MuntashirAkon / AppManager

A full-featured package manager and viewer for Android
https://muntashirakon.github.io/AppManager/
Other
4.29k stars 252 forks source link

java.lang.IllegalStateException: External directory unavailable. #1333

Closed brian6932 closed 1 month ago

brian6932 commented 1 month ago

Please check before submitting an issue

Describe the bug

I updated my phone from Android 13 to 14, and now opening App Manager instantly crashes with the following stack. Seems like the latest actions build doesn't exhibit this the same way, instead after a few launches, it freezes on initialization, and then eventually says that it can't establish root method.

To Reproduce

  1. Grant the app root in KSU
  2. Open app
  3. Crashes

Expected behavior

Should open

Screenshots

No response

Logs

java.lang.IllegalStateException: External directory unavailable.
    at io.github.muntashirakon.AppManager.ipc.RootServiceManager.startRootProcess(RootServiceManager.java:161)
    at io.github.muntashirakon.AppManager.ipc.RootServiceManager.createBindTask(RootServiceManager.java:285)
    at io.github.muntashirakon.AppManager.ipc.RootService.bindOrTask(RootService.java:146)
    at io.github.muntashirakon.AppManager.ipc.RootService.bind(RootService.java:110)
    at io.github.muntashirakon.AppManager.ipc.RootService.bind(RootService.java:125)
    at io.github.muntashirakon.AppManager.ipc.ServiceConnectionWrapper.lambda$startDaemon$0$io-github-muntashirakon-AppManager-ipc-ServiceConnectionWrapper(ServiceConnectionWrapper.java:117)
    at io.github.muntashirakon.AppManager.ipc.ServiceConnectionWrapper$$ExternalSyntheticLambda0.run(Unknown Source:4)
    at android.os.Handler.handleCallback(Handler.java:958)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8248)
    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:971)
 Caused by: java.io.FileNotFoundException: No available shared storage found.
   at io.github.muntashirakon.AppManager.utils.FileUtils.getExternalCachePath(FileUtils.java:210)
   at io.github.muntashirakon.AppManager.ipc.RootServiceManager.startRootProcess(RootServiceManager.java:159)
   at io.github.muntashirakon.AppManager.ipc.RootServiceManager.createBindTask(RootServiceManager.java:285)
   at io.github.muntashirakon.AppManager.ipc.RootService.bindOrTask(RootService.java:146)
   at io.github.muntashirakon.AppManager.ipc.RootService.bind(RootService.java:110)
   at io.github.muntashirakon.AppManager.ipc.RootService.bind(RootService.java:125)
   at io.github.muntashirakon.AppManager.ipc.ServiceConnectionWrapper.lambda$startDaemon$0$io-github-muntashirakon-AppManager-ipc-ServiceConnectionWrapper(ServiceConnectionWrapper.java:117)
   at io.github.muntashirakon.AppManager.ipc.ServiceConnectionWrapper$$ExternalSyntheticLambda0.run(Unknown Source:4)
   at android.os.Handler.handleCallback(Handler.java:958)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loopOnce(Looper.java:205)
   at android.os.Looper.loop(Looper.java:294)
   at android.app.ActivityThread.main(ActivityThread.java:8248)
   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:971)

Device Info:
App version: 3.1.5
App version code: 428
Android build version: 278
Android release version: 14
Android SDK version: 34
Android build ID: UQ1A.240205.004.B1 release-keys
Device brand: asus
Device manufacturer: asus
Device name: AI2202
Device model: ASUS_AI2202
Device product name: WW_AI2202
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: auto
Inferred Mode: root

Device info

Additional context

Only happens with Root enabled, likely the same cause as #948, although I didn't have such an issue on Android 13.

brian6932 commented 1 month ago

This was actually due to a Kernel incompatibility with my ROM 😅

MuntashirAkon commented 1 month ago

Hi, can you explain exactly where it went wrong? Please explain it here: #948. Thanks.

brian6932 commented 1 month ago

It shouldn't actually be related to that.

MuntashirAkon commented 1 month ago

It shouldn't actually be related to that.

The issue tracker tracks every issue that produces the crash. So, it should very much be identical to the issue even though it may be reproduced differently in your case.

MuntashirAkon commented 1 month ago

Duplicate of #948