Automated power on with charging cable plugged: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
(Created page with "[https://www.youtube.com/watch?v=AM4X8OWlFZ8 Turn Your Old Android Phone/Tablet into the Ultimate Car GPS (for poweron with charger plugged in, see 12:36)] [https://www.youtu...")
 
No edit summary
Line 1: Line 1:
[https://www.youtube.com/watch?v=AM4X8OWlFZ8 Turn Your Old Android Phone/Tablet into the Ultimate Car GPS (for poweron with charger plugged in, see 12:36)]
[https://www.youtube.com/watch?v=AM4X8OWlFZ8 Turn Your Old Android Phone/Tablet into the Ultimate Car GPS (for poweron with charger plugged in, see 12:36)]
Because Samsung can't do Fastboot the above method won't work for charger, but it comes down to going to fastboot mode and typing
  fastboot oem off-mode-charge 0


[https://www.youtube.com/watch?v=Zp9G6A6EFlA Set your Android Phone to Automatically Power on when USB Charger is plugged in]
[https://www.youtube.com/watch?v=Zp9G6A6EFlA Set your Android Phone to Automatically Power on when USB Charger is plugged in]
Because Samsung can't do Fastboot the above method won't work, but it comes down to going to fastboot mode and typing
  fastboot oem off-mode-charge 0
[https://medium.com/@MrSmokeTooMuch/auto-starting-samsung-android-phone-when-charger-is-plugged-in-7f8b84048a09 Auto-starting Samsung Android phone when charger is plugged in.]
Ensure busybox is installed first [https://play.google.com/store/apps/details?id=stericson.busybox&hl=en Busybox by stericson] Note also that if you install to /sbin you will lose it all after reboot, so install to /system/xsbin
Note: start in recovery mode (twrp) and mount the system partition here. If the phone is started then you can't perform the /system remount.
  adb shell
  cd /system/bin
  cp lpm lpm.orig
  vi lpm
<pre>
#!/system/bin/sh
/system/bin/lpm.orig &
while [ true ]; do
bat_proc=`cat /sys/class/power_supply/battery/capacity`
if [ $bat_proc -gt 10 ]; then
sleep 3 && /system/bin/reboot
fi
sleep 5
done
</pre>
  chmod 0755 /system/bin/lpm
  chmod 0755 /system/bin/lpm.orig
  chown root.shell /system/bin/lpm
  chown root.shell /system/bin/lpm.orig

Revision as of 15:10, 19 September 2019

Turn Your Old Android Phone/Tablet into the Ultimate Car GPS (for poweron with charger plugged in, see 12:36)

Because Samsung can't do Fastboot the above method won't work for charger, but it comes down to going to fastboot mode and typing

  fastboot oem off-mode-charge 0

Set your Android Phone to Automatically Power on when USB Charger is plugged in

Because Samsung can't do Fastboot the above method won't work, but it comes down to going to fastboot mode and typing

  fastboot oem off-mode-charge 0

Auto-starting Samsung Android phone when charger is plugged in.

Ensure busybox is installed first Busybox by stericson Note also that if you install to /sbin you will lose it all after reboot, so install to /system/xsbin

Note: start in recovery mode (twrp) and mount the system partition here. If the phone is started then you can't perform the /system remount.

  adb shell
  cd /system/bin
  cp lpm lpm.orig
  vi lpm
#!/system/bin/sh
/system/bin/lpm.orig &
while [ true ]; do
 
 bat_proc=`cat /sys/class/power_supply/battery/capacity`
 
 if [ $bat_proc -gt 10 ]; then
 sleep 3 && /system/bin/reboot
 fi
 
 sleep 5
done
  chmod 0755 /system/bin/lpm
  chmod 0755 /system/bin/lpm.orig
  chown root.shell /system/bin/lpm
  chown root.shell /system/bin/lpm.orig