Venenl
记录保安阿强的生活
Veneno

Auto boot (start or power on) android on charge
After some research and I don`t remember how many google pages and searches I found that you can achieve this function using:

Enter Fastboot Mode (adb reboot bootloader)
Enter Command: fastboot oem off-mode charge 0
Enter Command: fastboot reboot
if that is not working for you maybe this one will work:
search in /system/bin/ for playlpm, ipod, lpm, kpoc_charger or any other file that have inside some reference to battery animation.
edit that file, delete all content inside and add

!/system/bin/sh

/system/bin/reboot
if that is not working you can try this:
Unpack boot.img and edit init.rc.
Add following to the end of file:

Check if chargermode and start autoreboot service.

on property:ro.bootmode=charger
start autoreboot

autoreboot service which command reboot

service autoreboot /su/bin/su /system/bin/reboot -c reboot now
user root
oneshot
re-pack boot.img
None of that worked for me but I had an idea. Why not just create that damn file inside /bin ???
unpack boot.img
edit > ramdisk > init.target.rc
add start kpoc_charger to “on charger” line “kpoc_charger” can have any name be free to name it
add after:
service kpoc_charger /system/bin/kpoc_charger
class charge
create kpoc_charger file on root/system/bin/ with 755 permissions using any root file managers
edit file and add:

!/system/bin/sh

/system/bin/reboot
Have fun and enjoy this.
For NEXUS and MOTOROLA PHONES

enter FASTBOOT mode
Connect phone to computer via USB
Go to adb folder and then press SHIFT+RIGHT CLICK
Select command prompt
Enter “fastboot oem off-mode-charge 0”
To reverse it type “fastboot oem off-mode-charge 1”

Another method for ASUS:

Unpack the kernel
Open the init.qcom.rc file in the Notepad ++ ramdisk
Look for and delete the lines:
service charger / charger
class charger
group log
seclabel u: r: healthd: s0
1
2
3
4
Instead of deleted lines we write the following lines:
on property: ro.bootmode = charger
class_start sec-charger
service playlpm / system / bin / reboot
class sec-charger
critical
1
2
3
4
5
We pack the kernel.
Install the kernel.

————————————————
版权声明:本文为CSDN博主「无证的攻城狮」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/alal001/article/details/99209614

2022年02月19日
Icefox Theme .