Allow the pm CLI utility to install APKs from anywhere in your filesystem
Find a file
2024-03-25 09:52:48 -03:00
META-INF/com/google/android Initial commit 2024-03-25 02:29:40 -03:00
.editorconfig Initial commit 2024-03-25 02:29:40 -03:00
.gitattributes Initial commit 2024-03-25 02:29:40 -03:00
LICENSE Initial commit 2024-03-25 02:29:40 -03:00
module.prop Initial commit 2024-03-25 02:29:40 -03:00
README.md Add some references 2024-03-25 09:52:48 -03:00
sepolicy.rule Initial commit 2024-03-25 02:29:40 -03:00

"pm Install" from anywhere

Allow the pm CLI utility to install APKs from anywhere in your filesystem.

This is done by modifying the SELinux policy to allow system processes running under the user system_server to read APK files from fuse and sdcardfs filesystems.

Background

At some point between the release of Android 8 and 9, Google changed the way the pm install utility handles APK installation. Before that change, you could install APKs from anywhere in your filesystem, but now you are required to provide an APK from a "trusted location" like /data/local/tmp to be able to install it.

This is annoying because it makes you run additional commands or take extra actions (e.g., copy, move, change file permissions) to move or copy the APK to a trusted location before actually installing it.

References

Supported Android versions

This module was only tested on Android 14, but in theory, it should work on any Android version starting from Android Oreo.