Nexus 4 will not get official Android 6 Marshmallow update from Google, but you can upgrade your phone to Android 6.0 Marshmallow via CyanogenMod 13 ROM. CyanogenMod team just released the first nightly build of CM13 (mako) for Nexus 4 that you can install on a rooted phone via custom recovery and enjoy Android 6.0 features.
CyanogenMod 13 ROM brings Android 6’s features to Nexus 4, but the present status of the ROM is nightly, which means it is unfinished, buggy and you may come across glitches while using it. However, previous experiences shows that the CyanogenMod nightly builds are usually reliable, if you are ready to face few issues.
Installing official CM13 on Nexus 4 is quite simple, but your device has unlocked bootloader, root access and latest version of TWRP custom recovery installed on it. Also, as Android 6 requires latest bootloader, your Nexus 4 should be running on Android 5.1.1 Lollipop.
Disclaimer: Follow the guide at your own risk. We will not be responsible for any damage that occurs. The guide is intended for technically talented users only. Backup every data on your phone.
2. Boot your phone into TWRP recovery mode. To do so, switch off phone, hold Volume (-) and Power buttons until the bootloader appears, then release the buttons.
3. In TWRP recovery, select ‘Wipe’ and perform a factory reset, wipe data and the Dalvik cache. Do not use the ‘format data’ option, as it will format the internal storage and the ROM you just saved.
4. Now, in recovery tap ‘Install’, navigate and select the ROM zip file and Gapps zip file. Confirm the action by swiping the arrow to the left.
5. Once installation has finished, return to the main menu and reboot your phone. Once booted up, setup your device and enjoy Android Marshmallow.
Troubleshooting: If you have come across bootloop issue (stuck in a bootloop) after installing CM13, reboot your Nexus 4 into TWRP recovery mode, and then wipe cache partition and dalvik cache.