Feature description
Improve utility uninstall output & argument validation. Current exit code & stdout messages always imply the operation was successful (and that anything was done at all).
- Example one: phone not connected to PC:
$ java -jar revanced-cli-5.0.1-all.jar utility uninstall --package-name com.no.such.pkg --unmount
SEVERE: app.revanced.library.installation.installer.DeviceNotFoundException: No ADB device found
INFO: Uninstalled the patched APK file
- Example two: adb link exists, but unmounting a nonexisting package:
$ java -jar revanced-cli-5.0.1-all.jar utility uninstall --package-name com.no.such.pkg --unmount
WARNING: No device serial supplied. Using device with serial b7a7a89a
INFO: Uninstalling com.no.such.pkg by unmounting
INFO: Uninstalled the patched APK file
Same happens with existing packages that were not mounted to begin with.
Also it's not limited to --unmount option - uninstall operation without it always appear to succeed the same.
It would be useful if there were validation done whether the package:
- we're operating on is installed;
- is even mounted - if not,
--unmount operation should error out;
Basically, process should exit with 0 only if the requested operation was actually performed & successful.
Motivation
Appropriate exit code & stdout/stderr messages make it easier too detect user error. Easy to make typos with longer package names, and if exit code & messaging is always successful, it's hard to tell whether intended action was completed.
Arguably it's also a bug if it always prints INFO: Uninstalled the patched APK file, even if package isn't installed.
Acknowledgements
Feature description
Improve
utility uninstalloutput & argument validation. Current exit code & stdout messages always imply the operation was successful (and that anything was done at all).Same happens with existing packages that were not mounted to begin with.
Also it's not limited to
--unmountoption - uninstall operation without it always appear to succeed the same.It would be useful if there were validation done whether the package:
--unmountoperation should error out;Basically, process should exit with
0only if the requested operation was actually performed & successful.Motivation
Appropriate exit code & stdout/stderr messages make it easier too detect user error. Easy to make typos with longer package names, and if exit code & messaging is always successful, it's hard to tell whether intended action was completed.
Arguably it's also a bug if it always prints
INFO: Uninstalled the patched APK file, even if package isn't installed.Acknowledgements