22

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.

1
  • 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 Apr 12, 2015 at 16:32

1 Answer 1

19

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'

4
  • 6
    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, 2014 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, 2015 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, 2017 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, 2017 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .