Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 45e499a3 authored by Håkan Kvist's avatar Håkan Kvist
Browse files

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
parent c456bc72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment