How is an APK prevented from making security changes during their installation process
What if the APK installation ran a few scripts? Overwrote files outside it's designated folder? Edited a few files? etc? What would prevent it from doing so?
Analeea last edited by
An APK does not have any control over its installation process. Installation is performed by the Android operating system. Details can be found in https://android.stackexchange.com/a/218572/218526 .
But once an app is installed, it can then run its code and try to make malicious changes.
What would prevent it from doing so?
At Linux kernel level:
- DAC (UID, GID, mode)
- MAC (SELinux labels)
Read more about https://source.android.com/security/app-sandbox .
At Android platform level:
- Manifest permissions
- AppOp permissions
Read more about permissions https://developer.android.com/guide/topics/permissions/overview , https://android.stackexchange.com/a/217522/218526 and https://mirfatif.github.io/PermissionManagerX/help/help#perms_types .