I have been modifying Dalvik VM and I was wondering if there is a way that I can build only Dalvik VM from android source code.
If I can build Dalvik VM separately then how can I add the modified Dalvik VM to Android system?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Once you have done the initial build (I am assuming you have followed the steps described here: http://source.android.com/source/building.html), you can build just the Dalvik VM by doing
When the build is done, you will see some output near that looks something like
This is the newly built Dalvik VM (or more specifically, the library in which the Dalvik VM is implemented). The last part of the out path is where the installed file is expected, in this case
/system/lib/libdvm.so. To install your new VM, first ensure you are root and then remount the system partitionyou can now push the new VM to the system:
Note that if you run the emulator, this change is not permanent, since the emulator reloads
system.imgeach time it starts. On a device however, the change will be permanent. Also, since Android preloads a process called Zygote that is later used to fork application processes, you need to reboot the system to make the new VM be used in applicationsYou can actually rebuild virtually all Android components this way. The general steps are
Android.mkin the source tree for the component you wish to rebuildLOCAL_MODULE := libdvmmakethe module name, which islibdvmfor Dalvik VMInstall:. In the case of the Dalvik VM, this isInstall: out/target/product/generic/system/lib/libdvm.soadb rootandadb remount, thenadb pushthe built file to a running Android system. The destination path is the last part of the out file path, which in the case of dalvik is/system/lib/libdvm.so