• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Linux move download script

Atma

Extreme Android User
Too much time on my hands and I know diddly squat about Linux. I was playing around with this:

# cd /cache
# mv download download.old
# mkdir -p /sdcard/cache/download
# ln -s /sdcard/cache/download download


I want to make an executable (like a batch file) that will run it without having to type all that in. I named it movedownload2.sh in notepad. So I change it to this?

#!/bin/bash
# cd /cache
# mv download download.old
# mkdir -p /sdcard/cache/download
# ln -s /sdcard/cache/download download


Then use this to make it an executable?

chmod a+x movedownload2.sh

And run it like this?

./movedownload2.sh

I have it in the root of the sdcard. Would I cd /sdcard and then run it? That's what I did when making it an executable and didn't get an error.

I thought I was doing ok but when I tried to run it it said, ./movedownload2.sh permission denied

What am I doing wrong? Everything? :D
 
You're on the right track, you should check the code.google pages. That will give you enough to put you over the top, and your script will work. Then you can share it with other members and reap in the accolades which will be yours.
 
Then you can share it with other members and reap in the accolades which will be yours.

It may be in the next BACKside update anyway. I know Jerry was checking into it. I thought playing with this would ease the update withdrawals. Besides, I prefer cash to accolades. :D

Actually, I was looking to get that script to work so I could maybe play around with this for TE and some kind of batch for ADB:

(line #1) su(return) [If using a command Prompt type in: adb shell (return) instead]
(line #2) mount_-o_remount,rw_-t_yaffs2_/system_/system(return)
(line #3) cat_/sdcard/flash_image_>_/system/bin/flash_image(return)
(line #4) chmod_755_/system/bin/flash_image(return)
(line #5) flash_image_recovery_/sdcard/recovery.img(or however it's named exactly, on the sd card) (return) If you get a # after typing all that in, continue with the sixth line of code. If you did not, or got an error anywhere, start over.
(line #6) reboot_recovery(return)

I think a script for that would be helpful. Thanks for the code link. :cool:
 
Back
Top Bottom