Saturday, December 05, 2015

Android OS - Zygote, Dalvik VM to Android_Runtime

below lot of concept - only heard but never understand well

Android OS - Processes and the first init process Zygote

This is first lesson on Android
But most of time it is running in the background
as 


and I look into

Dalvik is a discontinued[1] process virtual machine (VM) in Google's Android operating system in Android 4.4

 In the next major Android release, Android 5.0 "Lollipop", Dalvik was entirely replaced by ART.[8]

So I am ignorance as I every time still clear the Dalvik Cache





Lollipop did not totally abandon dalvik cache. All it did it is to write pre compiled files to dalvik folder when installing while back in KitKat the system did not compile apps during installation but compile them just before them run (JIT). If you somehow delete/cleared all/some cached dalvik files in lollipop, system will try to re-compile the corresponding app so that you don't have to compile before they run.

Whenever an app updates via google play system compiles it during installation. However, when apps are updated via system update (Odin, ZIP flashing, OTA,you name it) , system will recompile the new apps which is why the first boot of lollipop takes so much time ( It is compiling all upgraded app!!).

Because TiBackup does not compile apps when restoring them, when you try to run the restored app, lollipop will try to find the pre-compiled file under dalvik cache directory but the correct one is not there. Therefore the app will not run properly. This is why after TiBackup restore in lollipop, always clear dalvik cache and cache and reboot. The restored app will be compiled correctly after during rebooting~ The same applies to Zip/Odin flashing too.

No comments:

Post a Comment