1

In operating systems like windows there is a special folder like Program Files where the executables themselves are stored. But in android it's kind of amazing that the binaries themselves are hidden after their installation via an APK file, and the APK can be deleted safely. Moreover, the only way to uninstall an app is via the application manager! Can anyone give me insights to the reason behind this design ?

4
  • Upon installation the APK file is copied and partially extracted. That you don't see it anymore is not relevant. In any way on Windows you can't edit the program files folder unless you are admin - on Android this would be root and regular devices don't allow anybody to to something with root permissions. Hence there is a different way required to manage applications.
    – Robert
    Jan 28, 2020 at 18:38
  • there are no pre-compiled binaries stored for use, android compiles on the fly as needed. if you delete apk from app folder, app will uninstalled on boot android.stackexchange.com/q/75166
    – alecxs
    Jan 28, 2020 at 18:56
  • @alecxs But what if the apk was initially inside a removable SD card, and then the SD card got removed or replaced ? Jan 28, 2020 at 19:01
  • As others said, all apps don't have native binaries, some are only Dalvik code which is compiled during runtime or at installation time. It runs as a virtual machine. In either case original apk is copied to /data/app/, so it's no more needed. Related: Where Android apps store data? - Why are superuser permissions needed to acess /data partition? - Android apps for “armeabi-v7a” and “x86” architecture Jan 28, 2020 at 21:22

1 Answer 1

0

Just answering as the comments suggested,

 /data/app/package.name/base.apk

The APK File is placed inside the data partition.

This is different from Windows as you mentioned.

Windows uses a different protection for System Software called UAC (User Access Control) whereas Android uses a separated Partition on the HDD ( SSD ) called the System Partition.

All Stock Software is stored under

system/app/*app name*/app name.apk

&

system/priv-app/*app name*/app name.apk

or

system/app/appname.apk

&

system/priv-app/appname.apk

Additional Software from OEM's is usually stored under

system/vendor/app/

However since the new partitions in Android 7.0+ i believe that Vendor is now designated its own partition, making the app directory

vendor/app

Or similar.

Some Vendors put APK's into the system tp be automata installed also under "custom" partition or root folder

custom/app

Furthermore, applications can be built by binaries under

system/bin/

&

system/xbin/

If you're the Administrator of your PC, you can hypothetically destroy the systems integrity on Windows - however due to any changes being placed in /data partition on Android, you can not delete system software or destroy the system integrity without root access.

The data partition & cache partition hold every single modification made to the device - this means a "Factory Reset" just Erases the Data & Cache partitions on Android - VS windows reinstalling the entire system from a separate backup partition.

1
  • Thankyou very much!!! Feb 1, 2020 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .