I have an android update that's taking multiple minutes. Considering that there's no network IO, it's kind of hard to imagine what sort of process could take multiple minutes. I don't really know what goes into such a thing - why is it so slow?
Conversation
Replying to
All the app java code gets recompiled into byte code and rewritten to the dalvik cache after every update. After that, some of the oat files that contain startup functions are signed and need to be verified.
1
2
Replying to
Yeah I guess I was thinking that was the later part of the process. Idk it seems that there are two "stages" from a UX perspective. The latter being when it recompiles apps etc
1
Replying to
I don’t remember the exact order of the steps during an OTA android update but iirc the zygote service is stopped so all the apps are recompiled before reboot
1
1
Replying to
Huh interesting. I guess I assumed otherwise because the second half of the process has a bubble with something like "optimization apps".
1
Which version of Android, on which device? If you're talking about a modern device with A/B updates, you can watch the update_engine progress with `adb logcat`. On modern, stock OS devices, they usually use a mix of interpreter + JIT + AOT compilation driven by JIT profiles.
2
1
During the update process in the background, once it finishes installing and verifying the new update, it starts redoing AOT compilation of apps driven by the JIT profiles gathered from the existing usage. It also recompiles code daily when not low battery + plugged in and idle.
The update it installed to the alternate set of partitions, so it mounts the alternate system partition and then uses that to recompile the apps for the upcoming reboot into the newly updated OS. It can't reuse the existing AOT compiled code.
1
1
Show replies


