mirror of
https://github.com/meowstercatel/r1-apk-patcher.git
synced 2024-12-22 23:25:20 -06:00
bump to new auth and device-healthls
This commit is contained in:
parent
cd1fa117b7
commit
1bb6eb0bbc
4 changed files with 40 additions and 29 deletions
BIN
asusna_libbase.so
Normal file
BIN
asusna_libbase.so
Normal file
Binary file not shown.
41
functions.js
41
functions.js
|
@ -9,7 +9,7 @@ const getOSVersion = {
|
||||||
`.method private final getOSVersion()Ljava/lang/String;`,
|
`.method private final getOSVersion()Ljava/lang/String;`,
|
||||||
`.locals 0`,
|
`.locals 0`,
|
||||||
`.line 49`,
|
`.line 49`,
|
||||||
`const-string p0, "rabbit_OS_v0.8.86_20240523151103"`,
|
`const-string p0, "rabbit_OS_v0.8.103_20240620101341"`,
|
||||||
`return-object p0`,
|
`return-object p0`,
|
||||||
`.end method`,
|
`.end method`,
|
||||||
]};
|
]};
|
||||||
|
@ -92,7 +92,44 @@ const gotoConnectNetwork = {
|
||||||
".end method",
|
".end method",
|
||||||
]};
|
]};
|
||||||
|
|
||||||
|
const wssClientMethods = {
|
||||||
|
location: "smali/classes/tech/rabbit/r1launcher/wss/WssClient.smali",
|
||||||
|
code: [
|
||||||
|
".method public native getKey()Ljava/lang/String;",
|
||||||
|
".end method",
|
||||||
|
".method public native getHealth()Ljava/lang/String;",
|
||||||
|
".end method",
|
||||||
|
".method public getWebSocket()Lokhttp3/WebSocket;",
|
||||||
|
".locals 0",
|
||||||
|
"iget-object p0, p0, Ltech/rabbit/r1launcher/wss/WssClient;->webSocket:Lokhttp3/WebSocket;",
|
||||||
|
"return-object p0"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
const wssClientConnection = {
|
||||||
|
location: "smali/classes/tech/rabbit/r1launcher/wss/WssClient.smali",
|
||||||
|
code: [
|
||||||
|
`const-string v1, "App-Version"`,
|
||||||
|
`invoke-virtual {v0, v1, p3}, Lokhttp3/Request$Builder;->addHeader(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;`,
|
||||||
|
`move-result-object p3`,
|
||||||
|
`const-string v1, "Device-Health"`,
|
||||||
|
`invoke-virtual {p0}, Ltech/rabbit/r1launcher/wss/WssClient;->getHealth()Ljava/lang/String;`,
|
||||||
|
`move-result-object p4`,
|
||||||
|
`invoke-virtual {p3, v1, p4}, Lokhttp3/Request$Builder;->addHeader(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;`,
|
||||||
|
`new-instance v0, Ljava/lang/StringBuilder;`,
|
||||||
|
`const-string v0, "OS-Version"`,
|
||||||
|
`const-string p4, "rabbit_OS_v0.8.103_20240620101341_MxA1cbwGjoZgqG54ggsYtg8t2RHX1DJ+LHzKtWLfwSSOim69dlKwt1FLnnWFtYeZ5cuSp2NNb+XhzOzIu0SJr1BnrbgpgGd+pXa5"`,
|
||||||
|
`invoke-virtual {p3, v0, p4}, Lokhttp3/Request$Builder;->addHeader(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;`,
|
||||||
|
`move-result-object p3`,
|
||||||
|
`invoke-virtual {p3, p1}, Lokhttp3/Request$Builder;->url(Ljava/lang/String;)Lokhttp3/Request$Builder;`,
|
||||||
|
`move-result-object p1`,
|
||||||
|
`invoke-virtual {p1}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request;`
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
const functions = {
|
const functions = {
|
||||||
functions: [getOSVersion, getImei, getDeviceId, onKeyUp, onKeyDown, gotoConnectNetwork]
|
functions: [getOSVersion, getImei, getDeviceId, onKeyUp, onKeyDown, gotoConnectNetwork,
|
||||||
|
wssClientMethods, wssClientConnection
|
||||||
|
]
|
||||||
}
|
}
|
||||||
module.exports = {functions}
|
module.exports = {functions}
|
28
index.js
28
index.js
|
@ -8,36 +8,10 @@ const decompName = settings.apkFileName;
|
||||||
const base = `${decompName}_decompile_xml`;
|
const base = `${decompName}_decompile_xml`;
|
||||||
|
|
||||||
decomp();
|
decomp();
|
||||||
|
|
||||||
functions.functions.forEach(func => {
|
functions.functions.forEach(func => {
|
||||||
modifyFunc(`./${base}/`+func.location, func.code)
|
modifyFunc(`./${base}/`+func.location, func.code)
|
||||||
})
|
})
|
||||||
|
|
||||||
// modifyFunc(
|
|
||||||
// `./${base}/smali/classes/tech/rabbit/r1launcher/RLApp.smali`,
|
|
||||||
// getOSVersion
|
|
||||||
// );
|
|
||||||
|
|
||||||
// modifyFunc(
|
|
||||||
// `./${base}/smali/classes/tech/rabbit/r1launcher/settings/utils/SystemControllerUtil.smali`,
|
|
||||||
// getImei
|
|
||||||
// );
|
|
||||||
|
|
||||||
// modifyFunc(`./${base}/smali/classes/AppConfig.smali`, getDeviceId);
|
|
||||||
|
|
||||||
// modifyFunc(
|
|
||||||
// `./${base}/smali/classes/tech/rabbit/r1launcher/rabbit/KeyEventHandler.smali`,
|
|
||||||
// onKeyUp
|
|
||||||
// );
|
|
||||||
// modifyFunc(
|
|
||||||
// `./${base}/smali/classes/tech/rabbit/r1launcher/rabbit/KeyEventHandler.smali`,
|
|
||||||
// onKeyDown
|
|
||||||
// );
|
|
||||||
|
|
||||||
// modifyFunc(
|
|
||||||
// `./${base}/smali/classes/tech/rabbit/r1launcher/initstep/InitStepActivity.smali`,
|
|
||||||
// gotoConnectNetwork
|
|
||||||
// );
|
|
||||||
|
|
||||||
replaceLib("./libbase.so", "libbase.so");
|
replaceLib("./libbase.so", "libbase.so");
|
||||||
|
|
||||||
|
@ -51,5 +25,5 @@ fs.renameSync(
|
||||||
`${decompName}_Patched.apk`
|
`${decompName}_Patched.apk`
|
||||||
);
|
);
|
||||||
|
|
||||||
fs.rmdirSync(`./${base}`, { recursive: true, force: true });
|
fs.rmSync(`./${base}`, { recursive: true, force: true });
|
||||||
fs.rmSync(`${base}_out.apk`);
|
fs.rmSync(`${base}_out.apk`);
|
BIN
libbase.so
BIN
libbase.so
Binary file not shown.
Loading…
Reference in a new issue