最終更新:2021-11-26 (金) 18:24:41 (1178d)
Android/fastboot
command line tool used to directly flash the filesystem in Android devices from a host via USB.
It allows flashing of unsigned partition images. It is disabled in production devices since USB support has been disabled in the bootloader. You must have an Engineering SPL, or an SPL that is S-OFF.
http://source.android.com/source/building.html
http://source.android.com/source/building-devices.html
例
$ adb reboot bootloader $ fastboot -w $ fastboot flash system $ANDROID_ROOT/out/target/product/maguro/system.img $ fastboot flash boot $ANDROID_ROOT/out/target/product/maguro/boot.img $ fastboot reboot
ドライバ
- Android SDKのextras\google\usb_driver\android_winusb.inf
Android/アンロック
- fastboot flashing unlock
- On Nexus One?, Nexus S, Nexus S 4G?, Xoom?, Galaxy Nexus, and Nexus 7, the bootloader is locked by default. With the device in fastboot mode, the bootloader is unlocked with
$ fastboot oem unlock $ fastboot oem lock
デバイスへの転送
機種別
- During a cold boot, the following key combinations can be used to boot into fastboot mode, which is a mode in the bootloader that can be used to flash the devices:
Device Keys grouper (Nexus 7) Press Power for a second, and press Volume Down when the bootloader logo appears maguro (Galaxy Nexus) Press and hold both Volume Up and Volume Down, then press and hold Power toro (Galaxy Nexus) Press and hold both Volume Up and Volume Down, then press and hold Power panda (PandaBoard) Press and hold Input, then press Power wingray (Motorola Xoom) Press and hold Volume Down, then press and hold Power crespo (Nexus S) Press and hold Volume Up, then press and hold Power crespo4g? (Nexus S 4G?) Press and hold Volume Up, then press and hold Power passion? (Nexus One?) Press and hold the trackball, then press Power sapphire? (HTC Magic?) Press and hold Back, then press Power dream? (HTC Dream?) Press and hold Back, then press Power
コマンド
help
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 -s <serial number> specify device serial number -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
fastboot help usage: fastboot [ <option> ] <command> commands: update <filename> Reflash device from update.zip. flashall Flash boot, system, vendor, and -- if found -- recovery. flash <partition> [ <filename> ] Write a file to a flash partition. flashing lock Locks the device. Prevents flashing. flashing unlock Unlocks the device. Allows flashing any partition except bootloader-related partitions. flashing lock_critical Prevents flashing bootloader-related partitions. flashing unlock_critical Enables flashing bootloader-related partitions. flashing get_unlock_ability Queries bootloader to see if the device is unlocked. flashing get_unlock_bootloader_nonce Queries the bootloader to get the unlock nonce. flashing unlock_bootloader <request> Issue unlock bootloader using request. flashing lock_bootloader Locks the bootloader to prevent bootloader version rollback. erase <partition> Erase a flash partition. format[:[<fs type>][:[<size>]] <partition> Format a flash partition. Can override the fs type and/or size the bootloader reports. getvar <variable> Display a bootloader variable. set_active <suffix> Sets the active slot. If slots are not supported, this does nothing. boot <kernel> [ <ramdisk> [ <second> ] ] Download and boot kernel. flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] Create bootimage and flash it. devices [-l] List all connected devices [with device paths]. continue Continue with autoboot. reboot [bootloader] Reboot device [into bootloader]. 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 erase partition before formatting. -s <specific device> Specify a device. For USB, provide either a serial number or path to device port. For ethernet, provide an address in the form <protocol>:<hostname>[:port] where <protocol> is either tcp or udp. -p <product> Specify product name. -c <cmdline> Override kernel commandline. -i <vendor id> Specify a custom USB vendor id. -b, --base <base_addr> Specify a custom kernel base address (default: 0x10000000). --kernel-offset Specify a custom kernel offset. (default: 0x00008000) --ramdisk-offset Specify a custom ramdisk offset. (default: 0x01000000) --tags-offset Specify a custom tags offset. (default: 0x00000100) -n, --page-size <page size> Specify the nand page size (default: 2048). -S <size>[K|M|G] Automatically sparse files greater than 'size'. 0 to disable. --slot <suffix> Specify slot suffix to be used if the device supports slots. This will be added to all partition names that use slots. 'all' can be given to refer to all slots. 'other' can be given to refer to a non-current slot. If this flag is not used, slotted partitions will default to the current active slot. -a, --set-active[=<suffix>] Sets the active slot. If no suffix is provided, this will default to the value given by --slot. If slots are not supported, this does nothing. This will run after all non-reboot commands. --unbuffered Do not buffer input or output. --version Display version. -h, --help show this message.
ソースコード
Android/パーティション
# cat /proc/mtd
参考
http://wiki.cyanogenmod.com/wiki/Fastboot
http://android-dls.com/wiki/index.php?title=Fastboot
http://blog.sola-dolphin-1.net/archives/4059847.html
関連
- adb
- Second Program Loader?
- Android/ビルド