Auto change to fastboot mode after reboot Hikey960 board

Hi everyone,
I use hikey960 board with UART serial debug board to run AOSP (9.0 kernel 4.9).
I turn On switch 1 and turn Off switch 2,3.
In fisrt time plug power to the board, I see usbloader: bootmode is 1 and it totally boot into android. But after press the Power key, my board auto change to fastboot mode, I see usbloader: bootmode is 4.
Anyone got this problem and how can I disable that auto change bootmode?

Alternating boot mode is a very annoying “feature” of the hisilicon proprietary bootloader.
Install the uefi bootloader to fix it.

Use the “uefi-flash-all.sh” script to install instead of “flash-all.sh”.

thank you for your help,
After I recovery as UEFI boot, I got this error:

Press ESCAPE for boot options .ERROR: Device Tree header not valid (err:-9)
Android Fastboot mode - version 0.7.
Press RETURN or SPACE key to quit.

Sounds like you didn’t install all the partitions. You need to install everything.

Yes it sounds like you should reflash the device tree partition.

After installing uefi boot I had to modify my flash-all script to not reflash the incorrect partition table but after doing so, it was usable.

Flashing with this sniplet works for me.

fastboot flash xloader "${INSTALLER_DIR}"/hisi-sec_xloader.img
## fastboot flash ptable "${INSTALLER_DIR}"/hisi-ptable.img
fastboot flash fastboot "${INSTALLER_DIR}"/hisi-fastboot.img
fastboot reboot-bootloader
fastboot flash nvme "${INSTALLER_DIR}"/hisi-nvme.img
fastboot flash fw_lpm3   "${INSTALLER_DIR}"/hisi-lpm3.img
fastboot flash trustfirmware   "${INSTALLER_DIR}"/hisi-bl31.bin
fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img
fastboot flash dts "${ANDROID_PRODUCT_OUT}"/dt.img
fastboot flash system "${ANDROID_PRODUCT_OUT}"/system.img
fastboot flash vendor "${ANDROID_PRODUCT_OUT}"/vendor.img
fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img
fastboot reboot

Good luck hope it helps!

1 Like