fastboot fastbootd

Prepare

  • Check fastboot tool(Host): fastboot --version

  • Download fastboot tool and install(Host): platform-tools

  • Enable the fastbootd application(Device): CONFIG_USBFASTBOOT=y and CONFIG_SYSTEM_FASTBOOTD=y

  • Start fastbootd(Device): fastbootd &

Commands

  • fastboot reboot [FLAG]: Reboot the device, more details for [FLAG]: g_resetflag and boardioc_softreset_subreason_e

  • fastboot flash <PARTITION> <FILENAME>: Flash partition <PARTITION> using the given <FILENAME>

  • fastboot erase <PARTITION>: Erase given partition

  • Get Variables
    • fastboot getvar product: Get product name

    • fastboot getvar kernel: Get kernel name

    • fastboot getvar version: Get OS version string

    • fastboot getvar slot-count: Get slot count

    • fastboot getvar max-download-size: Get max download size

  • OEM
    • fastboot oem filedump <PARTITION> [OFFSET] [LENGTH]: Get <LENGTH> (full by default) bytes of <PARTITION> from <OFFSET> (zero by default)

    • fastboot oem memdump <ADDRESS> <LENGTH>: Dump <LENGTH> bytes memory from address <ADDRESS>

  • fastboot get_staged <OUT_FILE>: Writes data staged by the last command to file <OUT_FILE>. e.g. “oem filedump” and “oem memdump”

Examples

  • Exit fastboot mode: fastboot reboot

  • Flash app.bin to partition /dev/app: fastboot flash app ./app.bin

  • Erase partition /dev/userdata: fastboot erase userdata

  • Dump partition /dev/app: fastboot filedump /dev/app and then fastboot get_staged ./dump_app.bin

  • Dump memory from 0x44000000 to 0x440b6c00: fastboot oem memdump 0x44000000 0xb6c00 and then fastboot get_staged ./mem_44000000_440b6c00.bin