[Samsung Galaxy Nexus] androvoid:
Hi All,

I have spent this afternoon rooting stock 4.3 yakju and thought that I'd share the latest on how to go about doing this manually for the maguro GT-I9250. This is a complete guide which brings all the information you will need under the one thread which doesn't seem to have been done before except as separate guides and scattered information all over the internet.

NOTE: Unlocking and Rooting your device will void your warranty and can in some instances if not performed properly brick the phone. This process will also wipe your phone back to factory defaults so any personal files and applications will be lost. You should backup the device using the backup options in the recovery environment or by saving any personal files off the device via the USB cable, prior to unlocking your device. You follow this procedure at your own risk!!

With that disclaimer out the way there, We can begin.

NB: I ran all linux commands in this tutorial as root, I am not able to say if running as a standard user may cause issues, although one forum suggested to run as root or sudo up if you have a bootloop issue so I did this to avoid problems. This tutorial assumes that you have some experience with using basic Linux commands including but not limited to copying and moving files, changing directories, listing files, running scripts and executables using './' and using the console

So Firstly I am running Fedora 19 x64 with the latest kernel. It's a lot easier than trying to muck around with Windows 7 drivers and there are tutorials for installing these. To update on that tutorial you can use the official samsung drivers to install the adb and mtp drivers (may already be noted in the thread, but I might as well state it here also.) and the best place to get the official samsung drivers is by installing the Samsung Kies application.

You need to enable 'USB debugging' in order for ADB to work, you do this from 'settings --> developer options' if you can't see 'developer options' you may need to enable them, to do this, select 'settings --> about phone' and tap 'build number' until it says 'you are now a developer' which takes around 7 taps. In 'developer options', you may need to turn them on by clicking the 'on' button at the top. Once you have turned them on, select 'usb debugging' and this will then tell you that 'this may make your device less secure', agree/accept this, and continue. You can always turn it off later if you need to. Once you enable this, within linux you may get prompted when running adb to authorize (e.g. you are not authorized, check the device screen). You need to authorise from the phone, so allow the connection and select 'remember this computer' to save having to do it again.

Now for the bootloader driver it's a bit trickier to install. You need to reboot into the bootloader, by powering off the device and then powering back on again while holding the volume + and volume - keys at the same time. You will then probably get a failed driver install for 'Android 1.0'. At this point, you will need the universal Naked driver from this thread. Download and extract it to your 'Downloads' folder. Now go to device manager, right click on the 'Android 1.0' device and select 'update driver...' and then select 'browse my computer for driver software' and then select 'let me pick from a list of drivers'. Click 'have disk' and you will be able to install from the folder you extracted the 'Universal Naked Driver' into. You will now be able to use the fastboot command in Windows.

Ok. Now we have the windows users covered. In Linux, All I needed to do was download the android sdk adt tools. I'm using the 64 bit version, so I downloaded the 64 bit version from the adt bundle section here. Once I had downloaded and extracted these into a folder in my Downloads folder under my user profile, I copied the adb and fastboot files to a separate folder as these are the only things I needed in the bundle. you do this by typing

cp /home/<your_username>/Downloads/Androidadt/adb /home/<your_username>/Downloads/Nexusroot/
cp /home/<your_username>/Downloads/Androidadt/fastboot /home/<your_username>/Downloads/Nexusroot/

From here on you will want to be working from the 'Nexusroot' folder, so type

cd /home/<your_username>/Downloads/Nexusroot

.

From here, you need to obtain the recovery you wish you use, I chose to use the CWM v6.0.4.3 touch recovery which can be obtained from here. Once it's saved to your downloads folder you should copy it to your previously created 'Nexusroot' folder where we saved adb and fastboot.

