大神指导下 关机状态下充电自动开机 移除充电器自动关机
tasker吧
全部回复
仅看楼主
level 6
大神指导下 关机状态下充电自动开机 移除充电器自动关机
2017年12月26日 14点12分 1
level 13

自动开机需内核及主板支持
2017年12月26日 14点12分 2
level 6
自动关机给指导下吧 谢谢
2017年12月26日 14点12分 3
level 1
检测到电源断开,执行关机命令。。。
2017年12月27日 00点12分 4
level 2
车载用的吧,通电自动开机不改动硬件基本不可能,断电自动关机倒是很简单,不过需要ROOT权限。如果从省电来讲断电就关机反而用处不大,还不如设置每天定几个时段关机来得实用
2017年12月28日 08点12分 5
上电自动开机只需要fastboot模式下 一条命令就可以了吧 fastboot oem off-mode-charge 0
2018年01月11日 03点01分
tasker可以让手机设置每天几个时段开关机吗
2018年03月15日 02点03分
level 6
1. Enter Fastboot Mode (adb reboot bootloader)
2. Enter Command: fastboot oem off-mode charge 0
3. Enter Command: fastboot reboot
if that is not working for you maybe this one will work:
1. search in /system/bin/ for playlpm, ipod, lpm, kpoc_charger or any other file that have inside some reference to battery animation.
2. edit that file, delete all content inside and add
#!/system/bin/sh
/system/bin/reboot
if that is not working you can try this:
1. Unpack boot.img and edit init.rc.
2. 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
3. re-pack boot.img
None of that worked for me but I had an idea. Why not just create that damn file inside /bin ???
1. unpack boot.img
2. edit > ramdisk > init.target.rc (your file may have a different name then mine but search every file for "on charger" word using notepad++ and when you see that below that line are some "start" services you found it)
3. add start kpoc_charger to "on charger" line *** "kpoc_charger" can have any name be free to name it ***
4. add after:
service kpoc_charger /system/bin/kpoc_charger
class charge
5. create kpoc_charger file on root/system/bin/ with 755 permissions using any root file managers
6. edit file and add:
#!/system/bin/sh
/system/bin/reboot
↑↑↑↑↑↑↑↑↑↑↑↑↑↑
基本上市面上常见的所有充电开机的方法都在这个帖子里面了
很多人第一步就成功实现了充电开机
然后我试了所有的方法
然并卵,全都无效
初步怀疑,这个功能还是需要硬件支持,硬件支持了才有折腾的可能,不然无论怎么改系统都没法实现
2018年01月18日 18点01分 6
@dfish340 前辈,在不在
2023年11月01日 13点11分
大神 有没有解决方案
2018年06月29日 17点06分
我用的手机是美图M4,也试过上述所用方法无效。幸好没有放弃,经过2天艰苦测试终于成功了
2019年12月21日 14点12分
level 4
我用三星A7实现充电开机,有些手机需要官网解锁才能root,我就按上贴说的,修改文件plm,里的命令实现充电开机,用tasker实现断电30秒关闭HUD程序,再等10秒,自动关机。
2018年02月02日 13点02分 7
level 1
我已经实现了。电池拿掉,接个降压线直接到手机电池触点上。把开机按钮按下去,用胶水粘死。只要一通电,就自己开机了。美中不足的是一断电立马关机,最后一分钟段录的视频没发保存。
2018年10月18日 05点10分 8
感谢分享
2018年10月18日 06点10分
level 1
移除充电器自动关机的tasker,怎么设置?
2019年05月05日 03点05分 10
level 1
root后下载断电关机软件。
2019年05月27日 10点05分 11
level 1
我的成功经验,供大家参考。
美图M4以上都方法无效,经测试,发现插电时的确调用了kpoc_charger这个文件,但是就是不执行reboot命令,用init 6 、powerctl等也不行,权限也正确是755。
后来用getprop 抓取系统属性,发现加载的服务很少,不像是加载init.rc的表现。猜测是某些服务没有运行导致reboot等命令无法执行。但是执行了kpoc_charger,说明了肯定加载了init.charging.rc,最后试验无数,大胆在init.charging.rc中加载init.rc,OK,成功了。
具体如下,修改init.charging.rc,增加import /init.rc 这一句。
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
#import /init.${ro.hardware}.rc
import /init.rc
import /init.trace.rc
#import init.xlog.rc
然后按楼上的方法修改kpoc_charger,改成成脚本添加reboot命令就可以了。
用这个方法需要替换boot.img,有一定风险,没有经验的朋友慎用。
另外,下载固件时时只需下载boot.img就可以了,如图
2019年12月21日 14点12分 12
1