And so it came to pass that the Nexus 4, which was already a year old when I bought two years ago, started getting slow. I was hopefully initially that Android M (marshmallow), Google’s latest version of the operating system, would help: it apparently has a lower RAM footprint than L (lollipop). But unlike in the case of my Nexus 5 (which has already received the update) Google does not intend to ship M to Nexus 4s. Thus I had three three options: slug it out; hack a version of Android M onto it; or install a maintained fork that would (eventually) pick up the benefits of M. I chose the latter, going with the most popular fork: CyanogenMod, version 12.1 (a stable version 13 – i.e. one based on M – is expected around the New Year).
Installing CyanogenMod is not a walk in the park, even following the detailed instructions available on the CyanogenMod website and working out of Ubuntu. The following commands were useful (gapps.zip is an OpenGApps package and TWRP is, well, TWRP).
1 2 3 4 5 6 |
sudo apt-get install android-tools-adb android-tools-fastboot adb reboot bootloader fastboot oem unlock fastboot flash recovery ~/Desktop/twrp.img adb push ~/Desktop/cm.zip /sdcard/ adb push ~/Desktop/gapps.zip /sdcard/ |
Unfortunately the “stock” OpenGApps package doesn’t seem to fit in the system partition of a Nexus 4 (and hence use of Advanced Options is advisable). To ascertain how many Google Apps needed excluding, and to effect that change, the following commands were useful:
1 2 3 4 |
adb pull /sdcard/open_gapps_log.txt cat open_gapps_log.txt nano ~/Desktop/gapps-config.txt adb push ~/Desktop/gapps-config.txt /sdcard/ |