summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Håkan Kvist <hakan.kvist@sony.com> 2024-04-22 12:43:10 +0200
committer Håkan Kvist <hakan.kvist@sony.com> 2024-10-23 21:54:04 +0200
commit45e499a3f587cc146e21a1c81bd404e4cd41e59d (patch)
tree43f296586d6a9f903c70023366f4c804f3943311 /api/api.go
parentc456bc72297a360ea58a0fc17f7850bb42754b7c (diff)
Improve robustness when migrating from appops xml
A device failing to create a complete appops.xml with all the attributes needed will cause appops migration to fail when upgrading. AppOpsService is reading its files as part of ActivityManagerService start, which happens before rescue party is started. Upon failure Rescue party is not started, there is no attempt to reboot and the user is stuck with a device trying to boot. A user experiencing this will think the device is bricked. This change will log the actual error, treat the appops xml as not existing instead of throwing an exception. Bug: 323262109 Test: adb root adb shell stop adb shell rm /data/misc/apexdata/com.android.permission/access.abx \ /data/misc_de/0/apexdata/com.android.permission/access.abx adb shell dd if=/dev/urandom of=/data/system/appops_accesses.xml \ bs=4096 count=2 adb shell dd if=/dev/urandom of=/data/system/appops.xml bs=4096 \ count=2 adb shell start Change-Id: Ic24259662e1c7f0cfe23c72bd1c390f9aff80bec
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions