I recently updated to Lollipop on a Moto G (1st Gen).

It was running a bit slow, so I wiped by cache then performed a factory reset as recommended.

I now receive the 'Android is starting optimising app xx of xx' every time I boot.

Obviously not life and death, but it's annoying to have to wait 10 minutes for every reboot.

Is this a known issue and is there any way to fix this?

  • This is common when using Xposed Framework beta for 5.x. Do you have this installed? Was the cache and wipe preformed within Settings, from stock recovery, or a custom recovery? Jul 23 '15 at 4:21
  • Run adb logcat > log.txt while booting and look for a line containing dex2oat.
    – rustyx
    Mar 18 '20 at 11:20

I just had the same exact issue on the same exact phone. After doing some digging it seems like this happens when Android has a problem optimizing one or more apps, so it stubbornly retries all of them. So I uninstalled apps one-by-one and rebooted, and the problem went away after uninstalling SuperSU.

Not wanting to leave my phone unrooted, I noticed I had installed the latest SuperSU (2.79 SR3), so I went here and downloaded the latest stable release (2.79):


After installing it I no longer had any issues.

During my troubleshooting I also cleared the cache, although I'm not sure if it helped or not:

  1. Boot to recovery
    For the Moto G 1st generation:

    1. Power off the phone

    2. Press and hold volume down button, press and hold power button, wait for about 4 seconds and then release both buttons

    3. Press volume down to select Recovery and press volume up to boot to recovery

  2. Clear the cache
    For the Moto G 1st generation (stock recovery):

    1. If you get to a screen that says "No command"

      1. Press and hold the power button for 2-3 seconds
      2. Without releasing power button, press volume up button and release the volume up button
      3. Release the power button
    2. Use the volume buttons to move down to wipe cache partition and select it with the power button

    3. Wait for it to finish (it can take a while) then reboot


For my 1st gen moto X , I was able to resolve the issue by:

  1. clearing up disk space
  2. updating all apps
  3. boot through optimization (~130 apps)
  4. clear cache (2.75MB remains)
  5. power off (shut down)
  6. boot through optimization (2 apps)
  7. clear cache (3.5MB -> 2.84MB remains)
  8. power off (shut down)
  9. boot -- No Optimization!

I was at 500MB of free space and increased that to 5GB by deleting photos and downloads.

A few other ideas from around the net:


It's because Android clears optimized dex files when it needs disk-space. Hence it's re-created during boot. You can read more in-depth debugging details here.

If you have rooted device, you can try the following app; it locks the dex files, thus saving a lot of time:


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