|
@@ -5,11 +5,14 @@ const TARGET_PACKAGE = "com.rbigkic.yyydsj";
|
|
|
const targetModuleName = "libcocos2djs.so";
|
|
|
let TAGET_DATA_FILES = `/data/data/${TARGET_PACKAGE}/files`;
|
|
|
|
|
|
-const PROJECT_PATH = `${TAGET_DATA_FILES}/project.js`;
|
|
|
-const RE_PROJECT_PATH = `${TAGET_DATA_FILES}/index.jsc`;
|
|
|
+// const RE_PROJECT_PATH = `${TAGET_DATA_FILES}/index.jsc`;
|
|
|
+const RE_PROJECT_PATH = `/data/local/tmp/index.jsc`;
|
|
|
+// 命令
|
|
|
+// adb push D:\Project_Repostory\HookCli\yyyy_js\assets\main\index.jsc /data/local/tmp/index.jsc
|
|
|
|
|
|
export let HookYDSJ = {
|
|
|
start: function () {
|
|
|
+
|
|
|
Java.perform(function () {
|
|
|
Interceptor.attach(Module.findExportByName(null, "android_dlopen_ext"), {
|
|
|
onEnter: function (args) {
|
|
@@ -30,16 +33,6 @@ export let HookYDSJ = {
|
|
|
logColor("HookLDGP start", LogColor.RED_BG);
|
|
|
let addressBase = Module.findBaseAddress(targetModuleName);
|
|
|
|
|
|
- function saveString(scriptString) {
|
|
|
-
|
|
|
- logColor("=======开始写入========", LogColor.GREEN_TEXT);
|
|
|
- var file = new File(PROJECT_PATH, "wb");
|
|
|
- file.write(scriptString);
|
|
|
- file.flush();
|
|
|
- file.close();
|
|
|
- logColor("=======写入完成========", LogColor.GREEN_TEXT);
|
|
|
- }
|
|
|
-
|
|
|
function createDir(saveFilePath) {
|
|
|
let path = require('path'); // 引入path模块,假设Frida环境支持或者有类似的路径处理方法
|
|
|
|