DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 1 of 1

Thread: Need directions about scripting

  1. Master Droid
    chrstdvd's Avatar
    Member #
    122873
    Join Date
    Sep 2010
    Location
    McKenney Va
    Posts
    577
    Liked
    3 times
    Phone
    Droid Charge
    #1

    Question Need directions about scripting

    I am practicing writing scripts. I decided to take the instructions form:
    http://www.droidforums.net/forum/dro...-required.html
    and put them in a script on the emulator on my phone.

    I can enter the steps one at a time on the phone and everything goes well.

    When I am rooted, I can write a script for the unroot part in the /tmp folder chmod to 755 and ./ run it. After reboot the phone is unrooted but my script is no longer in the /tmp folder. Where do I need to put it to always have it available?

    When I am un rooted and write the script to root, it will not work from /tmp or from /data/local/tmp. I thought for sure since we push rage*.bin into /data/local/tmp, chmod it, and ./ it, I could do the same with my script. My script will not run rage from either of these folders, I get "permission denied" or "can't open" or "no such file or directory." I have tried ./rage, .rage, and sh rage.

    If I ever get rage to run from a script then there is the part when it is done where you have to go kill the emulator. I can not figure out how to do that from a script, so I guess, I will have to write another script to finish off the process after I manually kill the emulator and restart it.

    Another aggravating thing for me is when unrooted using Root explorer I can not cd to data/local/tmp and ls, but if I hook up the the computer and use adb to open a shell, I can cd to any folder on the phone and ls ,to see what files are in the folder.

    I guess I am asking, "How do I write a script and place it in /system/bin or system/app and run it like any other command?"

    Thanks

    Update: I found this link using Google: http://www.droidforums.net/forum/dro...ng-script.html
    I went into /system/xbin and wrote the script to unroot the phone, chmod, and the exited the emulator. I re-entered the emulator, su'ed typed "unroot" and it worked like a charm. After reboot (turn phone off /back on) I was unrooted and all the files were gone. COOL! Then to check, I used z4root and rooted again and then unrooted all over. Worked great that time too. Part one is done. Now on to part 2.

    Update 2: I got it! I wrote a script, root, that installed rage, then one root2 both in system/xbin chmod'ed them 0755 left the emulator, went back into emulator and typed "unroot" and and then the phone was unrooted. Next I turned off the phone and back on to verify I was unrooted. Next, I went into emulator and typed "root" and rage installed. Then I went into settings>applications>manage apps> running and force closed terminal emulator. Went back into emulator, had the # sign prompt typed "root2" and it ran. Then I typed "reboot" the phone rebooted into Droid 2 bootstrapper just like when I use the z4root and I clicked on "reboot" and she is rooted again.

    If anyone wants I will zip them up and post them on here, but I have scripts sysrw and sysro (to mount rw and ro) on my phone so, anyone who uses root and unroot scripts will need those files installed on their phone in /system/bin.
    Last edited by chrstdvd; 12-12-2010 at 01:21 PM.

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. GPS voice directions
    By meldupuis in forum Droid 2 Tech Issues
    Replies: 2
    Last Post: 08-12-2010, 08:16 AM
  2. just following directions
    By Metal in forum New Member Introductions & Site Assistance
    Replies: 3
    Last Post: 03-23-2010, 12:32 PM
  3. Perl or other scripting engine...
    By John.Edwards in forum Android Applications
    Replies: 3
    Last Post: 03-23-2010, 02:44 AM
  4. E Mailing Directions
    By jazzman77 in forum Android General Discussions
    Replies: 5
    Last Post: 12-07-2009, 07:01 PM
  5. Android Scripting Enviroment or ASE
    By cramit in forum Android Hacks and Help
    Replies: 0
    Last Post: 11-07-2009, 07:41 PM

Search tags for this page

android data local tmp folder

,
android emulator script permission denied
,

android sh script

,

android shell script permission denied

,

android terminal emulator run script

,

android terminal emulator scripts

,

android+can%27t+execute+shell script

,

scripts for android terminal emulator

,
terminal emulator can't cd
,
writea script in terminal emulator
Click on a term to search our site for related topics.

Tags for this Thread

Find us on Google+