2024-05-31 04:27:01 -05:00
|
|
|
const {generateIMEI} = require("./utils");
|
2024-05-31 09:24:56 -05:00
|
|
|
const settings = require("./settings.json");
|
2024-05-31 04:27:01 -05:00
|
|
|
|
2024-05-31 09:24:56 -05:00
|
|
|
const imei = settings.imei=="" ? generateIMEI() : settings.imei;
|
2024-05-31 04:27:01 -05:00
|
|
|
|
|
|
|
const getOSVersion = {
|
|
|
|
location: "smali/classes/tech/rabbit/r1launcher/RLApp.smali",
|
|
|
|
code: [
|
|
|
|
`.method private final getOSVersion()Ljava/lang/String;`,
|
|
|
|
`.locals 0`,
|
|
|
|
`.line 49`,
|
2024-06-24 11:26:34 -05:00
|
|
|
`const-string p0, "rabbit_OS_v0.8.103_20240620101341"`,
|
2024-05-31 04:27:01 -05:00
|
|
|
`return-object p0`,
|
|
|
|
`.end method`,
|
|
|
|
]};
|
|
|
|
|
|
|
|
const getImei = {
|
|
|
|
location: "smali/classes/tech/rabbit/r1launcher/settings/utils/SystemControllerUtil.smali",
|
|
|
|
code: [
|
|
|
|
`.method public final getImei(Landroid/content/Context;)Ljava/lang/String;`,
|
|
|
|
`.locals 0`,
|
|
|
|
`.line 49`,
|
|
|
|
`const-string p0, "${imei}"`,
|
|
|
|
`return-object p0`,
|
|
|
|
`.end method`,
|
|
|
|
]};
|
|
|
|
|
|
|
|
const getDeviceId = {
|
|
|
|
location: "smali/classes/AppConfig.smali",
|
|
|
|
code: [
|
|
|
|
`.method public final getDeviceId()Ljava/lang/String;`,
|
|
|
|
`.locals 0`,
|
|
|
|
`.line 34`,
|
|
|
|
`const-string p0, "${imei}"`,
|
|
|
|
`return-object p0`,
|
|
|
|
`.end method`,
|
|
|
|
]};
|
|
|
|
|
|
|
|
const onKeyUp = {
|
|
|
|
location: "smali/classes/tech/rabbit/r1launcher/rabbit/KeyEventHandler.smali",
|
|
|
|
code: [
|
|
|
|
".method public final onKeyUp(ILandroid/view/KeyEvent;)Z",
|
|
|
|
".locals 3",
|
|
|
|
"const/4 p0, -0x1",
|
|
|
|
"sput p0, Ltech/rabbit/r1launcher/rabbit/KeyEventHandler;->lastKey:I",
|
|
|
|
"sput p1, Ltech/rabbit/r1launcher/rabbit/KeyEventHandler;->lastUpKey:I",
|
2024-07-01 14:16:02 -05:00
|
|
|
"const/16 p0, 0x50",
|
|
|
|
"if-eq p1, p0, :setter",
|
2024-05-31 04:27:01 -05:00
|
|
|
"const/16 p0, 0x18",
|
|
|
|
"if-eq p1, p0, :setter",
|
|
|
|
"const/16 p0, 0x19",
|
|
|
|
"if-eq p1, p0, :setter",
|
|
|
|
"const/16 p0, 0x13",
|
|
|
|
"if-eq p1, p0, :cond_0",
|
|
|
|
"const/16 p0, 0x14",
|
|
|
|
"if-eq p1, p0, :cond_0",
|
|
|
|
"packed-switch p1, :pswitch_data_0",
|
|
|
|
"goto :goto_0",
|
|
|
|
":setter",
|
|
|
|
"const/16 p1, 0x1A",
|
|
|
|
":cond_0",
|
|
|
|
":pswitch_0",
|
|
|
|
]};
|
|
|
|
|
|
|
|
const onKeyDown = {
|
|
|
|
location: "smali/classes/tech/rabbit/r1launcher/rabbit/KeyEventHandler.smali",
|
|
|
|
code: [
|
|
|
|
".method public final onKeyDown(ILandroid/view/KeyEvent;)Z",
|
|
|
|
".locals 3",
|
2024-07-01 14:16:02 -05:00
|
|
|
"const/16 p0, 0x50",
|
|
|
|
"if-eq p1, p0, :setter",
|
2024-05-31 04:27:01 -05:00
|
|
|
"const/16 p0, 0x18",
|
|
|
|
"if-eq p1, p0, :setter",
|
|
|
|
"const/16 p0, 0x19",
|
|
|
|
"if-eq p1, p0, :setter",
|
|
|
|
"const/16 p0, 0x13",
|
|
|
|
"if-eq p1, p0, :cond_0",
|
|
|
|
"const/16 p0, 0x14",
|
|
|
|
"if-eq p1, p0, :cond_0",
|
|
|
|
"packed-switch p1, :pswitch_data_0",
|
|
|
|
"goto :goto_0",
|
|
|
|
":setter",
|
2024-07-01 14:16:02 -05:00
|
|
|
"const/16 p1, 0x1a",
|
2024-05-31 04:27:01 -05:00
|
|
|
":cond_0",
|
|
|
|
":pswitch_0",
|
2024-07-02 03:37:28 -05:00
|
|
|
"sget p0, Ltech/rabbit/r1launcher/rabbit/KeyEventHandler;->lastKey:I"
|
2024-05-31 04:27:01 -05:00
|
|
|
]};
|
|
|
|
|
|
|
|
const gotoConnectNetwork = {
|
|
|
|
location: "smali/classes/tech/rabbit/r1launcher/initstep/InitStepActivity.smali",
|
|
|
|
code: [
|
|
|
|
".method public final gotoConnectNetwork(Ltech/rabbit/r1launcher/initstep/process/ConnectNetworkFragment$ShowType;)V",
|
|
|
|
".locals 2",
|
|
|
|
`const-string v0, "rabbit explode"`,
|
|
|
|
"invoke-virtual {p0, v0}, Ltech/rabbit/r1launcher/initstep/InitStepActivity;->connectWifiSuccess(Ljava/lang/String;)V",
|
|
|
|
"return-void",
|
|
|
|
".end method",
|
|
|
|
]};
|
|
|
|
|
2024-06-24 11:26:34 -05:00
|
|
|
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"`,
|
2024-07-01 14:16:02 -05:00
|
|
|
`const-string p3, "20240615.10-dirty"`,
|
2024-06-24 11:26:34 -05:00
|
|
|
`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;`
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2024-05-31 04:27:01 -05:00
|
|
|
const functions = {
|
2024-06-24 11:26:34 -05:00
|
|
|
functions: [getOSVersion, getImei, getDeviceId, onKeyUp, onKeyDown, gotoConnectNetwork,
|
|
|
|
wssClientMethods, wssClientConnection
|
|
|
|
]
|
2024-05-31 04:27:01 -05:00
|
|
|
}
|
2024-07-01 14:16:02 -05:00
|
|
|
module.exports = {functions}
|