Wednesday, May 7, 2014

How to Auto Start Android Tablets/Phones On Power Connection


We've been to a situation where we need to turn on our tablets when the power source is connected, need to research a lot and here is the way how I met the objective:-

1. Root your phone/tablet, we were using GALAXY Tab 3 hence i used the following post to root the tablet

http://dottech.org/149779/how-to-root-samsung-galaxy-tab-3-7-0-wifi-sm-t210-sm-t210r-and-flash-twrp-guide/


2. Connect the tablet to the PC via USB, i am assuming you have adb drivers installed.

3. run "adb shell"

4. remount your file system " mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system"

5. make a file named as "playlpm" having the following contents only. 

#!/system/bin/sh 
/system/bin/reboot
Make sure you make it in linux please otherwise you will also waste an hour like me

6. Put this file on desktop or where ever

7. Open "cmd" and write "adb put playlpm /sdcard/playlpm", this send the file to the sdcard of your tablet/phone

8. From the first cmd (as of step 3) write following commands
su
cp /system/bin/playlpm /system/bin/playlpm-original
mv /sdcard/playlpm /system/bin/playlpm
chmod 0755 /system/bin/playlpmchown root.root /system/bin/playlpm

9.  You are done now run playlpm once and it should reboot your tablet
/system/bin/playlpm

You tablet should reboot

Now as a test power off your tablet and just connect the power and it will fist show a battery icon for 4-5 seconds and your tablet gets started....


Good Luck !