HTC Desire 820 Dual SIM (htc-a51dtul)

Contributors

 * Natsu
 * rom4nik

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
It appears that using custom .dts as shown in MSM8916 Mainlining didn't succeed so far, lk2nd keeps showing unknown model. Prebuilt lk2nd-msm8916-appended-dtb.img flashed in HTC fastboot mode boots and seems to work. There are two issues though:
 * After flashing the device will stay stuck in HTC fastboot. I've found two ways to get out of this state:
 * Select HBOOT, choose recovery, then reboot into system.
 * 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.
 * 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.
 * Running fastboot reboot in both HTC and lk2nd fastboot causes device to reboot into HTC fastboot and get stuck there.

UART
UART pins location on HTC Desire 820 Dual SIM (htc-a51dtul) motherboard is likely to be the same as in HTC_Desire_820_Single_SIM_(htc-a51tuhl), although logs transmitted by those two models may differ.