LegacyXperia / local_manifests

Local manifest for building CyanogenMod for Xperia 2011 devices
legacyxperia.github.io
122 stars 78 forks source link

[cm11][20160417][Smultron] “Android is upgrading” on every reboot #1064

Closed Pazu closed 8 years ago

Pazu commented 8 years ago

On rebooting the phone, I see “Android is upgrading” and “Optimizing apps” each time.

This phone was previously running my own build 20160414, and before that my own build from mid-February, and before that your 20151117 build, and this problem was never evident before now. bugreport.zip

Also, many app settings were lost on upgrading, and some settings are lost again on rebooting.

bykidi commented 8 years ago

Cycle optimizing fix is here https://github.com/LegacyXperia/Wiki/wiki/Installing-Lollipop (CTRL+F "--no-watch-dog") but if your settings are still missing - try to clean install.

Pazu commented 8 years ago

@bykidi this is for KitKat, not Lollipop.

bykidi commented 8 years ago

@Pazu works both. But still this doesn't help you if you have something else broken in your installation.

Pazu commented 8 years ago

@bykidi I tried it, but the problem persists. I think I may try reverting to my own 20160414 build to see if that changes things.

bykidi commented 8 years ago

@Pazu i highly suggest you to clean install before flashing another build.

Pazu commented 8 years ago

@bykidi Okay, will do, thanks for the advice. By "clean install" I presume you mean formatting /system, /data, and /cache, then selecting "Wipe Data / Factory Reset", right?

bykidi commented 8 years ago

@Pazu yes.

Pazu commented 8 years ago

@bykidi I finally went through the process, doing all the formatting and wiping associated with a first-time install. Unfortunately, the problem still exists; the phone shows "Android is upgrading" on every reboot.

bykidi commented 8 years ago

If you 100% sure that your installation is fine and you still getting this 'upgrading' problem - you have to add --no-watch-dog parameter to build.prop

Step by step

  1. go to recovery
  2. mount /system
  3. connect your phone to PC
  4. open your CMD
  5. type CD , for me its "cd C:\Program Files (x86)\Android\android-sdk\platform-tools"
  6. type "adb pull /system/build.prop build.prop"
  7. in your folder you will get new file named build.prop
  8. open it (i recommend to use Notepad++) search for this string "dalvik.vm.dex2oat-flags="
  9. edit it so it looks like "dalvik.vm.dex2oat-flags=--no-watch-dog"
  10. save it
  11. now type command "adb push build.prop /system/build.prop"
  12. unmount /system, disconnect phone, reboot phone
  13. you will see OPTIMIZING APP window AGAIN. Don't interrupt it.
  14. wait until progress finishes
  15. your next reboots will be faster
  16. ...
  17. profit
bykidi commented 8 years ago

If you still have problems - email me with your TeamViewer ID and password.

Pazu commented 8 years ago

@bykidi Thanks. While I can't be 100% sure nothing's wrong with my installation, I did go through your procedure, and have a couple of observations to report.

  1. dalvik.vm.dex2oat-flags did not exist in build.prop already. Should it have? I added it as a new line per your step 9 (copied and pasted directly from your text)
  2. On rebooting, I did not see the Optimizing App window again. It went straight to the Enter SIM PIN page.

I do see that my build.prop change is definitely there using File Manager/Editor.

I just tried rebooting again, and no longer see the Android is Upgrading window. Not sure if this means the problem is permanently gone or not. Will try a few more times over the coming days to be sure.

One more question: should I leave the dalvik.vm.dex2oat-flags line in build.prop, or remove it now?

bykidi commented 8 years ago

You see "optimizing 1 of 1..." on every boot. This is usually GMSCore.apk from the GAPPS package, or Facebook; it could be any very large app. Compiling an apk takes too long (>6 minutes), you have to turn off the timeout temporarily. Add this line to /system/build.prop: dalvik.vm.dex2oat-flags=--no-watch-dog

source: https://github.com/LegacyXperia/Wiki/wiki/Installing-Lollipop

Still not 100% sure, but LX12.1, LX13 both have this parameter included by default, so, yes, you can keep it (in case you will flash something else and it's big)

If this helps you - feel free to close the issue.

Pazu commented 8 years ago

The issue is no longer evident, so I'll close this.