[GUIDE] Linux Ubuntu: Unlocking Bootloader / Rooting Nexus S

Search This thread

VirtualVoyage

Member
Jan 29, 2012
10
0
This guide is quite outdated, namely the image files to download are last generation and it isn't actually required to flash clockwork recovery by hand anymore. There's an app for that.
 

as6

Member
Jun 19, 2011
47
6
Graz
udev in debian

gedit /etc/udev/rules.d/99-android.rules
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="18d1", MODE="0666", OWNER="you", GROUP="your group"
 

josebasanchezjs

New member
Feb 1, 2012
4
0
Bilbao
Hi all.

I'm new here, and I have rooted my Nexus S without any issue following this good guide.
The question is: Can anybody tell me if this tutorial would work with other devices apart from Nexus S? Installing the sdk tools and without drivers issues, changing the manufacturer code, would be valid?

I'm trying to help a friend to root his Samsung Galaxy SII.

Thanks in advance.
 

joe2me

New member
Feb 16, 2012
3
0
thx. Worked but had to change a few of the steps.

1. File is called android-sdk_r16-linux_86.tgz

7. not needed. already installed in new version of 1.

8. same but also add a file called 90-android.rules containing: SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"

sudo reload udev

11. chmod +x adb
chmod +x fastboot
 

joao2c

Member
Apr 20, 2011
41
8
Hello all. If I use this method on a tablet dropad a8x ( same CPU) that I will be successful or will it brick?
 
Last edited:

treesurf

Senior Member
Sep 8, 2010
685
153
I've just picked up a 9020T Nexus S with stock jellybean. Is this still the best method for rooting the phone using Ubuntu, or is there an easier method?

I noticed that some of the links in the first post no longer work. Thanks!
 

albundy2010

Senior Member
Sep 24, 2010
3,707
2,580
Yes it still stands and works.

Just get the SDK from Google.
http://developer.android.com/sdk/index.html

Fastboot is included in the SDK. No need to worry about that link to it in the op

Edit. Also download your custom recovery and root zip of choice in place of what is in the op.

Basically sub in the new files but the process itself is the same
 
Last edited:

dodohjk

Member
Sep 25, 2012
8
0
waiting for device

follow the steps from 1 to 10
also got the sdk from google and fastboot was included
but when i start on the next section and run command "fastboot oem unlock" the terminal just tells me <waiting for device> and nothing appears on my phone.
earlier in this thread it says to update the drivers, how can i do that?

thanks for any help
 

dodohjk

Member
Sep 25, 2012
8
0
done, thanks
for a second i thought i had the same problem even with the other howto but searching in the comments i discovered that my problem was i didn't use sudo
the command is "sudo ./fastboot-lux oem unlock"

