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

AppManager crashes when wireless debugging mode when selecting apps #884

Closed
3 tasks done
ghost opened this issue Sep 30, 2022 · 3 comments
Closed
3 tasks done

AppManager crashes when wireless debugging mode when selecting apps #884

ghost opened this issue Sep 30, 2022 · 3 comments
Labels
Bug Something isn't working Documentation Improvements or additions to documentation Priority: 3 Severity: 2

Comments

@ghost
Copy link

ghost commented Sep 30, 2022

Please check before submitting an issue

  • I know what my device, OS and App Manager versions are
  • I know how to take logs
  • I know how to reproduce the issue which may not be specific to my device

Describe the bug

Installed AppManager from F-Droid, I was trying to disable or uninstall apps using this tool through wireless debugging but it crashes when I tap specific app to perform operations. However if normal mode was used then I was able to see app's details without crashes.

To Reproduce

    1. Open AppManager
    1. Change the mode of operation to "Wireless debugging" in settings
    1. Select any app after connection
    1. Possible crash may happen

Expected behavior

It shouldn't crash and should get into app details

Screenshots

Some video recording:

Record_2022-09-30-20-51-58.mp4

Logs

Additional logs reported by the app:

Logs: java.lang.RuntimeException: Unable to start activity ComponentInfo{io.github.muntashirakon.AppManager/io.github.muntashirakon.AppManager.details.AppDetailsActivity}: java.lang.RuntimeException: Cannot create an instance of class io.github.muntashirakon.AppManager.details.AppDetailsViewModel at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3720) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3887) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2317) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:263) at android.app.ActivityThread.main(ActivityThread.java:8292) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006) Caused by: java.lang.RuntimeException: Cannot create an instance of class io.github.muntashirakon.AppManager.details.AppDetailsViewModel at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:320) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:304) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:278) at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.kt:128) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153) at io.github.muntashirakon.AppManager.details.AppDetailsActivity.onAuthenticated(AppDetailsActivity.java:93) at io.github.muntashirakon.AppManager.BaseActivity.onCreate(BaseActivity.java:65) at android.app.Activity.performCreate(Activity.java:8146) at android.app.Activity.performCreate(Activity.java:8130) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3689) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3887) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2317) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:263) at android.app.ActivityThread.main(ActivityThread.java:8292) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:312) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:304) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:278) at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.kt:128) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153) at io.github.muntashirakon.AppManager.details.AppDetailsActivity.onAuthenticated(AppDetailsActivity.java:93) at io.github.muntashirakon.AppManager.BaseActivity.onCreate(BaseActivity.java:65) at android.app.Activity.performCreate(Activity.java:8146) at android.app.Activity.performCreate(Activity.java:8130) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3689) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3887) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2317) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:263) at android.app.ActivityThread.main(ActivityThread.java:8292) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006) Caused by: java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS. at android.os.Parcel.createExceptionOrNull(Parcel.java:2389) at android.os.Parcel.createException(Parcel.java:2373) at android.os.Parcel.readException(Parcel.java:2356) at android.os.Parcel.readException(Parcel.java:2298) at android.permission.IPermissionManager$Stub$Proxy.grantRuntimePermission(IPermissionManager.java:1351) at io.github.muntashirakon.AppManager.compat.PermissionCompat.grantPermission(PermissionCompat.java:314) at io.github.muntashirakon.AppManager.appops.AppOpsService.(AppOpsService.java:36) at io.github.muntashirakon.AppManager.details.AppDetailsViewModel.(AppDetailsViewModel.java:660) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:312) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:304) at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.kt:278) at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.kt:128) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153) at io.github.muntashirakon.AppManager.details.AppDetailsActivity.onAuthenticated(AppDetailsActivity.java:93) at io.github.muntashirakon.AppManager.BaseActivity.onCreate(BaseActivity.java:65) at android.app.Activity.performCreate(Activity.java:8146) at android.app.Activity.performCreate(Activity.java:8130) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3689) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3887) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2317) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:263) at android.app.ActivityThread.main(ActivityThread.java:8292) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006) Caused by: android.os.RemoteException: Remote stack trace: at android.app.ContextImpl.enforce(ContextImpl.java:2073) at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2101) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1468) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1449) at android.permission.IPermissionManager$Stub.onTransact(IPermissionManager.java:648)

Device Info:
App version: 3.0.2
App version code: 413
Android build version: 1656498236709
Android release version: 11
Android SDK version: 30
Android build ID: CPH1933_11_F.15
Device brand: OPPO
Device manufacturer: OPPO
Device name: OP4B79L1
Device model: CPH1933
Device product name: CPH1933
Device hardware name: qcom
ABIs: [arm64-v8a, armeabi-v7a, armeabi]
ABIs (32bit): [armeabi-v7a, armeabi]
ABIs (64bit): [arm64-v8a]
System language: en-US
In-App Language: auto
Mode: adb_wifi
Inferred Mode: ADB

Device info

  • Device: Oppo A5 2020
  • OS Version: 11
  • App Manager Version: 3.0.2 (413)
  • Mode: ADB

Additional context

No response

@ghost ghost added the Bug Something isn't working label Sep 30, 2022
@MuntashirAkon
Copy link
Owner

MuntashirAkon commented Sep 30, 2022

java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.

It appears that you have to disable permission monitoring similar to Realme.

@MuntashirAkon MuntashirAkon added Documentation Improvements or additions to documentation Severity: 2 Priority: 3 labels Sep 30, 2022
@ghost
Copy link
Author

ghost commented Oct 1, 2022

It works after disabling permission monitoring, but maybe add some warning system instead of crashing because of it?

@MuntashirAkon
Copy link
Owner

Should be fixed in aba5b57. Not verified because I cannot reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Documentation Improvements or additions to documentation Priority: 3 Severity: 2
Projects
None yet
Development

No branches or pull requests

1 participant