Difference between revisions of "Google Nexus 4 (lg-mako)"

From postmarketOS
Jump to navigation Jump to search
m (add device owners)
m (Update Device package link to GitLab, add Kernel package link)
Line 87: Line 87:
== See also ==
== See also ==
* [https://github.com/freedreno/freedreno/wiki/Nexus-4 freedreno: Nexus 4]
* [https://github.com/freedreno/freedreno/wiki/Nexus-4 freedreno: Nexus 4]
* [https://github.com/postmarketOS/pmbootstrap/tree/master/aports/device/device-lg-mako Device package]
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/device-lg-mako Device package]
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/linux-lg-mako Kernel package]
* [https://www.optiv.com/blog/building-a-nexus-4-uart-debug-cable Tutorial: UART debug cable]
* [https://www.optiv.com/blog/building-a-nexus-4-uart-debug-cable Tutorial: UART debug cable]
* [https://developers.google.com/android/drivers#mako Official proprietary drivers]
* [https://developers.google.com/android/drivers#mako Official proprietary drivers]
* {{issue|1079}} The Nexus 7 DTB is so similar, it even boots
* {{issue|1079}} The Nexus 7 DTB is so similar, it even boots
* {{issue|9|linux-postmarketos}} Attempt at writing a new DTS for the Nexus 4
* {{issue|9|linux-postmarketos}} Attempt at writing a new DTS for the Nexus 4

Revision as of 17:26, 23 May 2020

Currently the device is booting into a black screen, see pmaports#209. Help with resolving this is welcome. Please remove this note when the issue has been fixed.
Google (LG) Nexus 4
LG Nexus 4 running Weston
LG Nexus 4 running Weston
Manufacturer Google (LG)
Name Nexus 4
Codename lg-mako
Released 2012
Category testing
Original software Android on Linux 3.4
Chipset Qualcomm APQ8064 Snapdragon S4 Pro
CPU Quad-core 1.5 GHz Krait
GPU Adreno 320
Display 768x1280 IPS
Storage 8/16 GB
Memory 2 GB
Architecture armhf
USB Networking
3D Acceleration
Mobile data


  • ollieparanoid
  • PabloCastellano and robb4 on IRC: Workaround for red screen bug (#54)

Users owning this device


FDE (full disk encryption) seems to be broken for lg-mako currently, see pmaports#209
pmbootstrap init
pmbootstrap install
(enter fastboot, see below)
pmbootstrap flasher flash_rootfs
pmbootstrap flasher boot

To flash the kernel, you can choose pmbootstrap flasher flash kernel (but charging and power off doesn't work as expected anymore, see below).

Entering "Fastboot mode"

Hold Volume Down + Power, let go of Power once the device display does something (e.g. turns from battery icon to black screen).

Charging and power off (after flashing the postmarketOS kernel)

You don't have to flash the kernel! pmbootstrap flasher boot is also working!

You can flash the postmarketOS kernel, but instead of charging the battery, it will boot straight into postmarketOS (or the on screen keyboard to type in the password). Right now, the best way to charge it from that situation is to boot the recovery TWRP.

You can properly turn the device off by unplugging the usb cable, then booting into fastboot, then choosing power off.


Looks like, we need to package the wcnss.* files for wifi. A version from 2015 can be found here. It's a Qualcomm chip.


See The Mainline Kernel for a general introduction to mainlining.

power_graphic's mainlining progress is here. Read on for generic instructions of what would need to be done.

Currently we only have a downstream vendor kernel packaged, not the mainline kernel. The lg-mako has the same SoC as the asus-flo, and on the latter it is possible to run Android on a kernel close to mainline.

This means, that most peripherals of the mako should work with mainline as well, once they are enabled in the DTS file. In fact, @vetzki reported in #1079 that the mako boots when using exactly the same DTS as the one from flo (this is not recommended, as misconfiguring your device like that may damage it). SSH appears to be working for a short time before getting kicked out, the display does not work.

A good way forward would be using a minimal version of the flo DTS, where everything but USB is deleted, and fixing USB / trying to get the display working with the DSI Panel Porting Guide. The downstream DTSI files that need to be ported to the upstream kernel are probably located here, and I guess the exact panel name appears when running dmesg after a successful boot (I did not verify this). Please expand this when you're working on it, and report your progress in #postmarketOS. Check out the Mainline Guide.


See also