How to store and run Android programs

Android stores it in APK format, which is a modified version of ZIP / JAR.

When these APK files are installed, they are stored in / system / app / $ APKNAME.apk.

Some of the applications in this directory also have the $ APKNAME.obex file.

These APK files contain some of the inbox

META-INF MANIFEST.MF CERT.RSA CERT.SF SHA1-Digest res AndroidManifest.xml classes.dex resources.arsc 

So I want to know which .obex files and android program are unpacked from APK / ZIP / JAR at runtime and how?

+7
source share
1 answer

The way this works is quite interesting, and provides some key information about the Android runtime model. The first thing I would recommend looking at is Dalvik VM internals if you plan on doing any serious things with Android. (Although, obviously, the old one.) Now that the Android package manager receives an intent that requires the launch of a new application, it discards the new virtual machine from the already running zygote process. This is basically a method that allows the system to get many nice memory properties (sharing of displayed pages, etc.). The system then downloads the (potentially pre-optimized and verified) file for download, so vm can start to execute it. You should read this document, which will tell you a little about how it works. (Perhaps this thread will also help.) Keep in mind that since all systems are different β€” for example, if you use the new architecture, you won’t get JIT support if you don’t explicitly write it! - You may not know exactly how Dalvik downloads the code to launch your application.

+2
source

All Articles