How to install Android 6.0 Marshmallow based custom ROM on Nexus 4


Despite its relatively powerful internals, Google decided against updating the Nexus 4 to Android 6.0 Marshmallow. On surface, Marshmallow any major new feature, but it does seem to fix the numerous bugs that were present in Lollipop that greatly help in improving the overall experience.

Being a Nexus device though, the Nexus 4 gets plenty of love from third-party development community. Thanks to some talented developers over at XDA forums, the LG-made Nexus 4 has already received quite a few fully functional ports of Android 6.0 Marshmallow. This means that if you are ready to jump into the world of custom ROMs and go through the hassle of rooting your handset, you can get it to run the very latest version of Android — Marshmallow.

Before you excitedly jump to the steps below, keep in mind that for first time users, the process of unlocking the bootloader, flashing a custom recovery, and then installing a ROM can be very exhaustive and confusing. Additionally, since the internal storage of the handset will be wiped, you will lose all your installed apps and their associated app data along with your documents, music, and movies.

P.S.: Make sure that your Nexus 4 is running Android 5.1.1 Lollipop before jumping to the steps below. This is because Marshmallow requires the very latest bootloader and radio to work on the handset.

If the above warning still has not deterred you from flashing a Marshmallow ROM on your Nexus 4, jump over to the steps below.

Step 1: Download the below files and transfer them to a folder called ‘nexus’ on your desktop.

Unlocking the bootloader

Step 2: The first thing you now have to do is unlock the bootloader of your Nexus 4. If it is already unlocked, you can simply skip to the next step. If not, reboot your device into bootloader mode by pressing the Volume Up + Power button.

Step 3: Connect the device to your PC and start a new Command prompt or Terminal window on it. Use the ‘cd’ command and navigate to the nexus folder on your desktop. The below command should work for the majority of the users:

cd  desktop/nexus

Alternatively, you can simply drag ‘n’ drop the root folder to the Terminal or Command Prompt window as well.

Step 4: Run the following command to first make sure that all the drivers are properly installed and your Nexus 4 is being detected by your PC.

fastboot devices

Mac users will have to prefix a “./” before every Fastboot or ADB command. So, the above command will look something like this when executed on a Mac:

./fastboot devices

If detected, you will receive a valid response along with the device ID of your Nexus device. If not, you will get a time out error in which case you need to repeat Steps 1-4 mentioned above.

Step 5: Finally, unlock the bootloader of your Nexus 4 by running the following command:

fastboot oem unlock

You will need to confirm the selection on your handset by pressing the Volume Up button. Once the bootloader is unlocked, your Nexus 4 will automatically reboot back into Android. Since you will be flashing a custom ROM on the handset, you can skip the initial setup process.

Flash a custom recovery

Step 6: Transfer the ZIP file of the ROM to the internal storage of your Nexus 4. Then repeat step 2 from above to boot the handset into bootloader mode, and then proceed to connect it to your PC.

Step 7: Now flash the TWRP recovery on the handset by issuing the following command:

fastboot flash recovery twrp.img

With the recovery flashed, you now need to install the Fake Nexus ROM on it. To do this, boot into recovery by running the following command:

fastboot boot twrp.img

Step 8: Before you flash the Marshmallow based custom ROM, you need top wipe the /system and /data partition of your Nexus 4. This can be done by going to the ‘Wipe’ menu and then simply sliding the slider at the bottom to the right. Make sure to not use the ‘format data’ option as it will format the internal storage of the handset, which will delete the ROM from the storage as well.


Step 9: It is now time to flash the Fake Nexus ROM on your Nexus 4. Simply tap on the ‘Install’ button and then navigate to the Fake Nexus ROM zip file. Select the zip file and confirm your selection by swiping the arrow at the bottom of the screen to the left.

The custom ROM will take anywhere between 10-30 seconds to install on your Nexus 4. Once installed, select the ‘Reboot system’ option to boot the device back into Android. The first boot can take nearly 5-10 minutes, so be patient. In case your device enters into a boot loop, repeat steps 8-9 from above.

Once you have gone through the initial setup process, let the phone idle for a few minutes. If things are a bit slow or janky, restart the device and let it idle again for a few minutes before you start installing all your apps and games.

Since the Fake Nexus ROM is a port, you are bound to run into some issues and bugs from time to time. However, if you are interested in using Marshmallow on your Nexus 4, you will have to learn to have to live with them. If there are any bugs that prevent the ROM from being used as a daily driver, it is likely that the developer of Fake Nexus will fix them through updates.