-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PackageManagerAPI #684
base: master
Are you sure you want to change the base?
PackageManagerAPI #684
Conversation
Hi, nice feature, thanks for the PR! Could you please squash the commits so that just one or a handful remains? |
Thanks for the pull, this is something greatly needed for sure, but The https://github.com/termux/termux-am-socket https://github.com/termux/termux-packages/blob/master/packages/termux-am-socket/build.sh https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/cmds/am/am.sh A similar implementation needs to provided for https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/cmds/pm/pm.sh |
Hello, sorry for my late reply. This PackageManagerAPI will just add a small pm command alternative which is parsable because it's JSON, this might be useful for making some sort of "launchers" inside the Termux app, and it's more user-friendly (I guess). maybe I'll work on the TermuxPmSocketServer if I have much knowledge in Android APIs and free time. Thanks for your replies:) |
No apologies necessary for late replies. The Generally before implementing new features, it's best to open an issue first and ask the devs how they want it implemented, so you don't waste time going in a different direction. |
This adds the PackageGet, PackageList, PackageInstall, and PackageUninstall functions using the PackageManager API on Android
PackageGet - get the information from external storage
PackageList - list all system and user installed applications and filter them
PackageInstall - install an application from external storage (I know it can be done by termux-open, but having a dedicated APK installer seems good, I guess)
PackageUninstall - uninstall an application, doesn't work on system apps
I haven't tested it on Android 10 below and 12 up, I just tested it on my Android 11 phone which works fine
I will also add some optimizations if I can because PackageList takes so long to filter out package names
idk if this gets merged or not, but I'll try :)