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 meth

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 launcher. I

Gnome Extensions I Use To Enhance My Desktop Usage

I am currently running Fedora 22 with Gnome 3.16 . One of the best features of GNOME are shell extensions. These extensions bring all sorts of handy features to GNOME. Installing and using GNOME extensions couldn't be any simpler. Simply browse over extensions.gnome.org  and look for the extension that appeals to you. Click the switch from Off to On, and immediately you're prompted to install it. That's it. Here are the extensions that I use to personalize my Fedora 22 experience and maximize my performance. Hopefully they can make you enjoy your Gnome Desktop experience. 1. Activities Configurator It can be used to configure the activities button and Top panel appearance. https://extensions.gnome.org/extension/358/activities-configurator/ 2. Alternate Tab GNOME Shell’s default Alt-Tab behavior groups windows into a single application icon and shows applications from all workspaces. This extension substitutes Alt-Tab with a window based switcher that