diff options
| author | 2024-03-28 20:13:40 +0000 | |
|---|---|---|
| committer | 2024-04-03 16:52:26 +0000 | |
| commit | 3c56021d8981e6af33d96ad137b3a483deb19aa5 (patch) | |
| tree | 630293f63aa99e724b24923be6911a34e32b1bac /libs/androidfw/ZipFileRO.cpp | |
| parent | 417dae889d11929722b68a83294505181b394e29 (diff) | |
update package watchdog to perform mitigations after every reboot once threshold is reached.
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
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
0 files changed, 0 insertions, 0 deletions