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
I have a rooted Samsung S4 mini. The following steps worked for me:
mount -o remount,rw /system
mv /system/bin/lpm /system/bin/lpm.orig
create /system/bin/lpm
as follows:
#!/system/bin/sh
/system/bin/lpm.orig &
while [ true ]; do
sleep 1
ps | grep lpm.orig && sleep 3 && /system/bin/reboot
done
chown root.shell /system/bin/lpm