I had a similar issue not that long ago: the culprit seems to be some app ART cannot compile for some reason. As you successfully applied my solution and confirmed, let me sum up the facts from the comments in an answer:
1. figure which app is the culprit.
On each of those crashes, the Android system sets a "tombstone" on the "grave" of the dying process – something known on Unix/Linux systems as Core Dump. Those core dumps are placed into /data/tombstones
, with at maximum 10 files kept (after that, the oldest one will be overwritten on the next occasion). So we need to look to those tombstones to see whats written on them. As you have a custom recovery which offers adb access, the easiest way is:
adb pull /data/tombstones tombstones
(will copy the entire directory to your computer)
- use a viewer/editor of your choice (best one you are familiar with) to open and investigate each of the tombstones, starting with the newest and walking back.
- look into the "stack trace" to see if an app (or it's path in
/data/data
) is mentioned there. If so, note it. If it's the same app in the next tombstone and the one after, you can be pretty sure this is the case we're describing here.
2. put the "obstacle" out of ART's way
Having identified the app, we need to remove it so art doesn't get stuck with it. For this, again we need adb shell
with its root prompt – and the directory name from our tombstones:
rm -rf /data/data/<whateveritwas>
Note this removes all the data of the app as well – so having a backup in advance might be a good idea (in the current state: either adb pull
the directory, or do a nandroid backup you can analyze later).
That done, reboot. Now "optimizing apps" should finish successfully.
Alternatives to the command-line approach
Some custom recoveries ship with an integrated file manager, usually called "Aroma". Above steps could also be perfomed with that:
- navigate to
/data/tombstones
- view the tombstones
- navigate to
/data/data
and remove the offender
cyanogenmod
tag lets me assume you've got a custom recovery on the device. Boot into that. Hopefully you have either ADB capabilities there, or the recovery includes a file manager (e.g. Aroma; twrp has both). Navigate to the tombstone folder (usually/data/tombstones
) and check the "trace" block of the latest files. I suspect it always mentions the same app/package-name. If so, delete that app's data directory (/data/data/<package_name>
). Next boot should succeed. // Had that recently myself …cwm/aromafm/aromafm.zip
in path'. Any help on getting that installed would be awesome. I do haveadb
andfastboot
access but I am not that expert there either.adb shell
, thencd /data/tombstones
.ls
lists the contents. Viewing those files on-device would obviously be a bit tricky for you, so the easiest would be pulling them to your computer:adb pull /data/tombstones tombstones
would pull the entire folder and place it onto your PC. Then investigate with the tools you're familiar with. Having found the culprit, fromadb shell
(as root)rm -rf /data/data/<culprits-package-name>
. To exit fromadb shell
type, well,exit
:)