1

My mobile phone (Yu-Yuphoria) continue updating OS or optimising Apps and not stop.

Actually last night when I'm going to use my mobile it displayed black screen and then I did restart the phone.

At the time of restart phone as usual display "cyanogen" logo and then instantly going to updating mode and display "Optimise Apps". I gave time but this process is not finish. I also switch off device and switch on but same alway phone going on updating mode and displaying **"Optimise Apps".

I'm facing this issue last 2 days. If anyone have faced same problem then guide me on right direction.

In Short how to stop this continuously updating/optimising OS ?

3

After googling found only one way to get rescue of it.

You must need to do force restore factor. Use Below Step

1) Reboot your Device

2) When your mobile ON instantly press Volume Down Button + Lock Button

3) You mobile will be gone on boot mode

4) Select 3rd option Restore factory

5) Select Option for Delete whole data select YES (Might be 4th option)

6) Formate will be started (It will take approx 15 min)

7) When It will completed again your system will be display boot mode. You should choose Reboot Device

Congratulation your device will be worked as normally.

  • Did you previously root/unroot your device after installing a system application? Also on restart how many app(s) are being optimised on restart? – xavier_fakerat Sep 28 '17 at 17:30
  • From my experience this sounds like permission issues in dalvik cache, an alternative solution in such scenario is uninstalling the problematic app – xavier_fakerat Sep 28 '17 at 17:31
  • I decided to add another answer based from experience, but its good you fixed the problem yourself – xavier_fakerat Sep 28 '17 at 19:16
  • @xavier_fakerat - Thanks for your quick reply, Actually whenever I did restart my device always display "Optimise App 1 to 150" and its in loop and restart automatically and again start "Optimise App 1 to 150" and continue. – Govaadiyo Sep 29 '17 at 5:43
3
+25

Based on my experience, this problem usually occurs as a result of faulty (or incorrect) permissions in the dalvik cache.

How does optimisation work?

When the Android system is "optimising apps/system", it will be creating an optimised version of each application. This process makes each app start as fast as possible with the new Android version.

When an .apk file is added to an Android system, it is converted to an odex (Optimised Dalvik Executable) file whose function mainly is to save space. Unlike the odexed file, a deodexed file essentially has all parts assembled in one place into classes.dex files (just Dalvik Executable)

Android uses Android Runtime (ART) for running applications (in ealier android verisons - Dalvik Virtual Machine to maintain backward compatibility , ART uses the same input bytecode as Dalvik, supplied through standard .dex files as part of APK files , while the .odex files are replaced with Executable and Linkable Format (ELF) executables).

Now, when an Android-based system is booting, the dalvik cache for the Dalvik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.

Situations in which the problem arises

  • After an upgrade of an Android version, the issue can surface if Android system is trying to create a new dalvik cache for the apps but the still has the "old cache" for such an application, hence tries to constantly create a new cache on top of the old one.

  • A "used" odex file is still present even though that particular application is deoxeded . Certain apps (e.g Link2sd, Lucky Patcher, Titanium backup etc) that integrate dalvik cache in system partition can cause such issues. In one case, it resulted when Titanium backup created a patch that created an .odex file in /system/apps. this problem resulted.

  • Rooting/Unrooting of the device can result in modification of data in the dalvik cache of a certain application, such that when the change of state occurs (from rooting or unrooting vice versa), it keeps trying to perform optimisation of the application(s).

Possible fixes

  1. Wiping data and cache

No. You can try wiping your cache partition:

  • Turn off your device

  • Press a combination of Vol + + Vol - + Power key buttons and hold them down.

  • Release only the Power button when the device vibrates

  • Release the other buttons when the Recovery Menu screen appears

  • Using the Vol +/Vol - buttons to navigate, select Wipe cache partition

  • Press the Power key , which will act the enter key on your keyboard.

  • Wait for the process to finish.

  • You can then reboot the device and see if your problems are fixed

    1. Resetting dalvik cache permissions

Another user has offered a concise explanation:

This problem is caused when there are .odex files in /data/app folder than have permissions set so system can't write to them during the optimization process.

In this case, setting correct permissions can resolve this matter:

  • Set correct permissions i.e rw- r-- r-- for odex files in /data/app ( or /system/app ) folder

Several users have suggested to use this method by employing a file explorer to delete the folder:

Use a file explorer with root access or adb shell and delete the folder dalvik-cache found inside /data (or rm -r -f /data/dalvik-cache from adb shell)

  1. Uninstalling problematic application(s)

    • Try getting rid of possible culprits, especially those that require root, by simply uninstalling such applications.
    • Alternatively, try deodexing the applications with a suitable tool, to allow Android Virtual machine to reoptimise the applications at next reboot.

For many users its the app titanium backup odex file that causes the issue but there can be other programs.

  1. Reflashing stock ROM

    • If none of these seem fixing the issue, then you might have the highest probability of fixing the issue by reflashing your device with stock ROM.
    • Get the appropriate stock ROM file and reflash to clear essentially everything and rewriting the partitions with "fresh data" Note back up important data first!

References

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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