I am currently reading /proc/cmdline
to determine a device's boot reason. Currently, I am using Android's Canonical Boot Reason from the bootloader to determine why the device booted. I just read the values for androidboot.bootreason
, eg
androidboot.bootreason=reboot
androidboot.bootreason=bootloader
androidboot.bootreason=PMIC_cold_reboot
Is there a Linux Kernel API to do something similar?