Nexus 4 Guide-Unlock Bootloader, Root, Install Custom Recoveries & Custom ROMs

Prerequisites
  1. Google USB drivers delivered with Android SDK (Do it the way you find it easy). Remember, USB drivers in this case doesn’t mean only the drivers to mount the device storage but rather the fastboot and adb drivers too.
  2. Compatible USB data cable.
  3. Android SDK configured (Follow this guide to setup Android SDK and thus it itself configures ADB and all other SDK components)
  4. USB Debugging enabled (Don’t know how? Take a look here)
  5. Backup Device Storage, Messages, Contacts, Calendars etc.
  6. 60% or above battery life (This is a recommendation to avoid any uncertain shutdowns during the mentioned process, it might cause issues)
  7. Fastboot binary (Put the file in <sdk_directory>/platform-tools)
Once you have filled in all the requirements, you shall follow further. If you have problem with setting up the prerequisites, please comment and get your issue resolved. Always remember, the more you ask, the more put up to your knowledge and the more you learn.



Unlock Bootloader
Don't want to lose your data after unlocking? Read this.
  1. Reboot your device into bootloader mode. Either manually, by powering off and then pressing Volume Down + Power buttons simultaneously or using the following command in CMD/Terminal.
    Code:
    adb reboot bootloader
  2. Connect the device to your PC using USB data cable.
  3. Open CMD/Terminal and confirm that the drivers are properly installed and the device is detected by entering the following command
    Code:
    fastboot devices
    The device ID shall be displayed as the output in your shell. If it is so then the response is positive but in case it shows something else, please make sure to properly install the drivers using a different method than that you used earlier.
  4. Type in the following in CMD/Terminal to initiate the unlocking process
    Code:
    fastboot oem unlock
  5. You will now be prompted with a warning message, use the volume keys to highlight Yes and select it using the power button. Then within a matter of seconds, your device shall be unlocked.
  6. To confirm that it is unlocked, look over to the text in front of Lock State and it should be unlocked.
  7. You’ve successfully unlocked.

What? Too easy? Yes, indeed. The following is as easy too.


Install Custom Recovery
We’ve 2 custom recoveries available yet for our Nexus 4 viz ClockworkMod and TWRP. ClockworkMod or CWM (in short) comes in 2 variants (Touch UI based & Non-Touch UI based). Below I have mentioned on how to flash each one of them using fastboot. For more info about these two recoveries, visit ClockworkMod and TeamWin websites.
  1. Reboot your device into bootloader mode. Either manually, by powering off and then pressing Volume Down + Power buttons simultaneously or using the following command in CMD/Terminal.
    Code:
    adb reboot bootloader
  2. Download the latest build of your desired recovery [CWM | TWRP]
  3. Place the downloaded recovery image (.img) file on your desktop.
  4. If in Windows, open CMD and cd it to the desktop using the following command
    Code:
    cd Desktop
  5. If in OS X or Linux, open terminal and cd it to the desktop using the following command
    Code:
    cd ~/Desktop
  6. To flash ClockworkMod Non-Touch, type in the following command:
    Code:
    fastboot flash recovery recovery-clockwork-x.x.x.x-mako.img
    Replace x.x.x.x with the recovery build no. that you downloaded.
  7. To flash ClockworkMod Touch, type in the following command:
    Code:
    fastboot flash recovery recovery-clockwork-touch-x.x.x.x-mako.img
    Replace x.x.x.x with the recovery build no. that you downloaded.
  8. To flash TWRP, type in the following command:
    Code:
    fastboot flash recovery openrecovery-twrp-x.x.x.x-mako.img
    Replace x.x.x.x with the recovery build no. that you downloaded.
  9. Once flashed, you will prompted on the CMD/Terminal itself.
  10. Now, either reboot your device by using volume keys to highlight Reboot and select using Power button or reboot into the recovery by selecting Recovery mode.
Voila! The next to follow is to root or directly flash a Custom ROM, which is already rooted.


Rooting
Not everyone and each one of us like Custom ROMs. Some users might prefer high stock stability over the features offered by Custom ROMs. and that’s completely normal. But, what if you have an App that requires Root privileges or may be, you need to access the System partition of your device to make certain modifications of your own? This is where the process of Rooting enters. Now when you already know what Rooting is, we shall head further and follow another set of very-simple instructions to root your Nexus 4.
  1. Download the latest SuperSU flash-able root package. [Chainfire's SuperSU Thread]
  2. Connect your device to the PC via USB cable.
  3. Transfer the downloaded file to a suitable location in the device.
  4. Do not disconnect the device.
  5. Open CMD/Terminal and type in the following command:
    Code:
    adb reboot recovery
  6. This will boot your device directly into recovery mode.
  7. You may now disconnect the device.
  8. If you are using CWM, tap on install zip from sdcard > choose zip from sdcard and select the CWM-SuperSU-v0.93.zip. When prompted select Yes to start the flashing process.
  9. If you are using TWRP, tap on Install and select the CWM-SuperSU-v0.93.zip. Slide the circular button to start the flashing process.
  10. When the flashing process has finished, select reboot system now (In CWM) or Reboot > System (In TWRP) to reboot your device.
Congrats! You have successfully rooted your device. Go ahead and use any App that requires Root permissions.


Installing Custom ROM
Its simple, very much simple. All you got to do, is to choose a Custom ROM and simply flash it via your custom recovery.
  1. The very first step is to choose a Custom ROM that fits all your needs and serves you with your desires. When chosen, download the ROM file (flashable zip).
    NOTE: Every ROM here at this section is worth and is a result of hardwork of developers/team. Please do not criticize any ROM for any reason. Maintain the forum spirit by encouraging people.
  2. Download the suitable GApps package corresponding to the Android version of your ROM [Link]
  3. In case, the developer has provided specific modified GApps package, download that. Then there is no need to download the GApps package from step #2
  4. Connect your device to the PC via USB data cable.
  5. Transfer the ROM & GApps zip to the device. Its is recommended to put the files in the root of your device storage for convenience.
  6. Disconnect the device,
  7. Power off. Press the Volume Down and Power keys together to boot into the Bootloader mode.
  8. Use the volume keys to highlight Recovery mode and select it using the Power button. Your device will then boot itself into Recovery mode.
  9. Flash using CWM
    wipe data/factory reset
    wipe cache partition
    Go to "mounts and storage" > "format /system" "format /boot"
    Go to "install zip from sdcard" > "choose zip from sdcard" > select your ROM .zip file that you placed in step #6. Flash it.
    Gapps are the next to be flashed just after flashing the ROM. So, flash Gapps following the same way as the ROM. further if your are provided any add-on in a flash able zip format you can flash it the same way after flashing the ROM and GApps successfully.
    Once everything has flashed successfully, select "reboot system now".
  10. Flash using TWRP
    Go to "Wipe" > "Advanced" and "Factory Reset".
    Go to "Install" > choose the ROM .zip file and flash it.
    Gapps are the next to be flashed just after flashing the ROM. So, flash Gapps following the same way as the ROM. further if your are provided any add-on in a flash able zip format you can flash it the same way after flashing the ROM and Gapps successfully.
    When flashed, go to "Reboot" > "System".

Your phone will now boot into the custom ROM.

Unknown

Phasellus facilisis convallis metus, ut imperdiet augue auctor nec. Duis at velit id augue lobortis porta. Sed varius, enim accumsan aliquam tincidunt, tortor urna vulputate quam, eget finibus urna est in augue.

No comments:

Post a Comment