I just want to know the full steps.
Does Android just copy the application package to another location?
when to run the application, the android unzip app package every times?
|
|
|||||||||
|
|
No, it does not unzip the package every time. The dalvik-cache is where is stores the cache of the the dex (The dalvik executables) files. I know system apps are cached when the device is first booted, if the cache does not exist. User apps, if I had to guess, would be done when installed or first launched. After it is cached, it will not have to update that cache until the application is updated, which is why I think it happens in the install process. But it is also possible to just read the Manifest from from the APK and see what version it is when it is launched. If the version is different then the version in the cache, it could re-cache it. edit The PackageManager "collects" the certs of the apk. then it unpacks the apk. The PackageParser stores any permissions that the APK has. So these steps are done when the device boots (if the apks changed since the last boot, or the dalvik-cache was cleared). But this same process would be completed when the APK is installed, since the PackageManager & PackageParser are the ones that handle the process. edit2 |
||||
|
