Thoughts? Using Gscript to root your 2.2 X?

Discussion in 'Droid X Hacks' started by Daali, Oct 25, 2010.

  1. Daali
    Offline

    Daali New Member

    Joined:
    Sep 9, 2010
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    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
       
  2. ArmyDude
    Offline

    ArmyDude New Member

    Joined:
    Aug 25, 2010
    Messages:
    374
    Likes Received:
    1
    Trophy Points:
    0
    I don't see why that wouldn't work. In essence, you are just running the scripts that are pre-typed.
  3. chazall1
    Offline

    chazall1 Member

    Joined:
    Jun 29, 2010
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    16
    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!
  4. Daali
    Offline

    Daali New Member

    Joined:
    Sep 9, 2010
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Athens, GA
    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 =)
  5. Abe21599
    Offline

    Abe21599 DF Super Moderator Rescue Squad

    Joined:
    Dec 22, 2009
    Messages:
    6,345
    Likes Received:
    29
    Trophy Points:
    48
    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.
  6. Daali
    Offline

    Daali New Member

    Joined:
    Sep 9, 2010
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Athens, GA
    =)) 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.
Search tags for this page
gscript lite sdcard root
,
gscript lite.apk 2.2
,
how to type command gscript lite
,

root droid x 2.3.4 gscript lite

,

using gscript