summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorJeongsik Mun <jeongsik.mun@samsung.com>2020-08-13 09:43:22 +0900
committerTodd Kennedy <toddke@google.com>2021-03-03 07:51:41 -0800
commitef96992ba06ec8a923dd4a4637f62bd86ae0c5fa (patch)
treebbc5c5d94b16d826d8b36b62094b6ac187b57e7f /tools/aapt2/java/JavaClassGenerator.cpp
parent99abec3d81c873621cc174ff9d2132749887b620 (diff)
Fix an app data removal issue during OTA update
There is an edge case where an OTA updates a system app to a higher version than a version of an upgrade on /data and reset happens for unknown reason right after removing the apk of the upgrade on /data. PackageManager cleans up orphaned packages ahead of scanning when it happens. However, it gets 'duplicated appId' error in enableSystemPackageLPw() and it ends up changing the appId and removing app's data dir. This fix removes the code to clean up orphaned packages, which is a fix for b/32321269. Test: manual 1. Command to install an apk(version 1) as system app. $ adb remount; adb shell mkdir /system/app/Test \ adb push Test_v1.apk /system/app/Test/Test.apk \ adb reboot 2. Command to update it with an apk(v2) $ adb install Test_v2.apk 3. Command to simulate an OTA, rebooted after removing Test_v2.apk $ adb remount; adb push Test_v3.apk /system/app/Test/Test.apk \ adb shell rm -rf [codepath_of_test_v2]; adb reboot 4. Check the appId didn't change and app data wasn't removed Bug: 162757159 Change-Id: I4544316e99247ae1de1228d5fe11416cfb601849
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions