Google Nexus 5 (lg-hammerhead)

From postmarketOS
Jump to: navigation, search
LG Nexus 5
Nexus 5 running the weston demo
Nexus 5 running the weston demo
Manufacturer LG
Name Nexus 5
Codename hammerhead
Released 2013
Original software Android 4.4-6 on Linux 3.4
Chipset Qualcomm MSM8974 Snapdragon 800
CPU Quad-core 2.3 GHz Krait 400
GPU Adreno 330
Display 1080x1920 IPS
Storage 16/32 GB
Memory 2 GB


  • MartijnBraam
  • dzervas
  • lawl
  • bshah
  • opendata

What works

  • Mainline linux
  • SSH
  • Battery
  • Display
  • Touchscreen
  • 3D acceleration
  • Calls?
  • USB Networking
  • WiFi

What does not work

  • Race condition: it won't always boot
  • Flashlight and Front led
  • Camera
  • Backlight works partially (#1427, more?)
  • Serial console
  • Splash screens
  • The SDL programs

Fastboot Mode

With device powered off, hold down Volume-Down and Power buttons simultaneously for a few seconds, until Fastboot Mode screen appears.

OEM Unlock

Get device into Fastboot Mode, plug in USB cable, then:

$ fastboot oem unlock

When prompted on device, use Volume-Up/Down buttons to highlight choice, then Power button to select it. The Fastboot Mode screen will appear again, and a message regarding flashing will appear briefly.


There's a timing issue with the mainline kernel, hence we need the --split installation for now.
$ pmbootstrap init # select lg-hammerhead
$ pmbootstrap install --split --no-fde
$ pmbootstrap -s export
$ pmbootstrap -s flasher flash_kernel
$ fastboot flash system /tmp/postmarketOS-export/lg-hammerhead-boot.img
$ fastboot flash userdata /tmp/postmarketOS-export/lg-hammerhead-root.img

NOTE: The above --split instructions didn't work on 2018-07-07, for a D821. It would either get a black screen during boot, or would show the postmarketOS logo with the message "system partition not found". But doing the below did boot into Plasma Mobile on the first attempt, and it seemed like it might be working, although the screen is very dim (see below), and two (so far) Plasma Mobile lockups:

$ ./ init
$ ./ install --no-fde
$ ./ flasher flash_rootfs
$ ./ flasher flash_kernel

Regarding brightness problems with this non- --split build, display is very dim with both Plasa-Mobile and Weston demo UIs. At least on this particular unit, it was disproportionately dim in lower-left corner (uneven backlighting?). When running the Plasma Mobile UI, one can adjust the brightness using the Plasma Mobile Settings; however, 100% on the UI control seems to correspond to the initial very-dim brightness, and 0% on the control is black.

Additional info

WiFi workaround on boot

The wifi adapter works in networkmanager but it seems it boots in airplane mode. To make it detect wifi networks you need to disable and re-enable the wifi adapter. This can be done in the graphic shell (Plasma Mobile has an airplane mode switch in the pull-down menu) or through the shell:

$ nmcli radio all off
$ nmcli radio all on



TTY on mainline
Plasma Mobile on 2018-07-07