From 1e31f5a7a3427642bce6d9bea7615c4289aed89f Mon Sep 17 00:00:00 2001 From: Meowster Date: Mon, 1 Jul 2024 21:16:02 +0200 Subject: [PATCH] r1 support literally 2 lines but 10h of figuring that out --- functions.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions.js b/functions.js index 6a37069..f1e704f 100644 --- a/functions.js +++ b/functions.js @@ -44,6 +44,8 @@ const onKeyUp = { "const/4 p0, -0x1", "sput p0, Ltech/rabbit/r1launcher/rabbit/KeyEventHandler;->lastKey:I", "sput p1, Ltech/rabbit/r1launcher/rabbit/KeyEventHandler;->lastUpKey:I", + "const/16 p0, 0x50", + "if-eq p1, p0, :setter", "const/16 p0, 0x18", "if-eq p1, p0, :setter", "const/16 p0, 0x19", @@ -65,6 +67,8 @@ const onKeyDown = { code: [ ".method public final onKeyDown(ILandroid/view/KeyEvent;)Z", ".locals 3", + "const/16 p0, 0x50", + "if-eq p1, p0, :setter", "const/16 p0, 0x18", "if-eq p1, p0, :setter", "const/16 p0, 0x19", @@ -76,7 +80,7 @@ const onKeyDown = { "packed-switch p1, :pswitch_data_0", "goto :goto_0", ":setter", - "const/16 p1, 0x1A", + "const/16 p1, 0x1a", ":cond_0", ":pswitch_0", ]}; @@ -110,6 +114,7 @@ const wssClientConnection = { location: "smali/classes/tech/rabbit/r1launcher/wss/WssClient.smali", code: [ `const-string v1, "App-Version"`, + `const-string p3, "20240615.10-dirty"`, `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"`, @@ -132,4 +137,4 @@ const functions = { wssClientMethods, wssClientConnection ] } -module.exports = {functions} \ No newline at end of file +module.exports = {functions}