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

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 does not group by applicati…

Meet elementary OS Freya : A fast, lightweight and beautiful replacement for OS X and Windows

My favorite Linux distribution - elementary OS has released a new stable version named elementary OS Freya. After being under development for a 1 year and a half, its finally here and it’s now even more polished, clean, beautiful with great new features and three new default apps.

elementary OS is a Linux distribution based on Ubuntu and the latest release Freya is based on Ubuntu 14.04 LTS. Being based on Ubuntu doesn't mean that elementary OS is just a skinned version of Ubuntu. It features it's own shell named Pantheon Shell and comes with its own set of custom apps and many unique features. One of ther perks of being based on Ubuntu is that elementary OS users can benefit from the large number of repositories and apps available on Ubuntu platform.
According to elementary OS team, their previous release named elementary Luna (released on August 2013) was downloaded more than 3 million times and the interesting fact is that, 60% of those downloads were from non- free OSes. …

Dukto : An Open-source, cross-platform LAN file transfer tool

Dukto is an open source, multi-platform, easy to use  file transfer tool designed for LAN use. I have been using it for over an year now to transfer files from my Laptop (running various Linux distros) to my phone and other windows PCs. It's user interface is inspired from the Metro style UI developed by Microsoft and it is consistent across all supported platforms.

(Dukto in Fedora 22)

(Dukto in Android 4.4.4)

Dukto is developed by Emanuele Colombo, a software developer and engineer. Dukto automatically displays all the devices in your local area network running Dukto and you can select the devices and start transferring files. You can even send a folder to another device.




(File Transfer between my Laptop and my Phone)


You can also transfer text snippets like links and notes easily from one device to another.


You can change the default folder to save received files from the settings. You can also change theme color and device name from settings.



Dukto is available for various Linux…