1
+ # GENERAL
2
+ -dontobfuscate
3
+ -keepattributes Signature
4
+ -keepattributes RuntimeVisibleAnnotations
5
+
6
+ # ANDROID INTERFACES / AIDL
7
+ -keep class com.github.capntrips.kernelflasher.FilesystemService
8
+ -keep class * implements android.os.IInterface
9
+ -keepclassmembers class * {
10
+ public static ** asInterface(android.os.IBinder);
11
+ }
12
+
13
+ # Prevent R8 from stripping native methods used via JNI
14
+ -keepclasseswithmembernames class * {
15
+ native <methods>;
16
+ }
17
+
18
+ # Keep RootShell library (libsu)
19
+ -keep class com.topjohnwu.superuser.** { *; }
20
+
21
+ # RETROFIT2
22
+ -keep interface com.github.capntrips.kernelflasher.GitHubApi { *; }
23
+ -keep class retrofit2.** { *; }
24
+ -dontwarn retrofit2.**
25
+
26
+ # ============ GSON ============
27
+ -keep class com.google.gson.** { *; }
28
+ -keep class com.github.capntrips.kernelflasher.AppUpdater$* { *; }
29
+
30
+ # Keep all fields/methods annotated with Gson's @SerializedName
31
+ -keepclassmembers class * {
32
+ @com.google.gson.annotations.SerializedName <fields>;
33
+ }
34
+
35
+ # ============ KOTLIN ============
36
+ -keep class kotlin.Metadata { *; }
37
+ -keepattributes RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations,RuntimeVisibleParameterAnnotations,RuntimeInvisibleParameterAnnotations,Exceptions,InnerClasses,EnclosingMethod,Signature,SourceFile,LineNumberTable,*Annotation*,Deprecated,SourceDir,CompilationID,LocalVariableTable,LocalVariableTypeTable,Module*
38
+ -keepclassmembers class **.AppUpdater$GitHubRelease {
39
+ <fields>;
40
+ }
41
+ -keepclassmembers class **.AppUpdater$GitHubAsset {
42
+ <fields>;
43
+ }
44
+
45
+ # ============ COROUTINES ============
46
+ -keepclassmembers class kotlinx.coroutines.BuildConfig { public static final boolean DEBUG; }
47
+ -keep class kotlinx.** { *; }
48
+ -dontwarn kotlinx.**
49
+
50
+ # ============ DOWNLOAD MANAGER & BROADCAST RECEIVER ============
51
+ -keep class com.github.capntrips.kernelflasher.AppUpdater { *; }
52
+ -keepclassmembers class com.github.capntrips.kernelflasher.AppUpdater { *; }
53
+
54
+ # Keep VectorDrawableCompat to avoid crashes or inflation errors
55
+ -keep class androidx.vectordrawable.graphics.drawable.VectorDrawableCompat { *; }
0 commit comments