Skip to content

Commit

Permalink
[Fix] Fix Sui not working with R8 full mode.
Browse files Browse the repository at this point in the history
libsu has:

-keep,allowobfuscation class * extends
com.topjohnwu.superuser.ipc.RootService { *; }

However since Shizuku-API doesn't use a particular base class and only
requires the class to be extending IBinder, there's no good proguard
rule that can be bundled within that library. So just mark our class
with @keep for simplicity.

Fixes: #1034
  • Loading branch information
zhanghai committed Oct 1, 2023
1 parent bb351bf commit f6fa2f8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.content.pm.PackageManager
import android.os.Build
import android.os.IBinder
import androidx.annotation.ChecksSdkIntAtLeast
import androidx.annotation.Keep
import androidx.annotation.RequiresApi
import kotlinx.coroutines.TimeoutCancellationException
import kotlinx.coroutines.runBlocking
Expand Down Expand Up @@ -145,6 +146,7 @@ object SuiFileServiceLauncher {
}
}

@Keep
@RequiresApi(Build.VERSION_CODES.M)
class SuiFileServiceInterface : RemoteFileServiceInterface() {
init {
Expand Down

0 comments on commit f6fa2f8

Please sign in to comment.