Thoughts? Using Gscript to root your 2.2 X?

Daali

Member
Joined
Sep 9, 2010
Messages
207
Reaction score
0
Location
Athens, GA
Christim has this great walkthru on how to root on your phone without a PC. I was thinking how we could use GScript to do this without all that typing =)

http://www.droidforums.net/forum/re...08-multiple-phones-root-them-unroot-them.html

Step 2 option A: is a perfect solution for someone away from the computer. I was thinking that you could roll these into 2 Gscript lite(unbelievably great application) scripts and root with 2 clicks. The only uncertain part would be how the exploit file(rageagainstthecage) acts with the Gscript wrapper. We are not changing the process at all, just rolling them into batch in Gscript. I have changed the paths from /sdcard/download to /sdcard/gscript from the above walkthru to make it easier to import the scripts in GScript.


Anyway, this has not been tested, but the next time someone wants to root, you could try this out.


  • Visit the market and make sure you have Astro installed.
  • Visit the market and make sure you have Gscript or GScript Lite installed.
  • Visit the market and make sure you have Android Terminal Emulator installed for a sanity check afterroot.
  • Download and extract the GScript_Rootfiles to your /sdcard/gscript directory. Or gather them yourself, you need [ su, busybox, Superuser.apk, and rageagainstthecage-arm5.bin in this directory ]
  • Create 2 scripts in Gscript(import the 2 .sh's from file):
  • 1st script import: Menu Button -> Add Script -> Uncheck "Needs SU" -> click "Load File" -> Select "1_exploit_for_root.sh" -> click Save
  • 2nd script import: Menu Button -> Add Script -> Uncheck "Needs SU" -> click "Load File" -> Select "2_copy_root_files.sh" -> click Save
  • Run the 1stscript(1_exploit_for_root.sh) in GScript. This will take some time, just wait for GScript to autoclose the window.
  • Run the 2nd script(2_copy_root_files.sh): wait for GScript to autoclose the window.
  • Open Android Terminal Emulator and get to the $ prompt.
  • type su and let's see if we get the # prompt. (Superuser.apk may prompt you at this point if it is ok for the program to have su rights).

This is all theory at this point, since I am not unrooting to test, lol. But if I factory wipe I will test this out. Here are the 2 scripts in the file, you could just copy paste them into Gscript from your phone. Again, none of this is my work, and I humbly thank Gscript, Astro, Android Terminal Emulator, Christim, ChainsDD, and whomever wrote/compiled the exploit!

1_exploit_for_root.sh
Code:
  cd /tmp
   cp /sdcard/gscript/rage*.bin /tmp/
   chmod 777 rage*.bin
   ./rage*.bin
2_copy_root_files.sh
Code:
   mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
   cp /sdcard/gscript/Superuser.apk /system/app/Superuser.apk
   cp /sdcard/gscript/su /system/bin/su
   cp /sdcard/gscript/busybox /system/bin/busybox
   chmod 4755 /system/bin/su
   chmod 4755 /system/bin/busybox
   mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
 

ArmyDude

Member
Joined
Aug 25, 2010
Messages
374
Reaction score
1
I don't see why that wouldn't work. In essence, you are just running the scripts that are pre-typed.
 

chazall1

Member
Joined
Jun 29, 2010
Messages
111
Reaction score
1
I believe these scripts would run on this phone system. Same as a linux (Ubuntu) os. The DX is nothing more than a small laptop!
 
OP
Daali

Daali

Member
Joined
Sep 9, 2010
Messages
207
Reaction score
0
Location
Athens, GA
I don't see why that wouldn't work. In essence, you are just running the scripts that are pre-typed.

exactly. The only gray area in my head would be how GScript is terminaling/shelling and how the exploit works(spawning child processes, etc) in a "real" shell.

Either way, you could just launch them from Android Terminal Emulator and skip the typing =)
 

Abe21599

Super Moderator
Rescue Squad
Joined
Dec 22, 2009
Messages
6,322
Reaction score
31
Location
Ohio
lol nice idea but that still seems to be just as much work as just using the TE to type in all the commands.
 
OP
Daali

Daali

Member
Joined
Sep 9, 2010
Messages
207
Reaction score
0
Location
Athens, GA
lol nice idea but that still seems to be just as much work as just using the TE to type in all the commands.

=)) except I did all the typing. That's the only thing it buys you is not typing into the terminal. I still think someone can roll this up into a apk, for an on phone root; granted I do not know the exact specifics of the spawning child exploit, and how that could change if shelled through another process.
 
Top