Ridgeland
Member
- Dec 14, 2010
- 285
- 9
In Linux scripts are great for automating a series of terminal commands. Back in MS-DOS days I used batch files to automate a series of commands.
In Android you can also create scripts to automate a series of task - no typing just click to select - and it runs.
My MID7015 is rooted with a Superuser.apk. I'm using gscript app to run the script.
Here are the three steps I want to automate:
I try to keep root of /sdcard/ nearly empty and store files safely in subdirectories like /sdcard/clockworkmod (which is where the backups will be stored too.) So the first command is just to copy my Clockworkmod recovery.img file to the root of /sdcard/.
The second command flashes the image, the third command reboots the system.
So more of the nitty gritty. gscript has a text editor which I didn't like at all so I edited using TextEdit.
Install the app gscript
Launch TextEdit and type in the three commands above.
Save the file as /sdcard/gscript/Boot_Recovery.sh
(has to end with .sh or it will not run)
Launch gscript
Click on the menu button, select "Add Script"
click on [Load file]
Select the Boot_Recovery.sh file
Leave [x] Needs SU? turned on
click on [Save]
Now see how easy it is to boot to recovery.img
Just click on the script.
On my tablet a SuperUser screen pops up requiring my permission to run the script as superuser.
I click OK - you can set it to remember so this does not pop up again.
In seconds my tablet is booting the recovery image and I can select "backup" "restore" etc.
Sorry to be long winded but new bees need detail. It seems hard the first time but you'll appreciate it the second time you just click and reboot.
What other scripts have you created? Need to see?
In Android you can also create scripts to automate a series of task - no typing just click to select - and it runs.
My MID7015 is rooted with a Superuser.apk. I'm using gscript app to run the script.
Here are the three steps I want to automate:
This simple script reboots my Coby to the Clockworkmod menu. No holding buttons required.cp /sdcard/clockworkmod/recovery.img /sdcard/recovery.img
flash_image recovery /sdcard/recovery.img
reboot recovery
I try to keep root of /sdcard/ nearly empty and store files safely in subdirectories like /sdcard/clockworkmod (which is where the backups will be stored too.) So the first command is just to copy my Clockworkmod recovery.img file to the root of /sdcard/.
The second command flashes the image, the third command reboots the system.
So more of the nitty gritty. gscript has a text editor which I didn't like at all so I edited using TextEdit.
Install the app gscript
Launch TextEdit and type in the three commands above.
Save the file as /sdcard/gscript/Boot_Recovery.sh
(has to end with .sh or it will not run)
Launch gscript
Click on the menu button, select "Add Script"
click on [Load file]
Select the Boot_Recovery.sh file
Leave [x] Needs SU? turned on
click on [Save]
Now see how easy it is to boot to recovery.img
Just click on the script.
On my tablet a SuperUser screen pops up requiring my permission to run the script as superuser.
I click OK - you can set it to remember so this does not pop up again.
In seconds my tablet is booting the recovery image and I can select "backup" "restore" etc.
Sorry to be long winded but new bees need detail. It seems hard the first time but you'll appreciate it the second time you just click and reboot.
What other scripts have you created? Need to see?
Last edited: