21

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.

  • I had a problem with ART on a stock 4.4.4 ROM. A few days after switching from dalvik, I was stuck in a boot loop with adb logcat showing a lot of crash errors including `art/runtime/runtime.cc:203] Runtime aborting... Switching back to dalvik, I had to reboot into recovery and use the echo command to switch back to dalvik. That fixed the problem – Stan Kurdziel Apr 12 '15 at 16:32
18

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'

  • 5
    FWIW, doing "setprop persist.sys.dalvik.vm.lib libdvm.so" would have the same effect -- the "persist" properties are persisted by writing them to a file. – fadden Apr 11 '14 at 18:28
  • When this happened to me, I had no adb shell access while Android was running. However, I was able to reboot into ClockworkMod Recovery, clear my cache partition and dalvik cache to free up some flash storage space, mount my /data partition, and then (finally) use adb shell as described in this answer. Whew! – ʇsәɹoɈ Jan 7 '15 at 9:45
  • I tried this on Android 5.0.1 (Omega V28) on my Galaxy S4 GT-I9500. The file was called /data/property/persist.sys.dalvik.vm.lib.2 in my case. After rebooting it somehow reverted to "libart.so". Any idea why it's doing that and how to change it permanently? – EM0 Jun 10 '17 at 13:33
  • This happened even when I changed the file contents via adb shell in recovery. So it's not getting overwritten on shutdown, but on boot, it seems. – EM0 Jun 10 '17 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.