In response to my last post “Fixing sdcard bug in CyanogenMOD” , one of my reader (Amol) asked How to execute Command automatically at boot on his android phone.
One of the method is to place custom shell Script in /system/etc/init.d/ , but here I am going to discuss the easiest way.
All you have to do is install an app from Google Play store Script Manager – SManager . This app is free of cost and supported by adds. Kudos to developer this free apps where many apps are charging money for it. Anyway if you want to support developer or want to get rid of adds, you should buy a paid version of it.
I’ll take example of the problem discussed in last post to show the use of this app.
[Prerequisite: Your android device must be rooted.]
STEP 1: Install the App from play store.
Interface of Script Manager – SManager
STEP 2: On startup the app will ask superuser (SU) permission. Grant the SU permission.
STEP 3: Click on menu button and select New Script. Create a new script by giving a name and click OK. In my case I have given name mountext.
Creating New Script- Smanager
STEP 4: Now script file will open. In the second line enter the shell command you want to execute (on boot) and save the file. In my case I have entered command to mount external sdcard at /mnt/sdcard/external_sd.
$ mount -o bind /mnt/emmc to /mnt/sdcard/extrnal_sd.
Editing Script- Smnanager
STEP 5: After saving the above file following window will appear, click on Su button to grant this script Su permission and make it executable on boot by clicking on Boot button. If you want to execute this command (script) now, click on Run button.
STEP 6: That’s all! Now this command will automatically execute at each boot of your android device!
If this post helped you please like us on fb, +1 on G+ or leave comment!
This post first appeared on Technohunk.com| Daily Hacks In Plain English!, please read the originial post: here