Automatically download MTK devices (non-samsung) when docked

I am developing a standalone kiosk using an android tablet (iBall works on 4.2.2). It has Chinese MTK.

Suppose that when there is no power, then the tab battery will drain and no juice will be left in it. When power returns, I want the tab to automatically load without any manual intervention. I read on the internet that if we change the code present in the battery animation file we can achieve this. To do this, I replaced the source code of the battery charging animation file called "ipod" located in '/ system / bin' with:

    #!/system/bin/sh
    /system/bin/reboot

      

However, when my tab was turned off and docked it didn't load, instead it just got stuck in the charging logo. When I replaced the above code:

    /system/bin/reboot

      

my tab did the boot when it was off and docked. This means my code is stuck at '#! / System / bin / sh'. What could be the reason?

Also, while loading a tab using the above process, I want to load it after the delay for which I used

    sleep 20
    /system/bin/reboot

      

but there was no delay in the boot process (whatever the sleep value I give) How to create this delay?

PS: I gave 777 permission to the file; root owner; Wrapper group. Please help. Thanks a lot!

+3


source to share


2 answers


Found the reason why my commands were not being executed. The reason was that I was editing on my notepad ++ in windows until I came across this answer on SO - "Make sure your text editor doesn't put a / r / n and only a / n for every new line. This typically if you are writing a script on windows.Use notepad ++ (windows) and go to edit | EOL convention | UNIX then save it. " So I changed my convention as per the above answer and ran my code and got the desired result.



+2


source


In Sony Xperia GO, the file name is " chargemon ", and only by renaming it the task is completed (the smartphone will reboot after connecting). (possibly other Sony smartphones will be the same or similar)



0


source







All Articles