Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Granting permissions with shizuku crashes on Android 14 #1234

Closed
4 tasks
b-risk opened this issue Jun 22, 2024 · 4 comments · Fixed by #1243
Closed
4 tasks

Granting permissions with shizuku crashes on Android 14 #1234

b-risk opened this issue Jun 22, 2024 · 4 comments · Fixed by #1243
Assignees
Labels
bug Something isn't working
Milestone

Comments

@b-risk
Copy link

b-risk commented Jun 22, 2024

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 b-risk added the bug Something isn't working label Jun 22, 2024
@sds100
Copy link
Collaborator

sds100 commented Jun 25, 2024

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.

@b-risk
Copy link
Author

b-risk commented Jun 28, 2024

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.

@sds100
Copy link
Collaborator

sds100 commented Jul 1, 2024

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 sds100 added this to Key Mapper Jul 1, 2024
@sds100 sds100 added this to the Version 2.6 milestone Jul 1, 2024
@sds100 sds100 changed the title Crash w/ Shizuku Granting permissions with shizuku crashes on Android 14 Jul 1, 2024
sds100 added a commit that referenced this issue Jul 1, 2024
@sds100 sds100 moved this to In progress in Key Mapper Jul 1, 2024
@b-risk
Copy link
Author

b-risk commented Jul 1, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants