Skip to content
Snippets Groups Projects
Forked from Dhina17 / platform_frameworks_base
28561 commits behind the upstream repository.
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
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..
AccessibilityEventsLogger
AccessoryDisplay
ActivityManagerPerfTests
ActivityTests
AmSlam
AppLaunch
AppResourcesLoaders
Assist
AttestationVerificationTest
BackgroundDexOptServiceIntegrationTests
BandwidthTests
BatteryStatsPerfTest
BatteryWaster
BiDiTests
BinaryTransparencyHostTest
BinderLeakTest
BlobStoreTestUtils
BootImageProfileTest
BrowserPowerTest
Camera2Tests
CameraPrewarmTest
ChoreographerTests
Codegen
CompanionDeviceMultiDeviceTests
Compatibility
CoreTests/android
CtsSurfaceControlTestsStaging
DataIdleTest
DozeTest
DpiTest
DynamicCodeLoggerIntegrationTests
EnforcePermission
FeatureSplit
FlickerTests
FrameworkPerf
FsVerityTest
GamePerformance
GridLayoutTest
HandwritingIme
HierarchyViewerTest
HugeBackup
Input
InputMethodStressTest
InputScreenshotTest
Internal
JankBench
JobSchedulerPerfTests
JobSchedulerTestApp
LargeAssetTest
LegacyAssistant
LegacyRestoreTest
LocalizationTest
LocationTracker
LockTaskTests
LotsOfApps
LowStorageTest
ManagedProfileLifecycleStressTest
MemoryUsage
MidiTests
MirrorSurfaceTest
MotionPrediction
MultiDeviceInput
MultiUser
NativeProcessesMemoryTest
NetworkSecurityConfigTest
NullHomeTest
OdmApps
OneMedia
PackageWatchdog
PlatformCompatGating
ProtoInputStreamTests
RemoteDisplayProvider
RollbackTest
SerialChat
ServiceCrashTest
SharedLibrary
SharedLibraryLoadingTest
ShowWhenLockedApp
SmokeTest
SmokeTestApps
SoundTriggerTestApp
Split
StagedInstallTest
StatusBar
SurfaceComposition
SurfaceControlViewHostTest
SurfaceViewBufferTests
SurfaceViewSyncTest
SystemMemoryTest
SystemUIDemoModeController
TaskOrganizerTest
TelephonyCommonTests
TouchLatency
TransformTest
TransitionTests
TrustTests
TtsTests
UiBench
UpdatableSystemFontTest
UsageReportingTest