bug: Manager isn't properly checking if patched app is still installed
Bug description
When the Apps tab is loaded, there isn't adequate validation that the patched apps in the list are still installed. Only after the Manager is fully closed is the cache of installed patched apps fully regenerated.
Steps to reproduce
- Patch any app and install it.
- Once it is installed, return to the Apps screen in the Manager.
- Uninstall the patched app.
- Go to the Patches screen or Settings in the Manager.
- Return to the Apps screen.
Expected behavior: Patched app is no longer listed in the App screen.
Actual behavior: Some sort of malformed package name is shown.
https://github.com/user-attachments/assets/e886b9fd-dcce-4fb7-854c-72abaf808e91
Version of ReVanced Manager and version & name of app you are patching
1.26.0.-dev.7
Installation method
Regular
ReVanced Manager logs
revanced-manager_logcat_2025-10-03T13_38_55.000673.txt
Patch logs
Acknowledgements
- [x] I have checked all open and closed bug reports and this is not a duplicate.
- [x] I have chosen an appropriate title.
- [x] All requested information has been provided properly.
- [x] The bug is only related to ReVanced Manager.
How can it know? I don't think it should check everytime the app item is rendered, unless the app was uninstalled from within ReVanced Manager itself there's not really a way for it to know if it doesn't check installation status each render or listening to uninstall broadcasts (overkill?)
But a related issue if you uninstall an app and install the unpatched version from other sources like the Playstore, I don't think ReVanced Manager can know either so it'll stay in the list
Have we ever looked into resolving that in the previous version of ReVanced Manager?
How can it know? I don't think it should check everytime the app item is rendered, unless the app was uninstalled from within ReVanced Manager itself there's not really a way for it to know if it doesn't check installation status each render or listening to uninstall broadcasts (overkill?)
It is already checking something about the app each time the tab is rendered in order to get the app name. This is why the generic strange package name is shown when reentering the Apps tab after the app has been uninstalled.
But a related issue if you uninstall an app and install the unpatched version from other sources like the Playstore, I don't think ReVanced Manager can know either so it'll stay in the list
On startup, can the Manager check the hash/signature of installed apps it thinks are patched?
Store a set of all installed apps and their version. On app enter, compare it, if a difference is found update
Users don't need to directly use ReVanced Manager often. I can't think of a situation where a user would manually uninstall an app while Manager is running. Is there sufficient motivation for adding more detection? As far as I know, Android doesn't tell you when an app has been uninstalled.
If this causes a crash then that should obviously be fixed of course.
@oSumAtrIX or someone else should respond to my comment. Otherwise, it shouldn't be kept on the milestone.