Skip to content

Root/Shizuku: Fix SD Maid crashing on when activating Root or Shizuku#725

Merged
d4rken merged 1 commit into
mainfrom
service_binding_r8_minify_issue
Oct 14, 2023
Merged

Root/Shizuku: Fix SD Maid crashing on when activating Root or Shizuku#725
d4rken merged 1 commit into
mainfrom
service_binding_r8_minify_issue

Conversation

@d4rken
Copy link
Copy Markdown
Member

@d4rken d4rken commented Oct 14, 2023

As guessed, was an R8 issue.

Before the AGP update (i.e. on 8.0.2) the DESCRIPTOR field was implicitly kept. After moving to AGP 8.1.2 and fixing the reflection access (#705) works, but R8 will remove the field.

So this PR adds rules to keep the DESCRIPTOR field for Root and Shizuku.

Fixes #721
Fixes #722

As guessed, was an R8 issue.

Before the AGP update (i.e. on 8.0.2) the DESCRIPTOR field was implicitly kept.
After moving to AGP 8.1.2 and fixing the reflection access (#705) works, but R8 will remove the field.

So this PR adds rules to keep the `DESCRIPTOR` field for Root and Shizuku.

Fixes #721
Fixes #722
@d4rken d4rken added bug Something isn't working as expected Root ADB ADB/Shizuku related Build process Meta issues not related to the app but the project / gradle, i.e. building it. labels Oct 14, 2023
@d4rken
Copy link
Copy Markdown
Member Author

d4rken commented Oct 14, 2023

Without the rules, both Shizuku and Root:

result = {Field[9]@31981} 
 0 = {Field@31982} "public static final int android.os.IBinder.DUMP_TRANSACTION"
 1 = {Field@31983} "public static final int android.os.IBinder.FIRST_CALL_TRANSACTION"
 2 = {Field@31984} "public static final int android.os.IBinder.FLAG_ONEWAY"
 3 = {Field@31985} "public static final int android.os.IBinder.INTERFACE_TRANSACTION"
 4 = {Field@31986} "public static final int android.os.IBinder.ISSYSTEMSERVER_TRANSACTION"
 5 = {Field@31987} "public static final int android.os.IBinder.LAST_CALL_TRANSACTION"
 6 = {Field@31988} "public static final int android.os.IBinder.LIKE_TRANSACTION"
 7 = {Field@31989} "public static final int android.os.IBinder.PING_TRANSACTION"
 8 = {Field@31990} "public static final int android.os.IBinder.TWEET_TRANSACTION"

With the rules, Root:

 result = {Field[10]@32895} 
 0 = {Field@32896} "public static final int android.os.IBinder.DUMP_TRANSACTION"
 1 = {Field@32897} "public static final int android.os.IBinder.FIRST_CALL_TRANSACTION"
 2 = {Field@32898} "public static final int android.os.IBinder.FLAG_ONEWAY"
 3 = {Field@32899} "public static final int android.os.IBinder.INTERFACE_TRANSACTION"
 4 = {Field@32900} "public static final int android.os.IBinder.ISSYSTEMSERVER_TRANSACTION"
 5 = {Field@32901} "public static final int android.os.IBinder.LAST_CALL_TRANSACTION"
 6 = {Field@32902} "public static final int android.os.IBinder.LIKE_TRANSACTION"
 7 = {Field@32903} "public static final int android.os.IBinder.PING_TRANSACTION"
 8 = {Field@32904} "public static final int android.os.IBinder.TWEET_TRANSACTION"
 9 = {Field@32905} "public static final java.lang.String eu.darken.sdmse.common.root.service.RootServiceConnection.DESCRIPTOR"

With the rules, Shizuku:

 result = {Field[10]@33525} 
 0 = {Field@33526} "public static final int android.os.IBinder.DUMP_TRANSACTION"
 1 = {Field@33527} "public static final int android.os.IBinder.FIRST_CALL_TRANSACTION"
 2 = {Field@33528} "public static final int android.os.IBinder.FLAG_ONEWAY"
 3 = {Field@33529} "public static final int android.os.IBinder.INTERFACE_TRANSACTION"
 4 = {Field@33530} "public static final int android.os.IBinder.ISSYSTEMSERVER_TRANSACTION"
 5 = {Field@33531} "public static final int android.os.IBinder.LAST_CALL_TRANSACTION"
 6 = {Field@33532} "public static final int android.os.IBinder.LIKE_TRANSACTION"
 7 = {Field@33533} "public static final int android.os.IBinder.PING_TRANSACTION"
 8 = {Field@33534} "public static final int android.os.IBinder.TWEET_TRANSACTION"
 9 = {Field@33535} "public static final java.lang.String eu.darken.sdmse.common.shizuku.ShizukuServiceConnection.DESCRIPTOR"

@d4rken d4rken merged commit 3c05c1d into main Oct 14, 2023
@d4rken d4rken deleted the service_binding_r8_minify_issue branch October 14, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ADB ADB/Shizuku related bug Something isn't working as expected Build process Meta issues not related to the app but the project / gradle, i.e. building it. Root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on start with shizuku enabled App crash on launch with Shizuku/superuser permissions

1 participant