Files
Magisk/native
lsx 0675a18a3a init: check charger mode before force_normal_boot
b55f597c ("Skip loading magisk in charger mode") aborts when
androidboot.mode=charger, but the check sits after the force_normal_boot
branch. Devices that set androidboot.force_normal_boot=1 during off-mode
charging (e.g. some Motorola models) take force_normal_boot -> first_stage()
and never reach the charger check, so Magisk still loads in charger mode and
bumps the never-reset bootloop counter until safe mode trips.

Move the charger check ahead of skip_initramfs/force_normal_boot so charger
boots abort regardless, matching AOSP treating charger mode first.

Fixes #9967.
2026-08-18 18:38:55 +00:00
..