MuntashirAkon / AppManager

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

v2.5.17 Never loads list of apps (or takes over 8 minutes) #137

Closed Gitoffthelawn closed 3 years ago

Gitoffthelawn commented 4 years ago

Describe the bug Thank you for the wonderful app. In v2.5.17, on Android Nougat (not rooted), the list of apps never loads. This is true when trying to view all installed apps and when trying to view just the running apps. v2.5.13 worked very well.

To Reproduce Steps to reproduce the behaviour:

  1. Launch AppManager
  2. Press 'Refresh'
  3. Wait 8 minutes

Expected behaviour The list of apps to populate.

Actual behaviour The "in-progress" indicator on the top of the app keeps whirring, but the list of apps never populates.

Device info

Update After posting the above bug report, I was finally able to get v2.5.17 to load all the apps. Previously, I had waited 8 minutes for each of 3 tests, and then exited the app. This time, I waited even longer (10 minutes), and they finally loaded. Two key items to mention:

  1. The device has under 60 user apps installed. But, of course, because it's a Samsung, it has plenty of Samsung and Google bloatware that cannot be removed without root.
  2. v2.5.13 did not have this issue.
MuntashirAkon commented 4 years ago

This could be due to faulty root/ADB detection. I'll look into it. If you've updated the app from v2.5.13, try clearing data at first.

  1. The device has under 60 user apps installed. But, of course, because it's a Samsung, it has plenty of Samsung and Google bloatware that cannot be removed without root.

You can uninstall (but not remove) them using ADB if KNOX doesn't cause any problem.

Gitoffthelawn commented 4 years ago

@MuntashirAkon wrote:

This could be due to faulty root/ADB detection. I'll look into it. If you've updated the app from v2.5.13, try clearing data at first.

Thanks for looking into it. I tried clearing data, but unfortunately that didn't help. I also tried uninstalling and reinstalling, but no difference with that either.

You can uninstall (but not remove) them using ADB if KNOX doesn't cause any problem.

That's a real interesting idea, thank you. I've got too much going on to accidentally brick or be forced to factory reset. Any idea if KNOX will be a problem? Also, do you happen to have any links describing the process you mentioned? Thanks again.

MuntashirAkon commented 4 years ago

Any idea if KNOX will be a problem?

I don't think so. But AM may have trouble detecting ADB if you've recently updated your phone.

Also, do you happen to have any links describing the process you mentioned?

https://muntashirakon.github.io/AppManager/guide/adb-over-tcp.html

MuntashirAkon commented 3 years ago

I tried clearing data, but unfortunately that didn't help. I also tried uninstalling and reinstalling, but no difference with that either.

Unfortunately, I couldn't be able to reproduce it on a Samsung device running Android 10 (no-root).

Gitoffthelawn commented 3 years ago

Hmmm... I wonder why the issue did not occur for you. I'm thinking perhaps a difference between Android 7 and Android 10.

If anyone has Samsung devices with Android prior to 10, please do test and report back with results. Thanks!

RickyM7 commented 3 years ago

My phone is not Samsung but I tested it here and the list of apps basically loads instantly when I open the app. Phone: Xiaomi Redmi Note 4 (Miui 11 - Android 7.0 - No Root) All 243 packages loaded without problems.

MuntashirAkon commented 3 years ago

@Gitoffthelawn I was able to reproduce it! As I suspected, it was something to do with root/ADB detection.

MuntashirAkon commented 3 years ago

@Gitoffthelawn I've applied a fixed in e316b81. Can you check?

RickyM7 commented 3 years ago

@MuntashirAkon I don't know if it's related to this issue, but I tested the latest debug version and this bug occurred:

java.lang.IllegalStateException: Fragment AppInfoFragment{a06da00} (72e4138a-36c6-4fd5-8d51-d74bb6ddb958)} not attached to a context. at androidx.fragment.app.Fragment.requireContext(Fragment.java:885) at androidx.fragment.app.Fragment.getResources(Fragment.java:949) at androidx.fragment.app.Fragment.getString(Fragment.java:971) at io.github.muntashirakon.AppManager.details.AppInfoFragment.setPathsAndDirectories(AppInfoFragment.java:770) at io.github.muntashirakon.AppManager.details.AppInfoFragment.setVerticalView(AppInfoFragment.java:943) at io.github.muntashirakon.AppManager.details.AppInfoFragment.getPackageInfo(AppInfoFragment.java:1116) at io.github.muntashirakon.AppManager.details.AppInfoFragment.lambda$-e69aUgnVqgj3iKR3xkBTWsBjH8(AppInfoFragment.java) at io.github.muntashirakon.AppManager.details.-$$Lambda$AppInfoFragment$-e69aUgnVqgj3iKR3xkBTWsBjH8.run(lambda) at java.lang.Thread.run(Thread.java:760)

Device Info: App version: 2.5.19-DEBUG App version code: 372 Android build version: V11.0.2.0.NCFMIXM Android release version: 7.0 Android SDK version: 24 Android build ID: AL1512-mido-build-20191107001817 Device brand: xiaomi Device manufacturer: Xiaomi Device name: mido Device model: Redmi Note 4 Device product name: mido Device hardware name: qcom ABIs: [arm64-v8a, armeabi-v7a, armeabi] ABIs (32bit): [armeabi-v7a, armeabi] ABIs (64bit): [arm64-v8a] System language: pt-BR In-App Language: auto

MuntashirAkon commented 3 years ago

I don't know if it's related to this issue, but I tested the latest debug version and this bug occurred:

This is a known issue. See #135.

MuntashirAkon commented 3 years ago

Closed due to author's inactivity. This issue should be fixed since I am no longer able to reproduce it.

Gitoffthelawn commented 3 years ago

@MuntashirAkon Sorry for my absence. I will try the latest release when it is pushed to F-Droid, and will report back here if there is still an issue. Thank you for (hopefully) fixing the issue.

Gitoffthelawn commented 3 years ago

App Manager v2.6.0 was finally released on F-Droid (yea!), and so, as promised, I tested it and am now reporting back.

After installing it successfully without issue, I launched it. The app took 3-4 minutes before it allowed me to interact with its UI.

I then played around with it a little bit, and the app looks real good. You've made quite a bit of progress! :)

Summary: The 8 minute delay was reduced to ~3-4 minutes, but that is still a very long time to wait. If I wasn't prepared for the delay, I would have thought the app didn't work.

MuntashirAkon commented 3 years ago

After installing it successfully without issue, I launched it. The app took 3-4 minutes before it allowed me to interact with its UI.

First launch should take a long time as it catalogs all the installed apps. However, if you are stuck on the “Initializing” phase, it means something else. I suggest you upload some logs so that I can investigate.