Jump to content

HTC Desire 820 Dual SIM (htc-a51dtul): Difference between revisions

From postmarketOS Wiki
Rom4nik (talk | contribs)
m Notes: Mention fastboot oem dmesg
Rom4nik (talk | contribs)
lk2nd: HBOOT never picked up my DTB - it was probably a bug reusing DTB from recovery/charging
Line 57: Line 57:


== lk2nd ==
== lk2nd ==
It appears that using custom .dts as shown in [[MSM8916 Mainlining#lk2nd]] 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:
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 <code>lk2nd-msm8916-appended-dtb.img</code> for further tinkering. Here's two ways to trigger that behavior:
* 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.  
** 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.
** 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.
In both cases you should be getting <code>MODEL - Unknown (FIXME!)</code> since lk2nd couldn't find a <code>compatible = [..], "lk2nd,device";</code> in the DTB.
* Running fastboot reboot in both HTC and lk2nd fastboot causes device to reboot into HTC fastboot and get stuck there.
 
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 [https://github.com/msm8916-mainline/lk2nd/blob/541dd6768ab7bc03208be3fb2e031303c4a30d34/dts/msm8916/msm8939-htc-m8qlul.dts htc-m8qlul.dts].
 
Rebooting by <code>fastboot reboot</code> 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 <code>[FATAL] Invalid dtb header</code> in UART log. However, lk2nd used to be able to pick up the .dts when using <code>fastboot boot</code> in it, but currently gives me panics after <code>Cannot update chosen node [bootargs]</code>.


== UART ==
== UART ==

Revision as of 18:40, 31 December 2023

This device is marked as not booting.
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


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

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.
  • 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

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