<span style="font-size:14px;">usage: fastboot [ <option> ] <command> commands: update <filename> reflash device from update.zip flashall flash boot + recovery + system flash <partition> [ <filename> ] write a file to a flash partition erase <partition> erase a flash partition format <partition> format a flash partition getvar <variable> display a bootloader variable boot <kernel> [ <ramdisk> ] download and boot kernel flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it devices list all connected devices continue continue with autoboot reboot reboot device normally reboot-bootloader reboot device into bootloader help show this help message options: -w erase userdata and cache (and format if supported by partition type) -u do not first erase partition before formatting -s <specific device> specify device serial number or path to device port -l with "devices", lists device paths -p <product> specify product name -c <cmdline> override kernel commandline -i <vendor id> specify a custom USB vendor id -b <base_addr> specify a custom kernel base address -n <page size> specify the nand page size. default: 2048 -S <size>[K|M|G] automatically sparse files greater than size. 0 to disable </span>
<span style="font-size:14px;">fastboot oem command args</span>
//第一个参数是命令的名称 //第二个参数是命令的执行函数 //第三个参数是在security IC 中是否还提供此命令 fastboot_register("oem hello", cmd_oem_hello, FALSE);
//注意args 是以command 结束开始,即" args" if(!strncmp(arg, " OK", strlen(" OK"))){ fastboot_okey("OK"); }else{ fastboot_fail("Not OK"); } }
fastboot_okey(const char* result); fastboot_fail(const char* reason); fastboot_info(const char* reason);
注意这三个打印字符串的长度都不能超过64-1-4 = 59 个字
转载请注明出处:周木水的CSDN博客 http://blog.csdn.net/zhoumushui
我的GitHub:周木水的GitHub https://github.com/zhoumushui
原文地址:http://blog.csdn.net/zhoumushui/article/details/40737065