Skip to content
Snippets Groups Projects
Forked from Dhina17 / platform_frameworks_base
Source project has a limited visibility.
user avatar
Shrinidhi Hegde authored
Since the bootloop is not for complete boot rather for  system-server
restarts, we dont have to be as conscious about performing higher
impact mitigations and we can perform them earlier. (Reboots
initiated by user doesnt trigger a bootloop scenario.)

Removed the increment boot count threshold needed between 2 mitigations.
Also removed BOOT_LOOP_THRESHOLD(default value: 15) which was needed to
perform any high impact mitigations.

PackageWatchdog would wait for DEFAULT_BOOT_LOOP_TRIGGER_COUNT (default
value: 5) after a reboot (ex: WARM_REBOOT step in rescue party, mainline
rollback). Changed the behaviour to wait for DEFAULT_BOOT_LOOP_TRIGGER_COUNT
only for first mitigation.

MitigationCount was not getting reset properly after de-escalation
window. Updated the logic to save mitigationCount to the file after reset.

Did manual tests by killing system_server process using the following
command:
`adb shell kill -9 $(adb shell pidof system_server)`
Verified that the first mitigation was performed at 5 restarts.
Every restart after that resulted in next mitigation being executed.

Ran `atest PackageEatcdogTest` to verify PackageWatchdogTest and
CrashRecoveryTest changes.

Test: Unit test, manual test
Bug: 291137901
Change-Id: Ia0174e0e5dca09c5d4e9d3a12909c5e5087b4dbf
3c56021d
History
Name Last commit Last update