The next item on the list is something I did because I was running the yakjuxw firmware and is the reason I did everything in Linux for this tutorial, as the firmware files are tarballed and opening the tar in 7zip shows 'unix filesystem' as the base folder. I installed the stock 4.3 firmware from google. I used the extracted files for the firmware as my 'Nexusroot' folder and copied fastboot and adb into this folder as well as the recovery image. I then ran ./flash-all.sh with the device in fastboot mode (you will need to have unlocked the bootloader prior to doing this, instructions are below in the next paragraph. The script basically just flashes the firmware with the fastboot command, if you want to flash the CWM recovery at the same time, you will need to rename the recovery file to the same name as the recovery image in the tarball and replace or rename the one that came with the tar file from google), If you have setup your environment in Windows 7 as described above, there is also a batch file that will do the same thing ensure the device is in fastboot before running the batch file/script or it will sit there and say 'waiting for device' and make sure the fastboot application is in the same folder as the script. Once the flash is complete your device will be running the stock 4.3 firmware. (edit: I have since extracted the entire image out of the tar with 7zip from Windows 7, you will be able to flash the base once you extract it all to a folder but you need to open the secondary container file in 7zip separately)

The next step is to flash the recovery. To do this, put the device into fastboot mode and unlock the bootloader using the command

fastboot oem unlock

select 'Yes' at the prompt, your device will now reboot twice and perform a factory reset which will wipe all data, at this point you may need to re-enable 'usb debugging' from your settings (see above for instructions), re-enter fastboot mode by typing

adb reboot bootloader

next type in

fastboot flash recovery recovery-clockwork-touch-6.0.4.3-maguro.img

Your device will now install the touch recovery we downloaded earlier. Once done, type the command

fastboot reboot-bootloader

.

Now to root the device, download the SuperSU zip file from the link and copy it to your 'Nexusroot' folder. Now boot into your recovery environment by using your 'Volume -' key to select 'boot recovery' and allow the device to boot into the recovery environment. This will allow you to use the adb command. Change directory into your 'Nexusroot' folder if not already in it, and type

adb push UPDATE-SuperSU-v1.43.zip /sdcard/0

This will copy the zip file to the internal memory card. From the recovery environment on the phone, select 'install file from sdcard' and then 'choose zip from sd card'. Select '0' and then select the 'UPDATE-SuperSU-v1.43.zip' file and select 'yes - install...' and the zip file will install the SuperSU application and binaries. Your device is now rooted, however you will need to run the SuperSU app to update the binary again. We will discuss this further after the next step.

Now we should lock the bootloader again to prevent tampering with our recovery and other firmware images however if you wish to flash other ROMS you will want to leave this unlocked, or you will need to unlock it again next time you want to flash a rom. To lock the bootloader, with the phone in fastboot mode, you simply type

fastboot oem lock

and this will re-lock the bootloader. Note you will not be able to flash any radios, kernels, or other .img files while this is locked. Now reboot your phone back into Android.

Now that you know how to unlock your phone, it's rooted, and has a recovery environment installed, you need to activate your SuperUser install. To do this, open the SuperSU app, and when prompted to update, click 'continue'. You will at this point be asked how you want to install it, select 'CWM/TWRP Recovery' and your phone will reboot, you will see an update occur on the screen and SuperSU will now be correctly installed.

You can now begin experiencing the freedom to use whatever ROM you want, customise your device how you want, and even change which applications you want installed regardless of whether they are system apps or otherwise.

I hope this guide is helpful.

References:

http://xdaforums.com/showthread.php?t=1379875

http://xdaforums.com/showthread.php?t=1830108

http://xdaforums.com/showthread.php?t=2117822

http://xdaforums.com/showthread.php?t=2065470

http://www.ibtimes.com/how-root-galaxy-nexus-i9250-nexus-4-android-43-jelly-bean-official-firmware-tutorial-1362063

http://www.clockworkmod.com/rommanager

https://developer.android.com/sdk/index.html

http://www.ubuntu.com/phone/install

https://developers.google.com/android/nexus/images

Thanks:

[MENTION=391935]1wayjonny[/MENTION]

[MENTION=4162058]TECK[/MENTION]

[MENTION=4975115]samersh72[/MENTION]

Without your guides I wouldn't have been able to do this.