KeyMapper icon indicating copy to clipboard operation
KeyMapper copied to clipboard

Crash w/ Shizuku

Open b-risk opened this issue 1 year ago • 2 comments
trafficstars

Developer TODO (don't remove)

  • [ ] create new branch. put issue number at start of name if not a very quick fix.
  • [ ] write tests. put issue number in comment
  • [ ] update documentation
  • [ ] merge and delete branch (don't squash because want commit history to see why I made changes)

Describe the bug When granting Shizuku access the app immediately crashes, keeps crashing on launch until Shizuku is disabled. Other apps I've tried like SystemUI Tuner don't crash.

To Reproduce Follow app instructions to grant Shizuku access.

Expected behavior App shouldn't crash.

Smartphone (please complete the following information):

  • Device: Pixel 6a
  • Android version: Android 14 (GrapheneOS)

Additional context Tried reinstalling the app, disabling and re-enabling Shizuku, it always crashes when the permission is granted.

Crash Report

type: crash
osVersion: google/bluejay/bluejay:14/AP2A.240605.024/2024062000:user/release-keys
package: io.github.sds100.keymapper:63
process: io.github.sds100.keymapper
processUptime: 235 + 243 ms
installer: com.looker.droidify

java.lang.NoSuchMethodError: No interface method grantRuntimePermission(Ljava/lang/String;Ljava/lang/String;I)V in class Landroid/permission/IPermissionManager; or its super classes (declaration of 'android.permission.IPermissionManager' appears in /system/framework/framework.jar!classes3.dex)
	at io.github.sds100.keymapper.system.permissions.AndroidPermissionAdapter.grantPermissionWithShizuku(Unknown Source:23)
	at io.github.sds100.keymapper.system.permissions.AndroidPermissionAdapter.grant(Unknown Source:26)
	at io.github.sds100.keymapper.system.permissions.AutoGrantPermissionController$start$1.invokeSuspend(Unknown Source:30)
	at io.github.sds100.keymapper.system.permissions.AutoGrantPermissionController$start$1.invoke(SourceFile:2)
	at io.github.sds100.keymapper.system.permissions.AutoGrantPermissionController$start$1.invoke(SourceFile:1)
	at kotlinx.coroutines.flow.t$a$a.invokeSuspend(Unknown Source:63)
	at kotlinx.coroutines.flow.t$a$a.invoke(SourceFile:2)
	at kotlinx.coroutines.flow.t$a$a.invoke(SourceFile:1)
	at g3.l$a.invokeSuspend(SourceFile:1)
	at kotlin.coroutines.jvm.internal.a.resumeWith(Unknown Source:11)
	at d3.y0.run(SourceFile:1)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8623)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
	Suppressed: d3.w0: [r2{Cancelling}@3651d96, Dispatchers.Main]

b-risk avatar Jun 22 '24 21:06 b-risk

Hmm, I see you're using GrapheneOS and they mess with the permission system right? The error is saying it can't find the system function to grant a permission to an app.

sds100 avatar Jun 25 '24 11:06 sds100

Hmm, I see you're using GrapheneOS and they mess with the permission system right? The error is saying it can't find the system function to grant a permission to an app.

Alright then maybe it's not possible with my device unfortunately, they don't recommend Shizuku overall and I guess I'm just out of luck for some of the features I want without root.

b-risk avatar Jun 28 '24 23:06 b-risk

I just reproduced this on my Pixel 7, stock Android so its a new Android 14 thing :) Will also fix for 2.6.1

sds100 avatar Jul 01 '24 09:07 sds100

I just reproduced this on my Pixel 7, stock Android so its a new Android 14 thing :) Will also fix for 2.6.1

That's great! Guess I might not be out of luck then :)

b-risk avatar Jul 01 '24 14:07 b-risk