- Download factory image from Google, verify the checksum
- Reboot into the bootloader:
fastboot reboot-bootloader # Use adb reboot-bootloader if fastboot does not work!
Or via holding
Vol- while powering on the device. If this is not working either, try holding both
Vol+ down while powering on the device.
Erase all partitions:
fastboot erase boot fastboot erase cache fastboot erase recovery fastboot erase system fastboot erase userdata
Flash with the stock image:
fastboot flash bootloader bootloader-mako-makoz20i.img fastboot reboot-bootloader fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img fastboot reboot-bootloader fastboot -w update image-occam-jwr66v.zip
The last command should also reboot the device.
Additionally, if we want to lock the device again:
fastboot oem lock fastboot reboot-bootloader
Installing CM on the Nexus 4 was pretty straightforward.
The device needs a custom recovery image, see above. Once this is installed, we can install CyanogenMod.
- Download CyanogenMod
- Download SuperSU, to enable root access
- Download Google Apps, if needed
adb push cm-NN-XXX-mako.zip /sdcard/ adb push UPDATE-SuperSU-v*.zip /sdcard/ adb push gapps-kk-**.zip /sdcard/
Be sure to verify the checksums of these files!
Boot into the bootloader:
adb reboot bootloader
- Select "Recovery", we should now be in our recovery mode.
- Select "wipe" or "factory reset"
- Select "install from SDcard" and then point to the CyanogenMod zip file - and select install
- Repeat 4) for other zip files as well (the GoogleApps or the SuperSU package)
- Reboot the phone, now CyanogenMod should boot.
- As CyanogenMod comes up, it might ask if we want to run "Launcher" or "Launcher3". Apparently, "Launcher" has more Google features and "Launcher3" seems to be its basic variant
- As documented in the CyanogenMod wiki, some features might not work with:
- In low signal zones (remote house at the mountain for example) CM 10.1.3 mako on Nexus 4 throw a song and 2 vibrations when the null signal notification appears.
Native camera app is not available, photosphere feature is not available too. Impossible to take normal photos using flash. Camera app is usable only for daylight photography.
- The last two issues apparently have been fixed, but the Wiki cannot be edited at the moment to document that.
- Don't forget to 1) enable device encryption and 2) change the encryption password to a longer one later on.
Check out WhisperPush (Archive) too!- This has been deprecated in favour of Signal Private Messenger.
Select Wipe Dalvik Cache and Wipe Cache and select Swipe to Start Sideload:
adb push cm-NN-YYYYMMDD-SNAPSHOT-Mx-mako.zip.md5 /sdcard/sideload.zip.md5 adb sideload cm-NN-YYYYMMDD-SNAPSHOT-Mx-mako.zip
Reboot the phone, CyanogenMod should now be updated.
Without adb sideload, the procedure is somewhat more complex. In short:
adb reboot recovery adb shell
Mount a 500 MB tmpfs onto
mount -t tmpfs -o size=500m tmpfs /sdcard exit
Push the update image to the phone:
adb push cm-NN-YYYYMMDD-SNAPSHOT-Mx-mako.zip /sdcard/update.zip
On the phone, navigate to "Install update from sdcard", select
/sdcard/update.zip we just uploaded. After the update is complete, reboot the phone.
mount -t tmpfs tmpfs /data mkdir /data/media exit
On the computer again:
adb push cm-NN-YYYYMMDD-SNAPSHOT-Mx-mako.zip /data/media/update.zip
Then continue as above, but selecting
/data/media/update.zip instead of
LineageOS has been discontinued for the Nexus 4, but images can be built manually. However, the source trees only provide only sources up to lineage-15.1 (Android 8.1) for the
mako models, so we cannot upgrade to more current Android versions this way.
Download the latest TWRP and flash with:
adb reboot bootloader fastboot flash recovery twrp-3.4.0-0-mako.img
Boot into recovery, push both the
CarbonROM image and (if needed) the Open GApps image (ARM, pico) to the SD card. In TWRP, select install and select both files, but the actual installation failed early on with:
Too small /system partition detected (must be at least 1333788672 bytes). You need to repartition your device before installing this rom. (ERROR: 7)
Flash Recovery with a special TWRP version:
- Boot into recovery (TWRP)
- Open Terminal and execute "modify". This can also be done via adb if needed.
modify script will basically call
parted and remove and then re-create some partitions, but this time with a bigger
/system partition. If needed, this can be done manually:
# parted /dev/block/mmcblk0 > print [...] 21 159MB 1040MB 881MB ext4 system 22 1040MB 1627MB 587MB ext4 cache 23 1627MB 7817MB 6190MB ext4 userdata > rm 21 > rm 22 > rm 23 > mkpart primary 159383552B 1732247551B > name 21 system > mkpart primary 1732247552B 1994391551B > name 22 vendor > mkpart primary 1994391552B 2099249151B > name 23 cache > mkpart primary 2099249152B 7817134079B > name 26 userdata > quit # make_ext4fs /dev/block/mmcblk0p21 # make_ext4fs /dev/block/mmcblk0p22 # make_ext4fs /dev/block/mmcblk0p23 # make_ext4fs /dev/block/mmcblk0p26 # reboot recovery
Once this is done (and we manged to somehow save the
/sbin/parted utility), can can see that the
/system is bigger now:
# parted /dev/block/mmcblk0 > print [...] 21 159MB 1732MB 1573MB ext4 system 22 1732MB 1994MB 262MB ext4 vendor 23 1994MB 2099MB 105MB ext4 cache 26 2099MB 7817MB 5718MB ext4 userdata
In TWRP again, select Format Data. After this, 'Advanced Wipe' and wipe everything here. At this point we should be able to install
OpenGapps) w/o problems.
Settings → Wireless & Networks → Tethering & portable hotspot → Portable Wi-Fi hotspot
→ See also Tethering
Barnacle Wifi Tether
- "Custom Wifi Ad-hoc" → none
- "Skip wpa_supplicant" → enabled
- "WAN" →
Trying to install while connected to T-Mobile resulted in "This item is not available on your carrier". However, the
.apk file can be downloaded & installed manually.
Tethering only worked after setting the following options:
- Device-Profile → Generic ICS/JB (wlan0)
- Setup-Method → Netd-Ndc (master)
- Send Netd Max Client Cmd → enabled
- WiFi-driver reload 2 → enabled
- Routing fix → enabled
There is an issue though with the reported "signal strength" for 5GHz WiFi networks. Apparently with Android 4.3 the reported signal strength is lower for 5 GHz networks, although the bitrate seems to suggest otherwise:
- 5GHz network, 2 bars:
------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ ID] Interval Transfer Bandwidth [ 4] local 10.0.0.2 port 5001 connected with 10.0.0.3 port 34313 [ 4] 0.0-10.1 sec 48.1 MBytes 40.0 Mbits/sec [ 5] local 10.0.0.2 port 5001 connected with 10.0.0.3 port 34314 [ 5] 0.0-10.1 sec 47.4 MBytes 39.2 Mbits/sec
- 2.4 GHz network, 4 bars (full):
[ 4] local 10.0.0.2 port 5001 connected with 10.0.0.3 port 34315 [ 4] 0.0-10.4 sec 15.9 MBytes 12.8 Mbits/sec [ 5] local 10.0.0.2 port 5001 connected with 10.0.0.3 port 34316 [ 5] 0.0-10.3 sec 22.9 MBytes 18.7 Mbits/sec
Phone goes black while in call
Might be related to the Proximity Sensor, which is located in the upper left of the phone. A screen protector / dirt might be in the way.
USB Mass Storage
Unfortunately, the Nexus 4 does not show up as a . Alternative ways to transfer data to/off the device would be:when connected to a computer via USB cable.
adb pull /mnt/sdcard/DCIM . adb push local/directory /mnt/sdcard/download
- Apply some kind of hardware hackery to make USB OTG ("On The Go") work.
While contact icons appear just fine in the contact list, they appear blurry when displayed in incoming calls or when looked at in detail mode.
- Contact pictures needs higger resolution for ICS and Galaxy Nexus!
- Incomming Call Contact Picture Size should be Bigger (closed)
- HD Contacts (There are even apps to work around this!)
Google data connection issue
When not on WiFi, the Nexus 4 gets full bars and a "H" (for) - but the bars and the "H" are "grey". Data connection is fine, browsing works, but I can't install apps from the Google Play store.
When I connect to WiFi, the "H" vanishes (naturally) and the bars turn blue - now I'm able to install apps from the Google Play store, but data connections are handled by the WiFi connection of course.
- Not getting ANY data on T-Mobile
- What's the difference between grey and blue bars on the WiFi/cell signal indicators?
- Android 4.3 Radio Bugs Causing Cell Connection Drops On Some Nexus 4 Handsets, Fixes In Sight
The last link suggests to dial *#*#4636#*#* and select "Phone information", where one can switch from "WCDMA preferred" to "WCDMA only".
Lollipop Boot loop
After updating/flashing to Android 5.0.1 ("Lollipop"), the Nexus4 can't seem to exit its boot animation and stays there for quite a while. After it wouldn't come back after ~10 minutes, I pressed the power button and the Nexus4 rebooted just fine.
LineageOS & GApps
cat > /sdcard/gapps-config.txt Exclude GoogleTTS ^D
Now it should be possible to install Open GApps alongside Lineage 15.1 and above.
- Encrypted Nexus 4 rooting gone bad
- Nexus 4 Factory Image Restore
- How to Install CyanogenMod on the Google Nexus 4 ("mako") (Archive)
- Browse Files for Google Nexus 4 - mako (Archive)
- 2014.01.10 SuperSU v1.89
- Google Apps (Archive)
- What's The Difference Between Launcher And Launcher3? (Archive)
- Known Issues with CyanogenMod for Google Nexus 4 ("mako") (Archive)
- CyanogenMod wiki
- WhisperPush – End of Life (Archive)
- Upgrading CyanogenMod on an encrypted device (Archive)
- Updating Encrypted Phone – Cyanogenmod
- CarbonROM / CR-8.0 / MAKO / 15 July 2020
- Nexus 4 Repartition
- Supported Hardware
- SUP TMOBILE YOU SAY YOURE NOT LIKE OTHER CARRIER (Archive)
- How to Wifi Tether ANY Rooted Android Smartphone or Tablet!
- Snapdragon S4, S3, S2 and S1
- 5 G Wi-Fi (802.11ac)
- Nexus 4 5GHz wifi signal strength dropped down after update to Android 4.3
- Android Advanced: USB OTG on the Nexus 4
- Nexus 5 stuck on “flying color dots lollipop” screen after Hard Factory Reset
- Android 5.0 Lollipop boot-loop (48+hours)
- LineageOS 15.1 will not work with GApps on Nexus 4