ADB Root helper for Linux/Mac


Last Updated:

  1. n_i_x

    n_i_x Member This Topic's Starter

    Joined:
    May 21, 2010
    Messages:
    19
    Likes Received:
    14
    UPDATE: If you've used this script to root in the past you should redo it again. A new payload has been released with an updated su binary which allows Superuser.apk to work properly!

    I wrote this for someone on IRC...

    Figured others may find it useful.

    It's a helper script to somewhat automate the root process and guide you through most of the steps.

    Requirements:

    adb in path (or copy this script to the same location as adb)

    To use:
    extract
    chmod +x adb_recovery_helper.sh

    then
    sudo ./adb_recovery_helper.sh

    If adb is not in your path:

    cd to /path/to/androidsdk/tools
    export PATH=$PATH:`pwd`

    Enjoy!

    Download:

    adb_recovery_helper_1.3.zip

    Updates:

    Version 1.3:
    - Updated payload
    - Added AdBlock hosts file option
    - Using local files instead of downloading
    - Superuser.apk is no longer optional
    - Less commands to run in adb shell due to payload update

    Version 1.2:
    - Change /system/bin/su perms to 6755
    - Added optional Superuser.apk
    - Added optional WiFi tether drivers
    - Changed wording of instructions a little

    Version 1.1:
    - Added option for custom recovery install
    - Prompts the user to see if the payload worked and allow retry
     

    Advertisement
    g00fy1, xyzsb, crazydog and 2 others like this.
  2. crazydog

    crazydog Well-Known Member

    Joined:
    May 20, 2010
    Messages:
    240
    Likes Received:
    46
    Just a note, you need to download curl if you're using ubuntu, as it's not preinstalled. :p

    I'm about to try it. I'll post back with any feedback.

    For reference, I'm on Ubuntu 10.04 x64

    Meh. Spent 45 minutes trying. Never got ADB. Is there anything I could be missing?
     
  3. jpvonhemel

    jpvonhemel Member

    Joined:
    Apr 20, 2010
    Messages:
    17
    Likes Received:
    1
    Thanks for the script. Roughly 25 attempts without ever seeing We have ADB in Recovery.
     
  4. jpvonhemel

    jpvonhemel Member

    Joined:
    Apr 20, 2010
    Messages:
    17
    Likes Received:
    1
    I did achieve root with your script and Snow Leopard. I had to microSD bang the droid (In/Out/In/Out) using the Sandisk 2GB that VZW gave me with the phone. Both Sandisk 1GB and Kingston 8GB (4 rating) did not work for me.

    I initially had a problem where I saw, when you see file verifying or something to that effect, press any key. The script needs to differentiate between the mac and the droid. It took me a while to realize I needed to hit a droid key to feed it the unrevoked files. Second, I missed installing tether because I thought the script was over after enabling su and removing city id then typing exit in adb. I manually added it to the card and have tethering now.
     
  5. aptmx

    aptmx Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    91
    Likes Received:
    9
    I tried about 10 times and all I saw was waiting for ADB...

    Running Snow Leopard. It just never displayed "We have ADB in Recovery!"
     
  6. jpvonhemel

    jpvonhemel Member

    Joined:
    Apr 20, 2010
    Messages:
    17
    Likes Received:
    1
    Make sure your path variable is set correctly. at a prompt, make sure you can run adb shell. It should say device not found. If it says command not found, the script is not going to find the adb command correctly. My path variable did not export correctly and the script did not warn me that it could not find adb. Not sure if you are unix savy or not. I'm not, just futz through with cook booking from google.
     
  7. aptmx

    aptmx Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    91
    Likes Received:
    9
    I currently have Terminal pointed to the SDK tools directory where adb_recovery_helper.sh is located. However when I run adb shell it does state command not found. Sorry for my ignorace but can you tell me what to type or move to make it say device not found? Thank you
     
  8. aptmx

    aptmx Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    91
    Likes Received:
    9
    Ok I have figured out how to get terminal to say device not found instead of command not found by using the path command. Now I have typed sudo ./adb_recovery_helper.sh
    This starts the automated script in Terminal but it still says Waiting for ADB every time I boot into recovery? I know it says it takes a few tries to make it work but I no matter how many times It just says waiting for ADB...

    Any ideas on what I am doing wrong?
     
  9. sanderscm2

    sanderscm2 Active Member

    Joined:
    Apr 29, 2010
    Messages:
    27
    Likes Received:
    0
    I should be able to just drag the .sh into terminal and run from there right?
     
  10. NocturnalJazz

    NocturnalJazz Well-Known Member

    Joined:
    Mar 14, 2010
    Messages:
    268
    Likes Received:
    119
    Correct.

    I've had it running and tried doing reboots a number of times with no success :-(

    I'm going to go pick up a class 2 pny card at wal-mart.

    I'm running 10.6 leopard
     
  11. sanderscm2

    sanderscm2 Active Member

    Joined:
    Apr 29, 2010
    Messages:
    27
    Likes Received:
    0
    That's what i've been doing to. I'm pretty ignorant to terminal, so i guess maybe it's because I don't have the script in the same place as adb? If so, how can I move it there?

    I know the obvious thing is to wait until the unrevoked root comes out, and I honestly have no need to root other than I find it really interesting.

    Edit: I'm making progress as to understanding basic terminal navigation, but I still have a few questions.

    Should I have the phone on Charge or Disk Mode?
    Should I have the phone plugged in prior to starting the script?
    I don't need to login to root user on my macbook, I can just place everything on my user directory and as long as I'm an admin I'm good, right?
     
  12. FloridaOranges

    FloridaOranges New Member

    Joined:
    Apr 8, 2010
    Messages:
    4
    Likes Received:
    0
    Does this work on a mac running tiger?
     

Share This Page

Loading...