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

Root ADB Root helper for Linux/Mac

n_i_x

Newbie
May 21, 2010
19
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
 
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.
 
Upvote 0
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.
 
Upvote 0
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.

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
 
Upvote 0
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?
 
Upvote 0
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

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?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones