CLI on DalvikVM fails on JNI lib

Good question! I had to dig a bit to figure this out. There are a slew of JNI methods in libandroid_runtime.so that don’t get bound by default, when you’re using the dalvikvm command. Unfortunately, you can’t just do a System.loadLibrary(“android_runtime”), because this doesn’t actually bind all the native methods. However, after some digging, it turns … Read more

Understanding Android: Zygote and DalvikVM

Q. how does zygote exactly fork Dalvik VM? Short Answer: The Zygote process cold boots a Java VM on system start up. It then listens to a socket for incoming commands. Other processes (e.g. ActivityManagerService) write commands to this socket whenever a new process is needed for an application. These commands are read by the … Read more