karasevm / PrivateDNSAndroid

Quick settings tile to switch active private DNS server
MIT License
420 stars 47 forks source link

The app crashes after allowing it the permission to have a full control of device. #15

Closed Facejif closed 4 months ago

Facejif commented 6 months ago

Basically, when I open the app for the first time, allow it the permission mentioned, and it crashes. Then every time I try to open, it crashes every time instantly. I'm using Android 14 and using sui magisk module instead of shizuku, but I've tried shizuku and that didn't work for me either

time: 1716070816559
msg: 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)
stacktrace: 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 ru.karasevm.privatednstoggle.MainActivity.m(Unknown Source:53)
    at ru.karasevm.privatednstoggle.MainActivity.onResume(Unknown Source:279)
    at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1669)
    at android.app.Activity.performResume(Activity.java:8915)
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5166)
    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5209)
    at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57)
    at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:60)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:254)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:228)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:91)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2544)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8501)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
karasevm commented 5 months ago

I've made some changes to the shizuku related code, can you please retest on the latest version? Worst case scenario the app should now fallback to non-shizuku behaviour.

Facejif commented 5 months ago

Thank you, with the latest update it works perfectly

InfiniteCoder06 commented 4 months ago

@karasevm @Facejif Please close the issue since this is done