comeback commit!
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <android/log.h>
|
||||
#include <jni.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include "main.h"
|
||||
#include "util/util.h"
|
||||
|
||||
#include "util/armhook.h"
|
||||
|
||||
uintptr_t libapp = 0;
|
||||
|
||||
int (*print_internal_log)(int a1, const char *a2, ...);
|
||||
|
||||
void pending_thread(){
|
||||
|
||||
Log("Hello from thread!");
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10000));
|
||||
|
||||
|
||||
int unk = APP_ADDR(0x00E4B8EC);
|
||||
print_internal_log(unk, "Hello!");
|
||||
|
||||
unProtect(APP_ADDR(0x00E4A738));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
jint JNI_OnLoad(JavaVM *vm, void *reserved){
|
||||
|
||||
libapp = FindLibrary("libapp.so");
|
||||
Log("Hello! my base addr is 0x%08x", libapp);
|
||||
|
||||
//InitHookStuff();
|
||||
|
||||
//unProtect(APP_ADDR(0x00A522C4));
|
||||
//*(int *)APP_ADDR(0x00A522C4) = 0xE320F000;
|
||||
|
||||
//WriteMemory(APP_ADDR(0x00E4BA94), (uintptr_t)"my_tag", 6);
|
||||
raise(SIGSTOP);
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Log("Hello! my base addr is 0x%08x", libapp);
|
||||
Log("Address i wanna to get 0x%08x", APP_ADDR(0xC8C9D8));
|
||||
|
||||
const char* str = (char *)APP_ADDR(0xC8C9D8);
|
||||
|
||||
Log("i found it! %s", str);
|
||||
|
||||
unProtect(APP_ADDR(0xC8C9D8));
|
||||
|
||||
WriteMemory(APP_ADDR(0xC8C9D8), (uintptr_t)"APPLICATION_NO", 14);
|
||||
|
||||
str = (char *)APP_ADDR(0xC8C9D8);
|
||||
|
||||
Log("i change it! %s", str);
|
||||
|
||||
//makeNOP(APP_ADDR(0x00652EB4), 2);
|
||||
//makeNOP(APP_ADDR(0x00652E3C), 2);
|
||||
|
||||
unProtect(APP_ADDR(0x00652EB4));
|
||||
*(char *)APP_ADDR(0x00652EB4) = 0xE320F000;
|
||||
|
||||
unProtect(APP_ADDR(0x00652E3C));
|
||||
*(char *)APP_ADDR(0x00652E3C) = 0xE320F000;
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user