Google Nexus 6P (huawei-angler)

Contributors

 * zhuowei, khimaros, Learn Chung Chen

How to enter flash mode

 * Connect a USB cable
 * Make sure, the device is powered off
 * Hold power + volume down
 * Continue holding until you se the bootloader menu

pmbootstrap install
Install pmbootstrap and then run:

Kernel configs applied
Configs changed from stock Lineage kernel:
 * CONFIG_DEVTMPFS=y
 * CONFIG_VT=y
 * CONFIG_FRAMEBUFFER_CONSOLE=y
 * Various NFS client configs: CONFIG_NFS_V4_1=y
 * CONFIG_BCMDHD_FW_PATH, CONFIG_BCMDHD_NVRAM_PATH

How to enter flash mode
The Nexus 6P, like all Google Nexus devices, uses Fastboot as the flashing protocol.

To enter Fastboot mode, hold Volume Down while powering on the device. Let go of Volume Down when a picture of a green Android mascot shows up on the screen.

Limitations
The Nexus 6P running on downstream kernel does not have DRM support, which means most accelerated interfaces (such as phosh and sway) are unsupported. There are two known workarounds:


 * Recommended: running wlroots based compositors using wlroots native x11/fbdev + pixman support: relies purely on existing upstream behavior with a minor bug fix patch against wlroots.
 * Run wlroots with fbdev: relies on a custom fbdev backend for wlroots which has been declined for upstream inclusion.

Mainline
There is a project to port the mainline kernel to Nexus 6P: as a result there's now some support for Nexus 6P in mainline. However, currently there's only support for serial output and input, no screen or USB. Thus, this port doesn't use a mainline kernel. (The mainlining team's members can be found at )

Modem
Android boots the modem by mounting the modem partition to /firmware, then opening /dev/subsys_modem. Doing the same on postmarketOS (after linking all the firmware in /firmware/images to /lib/firmware/postmarketos) causes any `dmesg` call to freeze (?!), and the device would kernel panic with a "modem crashed" error in a few seconds.

Audio
The audio requires the blobs from Android's /vendor/adsp.* to be present in /lib/firmware/postmarketos. Then, opening /dev/subsys_adsp will boot the sound card. Currently ALSA recognizes the sound card but fails with an error when playing audio: the Android audio configuration files would need to be converted to Linux format by xml2ucm. See https://arunraghavan.net/2016/01/audio-devices-and-configuration/ for an explanation of the difference between Android and Linux audio, and see https://github.com/kholk/sony-alsa-ucm/tree/master/kitakami for a different SD810 device's ALSA config.

Bluetooth
It seems Bluetooth is connected via H4 UART at /dev/ttyHS0. Tizen uses the hciattach_bcm43xx tool from BlueZ to load firmware to the Bluetooth dongle, but I can't find this utility in Alpine's bluez or bluez-deprecated package. btattach -B /dev/ttyHS0 doesn't seem to work.

Links

 * (downstream)
 * (close to mainline kernel – alternative to downstream kernel, only basic hardware support), added in
 * pmbootstrap Pull Request #512: initial PR
 * pmbootstrap Pull Request #555: Wi-Fi and graphics
 * Mainline DTS – msm8994-huawei-angler-rev-101.dts
 * Downstream kernel (LineageOS 14.1)
 * Google Nexus 5X (lg-bullhead) – similar device
 * Google Nexus 5X (lg-bullhead) – similar device