OSDN Git Service

Skip from copying preopted files if device is undecrypted
authorIris Chang <iris.chang@mediatek.com>
Mon, 2 Jul 2018 01:53:53 +0000 (09:53 +0800)
committerBowgo Tsai <bowgotsai@google.com>
Thu, 26 Jul 2018 10:34:53 +0000 (18:34 +0800)
commitcd5dd3c7b594e0beea971499dd96a4af1fad7037
treec97c398df8c18cfd0fd6fc897c1bfa6e0ce57b8a
parent716c04b29a0bd117aab33d8b81621a3fff0af7a7
Skip from copying preopted files if device is undecrypted

After applies issue 78613232 patch (create symlink in init.rc),
we found device boots to home screen fail.

When device is FDE (Full Disk Encryption) and user sets the
Password/Pattern/PIN to lock phone and then reboot the device,
data partition will be mounted as tmpfs (256MB) until device
is unlocked after user inputs Password/Pattern/PIN.

During device boot-up process, PMS (Package Manager Service) will
execute requestCopyPreoptedFiles when device first boots, and it
may cause device fails to boot to home screen because PMS copies
larger system_b (about 500MB) to smaller tmpfs (tmpfs is only 256MB)
before device is decrypted.

We suggest that PMS doesn't execute requestCopyPreoptedFiles when
device is undecrypted during first boot.

Bug: 78613232

Test: Device boot up to launcher normally.
Test: APPs work normally after A/B upgrade.

Change-Id: I893e0e217a59577299e97adfbf5dc7762dffda7c
services/core/java/com/android/server/pm/PackageManagerService.java