I installed Philz Touch 6.59.0 (ClockworkMod in my Samsung Galaxy Tab 4 7" Wifi (SM-T230) and modified the /system/bin/lpm (also called playlpm in other devices) to reboot the device as soon as it is plugged.

The modification of the lpm file works great when I don't have Philz Touch 6.59.0 installed on the device. Every time the device is off and I plugged it to the charger, it starts Android just fine.

The problem comes when I install Philz Touch 6.59.0 which works great by it self but when I modify the lpm file, every time I power off the device and then plug it to the charger, it start in recovery mode which is incredibly anoying.

Next is my lpm file:


Does anyone knows what can I do to solve this issue or change this behaviour?


I also tried the TWRP and the same thing happens. When powered off and plugged in, the device starts in recovery mode.

  • 1
    I've no clue about this issue, although it makes me think about the jig device, which is a little electric circuit used to force the Download mode in a powered off device. Its mechanism is simple: it limits the voltage to a value which is interpreted as the value which triggers the booting in Download mode. I guess that the CWM modified some parameter in such a way that the voltage value in input triggers the Recovery, instead of the OS, but I've zero proof of it.
    – Grimoire
    Apr 8 '16 at 15:22

It was simply a problem of line endings. Somewhere along the road I modified the lpm file and the line endings of the file were changed to Windows and they were supposed to be to Unix line endings.

When you edit a file in a text editor make sure to the correct line endings. Next is a picture of how to do it in Sublime Text:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.