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

From postmarketOS
Jump to navigation Jump to search
(Update freedreno information (thanks @robclark!))
Line 67: Line 67:
* [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]
* {{github|1079}} The Nexus 7 DTB is so similar, it even boots
== Photos ==
== Photos ==

Revision as of 18:07, 18 March 2018

Google (LG) Nexus 4
LG Nexus 4 running Weston
LG Nexus 4 running Weston
Manufacturer Google (LG)
Name Nexus 4
Codename 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
USB Networking
3D Acceleration
Mobile data


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


pmbootstrap init
pmbootstrap install
(enter fastboot, see below)
pmbootstrap flasher flash_system
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.

What works

  • Touchscreen
  • Weston (has the red screen bug, but we have a workaround for that now 👍 )

What does not work

  • XWayland
  • fbsplash only displays splash images very shortly, then goes to black screen
  • osk-sdl has graphical bugs (but it works for unlocking!) (osk-sdl#59)
  • The rest (Wifi, bluetooth, making calls, ...)


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

freedreno / Mainline

The freedreno project brings an open source kernel driver for 3D acceleration. You would still need to run the proprietary blob on the GPU, but it makes 3D acceleration possible at all. There is a backport of freedreno to the 3.4 kernel, but the display doesn't work there. According to robclark from Freedreno, it makes more sense to get mainline going:

tbh, with the exception of perhaps making phone calls (modem), upstream support for 8064 should be decent (like the work that john stultz did on n7 tablet).. so I probably wouldn't try too hard on ancient 3.4 stuff

Let us know if you're interested in doing this and talk to opendata26 (from postmarketOS) and robclark (from freedreno). With their help it should be quite feasible.