summaryrefslogtreecommitdiffstats
path: root/fastboot/fastboot.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "System: Fastboot: warning fixit, misc bugs and cleanup."Alexander Levitskiy2014-05-071-5/+4
| | | | | | This reverts commit 782111b3bc5d372afc8d66ab6023e834b7c23b88. Change-Id: Ib66400dfaeef7f01e6461a57b9f09be08de2f1fe
* System: Fastboot: warning fixit, misc bugs and cleanup.Sasha Levitskiy2014-05-071-4/+5
| | | | | Change-Id: Ib8517a852977962de3f05c879ba7dce89bcef644 Signed-off-by: Sasha Levitskiy <sanek@google.com>
* fastboot: support for overriding format fs-type and sizeJP Abgrall2014-05-061-1/+1
| | | | | | | | | | This changes allows overriding the fs-type and size that are normally returned by the booloader. This is in preparation for supporting other FSes. Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870 Signed-off-by: JP Abgrall <jpa@google.com>
* fastboot: allow format on devices with small buffersDmitry Grinberg2014-05-061-1/+1
| | | | | | | | | | Formatting large partitions on devices with small transfer buffers did not work before since format used a strange path through the code to send data. It now uses the normal path. Also cleaned up a bit. FS code now lives in a separate file and the custom path for format is gone. Change-Id: If4e01cabc2e250b7c02ca7ce8c268e51d49e1529
* Wait for device to disappear after reboot-bootloader.Mark Wachsler2013-10-171-0/+3
| | | | | | | | | | | | | | | | (Linux only for now) With fastboot reading serial numbers from sysfs, it had become possible for a fastboot command issued immediately after rebooting the bootloader to fail, because sysfs still thought the device was online. To prevent this, after reboot-bootloader we wait for the device to disconnect. Also made usb_read and usb_write fail immediately if the descriptor has been closed; this prevents an incorrect error message ("Bad file descriptor") when errors from fb_getvar are ignored (e.g., by fb_format_supported). Also removed unused fd param from filter_usb_device, and simplified logic in usb_write by using do/while instead of a special case for len == 0. Change-Id: I799b857eab411fd8ad25f5777fc61c685152ea86
* Update fastboot to wipe ext4 partitions before flashingKen Sumrall2012-10-021-1/+2
| | | | | | | | | | To prevent false error reports from e2fsck, update fastboot to erase a partition identified as being ext4 partition before flashing an image to it. bug: 7259359 Change-Id: I85e9963aa8247b4b33fdd57f994cdb3ee72b670f
* resolved conflicts for merge of 4d72d881 to masterColin Cross2012-07-171-0/+5
|\ | | | | | | Change-Id: Ic092d27d3fc2bcc4db8a375bbcb5b86c111bf062
| * fastboot: add support for auto-resparsing large filesColin Cross2012-07-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to fastboot for automatically using libsparse to break large files, whether they are in sparse or normal format, into multiple sparse files that can each fit into the target's memory. Allows flashing images that are larger than the size of the available memory on the target. By default, any file over 512MB will be sparsed into 512MB chunks. The limit can be modified with the -m argument, or sparsing can be forced with -S or avoided with -N. If -m is not specified, the target can override the default by implementing getvar:max-download-size Change-Id: I6c59381c3d24475c4f2587ea877200b96971cbd7
| * fastboot: add fb_getvarColin Cross2012-07-091-0/+1
| | | | | | | | | | | | | | Add an fb_getvar helper that can be used to get values from the target. Change-Id: I0da088fcbc8d40076c7bf5ef6e5bbd97fae61471
* | am 177a74ac: am c1f88106: Merge "fastboot: Change -w to format after the ↵JP Abgrall2012-05-141-1/+1
|\ \ | |/ | | | | | | | | | | erase of userdata & cache" into jb-dev * commit '177a74aced971b89c319fb61ee12da0ca40f0c12': fastboot: Change -w to format after the erase of userdata & cache
| * fastboot: Change -w to format after the erase of userdata & cacheJP Abgrall2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | If the bootloader doesn't support formatting of those partitions (either because it doesn't support the getvar commands needed or the partition type is not supported), the errors are printed but doesn't halt processing of subsequent commands. Change-Id: I816ac2e5e7593846fcb4fd39c793a8dbdd996f6f Signed-off-by: Mike J. Chen <mjchen@google.com>
* | resolved conflicts for merge of 13081c69 to masterScott Anderson2012-05-011-0/+1
|\ \ | |/ |/| | | Change-Id: I631e466fc53e9b0f4a39f24f959b4ae9b626bdda
| * fastboot: Add ability to specify device pathScott Anderson2012-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For manufacturing and testing, there is a need to talk to whatever device is connected to a given port on the host. This change modifies fastboot's "-s" option to take either a serial number or a device path. The device paths of the connected devices can be listed using "fastboot -l devices" whose output will resemble: 016B75D60A00600D usb:2-5 fastboot AD3C12020173 usb:1-4.3 fastboot The second column lists the device paths. If the -l option is not given, the output from "fastboot devices" will be the same as it used to be (i.e. the paths will not be printed). Finally, note that the format of the device paths are platform dependent. The example above is from Linux. On OS-X, the paths will be "usb:" followed by hex digits. For Windows, the device paths will be printed as "????????????" and the -s option will not be able to select a device until someone implements the underlying functionality in usb_windows.c. Change-Id: I1f01b8f47acd32edb0ac18db107316a2c923bbde Signed-off-by: Scott Anderson <saa@android.com>
| * DO NOT MERGEMike J. Chen2012-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | fastboot: Change -w to format after the erase of userdata & cache If the bootloader doesn't support formatting of those partitions (either because it doesn't support the getvar commands needed or the partition type is not supported), the errors are printed but doesn't halt processing of subsequent commands. Change-Id: I816ac2e5e7593846fcb4fd39c793a8dbdd996f6f Signed-off-by: Mike J. Chen <mjchen@google.com>
| * Implement 'fastboot format' commandAnatol Pomazau2012-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some filesystems (e.g. ext4) require flushing an initial fs image, right after erasing it the partition is unusable. Doing erase,flush emptyfs is a little bit scaring so we have a separate command that performs it as atomic step: - get size of partition - create an empty filesystem image - erase the partition - flush empty fs to the partition This command applicable only for ext4 filesystem and checks the partition type before formatting it. Change-Id: I8529bc1dc64698f1f0d91312f7c0ab1a6e5d8b44
* | Remove trailing whitespacesAnatol Pomazau2012-02-281-2/+2
| | | | | | | | Change-Id: I6f83333a6ee0fbc562a12bb9555c43a44c98768e
* | Implement 'fastboot format' commandAnatol Pomazau2012-02-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some filesystems (e.g. ext4) require flushing an initial fs image, right after erasing it the partition is unusable. Doing erase,flush emptyfs is a little bit scaring so we have a separate command that performs it as atomic step: - get size of partition - create an empty filesystem image - erase the partition - flush empty fs to the partition This command applicable only for ext4 filesystem and checks the partition type before formatting it. Change-Id: I8529bc3485739487f0d91312f7c0ab1a6e5d8b44
* | Revert "Implement 'fastboot format' command"Mike Lockwood2012-02-131-1/+0
| | | | | | | | | | | | until Windows support is done This reverts commit 452e11885afb53d59b2aa38b15e3be41c568d1e6.
* | Implement 'fastboot format' commandAnatol Pomazau2012-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some filesystems (e.g. ext4) require flushing an initial fs image, right after erasing it the partition is unusable. Doing erase,flush emptyfs is a little bit scaring so we have a separate command that performs it as atomic step: - get size of partition - create an empty filesystem image - erase the partition - flush empty fs to the partition This command applicable only for ext4 filesystem and checks the partition type before formatting it. Change-Id: Ifa42deaa66c3cb96ff786a73c3fadad92658f395
* | Revert "Implement 'fastboot format' command"Anatol Pomazau2012-02-031-1/+0
| | | | | | This reverts commit 230d160a718333651f7ca1557404f96682795b37
* | Implement 'fastboot format' commandAnatol Pomazau2012-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some filesystems (e.g. ext4) require flushing an initial fs image, right after erasing it the partition is unusable. Doing erase,flush emptyfs is a little bit scaring so we have a separate command that performs it as atomic step: - get size of partition - create an empty filesystem image - erase the partition - flush empty fs to the partition This command applicable only for ext4 filesystem and checks the partition type before formatting it. Change-Id: I8529bc1dc64237f1f0d91312f7c0ab1a6e5d8b44
* | Revert "Implement 'fastboot format' command"Anatol Pomazau2012-02-031-1/+0
| | | | | | This reverts commit 049dff53ef368bd84d0bddcb4c91f408774949c1
* | Implement 'fastboot format' commandAnatol Pomazau2012-01-251-0/+1
|/ | | | | | | | | | | | | | | | | | Some filesystems (e.g. ext4) require flushing an initial fs image, right after erasing it the partition is unusable. Doing erase,flush emptyfs is a little bit scaring so we have a separate command that performs it as atomic step: - get size of partition - create an empty filesystem image - erase the partition - flush empty fs to the partition This command applicable only for ext4 filesystem and checks the partition type before formatting it. Change-Id: I8529bc1dc64698f1f0d91312f7c0ab1a6e5d8b44
* Teach fastboot to allow required variables per product.Wink Saville2011-04-041-1/+6
| | | | | | | | | | | | | | | | | | | | This is needed for products like xoom-cdma and xoom-cdma-lte. The xoom-cdma-lte product requires an lte baseband binary but it's not needed for xoom-cdma. This is implemented by allowing an optional product parameter to "required" statements. The parameter is separated from "required" by a colon so the version-baseband-2 requirment in board-info.txt for stingray becomes: require-for-product:xoom-cdma-lte version-baseband-2=ltedc_u_03.25.00|ltedc_u_03.19.00 In the above statement, only xoom-cdma-lte requires version-baseband-2 and the baseband can be lte_u_03.25.00 or lte_u_03.19.00. For other products version-baseband-2 will be ignored. Change-Id: I786bec5f5661c2243d87925b064fc6124d3cffa1
* fastboot should return non-zero exit code on errorBrian Carlstrom2010-04-231-1/+1
| | | | | | | | | | | | | | | | | | When using fastboot in scripts, it currently is necessary to parse the output for FAILED messages and possible other indications of error. This happens relatively often, for example when there are radio update issues. Fortunately, fb_execute_queue already has a notion that an error has occured which is used to abort the queue execution. This change makes the status value be returned from fb_execute_queue to main which can then return it as an exit status. usage cases were also changed to return 1. Note the code already returned 1 for error in one other case when there was a problem with boot, so there is a precedent for return 1 on error in this program. Change-Id: Ib0463b08c8f2569495e248dd84e331f7e3691039
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+57
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-57/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+57