|
1 | 1 | ======================
|
2 | 2 | ``fastboot`` fastbootd
|
3 | 3 | ======================
|
| 4 | +Prepare |
| 5 | +========================== |
| 6 | + |
| 7 | +- Check fastboot tool(Host): :code:`fastboot --version` |
| 8 | +- Download fastboot tool and install(Host): `platform-tools <https://developer.android.com/tools/releases/platform-tools>`__ |
| 9 | +- Enable the fastbootd application(Device): :code:`CONFIG_USBFASTBOOT=y` and :code:`CONFIG_SYSTEM_FASTBOOTD=y` |
| 10 | +- Start fastbootd(Device): :code:`fastbootd &` |
| 11 | + |
| 12 | +Commands |
| 13 | +========================== |
| 14 | +- :code:`fastboot reboot [FLAG]`: Reboot the device, more details for :code:`[FLAG]`: `g_resetflag <https://github.com/apache/nuttx-apps/blob/master/nshlib/nsh_syscmds.c#L114>`__ and `boardioc_softreset_subreason_e <https://github.com/apache/nuttx/blob/master/include/sys/boardctl.h#L458>`__ |
| 15 | +- :code:`fastboot flash <PARTITION> <FILENAME>`: Flash partition :code:`<PARTITION>` using the given :code:`<FILENAME>` |
| 16 | +- :code:`fastboot erase <PARTITION>`: Erase given partition |
| 17 | +- Get Variables |
| 18 | + - :code:`fastboot getvar product`: Get product name |
| 19 | + - :code:`fastboot getvar kernel`: Get kernel name |
| 20 | + - :code:`fastboot getvar version`: Get OS version string |
| 21 | + - :code:`fastboot getvar slot-count`: Get slot count |
| 22 | + - :code:`fastboot getvar max-download-size`: Get max download size |
| 23 | +- OEM |
| 24 | + - :code:`fastboot oem filedump <PARTITION> [OFFSET] [LENGTH]`: Get :code:`<LENGTH>` (full by default) bytes of :code:`<PARTITION>` from :code:`<OFFSET>` (zero by default) |
| 25 | + - :code:`fastboot oem memdump <ADDRESS> <LENGTH>`: Dump :code:`<LENGTH>` bytes memory from address :code:`<ADDRESS>` |
| 26 | +- :code:`fastboot get_staged <OUT_FILE>`: Writes data staged by the last command to file :code:`<OUT_FILE>`. e.g. "oem filedump" and "oem memdump" |
| 27 | + |
| 28 | +Examples |
| 29 | +========================== |
| 30 | +- Exit fastboot mode: :code:`fastboot reboot` |
| 31 | +- Flash app.bin to partition /dev/app: :code:`fastboot flash app ./app.bin` |
| 32 | +- Erase partition /dev/userdata: :code:`fastboot erase userdata` |
| 33 | +- Dump partition /dev/app: :code:`fastboot filedump /dev/app` and then :code:`fastboot get_staged ./dump_app.bin` |
| 34 | +- Dump memory from 0x44000000 to 0x440b6c00: :code:`fastboot oem memdump 0x44000000 0xb6c00` and then :code:`fastboot get_staged ./mem_44000000_440b6c00.bin` |
0 commit comments