thanks again time to mess up my phone properly now:p
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    One thing I've noticed is there isn't a lot of documentation for getting set up and unlocking your bootloader on a Linux OS. Setting up your machine to get adb and fastboot to recognize your device takes a tiny bit of extra work on a Linux operating system, but what exactly needs to be done may not be clear to everyone. Whether it's because you're new to the Android SDK/adb, somewhat new to Linux, or can't simply can't seem to find the Vendor Code for the Nexus S. (For those who are looking specifically for this, it's '18d1', and I assume will be the same on all Nexus devices to come; If this means nothing to you right now, read on.)

    Disclaimer: I take no responsibility if something goes wrong (if it does, it should be fixable though), Unlocking your bootloader voids your warranty (but you can lock it back), Unlocking the bootloader will wipe your entire phone, including USB Storage; so make a copy of all those family photos and other files you may have put onto the USB storage if you want to keep them.

    For the sake of sanity, this guide assumes you are using Ubuntu. If you're using something else (or different applications), there are terminal commands offered, and you probably have an idea on how to adapt the given instructions to your Linux OS.

    Preparation: Installing the Android SDK, ADB, Fastboot & Setting Up Your Nexus S to be Recognized

    1. Download the Android SDK for Linux: http://dl.google.com/android/android-sdk_r08-linux_86.tgz

    2. Save it in a folder of your choice. I chose to keep it in my Downloads folder, myself. If you'd like, you can rename it to the simpler name of 'AndroidSDK.tgz'. The rest of the guide will assume that you did, because I'm lazy, and it makes things simpler; it will also assume you saved it in Downloads. If you feel that you have the intuition to rename and edit the path names based on your own choices, then fine; but if you're utterly lost here, just stick with what I'm doing; download to 'Downloads', rename to 'AndroidSDK.tgz'.

    3. Now that you have it, navigate to the folder you downloaded it to, right-click, and click 'Extract' to unzip it. If for some reason you cannot do this, open up a terminal and try this command:
    Code:
    tar zxvf /home/<your-user-name>/Downloads/AndroidSDK.tgz
    You may have to adjust the command if you didn't save it under Downloads or didn't rename the file to AndroidSDK.tgz.

    4. Now, we'll install adb and some other software packages by starting up the Android SDK and AVD Manager. Start it either by:

    - Navigating to your AndroidSDK folder, going to the 'tools' folder and double-clicking the file called 'android'; if a popup opens asking you what you want to do with it click 'Run'.

    - Using this command:
    Code:
    /home/<your-user-name>/Downloads/AndroidSDK/tools/android

    5. In Android SDK and AVD Manager, click on "Available packages". Check the box next to "Android SDK Tools, revision 8" and "Android SDK Platform-tools", and click on "Install Selected" then "Install". When prompted click "Yes" to restart ADB.

    6.You should now have a folder in /home/<your-user-name>/Downloads/AndroidSDK/ called "platform-tools".

    7. Download fastboot here: http://developer.htc.com/adp.html
    - Save it to the aforementioned platform-tools folder.
    - Now, navigate to the file, right click it, click 'Properties', go to the 'Permissions' Tab and check 'Allow executing file as program'. Alternatively, run this command:
    Code:
    chmod +x /home/<your-user-name>/Downloads/AndroidSDK/platform-tools/fastboot

    8. Now to set things up so adb and fastboot recognize your Nexus.

    - Type this command into a terminal:
    Code:
    gksudo gedit /etc/udev/rules.d/51-android.rules
    - Paste this into the blank file:
    Code:
    SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
    - Click save and close.
    - Then, type the following terminal command:
    Code:
    sudo restart udev

    9. Almost done with preparations! Run this command:
    Code:
    gedit .bashrc
    And add this line to the top of the file:
    Code:
    #AndroidDev PATH
    export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools
    Then save the file and close.

    10. Download this file and save it to /home/<your-user-name>/Downloads/AndroidSDK/platform-tools: http://www.mediafire.com/?4pe5y906zr67nfh

    10.We're ready to go!

    Unlocking the Bootloader on your Nexus S and Rooting

    Once again, unlocking your bootloader wipes everything on your device, including USB storage. Make a backup of any files you want to keep.

    1. On your Nexus S, go to Menu>Settings>Applications. Select "Development" and check the box next to "USB debugging"

    2. Power off the phone, and then hold down the Volume Up button and the Power button simultaneously to get into Bootloader/Fastboot mode. Connect your Nexus to the computer via USB.

    3. Run this command to unlock your bootloader: (Once again WIPES EVERYTHING!)
    Code:
    fastboot oem unlock

    Hit Enter and on your phone you will be prompted to confirm the action. (Use Volume +/- buttons to choose, power button to confirm choice) Confirm. At this point you will have an unlocked bootloader.

    4. Copy/paste the following into the Terminal window:
    Code:
    fastboot flash recovery /home/<your-user-name>/AndroidSDK/platform-tools/recovery-clockwork-herring.img

    5. Use the Volume +/- buttons to choose the Recovery option, then press the power button.

    6. In Recovery, go to 'mounts and storage' and choose 'mount USB storage'.

    7. Go to this page: http://xdaforums.com/showthread.php?t=682828

    About 1/5 of the way down on that page, find the link for "su-2.3.6.1-ef-signed.zip", which is the link for the Froyo version of Superuser. Control-click (right click) on that link and choose "Download Link As..." Save that file to your desktop and then copy it to the main directory of your mounted phone.

    8. Click 'Unmount'. Go back to 'mounts and storage' and choose 'mount /system'. Then Go Back and choose 'install zip from sdcard'>'choose zip from sdcard'>su-2.3.6.1-ef-signed.zip

    9. When it's finshed installing, reboot. You are now rooted.

    Special Thanks
    Amin Sabet; I used your Mac guide as a reference and copy/pasted some things for convenience. :p

    Koush; For first posting the unlocking information, developing ClockworkMod Recovery, and ROM Manager. You should probably hook him up with a donation. https://www.paypal.com/us/cgi-bin/w...63663d3faee8d9384d85353843a619606282818e091d0 :D

    Michael.B.; for suggesting adding the platform-tools folder to the .bashrc file.

    Linus Torvalds; Without which we'd have neither Android nor Ubuntu. :p

    Feel free to leave your comments on the guide below. :)
    3
    Good guide for beginners, I would throw in how to update their path so they can just type adb or fastboot

    On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ and platform-tools directories to it. If you don't see a line setting the path, you can add one:
    export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools

    Be sure to update your username above.
    1
    I forgot to ask: will this work for 64 bit systems?

    It should work just fine.
    1
    It should work just fine.

    Yes but don't forget to install 32 libs.

    Thanks for guide :)
    Useful !
    I'm waiting for cyanogen ROM so i'll able to install :)
    Cheers
    1
    To confirm, yes it works on 64bit. I am running that :D