How to make Android device boot when power is plugged in?

后端 未结 6 1185
长发绾君心
长发绾君心 2020-12-15 09:40

I need to use this for a Samsung Tablet.

Usually if the device is switched-off and the USB cable is being connected the display will wake up for some seconds showing

6条回答
  •  忘掉有多难
    2020-12-15 10:11

    These answers led me to my solution. I'm using this on a Samsung Galaxy Tab S. For other tablets, the path to the system mount will be different. To find it, use this command in an adb shell.

    cat /proc/mounts | grep system

    One problem I came across was the tablet booting into recovery mode after I changed the lpm file, but that's because I mv'd the old one and created a new lpm file and didn't set the correct permissions and ownership. Using cp instead fixed this. My one-liner to set this up on a tablet is:

    mount -o remount,rw /dev/block/platform/dw_mmc.0/by-name/SYSTEM /system && cp /system/bin/lpm /system/bin/lpm_orig && echo "#!/system/bin/sh\n/system/bin/reboot" > /system/bin/lpm
    

提交回复
热议问题