Skip to content

Commit 89679eb

Browse files
committed
fix: Add proguard rules for the Shizuku implementation
* Otherwise it won't work after shrinking/obfuscation.
1 parent edda91a commit 89679eb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/proguard-rules.pro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
23+
# --- Shizuku integration ---
24+
# Keep all Shizuku library classes used for binder communication
25+
-keep class moe.shizuku.** { *; }
26+
-keep class rikka.shizuku.** { *; }
27+
28+
# Keep Shizuku user service implementation and its members
29+
-keep class dev.lexip.hecate.util.shizuku.GrantService { *; }

app/src/main/java/dev/lexip/hecate/util/shizuku/GrantService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package dev.lexip.hecate.util.shizuku
33
import android.os.Binder
44
import android.os.Parcel
55
import android.util.Log
6+
import androidx.annotation.Keep
67
import java.io.BufferedReader
78
import java.io.InputStreamReader
89

10+
@Keep
911
class GrantService : Binder() {
1012

1113
companion object {

0 commit comments

Comments
 (0)