Skip to main content

How to Unlock Bootloader, Flash Factory Images and Custom Recovery in Google Nexus Devices in Linux




Step 1 : Enable USB debugging

On your Nexus device, go to Settings> About Phone. Then tap on "Build Number" repeatedly until a dialog says "You're now a Developer".

Now go back to Settings and you will see a new "Developer Options" near the bottom of the menu. Go to "Developer Options". Then scroll down and select on "USB debugging".


Step 2 : Download Factory Image for your Nexus Device

Open the link below and download the correct the correct build for your device.

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


Step 3 : Download Custom Recovery for your Nexus Device

Open the link below and download the newest recovery image for your device.

http://teamw.in/twrp_view_all_devices


Step 4 : Connect your device to the computer via micro-USB cable.


Step 5 : Install Android Developer Tools

To install Android Developer Tool adb and fastboot on your computer, open the Terminal and enter the commands below.

sudo apt-get install android-tools-adb
sudo apt-get install android-tools-fastboot


Step 6 : Check if adb recognizes your device

To check if the adb recognizes your device type the following in Terminal.

adb devices

It can ask you to allow connection to computer in your phone, select always allow. It should show something like the screenshot below with some numbers and device connected information. Otherwise your device is not recognized and you cannot continue any further.



Step 7 : Reboot your device to Bootloader Menu

adb reboot bootloader

If the command is successful, your device will boot into bootloader like the picture below.


Step 8 : Flash the Factory Image

Extract the factory image file you downloaded. Then go inside the directory and right click and Open in Terminal. Now you will run the flash-all.sh file in the directory using following command in terminal.

sudo ./flash-all.sh


You can skip Step 9 and 10 if you don't want to mess with the bootloader.


Step 9 : Unlock the bootloader

Unlocking bootloader will wipe everything in your device and void your warranty so make sure you want to do this before using the following command. But you can always relock the bootloader any time in the future. 

sudo fastboot oem unlock


Skip Step 10 if your want the bootloader to remain unlocked.


Step 10 : Lock the bootloader

sudo fastboot oem lock


Step 11 : Flash Custom Recovery

Go to the directory where you downloaded the custom recovery. Right click and Open Terminal. Then enter the following command. 

fastboot flash recovery (the file name of the recovery image).img


For example it can be like :

fastboot flash recovery openrecovery-twrp-2.8.1.0-grouper.img



To root your Nexus Device

Download the CF-Auto-Root zip file for your device from the link below :

http://autoroot.chainfire.eu/
Then extract the zip file. Navigate to that folder and open Terminal there. Enter following command first.

chmod +x root-linux.sh

Then enter following

./root-linux.sh


It may ask you to press Enter once. Do that and let it do the rest. 


I hope this post helped you. If have any questions you can write then in the comment section below.



Stay High on Android. Peace!!!

Comments

Popular posts from this blog

How to enable Google Now in Nepal and other countries (Solve - Google Location reporting not available in your region problem)

Google Now was first introduced in Android 4.1 Jellybean and it has been used as a personal assistant by many android users ever since. However after the introduction of Android 4.4 Kitkat many users started to complain that the search update broke google now functionality.   Some of you might just have bought a shiny new Nexus 5 to enjoy a fine android experience but the lack of Google Now left you disappointed. When on the home screen of the default Android Launcher, swiping to the left should take you to the Google Now interface but for some of the users it is nowhere to be found. Also there are many people who flash custom roms to enjoy latest android builds on their devices. I am using Galaxy Nexus which didnot get the Kitkat update from Google. So i flashed a custom rom which promised the Google Now feature on the left side of the homescreen of default Kitkat launcher. But like some of you Nexus 5 users i was left disappointed. So i began my quest for searching a ...

How to enable Google Now in Android 5.0 Lollipop in Nepal and every other countries (location reporting not available problem) [ROOT Needed]

  [This method works only on Rooted Devices] I had posted a guide earlier this year on How to Enable Google Now in Nepal and other countries. That method works flawlessly on both Rooted and Non-Rooted devices running Android 4.0 to Android 4.4.4 Kitkat. Android has now gone into major overhaul in both design and software functions like ART being now default in Android 5.0 Lollipop. But with the new version of Android, same old problem arrived for the people living in Nepal and many other countries - "Location reporting is not available in your country". Tried every available method to enable Google No w ? Still no luck??  Keep calm guys, I have a solution. Remember that this method works only on Rooted devices. Here's a video showing Google Now running on my Phone. (ignore Ariana Grande news there. I googled her only when I was shocked to hear Big Sean is dating her :D ) Here are the steps to be followed: Step 1 : Install any custom launch...

How to Root Xperia Tipo, flash custom recovery and install a custom rom

You bought a Sony Xperia a while ago. At first things were great,  your phone was speedy and you were using Android 4.0 IceCream Sandwich  in a phone by SONY. But it received no updates from Sony and your phone started to slow down. Phones by relatively poor brands like Karbonn, Micromax were rocking Jelly bean while you were stuck at an android version released in 2011. As things stand Sony no longer cares about its Tipo users and wont provide any updates. So what can you do? Buy a new phone?? Naaah. Just keep calm and root your phone. Follow the steps below carefully and have patience. (Make sure your phone at least 70% battery charge left. Backup everything you need using ( App Backup & Restore ) or ( Helium - App Sync and Backup ) How to Root Xperia Tipo Step 1: Go to Developer Options inside settings and enable USB Debugging by going to Manage Application > Development >Select USB debugging. Step 2: Do...