I am eagerly interested in auto booting my device when connecting a charger, too. I use a Xperia Z1 Compact
with AICP based on nougat
(tried oreo too, no success). This ROM is LOS based so solving the problem could probably mean a solution for all LOS based ROMs.
Basically, none of the guides from the internet helped to do the trick.
There is no lpm
file in the system/bin
folder, and no chargemon
The fastboot command
fastboot oem off-mode-change 0
was unsuccessful either. It gave me the result "too many links".
I started to search for the files myself and came to the following results:
Within the system folder
the .init and .rc files can be found.
I located the file init.msm8974-common.rc
(msm8974 could be replaced with your device's name or board chipset) and within that file I found:
chown root system /sys/module/qpnp_charger/parameters/charger_monitor
chown root system /sys/class/power_supply/battery/input_current_max
chown root system /sys/class/power_supply/battery/input_current_trim
chown root system /sys/class/power_supply/battery/voltage_min
chmod 0644 /sys/module/qpnp_charger/parameters/charger_monitor
chmod 0644 /sys/class/power_supply/battery/input_current_max
chmod 0644 /sys/class/power_supply/battery/input_current_trim
chmod 0644 /sys/class/power_supply/battery/voltage_min
charger /sbin/healthd -c
Searching for healthd gave me the idea, that this is the service managing the charger properties and its behavior. Unfortunately its a compiled and unreadable binary file. I wonder if one could alter the healthd file it could be possible to automatically boot the device instead of going to the loading screen.
Maybe my ideas can help solving the issue.