Flashing Android on DB820c

Howdy!

I have a new DragonBoard 820C, haven’t done anything with it beyond confirming that it booted into Linux as delivered. I’m using one of the audio mezzanines to get access to a USB serial port on it.

I am trying to build and flash Android as described here:


…but am using a Windows box to do the actual flashing.

Here’s the batch file I created based on the flash-all-aosp:

fastboot flash partition:0 gpt_both0.bin
fastboot flash partition:1 gpt_both1.bin
fastboot flash partition:2 gpt_both2.bin
fastboot flash partition:3 gpt_both3.bin
fastboot flash partition:4 gpt_both4.bin
fastboot flash partition:5 gpt_both5.bin

fastboot erase ddr

fastboot flash cdt sbc_1.0_8096.bin
fastboot flash xbl xbl.elf
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash hyp hyp.mbn
fastboot flash pmic pmic.elf
fastboot flash aboot emmc_appsboot.mbn
fastboot flash devcfg devcfg.mbn
fastboot flash cmnlib64 cmnlib64.mbn
fastboot flash cmnlib cmnlib.mbn
fastboot flash keymaster keymaster.mbn

fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash userdata userdata.img
fastboot reboot

I powered the board off, held down S4, and then powered it up; saw the bootloader come up on the serial console. I validated that the device was available with ‘fastboot devices’, and proceeded to run the batch file to do the flashing. After flashing, it lost communications, and I wasn’t able to get it back:

PS D:\temp\db820c\db820c> .\flash.bat

D:\temp\db820c\db820c>fastboot flash partition:0 gpt_both0.bin
Sending 'partition:0' (44 KB)                      OKAY [  0.034s]
Writing 'partition:0'                              OKAY [  0.457s]
Finished. Total time: 0.565s

D:\temp\db820c\db820c>fastboot flash partition:1 gpt_both1.bin
Sending 'partition:1' (44 KB)                      OKAY [  0.032s]
Writing 'partition:1'                              OKAY [  0.062s]
Finished. Total time: 0.152s

D:\temp\db820c\db820c>fastboot flash partition:2 gpt_both2.bin
Sending 'partition:2' (44 KB)                      FAILED (Write to device failed (no link))
fastboot: error: Command failed

D:\temp\db820c\db820c>fastboot flash partition:3 gpt_both3.bin
^CTerminate batch job (Y/N)? y
PS D:\temp\db820c\db820c> fastboot devices
b6a93ed0        fastboot
PS D:\temp\db820c\db820c> fastboot reboot-bootloader
Rebooting into bootloader                          FAILED (Write to device failed (no link))
fastboot: error: Command failed
PS D:\temp\db820c\db820c> fastboot devices
b6a93ed0        fastboot
PS D:\temp\db820c\db820c> fastboot devices
PS D:\temp\db820c\db820c> fastboot devices

Here’s the serial terminal output:

[10] platform_init()
[10] target_init()
[10] RPM GLink Init
[10] Opening RPM Glink Port success
[10] Opening SSR Glink Port success
[20] Glink Connection between APPS and RPM established
[20] Glink Connection between APPS and RPM established
[90] UFS init success
[100] Qseecom Init Done in Appsbl
[100] secure app region addr=0x86600000 size=0x2200000[110] TZ App region notif returned with status:0 addr:86600000 size:35651584
[110] TZ App log region register returned with status:0 addr:916d4000 size:4096
[120] Qseecom TZ Init Done in Appsbl
[140] Loading cmnlib done
[140] qseecom_start_app: Loading app keymaster for the first time'
[170] <8>keymaster: "\"KEYMASTER Init \""
[170] Setting display_panel to none
[180] Selected panel: none
Skip panel configuration
[190] pm8x41_get_is_cold_boot: cold boot
[190] Invalid partition index
[190] Invalid partition index
[190] Invalid partition index
[200] fastboot_init()
[190700] fastboot: processing commands
[218160] fastboot: getvar:has-slot:partition:0
[218190] fastboot: getvar:max-download-size
[218210] fastboot: getvar:is-logical:partition:0
[218230] fastboot: download:0000b000
[218270] fastboot: flash:partition:0
[218270] Attempt to write partition image.
[218270] Writing GPT partition
[218700] Re-reading the GPT Partition Table
[218700] GPT: Partition Table written
[218700] Re-Flash all the partitions
[218760] fastboot: getvar:has-slot:partition:1
[218780] fastboot: getvar:max-download-size
[218800] fastboot: getvar:is-logical:partition:1
[218820] fastboot: download:0000b000
[218860] fastboot: flash:partition:1
[218860] Attempt to write partition image.
[218860] Writing GPT partition
[218890] Re-reading the GPT Partition Table
[218890] GPT: Partition Table written
[218900] Re-Flash all the partitions
[218960] fastboot: getvar:has-slot:partition:2

I tried resetting power, and now the bootloader isn’t even throwing any messages to the serial terminal.

Any ideas of what went wrong, and how to fix it?

Just found the documentation for the SD-card based recovery, will give that a try. Still curious what I did wrong and how to get it to work next time. :slight_smile:

Looks like SD card recovery worked; great! But is anyone able to tell me what I’m doing wrong as far as flashing Android goes? I’ll go ahead and try it again in the meantime…

William Gates strikes again?

Please find yourself something on which you can run Linux at the bare metal level. Even a live-usb would be a better idea than windows for this.

Hahah! Yeah I got un-lazy and got my Linux laptop close enough for a USB cable to reach. I don’t expect that’s the problem, as it’s the same Android development tools – but we’ll see!

There is a huge difference at the kernel level though.
And for that matter, did you try rebooting your workstation when it wasn’t working? I think I remember that as being the first thing to always try when something isn’t working on windows.

In case it continues to give you a hard time, you can use the usb/qdl method of recovery, and feed it the aosp recovery package. That should get the thing set up properly without having to use fastboot. The only difference between “linux” and “aosp” at this level is the partition table.

I’m trying the qdl method now… the directions state rawprogram.xml and patch.xml, but the new recovery images have rawpartition0-5.xml, and the same patch files… which ones am I supposed to be using?

To be honest, I’ve never run any of these.
I suspect that you run them all.

qdl prog_ufs_firehose_8996_ddr.elf rawprogram0.xml patch0.xml
qdl prog_ufs_firehose_8996_ddr.elf rawprogram1.xml patch1.xml
qdl prog_ufs_firehose_8996_ddr.elf rawprogram2.xml patch2.xml
qdl prog_ufs_firehose_8996_ddr.elf rawprogram3.xml patch3.xml
qdl prog_ufs_firehose_8996_ddr.elf rawprogram4.xml patch4.xml
qdl prog_ufs_firehose_8996_ddr.elf rawprogram5.xml patch5.xml

But that’s only a guess.

Why the heck didn’t I think of that?! Sigh. :slight_smile:

That appears to have done the trick… and Android flashed properly from Linux. Yay!

Now need to figure out why it’s not cooperating with my display… but at least it’s booting.

1 Like

What’s going on with the display?