Prerequisites
Unlock Bootloader
Don't want to lose your data after unlocking? Read this.
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.
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.
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.
Your phone will now boot into the custom ROM.
- 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.
- Compatible USB data cable.
- Android SDK configured (Follow this guide to setup Android SDK and thus it itself configures ADB and all other SDK components)
- USB Debugging enabled (Don’t know how? Take a look here)
- Backup Device Storage, Messages, Contacts, Calendars etc.
- 60% or above battery life (This is a recommendation to avoid any uncertain shutdowns during the mentioned process, it might cause issues)
- Fastboot binary (Put the file in <sdk_directory>/platform-tools)
Unlock Bootloader
Don't want to lose your data after unlocking? Read this.
- 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
- Connect the device to your PC using USB data cable.
- Open CMD/Terminal and confirm that the drivers are properly
installed and the device is detected by entering the following command
Code:fastboot devices
- Type in the following in CMD/Terminal to initiate the unlocking process
Code:fastboot oem unlock
- 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.
- To confirm that it is unlocked, look over to the text in front of Lock State and it should be unlocked.
- 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.
- 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
- Download the latest build of your desired recovery [CWM | TWRP]
- Place the downloaded recovery image (.img) file on your desktop.
- If in Windows, open CMD and cd it to the desktop using the following command
Code:cd Desktop
- If in OS X or Linux, open terminal and cd it to the desktop using the following command
Code:cd ~/Desktop
- To flash ClockworkMod Non-Touch, type in the following command:
Code:fastboot flash recovery recovery-clockwork-x.x.x.x-mako.img
- To flash ClockworkMod Touch, type in the following command:
Code:fastboot flash recovery recovery-clockwork-touch-x.x.x.x-mako.img
- To flash TWRP, type in the following command:
Code:fastboot flash recovery openrecovery-twrp-x.x.x.x-mako.img
- Once flashed, you will prompted on the CMD/Terminal itself.
- 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.
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.
- Download the latest SuperSU flash-able root package. [Chainfire's SuperSU Thread]
- Connect your device to the PC via USB cable.
- Transfer the downloaded file to a suitable location in the device.
- Do not disconnect the device.
- Open CMD/Terminal and type in the following command:
Code:adb reboot recovery
- This will boot your device directly into recovery mode.
- You may now disconnect the device.
- 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.
- 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.
- When the flashing process has finished, select reboot system now (In CWM) or Reboot > System (In TWRP) to reboot your device.
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.
- 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. - Download the suitable GApps package corresponding to the Android version of your ROM [Link]
- 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
- Connect your device to the PC via USB data cable.
- Transfer the ROM & GApps zip to the device. Its is recommended to put the files in the root of your device storage for convenience.
- Disconnect the device,
- Power off. Press the Volume Down and Power keys together to boot into the Bootloader mode.
- Use the volume keys to highlight Recovery mode and select it using the Power button. Your device will then boot itself into Recovery mode.
- 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". - 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.
No comments:
Post a Comment