Google Nexus 5X (lg-bullhead)

Contributors

 * PureTryOut
 * MartijnBraam

Unlocking
In android go to and tap the build number 7 times. Then go to and enable OEM unlocking

Reboot to the bootloader and run " fastboot oem unlock " Now select on the phone screen with the volume button and use the power button to accept.

No RPMB
If your device says  in the fastboot screen that means that the mainboard in your Nexus 5X is missing an image required by secureboot to function properly. If this is missing then oem-unlocking won't work on the device. It will re-lock every reboot.

No fix is available yet, but there is way to at least install LineageOS to gain root for adb (phone reset persists, but it allows to read various proc/sysfs files which contain hardware info which are readable only for root - useful for mainlining).

NOTE: modified boot.img from XDA thread has been moved, also TWRP.

Modify
When trying to workaround the issue it's probably better to modify your  yourself (source code for mount flags description).

Official images can be downloaded from https://developers.google.com/android/images#bullhead.

To disable dm-verity remove  parameter in   and  :

To disable forced encryption change  to   (source):

Repack boot.img (and continue according to the article):

Special key combos
Boot to bootloader: hold +  until the screen turns on.

Launch recovery: first boot to the bootloader, press the button twice and press the  button to select

Install postmarketOS
Go to bootloader then connect the device to the PC then run this commands one by one.

Now select start from the menu in the bootloader screen. Reboot again if you don't see anything in the screen after postmarketOS logo

Get your hardware revision
Retrieve t from a running system by running: Compare the identifier with the ones listed in msm8992-bullhead-rev-X.dts and find which one matched your number to retrieve your hardware revision. The example output would match revision 1.01.

Mainline Kernel Status
The current mainline Linux only supports Nexus 5X rev 1.01, but upcoming 5.18 will contain also rev 1.0 – cd4bd4704ec8 ("arm64: dts: qcom: msm8992-lg-bullhead: Add support for LG Bullhead rev 1.0").

Firmware
Here is the official Google page to download GPS, Audio, Camera, Gestures, Graphics, DRM, Video, Sensors firware blob. /developers.google

Mainlining
The Linux mainline kernel has very basic support for this phone since November 2016 (one cpu and uart). In kernel 4.18 was added support for SDHCI1 and pstore-ramoops. Further fixes has been added later (in SDHC1, PSCI and cleanup in 5.9, overlay msm8994 as hardware is very similar and update regulator config in 5.12, overlay and PSCI broke booting, which got fixed in 5.14. Upcoming 5.18 will add rev 1.0 support (currently is supported only 1.01).

Currently it's possible to use mainline kernel via close to mainline kernel linux-postmarketos-qcom-msm8994 package (added in ) – alternative to downstream kernel (only basic hardware support).

For further hacking on mainline kernel compiling with envkernel.sh is recommended.

To see serial console output add kernel parameter  (the latter only if you use UART debugging cable).

Update the boot.img to include your local kernel

You can communicate with the device using  (or other software, e.g.  ), so in a separate terminal start it: Boot your mobile to the bootloader (power + vol down) and you should see some debug output on the screen.

Boot the kernel using fastboot

Hardware status / details (downstream kernel, SKU LGH790, rev_1.0)
Note that xfce4 ui on this device boots to black screen, but usb networking is available.

Output of  (lm-sensors package): sensors output

CPU tuning
The default deviceinfo defines, forcing the 2xA57 cores offline. A naive tuning attempt based on oneplus-oneplus2 seems to bring the A57 cores online - but unused. still only recognizes "4 CPUs", and scores are unchanged (compare with much higher MSM8992 xiaomi-libra scores).

Monitor temperatures via  or   (lm-sensors package), (though most values may be null / disabled / 0);   may be more complete. When mainline is available, try  (linux-tools-tmon).

Links

 * (downstream)
 * (close to mainline kernel – alternative to downstream kernel, only basic hardware support), added in
 * initial MR
 * showing black screen after pmos logo in xfce DE
 * Intial porting for the Nexus 5X
 * Device Teardown
 * Mainline DTS – msm8992-lg-bullhead-rev-10.dts
 * Mainline DTS – msm8992-lg-bullhead-rev-101.dts
 * Downstream DTS
 * Google Nexus 6P (huawei-angler) – similar device
 * Google Nexus 6P (huawei-angler) – similar device