Conversation

I didn't realize Android verified apps on boot. I had a silly patch for Twitter (done by directly hexediting one of the overlay APKs on-device, because I'm lazy) and it worked fine until I rebooted, then Twitter disappeared. Or is this some Play Services verification thing?
4
93
I'm kind of surprised because doing a full sig check on every app on boot would probably take quite some time, and Android boots pretty fast these days. Or maybe the file mtime tipped it off?
6
42
NFT profile picture
Replying to
It might be done in the background nowadays? I remember that you had to sit through a 40 minute long “verifying apps” screen after each update on older android versions (lollipop / marshmallow era)
1
3
Replying to and
That's not related. That was because the OS needed to recompile apps not built into the OS images from bytecode to native code after an update. Kotlin/Java is mostly compiled to native code on Android. Each device does it on their own. It's still done, but doesn't hurt UX now.
1
5
You're likely misremembering the dialog showing it was "Optimizing apps". A/B updates mean that it performs the compilation while installing the update in the background. An update is fully installed and has apps compiled to native code for your device before you reboot into it.
2
1
Even without A/B updates, ART moved away from using full ahead-of-time compilation to a hybrid system in order to save storage space. When you install an app, the default for AOSP is to start with only the JIT/interpreter. Saves JIT profiles persistently and does background AOT.
1
1
This doesn't go particularly well with verified boot, so security sensitive apps can disable storing ahead-of-time compiled code for them. It does get replaced on OS and app updates, but that's not each boot. Relevant to an app using hardware attestation API to verify itself.
1