Thursday, November 29, 2018

adb - Manually switch from ART to Dalvik


I wanted to try out the new ART runtime, but didn't realize my custom ROM doesn't support it. So now I am getting recurring Force Closed messages after booting, and can't get through to the settings menu to switch back to Dalvik. So before I wipe everything and spend hours setting up my phone from scratch, is there a way to manually change back to Dalvik from the recovery menu? I think there should be a flag somewhere, that instructs Android to do the 'recompile' after a reboot.


Via the recovery menu, I have full root access over a adb shell and can mount all filesystems.



Answer



I just did this!



/data/property/persist.sys.dalvik.vm.lib is a textfile containing one of two values: 'libart.so' or 'libdvm.so'. You can change from ART to Dalvik simply by editing this file.


Ex: adb shell 'echo libdvm.so >/data/property/persist.sys.dalvik.vm.lib'


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...