Lock / Unlock Nexus 4 Bootloader (Fastboot Commands)
Just got your hands on Nexus 4? The first thing you should do is to unlock Nexus 4 bootloader before you go on to install apps and take photos. When you unlock the booatloader, all of the data gets removed, so its better to do it when you do not have any data on the device. The process is pretty straight forward. However, before you get started, you will first need to install fastboot for your OS. Here is the step by step guide that will help you along the process:
Fastboot Nexus 4 on Mac / Windows / Linux (Ubuntu)
Step 1: Install Android SDK: Download and install Android SDK from Official Android Dev website on your computer. You can download the SDK for Windows, OS X and Linux.
Confused? When you navigate to the directory where you installed Android SDK, you will find a directory named “platform-tools”. You just need to copy the fastboot there.
Step 3: Switch your phone off. Now press and hold Power + Volume down buttons together till you see some text appear on screen.
Step 4: Connect your phone to the computer via USB cable. Now launch Terminal / Command Prompt and execute cd commands to navigate to platform-tools directory inside the Android SDK installation directory.
That’s the directory where you copied fastboot in step 2 above.
Step 5: Execute following commands one by one on Command Prompt or Terminal:
fastboot devices <—this command will display your device ID.
fastboot oem unlock
After executing the commands, follow the prompts on your device to confirm the bootloader unlock. Remember that it will erase all your data.
Your phone will now reboot and once it boots up, you will have Nexus 4 with unlocked bootloader. Enjoy!