MuntashirAkon / MuntashirAkon/AppManager

Poor Visibility into Hidden API Incompatibility Bugs

Open
#2,033 0 comments 1 reaction 0 assignees View on GitHub
Bug Status: Pending
Dominant language
Java
Stars
9k
Forks
518
PR merge metrics
No merged PRs in 30d

Description

### Please check before submitting an issue

- [x] I know what my device, OS and App Manager versions are
- [x] I know how to take logs
- [x] I know that generating a report, in whole part or in part, using AI/LLM is prohibited
- [x] I know how to reproduce the issue which may not be specific to my device

### Describe the bug

There are several areas that can be improved to ensure users can diagnose/recognize/debug future issues similar to #1948 in the future

### To Reproduce

1. Use the latest version of App Manager and see no apps on Android 17 due to #1948

3. Check Android Logs and see no hint of the issue
4. Download and build the debug version of the latest release from source. Still fail to see any log entries suggesting the cause.
5. Search the list of recent GitHub issues in this report and see no hint of others experiencing this issue.
6. Proceed to run the code with an attached debugger in Android Studio, and still not be aware of the slightest trace of a problem. (To find out anything was wrong, I had to literally step line by line through the code, only for the execution flow to just return without warning when a function call to PM was supposed to be made.)

### Expected behavior

1. Arguably, App Manager should have a max API version set, or at least a warning shown when being run with an unverified Android API version. Another option could be to perform a test of hidden API functions on startup if the API version has changed since the last run.
2. There should be some sort of crash or error raised, or descriptive log entry recorded when an attempt is made to invoke hidden API method and the module/class/method couldn't be found or raised an error. At the very least, the activity should become aware a worker task has failed and stop animating the progress indicator suggesting the job is ongoing.
3. Ideally, a pre-built debug version of the app should be released on GitHub.
4. Please reopen GitHub issues if the problem they were believed to have fixed turns out to still exist. Also, double check that the parent issue is open before closing new GitHub Issues for the latest version of the app as duplicates if the bug is unfixed.

6. This mostly overlaps with 2, but part of the reason I had such a hard time debugging the issue was because Android Studio seemed unwilling to let me attach/step into to the root process, and I assumed that's why the execution point jumped out of the frame it was in when it was about to call the package manager function.

It would be great if there could be instructions for starting or attaching to the root process from Android Studio. I'm imagining that's where the error would have been more apparent , and that the error wasn't passed onto the activity because the root worker crashed before it could transmit the outcome/exception.

### Screenshots

N/A (not sure that there are any particular screenshots that would be helpful here, but happy to provide anything I'm asked)

### Logs

N/A (can provide upon request, but there wasn't anything that ended up being relevant)

### Device info

- Device: Pixel 8 Pro
- OS Version: 17
- App Manager Version: Latest
- Mode: Kernel SU + Debug via ADB

### Additional context

Sorry if this seems overly critical. I definitely want to recognize that you put a ton of work into the app, and I only began to realize how much I rely on it when it stopped working.

I just think there was an unlucky syzygy of blind spots that occurred with this issue, and I think it makes sense to ensure they're avoided in the future because Hidden APIs are likely to change without notice.

Happy to discuss this further if you'd like.

Thanks again!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Android 17 failure described in #1948 and inspect Android logs around hidden API calls to the Package Manager. The issue names the root worker, activity, hidden API functions, and Android Studio debugging, but no files or tests; scope must first be narrowed among diagnostics, API-version handling, worker failure reporting, release builds, and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.