How to build Android Marshmallow on Nexus 4



UPDATE: Uploaded new source and binaries that fix an issue some people had with cellular data. The links below represent the new files.

Many were very sad when google chose not to update Nexus 4 to Android 6.0 Marshmallow. This simple guide will show you how to build Android 6.0 Marshamllow for Nexus 4. You'll be amazed how simple it is. And for the lazy, I also have a pre-built AOSP Marshmallow image set to download on the bottom of this page. Also, LTE works in this set of images :) Since Nexus 4 was originally a Google-Play-equipped device, you can legally install Google Apps on this image and enjoy a full Google Android 6.0 experience on your Nexus 4. That part, however, is up to you to do yourself. I am not offering GApps downloads here.


  1. Download Android 5.1.1 AOSP sources
  2. Download Android 6.0 AOSP sources
  3. Download Binary blobs for Nexus 4 (mako) for LMY48T
  4. Download Nexus7 (razor) factory images for 6.0 (MRA58K)
  5. from 5.1.1 AOSP copy to 6.0 the /device/lge/mako folder
  6. you may now delete 5.1.1 sources
  7. apply the diff from the package below to that folder
  8. extract proprietary binaries for Mako
  9. lunch & make Marshmallow for mako (to produce simg2img mostly)
  10. use simg2img on the Nexus7 factory /system image to convert it to a normal ext4 image
  11. mount nexus7 /system image and copy the following files from it over the corresponding files in your build folder provided by binary blob packages:
    • /vendor/lib/egl/eglsubAndroid.so
    • /vendor/lib/egl/libEGL_adreno.so
    • /vendor/lib/egl/libGLESv1_CM_adreno.so
    • /vendor/lib/egl/libGLESv2_adreno.so
    • /vendor/lib/egl/libplayback_adreno.so
    • /vendor/lib/egl/libq3dtools_adreno.so
    • /vendor/lib/libCB.so
    • /vendor/lib/libsc-a3xx.so
    • /vendor/lib/libc2d30-a3xx.so
    • /vendor/lib/libc2d30.so
    • /vendor/lib/libC2D2.so
    • /vendor/lib/libllvm-qcom.so
    • /vendor/lib/libgsl.so
  12. replace prebuilt mako kernel with provided kernel (all the patches that went into it over the 5.1.1 kernel are included)
  13. make clean & build Marshmallow for Mako again
  14. flash & enjoy. Tested: WiFi, BT, GPS, NFC, Cellular, Camera
For extra credit, if you flash an OLD radio (initial radio release for Mako), this ROM will support LTE :)

Download patches if you want to make the build yourself: => [PACKAGE YOU'LL NEED (mirror)] <=

Or, a full working image, including the LTE radio image => [WORKING IMAGE (mirror)] <= It is fully usable userdebug image. Tested: sensors, NFC, WiFi, Bluetooth, Camera, Cell, GPS

Plase do not re-host this elsewhere and claim them as your work.
© 2012-2017