Google Nexus 5 (lg-hammerhead)

 Take a look at the open hammerhead issues before starting an installation!

Contributors

 * MartijnBraam
 * dzervas
 * lawl
 * bshah
 * opendata
 * JuniorJPDJ
 * otto

Fastboot mode
First make sure to enable USB debugging in Android Then with device powered off, hold down and  buttons simultaneously for a few seconds, until Fastboot Mode screen appears.

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

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.

Flashing
For installation you need to flash lk2nd and flash the rootfs. Do not flash the  partition since lk2nd uses fs-boot functionality to boot the kernel from the   partition of the rootfs.

If flashing fails with an error like "Unknown chunk type", you may need to update your bootloader. bootloader-hammerhead-hhZ20h.img comes with the latest firmware from |the android image page and can be flashed with.

DDR
There are 2 variants of hammerhead with different DDR vendors.

1. D820/D821(E) - Elpida

2. D820/D821(H) - Hynix

Charge type
In case your phone is always plugged into power outlet 24/7, you can set it to be slow charge mode and reduce the charge voltage and current to minimum (set it at your own risk):

See this reddit thread for some useful information.

See kernel documentation for details.

Power management
At this stage the directory  is empty, so it seems there is no integrated power management.

You can disable cpu cores, though:



Audio
No one has still worked on playback and recording support on-device.

Neverthless you can use a bluetooth headphone/speaker or another device (like an android device) to stream your audio.

source device

sink Device

Don't forget to copy cookie to from sink to source!

Bluetooth
Bluetooth controller works. You can start the service with  and enable it with

To test, use the instructions on the Alpine wiki.

Cellular modem
Using instructions for Nokia N900 it seems that SMS and calls likely work.

WiFi
On first boot, if the wifi adapter started in airplane mode and NetworkManager did not detect that, a manual workaround is to disable and re-enable the wifi adapter.

This can easily be done in the graphic shell (Plasma Mobile has an airplane mode switch in the pull-down menu: check it and uncheck it) or through the shell:

Mate
Mate works if started with the  driver, otherwise it freezes.

Booting
Producing  images with   will result in a non-functional device (as of now), so install the OS using the  environment.

Then from a root console, install ,, ,  ,.

Proceed to configure LightDM
 * enable touch keyboard
 * enlarge lightdm fonts

and finally
 * test the service
 * enable it at boot
 * disable gdm

Scaling
MATE does not follow GNOME scaling settings nor does it have a scaling control panel, so you will need to add export variables directly. Add the following lines to :

Be aware that if you already setup scaling from the GNOME control center, this will probably make really really big.

Touch keyboard
To be able to further configure MATE, you will need to ability to cast right clicks:

the Onboard touch keyboard is easily configurable and it's able to send any mouse signal you can think of (even drag and double click).

If you don't want to configure the device using touch input, you can always install barrier to use mouse and keyboard wirelessly from another device.

Bluetooth
Installing    should suffice.

Power button
You can emulate the power button by creating a button on the panel pointing to the following script.

Graphics
The interface randomly freeze in particular when heavy loading (browsing and stuff), requiring an hard reboot.

Bluetooth
There used to be problems with Bluetooth on Phosh ( - apparently fixed).

Numeric passwords
Be sure to use a numeric password if you want to use phosh, because its lockscreen only accepts digits.

Power button
Power button turns off the screen but the touchscreen keeps working.

Plasma Mobile
Plasma Angelfish does not run. You may want to install another browser, like qtwebbrowser, Firefox and/or Chromium.

Browsing

 * Qutebrowser crashes;


 * Firefox works very well on Xorg, somewhat slower on wayland;


 * Dillo will probably work, too.

WebkitGTK based

 * Epiphany;


 * Vimb;


 * Netsurf;

They work well, but they are slow on both Xorg and Wayland.

Fastboot unknown chunk type
Flashing with fastboot seems to fail for some outdated firmware, it prints the message "FAILED (remote: Unknown chunk type)" when trying to flash the rootfs to userdata. This can be solved by updating to the latest baseband firmware and bootloader.

Remote Data Too Large
Sometimes  can fail with an error message that includes "Failed (remote: data too large)". This might be solved by updating by reflashing the latest version of the stock Android image for the device.

Useful aliases
Force reboot

Input devices

Partition layout
The eMMC could be either  or , and it seems to be random for each boot.

Links

 * shelli-ui: framebuffer console + gesture recognition video demo
 * Demonstration video of a Nexus 5 with postmarketOS and plasma
 * obsolete downstream kernel packaging
 * Device package
 * dmesg from mainline linux with the missing block devices
 * flto's hammerhead-upstream status page
 * Brian Masney's Nexus 5 upstream status page

Videos

 * Running Phosh on the Nexus 5 with postmarketOS - YouTube
 * Stear Prime: input and sound sharing - YouTube
 * Stear Prime GNU half - YouTube

Resources

 * Weston running (with the red screen bug)
 * /r/postmarketOS post