For my current Android research project I needed to copy an APK to the /system/app
folder. Now for that you need root rights. Well, that shouldn't be a problem, right? There are dozens of apps out there which allow you to root your Android phone and put one of the available custom ROMs on it. For some devices there are one-click procedures available (i.e. Unrevoked), for others it may turn out to be a really painful story, especially if you run into the situation where you have done a system upgrade where no exploit for rooting has yet been found.
Anyway, in my case I really wanted to find the least invasive approach, mainly because the phones weren't mine but those of my testers. Hence, unlocking the bootloader, flashing a custom ROM etc isn't really what I aimed for. I was looking for a possibility to root a
Nexus One with Android 2.2.1 FRG83D on it and guys...there's a jungle of forum posts out there, some working, others are obsolete due to system upgrades and so on... Finally I found a solution that works just amazingly. Here are the requirements for the following to work:
Device Model: Nexus One
Tested Android OS version: Froyo 2.2.1 FRG83D (worked on a FRG91 as well)
Tools: latest Android SDK installed
OS: any, this tutorial describes OSX
Disclaimer: The following tutorial reports the steps listed in this forum. I am just reproducing their statements and am not responsible for any damage caused to your phone by following these guidelines.- Download the necessary files to your workstation. Click here to download.
- Extract the archive. For the temporary root, the main file of interest is "rootnow".
- Attach your Nexus One to your computer via the USB.
- Open the terminal. Type "adb devices". You should see the Nexus.
- In your terminal, navigate to the folder you downloaded till you see the "rootnow" file.
- Copy the file to your device by typing
adb push rootnow /data/local/tmp/rootnow
- Change the file access rights by typing
adb shell chmod 700 /data/local/tmp/rootnow
- Enter the shell, typing
adb shell
- Navigate to the "rootnow" script:
cd /data/local/tmp
- Switch off Wifi on the device
- Execute it:
./rootnow
Executing the script will terminate the adb connection. Re-enable it by first killing and then reactivating the adb server:
adb kill-server
adb start-server
If you now enter the shell again (typing adb shell), you should se a
#
sign instead of the usual
$
. Congrats, you're root now :). If you're still not root, try detaching your USB plug and re-attaching it again. Then execute step 10 another time.
Now you can perform your "root-operations". Note, this will just be a
temporary "rooting" as with the next reboot it will be gone again. Moreover I don't know how upgrading affects this.
In order to permanently keep root rights please follow the instructions on
the original site.
Questions? Thoughts? Hit me up
on Twitter