Many Android enthusiasts have installed either the available stock or the AOSP based Android 6.0 Marshmallow ROM on their device.ย If you are one of them, then this tutorial will help you root this Marshmallow ROM with ease. Thanks to the seniorย member at XDA,ย ktetreault14, Nexus 4 has a modified boot image that will help you flash the SuperSU package onto your system.
You can install the AOSP based Marshmallow ROMS on your Nexus 4 from our tutorial; refer to the linkย at the very end of this page. If you have already installed this or any other custom ROM that supports Android 6.0, then you first need to install the boot image and then flash the Super SU v2.51 provided by Chainfire. SELinux is Enforcing, for your information.
That’s it, once you reboot to system, you will have a rooted ROM and you can now start modifying your system and get intoย development again. Be sure to backup everything. Let’s begin with the process.
Downloads
- Downloadย (Mirror)| Modified Boot Imageย for Nexus 4 (File: Fixed_Data_root.img (6.5 MB))
- Downloadย | SuperSU v2.51 (File:ย BETA-SuperSU-v2.51.zip)
- Download | SuperSU v2.52 (File:ย BETA-SuperSU-v2.52.zip)
Requirements
- This guideย is compatible with only Nexus 4 device. Do not try it on any other device.
- You need a Custom Recovery like TWRP installed on your Nexus 4 in order to flash a custom ROM.ย To Install TWRP, downloadย the latest TWRP from hereย or hereย andย get to this linkย for a tutorial.
- You must have device drivers installed on your PC so that you can transfer the ROM and Google apps to your deviceโs storage.
- You must fully charge your device or at least to 60%, as the process may take a while.
Backup your Apps and Data
Before you proceed,ย make sure you backup all your data. This process will wipe all the data from your device except for the internal storage. Hence, a full backup or nandroid backup is recommended. Also backupย all your internal storage files just in case anything goes wrong. Take a nandroid backup from the custom recovery before flashing the ROM.
Warning: Warranty may be void if you root or install custom ROM on your device. We at DroidViews wonโt be liableย for any damage to your device whatsoever. We are not responsible if you brick or damage your device. Readerโs discretion is advised.
Root Nexus 4 on Android 6.0 Marshmallow ROM
- Download the Boot Imageย and theย SuperSU packageย from the download section.
- Now transfer the two files into your deviceโs internal storage. Place the zip file where you can easily locate it.
- Now reboot into TWRP recovery. To boot into TWRP, first turn off your device and then press and hold volume down and power keysย at the same time.
- Although this is optional, itโs highly recommended that youย perform a nandroid backup. To back up your ROM, tap on backup option in TWRP and select the following elements: System, Data, Boot, Recovery, EFS and swipe right where appropriate, to back up.
- Tap on Install in the TWRP main screen.ย Now to byย default, the mode is to flash zip files, you will need to toggle the mode to images to install the boot.img file.
- To do so, tap on the Imagesโฆ button on the bottom-right of the screen.ย The recovery will now only see the image files, select the one listed in this guide.
- Once you select the Boot image, you will be prompted to select the type of image it is; chooseย Boot.
- Now confirm the swipe action to proceed with the installation.
- Now change the TWRP mode back to zip using the same procedure and now you are ready to flash the SuperSU zip file to root your device.
- Go back to the TWRP main menu or home screen and tap on theย installย option. Navigate to the SuperSU fileย and select it.
- Swipe the confirmation button to proceed with the installation.
- Once installed, reboot to system.
When you see the boot logo, that means you have successfully installed the ROM on your device. If you come across any bootloops or face system errors, try a factory reset from the recovery or you can always restore your previous ROM from the backups. For queries, comment down below.
You can also refer to our ADB and fastboot method to flash the boot image or installย TWRP if it the above method doesn’t work for you, from this pageย and refer to flashing boot images in method 2.
See how to
Install Android 6.0 Marshmallow on Nexus 4 [AOSP]
Also See:
Join The Discussion: