6

I recently tried updating my Motorola Atrix 4g. It downloaded, and then it booted down to try to update. However, instead of updating, it ends up booting to a screen that just says

Failed to boot 2
Starting RSD mode

If I take out the battery, I boot up the phone for about 60 seconds before it starts shutting down again.

The phone is rooted, and it seems like it starts shutting down as soon as Android starts giving out root privileges.

Looking through different forums online, it seems as though the best solution to stop the phone from trying to update (without erasing all my data by resetting the phone to factory settings) is to clear the Dalvik cache.

The problem I am having is that so far, it seems that in order to clear the cache, I need root, but as soon as my phone has been on long enough to give out root, it restarts, and I can't do anything with it. To make the problem worse, I seem to be unable to boot into recovery...

Is there any way to clear the Dalvik Cache (really, really fast, and) without root (or recovery)?

5 Answers 5

7

I finally figured it out, here's how I did it:

Even though adb can't get root, and the phone it's self can't get root, as it turns out, there is in fact one more way to clear the cache without fully booting the phone.

  • Turn the phone off
  • Make sure you have fastboot working on your computer
  • Press the power button on the phone and then hold down the volume down button until you see fastboot, then hit the volume up button.
  • Open a terminal window, and type the following

    sudo su
    fastboot erase cache
    

And (apparently) voilà! The cache is cleared!!

3
  • 5
    Yepp, /cache is cleared. But not /data/dalvik-cache. Quoting rootzwiki: fastboot erase is very straight-forward: It erases the specified partition. Example: fastboot erase cache will erase the contents of the /cache partition. To say it again: that's the app-cache, and not the Dalvik-Cache.
    – Izzy
    Apr 12, 2013 at 22:45
  • @Izzy Does fastboot have any specific command for deleting the Dalvic/ART cache? Without using TWRP?
    – Shayan
    Jan 6, 2019 at 1:35
  • @Shayan to my knowledge not.
    – Izzy
    Jan 6, 2019 at 9:07
4

That's unlikely to be possible. Dalvik cache is stored in /data/dalvik-cache, and doing an ls -l /data (as root) shows:

drwxrwx--x system   system            2013-03-29 14:54 dalvik-cache

As you can see, it is owned by user system of the group system, and all other users only have "execute" permission (i.e. they are only permitted to change into that directory). Digging a little deeper with ls -l /data/dalvik-cache shows e.g.:

-rw-r--r-- system   app_17    6416640 2013-03-02 00:28 data@[email protected]@classes.dex

All files in here are again owned by system, which is again the only user with write permission (i.e. also the only one who could delete files). The app corresponding to each .dex file is represented as group; but as all "other" users, only has read-permissions.

Conclusion: only root can delete stuff here -- be it from a regular shell or via a custom recovery like e.g. ClockworkMod. Or via a , of course...


One thing you could try, though, is booting into . If any user app is causing the trouble, the device should boot up fine (as all user apps are skipped in safe-mode). A second suggestion is to attach your device via USB and try to capture a logcat (via adb logcat) to get some more hints on what could causing the trouble. This would of course require USB Debugging to be enabled. In case it was not yet enabled, you might be able doing so from safe-mode (I'm not sure about this, as I've never tried).

1

Do this:

sdk/platform-tools/adb shell

 shell@android:/ $ su system                  # switch from user "root" to "system"
 system@android:/ $ cd data/dalvik-cache/
 system@android:/data/dalvik-cache $ rm *
 system@android:/data/dalvik-cache $ exit
 shell@android:/data $ exit

and reboot your phone.

3
  • As a reminder: DO reboot immediately.
    – Koshinae
    Nov 14, 2015 at 15:45
  • 1
    Are you sure what “su system“ will work without root?
    – v6ak
    Dec 1, 2018 at 9:10
  • 1
    This doesn't work without root, because you don't have the su binary..
    – Det
    Jun 7, 2019 at 14:46
0

Do backups.

If you a have Fuel that's now working, install:

  1. Flashy now

  2. Install an advanced recovery like TWRP (Fuel specific). Then you can only run recovery from a working system (no key combo works yet, get there from Flashy dialogs to start the TWRP recovery).

  3. Once in recovery then finally your computer can do ADB (finally getting shell, I tested on another Fuel) and hopefully from there you will not be locked out (like me) and can unlock the boot-loader.

    Because, if you don't then you will be replacing your phone, should it go loopy. LG said mine did (repeated stopped processes, no use of the phone) just by regular auto updates! It progressed to no settings access.

2
  • How is this an answer? I'm sorry, but this must be flagged on multiple grounds. Oct 31, 2015 at 7:09
  • 1
    Hi! This is not a forum so please, while attempting to answer a question, only answer what has been asked. I removed some information from your answer because I found it unnecessary here. That said, attempt to write in an orderly fashion. Do not use abbreviations or short forms for just anything. Read formatting guide for better structuring of your answer. And finally, please keep up the good work of answering here. :) // It is another matter that I've not verified whether your post is even an answer to the question or not.
    – Firelord
    Oct 31, 2015 at 7:32
0

You don't even need root to clear dalvik cache. You can do it with the stock recovery. Shut off the phone & boot into recovery (I don't know what the key combination for the atrix is, so you'll have to look it up as the key combination is different from one phone to another) & look for an option that says something like "clear dalvik cache" hit volume down to highlight it & power to select it & wait until it boots which will probably take a lot longer than usual, which is normal. Leave it sit awhile while it rebuilds your list of apps. I don't know that might be any different since it's rooted. I've heard of the dalvik folder being as big as 3+GBs.

You must log in to answer this question.

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