A Hidden adb Command Saved a Redmi K80 From an Infinite Boot Loop Without Wiping Data
Any sideload of WebView or a similar system-native component onto a locked-bootloader device can trigger this boot loop. The rescue command works even while system_server is crashing, preserving user data and avoiding a service center detour that would otherwise end in a factory reset.
A Redmi K80 with a locked bootloader and no root gets stuck on the HyperOS boot animation after a manual `adb install` of an updated Android System WebView. system_server crashes every 5.6 seconds on a WebViewZygote null pointer, so the phone never reaches boot_completed. The bad update sits in /data/app as an UPDATED_SYSTEM_APP, but the system refuses to recognize it as a valid WebView provider.
All standard rescue attempts fail. PackageInstallerService rejects every package operation with `System is not ready yet` or `device is still booting` because boot never completes, while adb has no write access to /data. Safe mode, recovery, sideload, and official OTA all fail to remove the /data-based update.
The escape route is a hidden subcommand, `cmd package uninstall-system-updates`, which talks to IPackageManager directly and skips the boot check. After a few retries to land inside the crash window, it removes the bad update, the phone falls back to the factory WebView, and boot completes in about ten seconds. A subsequent reboot confirms the fix, with zero data loss.
The distinction between PackageInstallerService and IPackageManager Binder calls explains why nothing else worked: any package write that goes through the installer service inherits the boot check, while direct binder calls bypass it.
The NPE from `--user 0` is useful diagnostic evidence: it proves the command reached the implementation, confirming the channel is open even when the system is mid-crash. Error messages in a deadlock can validate a path, not just signal failure.
WebView is boot-time critical; treating it as a normal APK that can be rewritten via adb is the root mistake. The article's advice generalizes to any system component with native libraries that run from inside the APK, where alignment and storage requirements are stricter than typical sideloads.