====== Use fastboot ====== Fastboot is a method to quickly upgrade each partition package of Android. ===== Install fastboot tool ===== You can follow [[products:sbc:common:development:adb#install-adb-tool| install adb tool]] to install fastboot tool. ===== Enter fastboot mode ===== - Connect the PC host and board with USB cable. - Refer the documentation ([[setup-serial-tool| VIM1/2/3/3L/4/1S/Edge1 ]] / [[products:sbc:edge2/development:setup-serial-tool| Edge2 ]]) to setup your serial tool. - Once again, make sure you've done the correct connections and setup. - Hit ''Enter'' keys at the moment of bootup to stop autoboot. This step will let the board boot into U-Boot Mode. - Type ''fastboot 1'' command to enter the burning mode. ```shell kvim1s# fastboot 1 PHY2=00000000fe03a020,phy-base=0xfe03e000 serial num: 0000000000 crg_udc_epcx_update_dqptr Cannot update dqptr for ep0 ``` ===== Unlock bootloader ===== To use fastboot to flash the machine, you must first unlock the bootloader, otherwise the machine cannot be flashed. After entering the fastboot mode, run the following command to unlock: ```shell $ fastboot flashing unlock $ fastboot flashing unlock_critical ``` ```shell C:\Users\25348>fastboot flashing unlock ... OKAY [ 0.372s] finished. total time: 0.377s C:\Users\25348>fastboot flashing unlock_critical ... OKAY [ 0.007s] finished. total time: 0.009s C:\Users\25348> ``` ===== Fastboot commands ===== ```shell $ fastboot devices $ fastboot reboot $ fastboot reboot-bootloader $ fastboot flashing unlock_critical $ fastboot flashing unlock $ fastboot flashing lock_critical $ fastboot flashing lock $ fastboot flashing get_unlock_ability $ fastboot flash bootloader bootloader.img $ fastboot flash bootloader-boot0 bootloader.img $ fastboot flash bootloader-boot1 bootloader.img $ fastboot flash dts dt.img $ fastboot flash dtbo dtbo.img $ fastboot flash vbmeta vbmeta.img $ fastboot flash logo logo.img $ fastboot flash boot boot.img $ fastboot flash super super.img # not support burn logic partition in bootloader $ fastboot flash recovery recovery.img $ fastboot erase env/param/tee/boot/recovery/dtb $ fastboot -w $ fastboot format cache $ fastboot getvar all $ fastboot getvar is-userspace # return no in bootloader $ fastboot getvar is-logical:boot # return no, others $ fastboot getvar is-logical:system # return yes, system/odm/vendor/product $ fastboot getvar super-partition-name # return super ``` ===== Update kernel ===== ```shell $ fastboot flash vendor_boot /path/to/vendor_boot.img ``` ===== Update dtb ===== ```shell $ fastboot flash vendor_boot_a /path/to/vendor_boot.img ``` ===== Exit fastboot and restart the device ===== ```shell $ fastboot reboot ``` ===== See also ===== [[https://source.android.com/docs/setup/test/running | Fastboot ]].