HTC Desire 820 Dual SIM (htc-a51dtul)

From postmarketOS Wiki
HTC Desire 820 (Dual SIM)
Manufacturer HTC
Name Desire 820 (Dual SIM)
Codename htc-a51dtul
Released 2014
Type handset
Hardware
Chipset Qualcomm Snapdragon 615 (MSM8939)
CPU 4x 1.5GHz Cortex-A53 + 4x 1.0GHz Cortex-A53
GPU Adreno 405
Display 720x1280 SLCD
Storage 16GB
Memory 2GB
Architecture aarch64
Software
Original software Android
Original version 4.4
postmarketOS
Category testing
Pre-built images no
This device is marked as not booting.
This device is based on the Snapdragon 615.
See the SoC page for common tips, guides and troubleshooting steps

Contributors

Users owning this device


How to enter flash mode

In Power off state, use Volume- & power key to enter Hboot, and directly select the fastboot interface. Seems this fastboot interface can't use general fastboot for flashing partition, need to use another method to flash.

Installation

"The device must as S-OFF mode for installing custom kernel!"

lk2nd

todo: update with relevant information from https://github.com/msm8916-mainline/lk2nd/pull/316

It seems that HBOOT has a bug (or feature?) that allows to boot lk2nd without matching .dts in image flashed to boot partition, by reusing previous devicetree from another boot "stage". This lets you boot prebuilt lk2nd-msm8916-appended-dtb.img for further tinkering. Here's two ways to trigger that behavior:

  • Select HBOOT, choose recovery, then reboot into system or run adb reboot.
  • If the above is not possible (TWRP images seem scarce for this model) choose power down in HTC fastboot, plug charger, then once animated screen is shown hold power button. Phone should reboot into lk2nd.

In both cases you should be getting MODEL - Unknown (FIXME!) since lk2nd couldn't find a compatible = [..], "lk2nd,device"; in the DTB.

Button mapping is incorrect - volume up scrolls selection one way (possibly mapped as volume up), power scrolls another (possibly mapped as volume down), volume down does nothing. Haven't found a way to select an option. Once it's possible to get proper .dts selected by HBOOT the buttons should be fixable, see htc-m8qlul.dts.

Rebooting by fastboot reboot in HBOOT/lk2nd will cause HBOOT to forget the previous devicetree. Similarly, rebooting from recovery to recovery shows checking devicetree in HBOOT UART logs.

As of now I've had no luck getting custom .dts to be picked up by HBOOT, it'll complain about [FATAL] Invalid dtb header in UART log. However, lk2nd used to be able to pick up the .dts when using fastboot boot in it, but currently gives me panics after Cannot update chosen node [bootargs].

UART

Htc-a51dtul ground-uart tx-uart rx.jpg

You can connect to the ground by soldering to the pin shown in picture above or just using some part of the motherboard's ground plane, e.g. a screw hole or the large copper shielding. Be aware that UART high level (logical 1) is 1.8 V. UART decoder settings: baud rate - 115200, parity - none, data bits - 8.

Notes

  • this device is named as Desire 820u (d820u), not d820s
  • the system image is same as Desire 820 Single SIM, but device tree image is different.
  • fastboot oem dmesg can be used in HBOOT to get some logs, even if S-ON