summaryrefslogtreecommitdiffstats
path: root/fastboot
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '536dea9d61a032e64bbe584a97463c6638ead009' into HEADThe Android Open Source Project2013-11-223-181/+171
|\ | | | | | | Change-Id: I5c469a4b738629d99d721cad7ded02d6c35f56d5
| * am edeed28b: am 4a280e3d: Merge "Don\'t use control requests to read device ↵jp abgrall2013-09-171-78/+103
| |\ | | | | | | | | | | | | | | | | | | serial numbers." * commit 'edeed28bd397f863686ba3e5bb7479f881efc657': Don't use control requests to read device serial numbers.
| * | fastboot: add support for sparse images in flashall and updateRom Lemarchand2013-07-011-95/+171
| | | | | | | | | | | | | | | Change-Id: I66a73b16a988a65fc91fb22a26d11986025089de Signed-off-by: Rom Lemarchand <romlem@google.com>
| * | fastboot: Remove legacy MINGW workaroundsRom Lemarchand2013-06-283-90/+4
| | | | | | | | | | | | | | | | | | | | | | | | The version of MINGW we compile with has more advanced POSIX support. Removing legacy MINGW workarounds as those are not needed anymore. Change-Id: Id5d67176b719db6c3667be6d63c41432e0ba9f30 Signed-off-by: Rom Lemarchand <romlem@google.com>
| * | Revert "fastboot: add preflash command to help with large downloads+flash"jp abgrall2013-06-262-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6f1cd0b2ad7a16d4ec0b5324f992cae33dc34f34. It causes some devices to fail (b/9581613). Revert for now. Change-Id: I076158c704c2b4f0459322aa157c19ebd0c4615f
| * | fastboot: add preflash command to help with large downloads+flashJP Abgrall2013-06-252-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the partition name, the bootloader would have to store all of the data until the next flash command, which potentially wastes time. To help the bootloader deal with the data more efficiently, we now issue a flashing hint ("preflash:%s", partname). "preflash:" is used to indicate that the following download should ignore any previous "preflash:%s". Bug: 6045918 Change-Id: I4e9708f64f28a4781bde14eb3714d36b281ec5be
* | | Fix a bunch of small system/core bugs.Elliott Hughes2013-10-292-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing frees in: adb/file_sync_client.c fastboot/fastboot.c libsparse/output_file.c Missing closedirs in: adb/file_sync_service.c cpio/mkbootfs.c libcutils/dir_hash.c Potential buffer overrun in: gpttool/gpttool.c Incorrect NULL check in: libsparse/backed_block.c Bug: https://code.google.com/p/android/issues/detail?id=61564 Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
* | | Wait for device to disappear after reboot-bootloader.Mark Wachsler2013-10-179-59/+122
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* | Don't use control requests to read device serial numbers.Mark Wachsler2013-09-161-78/+103
|/ | | | | | | | | | | | | | Instead of sending control requests to all devices to read their serial numbers, read the cached strings from sysfs. This fixes two problems: 1) The control requests sometimes timed out, causing devices to show up as "????????????????", and 2) a control request could mess up devices which were in the middle of being flashed. Also enumerate by walking sysfs rather than devs so that we can avoid opening host controller devices, which can be slow. On a system with 10 EHCI controllers, fastboot devices now takes 7 msec instead of 700 msec. Change-Id: I2ad2d58b48268d7950bd279fd6a6753dc2f79514
* fastboot: add support for some obscure args.JP Abgrall2013-03-072-53/+78
| | | | | | | | | | | | Some devices use mkbootimg with weird args for which fastboot only a hardcoded value. Now fastboot recognizes those args. Made handling of global vars more consistent. Bug: 8341331 Change-Id: Ic09f148ccd0249f49935fdc63e517cf8ab2229bc
* Merge commit '35d5b7e6' into masterColin Cross2013-01-231-0/+1
|\
| * fastboot: add errno.h to fix windows buildColin Cross2013-01-231-0/+1
| | | | | | | | | | | | | | The removal of extra headers from ext4_utils.h removed an indirect include of errno.h that breaks building with USE_MINGW=1. Change-Id: Ic8448db97b5c056a139dc836e1d6f3aaafb917c9
* | am 5fc4fdc6: am 2447afdb: Merge "fastboot: use better exported api from ↵Colin Cross2013-01-231-6/+1
|\ \ | |/ | | | | | | | | | | | | libext4_utils" # Via Android Git Automerger (1) and others * commit '5fc4fdc6a06cfa151d29f751d9d9beb8cb781a6a': fastboot: use better exported api from libext4_utils
| * fastboot: use better exported api from libext4_utilsColin Cross2013-01-231-6/+1
| | | | | | | | | | | | | | | | Switch fastboot to use an exported api from libext4_utils that will change less often, and remove some of the implementation details from fastboot. Change-Id: I85a10c8f58abe8093d0c781e1a0e100c348ef0d9
* | Add old fastboot_protocol.txtScott Anderson2012-12-061-0/+173
| | | | | | | | | | | | | | | | | | fastboot_protocol.txt used to live in bootable/bootloader/legacy which was old, obsolete code. However, fastboot_protocol.txt is a useful file and belongs with the fastboot code. Change-Id: Iea50c3219f9ff9dd0c394fc6028c456fa948ffd9 Signed-off-by: Scott Anderson <saa@android.com>
* | resolved conflicts for merge of 20f5daa8 to masterKenny Root2012-10-161-2/+0
|\ \ | |/ | | | | Change-Id: Ie3e67696d265a56dfa4d089c777506f27783a9a6
| * resolved conflicts for merge of 44f4f8a4 to jb-mr1-dev-plus-aospKenny Root2012-10-161-2/+0
| |\ | | | | | | | | | Change-Id: I66988d8e87a8110ca9ab3da19870b80bbaf06eba
| | * Remove HAVE_SELINUX guardsKenny Root2012-10-161-2/+0
| | | | | | | | | | | | Change-Id: Idef0a784a1d237257ff4135bb1df62ff8a67ded3
| | * fastboot: move help command before usb connectColin Cross2012-09-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Move the help command handling before the call to open_device so that is doesn't block when no device is connected. Bug: 7078873 Change-Id: I4e9a4317bd72b4ceb4b9fc838eafd2e57b17a473
* | | am e17c821e: am 608634a1: am 48f3b576: Merge "Update fastboot to wipe ext4 ↵Ken Sumrall2012-10-033-8/+90
|\ \ \ | |/ / | | | | | | | | | | | | | | | partitions before flashing" into jb-mr1-dev * commit 'e17c821e36163695f6d5024a71f8e706bda65fd6': Update fastboot to wipe ext4 partitions before flashing
| * | Update fastboot to wipe ext4 partitions before flashingKen Sumrall2012-10-023-8/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Host builds: add fastboot and adbKenny Root2012-09-261-0/+1
|/ / | | | | | | | | | | | | Add fastboot and adb host utilities to debug builds for debugging and development purposes. Change-Id: If77699a27497b8641998930f14d4ee418b856080
* | Merge "fastboot: move help command before usb connect" into jb-mr1-devColin Cross2012-09-101-3/+5
|\ \
| * | fastboot: move help command before usb connectColin Cross2012-08-291-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Move the help command handling before the call to open_device so that is doesn't block when no device is connected. Bug: 7078873 Change-Id: I4e9a4317bd72b4ceb4b9fc838eafd2e57b17a473
* | | Dist fastboot and adb for the sdk build.Ying Wang2012-09-051-1/+1
|/ / | | | | | | | | | | | | So they can be downloaded from the build page. Bug: 7109694 Change-Id: Ibc60d0acbc5d2445c01010fd0bd4654a240b0a88
* | am 94938c9d: am ed2e672f: Merge "Print strerror for file read errors during ↵Jean-Baptiste Queru2012-08-201-8/+11
|\ \ | |/ | | | | | | | | | | flashing" * commit '94938c9d60d6467ec40df4254beadc50bb787934': Print strerror for file read errors during flashing
| * Merge "Print strerror for file read errors during flashing"Jean-Baptiste Queru2012-08-201-8/+11
| |\
| | * Print strerror for file read errors during flashingMatt Gumbel2012-07-261-8/+11
| | | | | | | | | | | | | | | | | | Change-Id: I7390867abd00036f19eb4d1a1ce23aa0aca50674 Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com> Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* | | am c56f4285: am a11f4bcf: Merge changes I5006b467,I0118cebf,Ibc792367Joe Onorato2012-08-171-1/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | * commit 'c56f428530a307c850dc99024d23f7e5ebbf92d3': Support for multiple modules with the same name is going away. Fix build by removing TAGS from host module libext4_utils on host is now called libext4_utils_host so there is no name conflict
| * | Support for multiple modules with the same name is going away.Joe Onorato2012-08-151-1/+4
| | | | | | | | | | | | Change-Id: I5006b467978071f9107babe532efa71d05061580
| * | libext4_utils on host is now called libext4_utils_host so there is no name ↵Joe Onorato2012-08-151-1/+7
| | | | | | | | | | | | | | | | | | conflict Change-Id: Ibc7923676925ed6942b3f672ee764cfaa98ee96e
* | | am 36f2e2ac: am 23ee469c: Merge "fastboot: change default sparse limit to ↵Colin Cross2012-07-241-4/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | disabled" * commit '36f2e2ac96f8b2163a37773f5cb92cfff75dede2': fastboot: change default sparse limit to disabled
| * | fastboot: change default sparse limit to disabledColin Cross2012-07-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default sparse limit to disabled to prevent resparsing files unless the bootloader or user specifies a sparse limit. Some bootloaders issue an erase before every flash command, which causes earlier parts of the downloaded image to get erased. Change-Id: Iac6f3b05580aba8b82ed0f2f800979a49c33c691
* | | am cecc3186: am f650c075: Merge "fastboot: check argc before using argv"Colin Cross2012-07-241-1/+1
|\ \ \ | |/ / | | | | | | | | | * commit 'cecc3186ca18ddf7a2d43a12353c45a81ab2baca': fastboot: check argc before using argv
| * | fastboot: check argc before using argvColin Cross2012-07-241-1/+1
| |/ | | | | | | | | | | | | | | "fastboot -w" would segfault because *argv was invalid when no non-option arguments were specified. Check argc > 0 before dereferencing argv. Change-Id: I822a799e6a38e4e5c0a4eca48c6343b8a08a6185
* | resolved conflicts for merge of 4d72d881 to masterColin Cross2012-07-176-102/+491
|\ \ | |/ | | | | Change-Id: Ic092d27d3fc2bcc4db8a375bbcb5b86c111bf062
| * fastboot: add support for auto-resparsing large filesColin Cross2012-07-096-45/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-092-6/+17
| | | | | | | | | | | | | | Add an fb_getvar helper that can be used to get values from the target. Change-Id: I0da088fcbc8d40076c7bf5ef6e5bbd97fae61471
| * fastboot: use getopt_longColin Cross2012-07-091-46/+62
| | | | | | | | | | | | | | | | | | | | | | Modify the fastboot argument parsing to use getopt_long. This simplifies argument parsing, and permutes all the commands to the end of argv to allow parsing them later. Also moves usb initailization between argument and command processing, to allow commands to query parameters over usb. Change-Id: I883572f52c4190c80ee3b4aa4511ea2061a6b734
* | fastboot: Let "fastboot devices" work in all casesJP Abgrall2012-06-061-3/+8
| | | | | | | | | | | | | | | | | | | | | | Ignore ANDROID_SERIAL when requesting to list devices, or else it is impossible to list devices without unsetting the env var. Even ANDROID_SERIAL= fastboot devices or fastboot -s "" devices won't work. Change-Id: Ie92f35bda852c6ecea4ebaefb75b8f18c10b6d0c
* | am 866b1bd5: fastboot: Make the format of "devices -l" match adb\'sScott Anderson2012-06-051-6/+4
|\ \ | | | | | | | | | | | | * commit '866b1bd5051db4f22b634df1f8a06bc1c9aa2e26': fastboot: Make the format of "devices -l" match adb's
| * | fastboot: Make the format of "devices -l" match adb'sScott Anderson2012-06-051-6/+4
| | | | | | | | | | | | | | | Change-Id: Iec7b02fee8298a4437d1827623e9f61688a73f42 Signed-off-by: Scott Anderson <saa@android.com>
* | | am 177a74ac: am c1f88106: Merge "fastboot: Change -w to format after the ↵JP Abgrall2012-05-143-5/+29
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 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-073-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-017-11/+89
|\ \ \ | |/ / |/| / | |/ Change-Id: I631e466fc53e9b0f4a39f24f959b4ae9b626bdda
| * fastboot: Add ability to specify device pathScott Anderson2012-04-197-11/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-163-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | 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-034-5/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | fastboot: Keep borked bootloaders happy by shrinking URB len.JP Abgrall2012-04-181-1/+3
| | | | | | | | | | | | | | | | | | Some devices will fail to return the requested data if the final URB len of the request to > 255. So shrink the current data buffer from 128 to 127 in the acse of getting the serial number seems to work just fine. Change-Id: Ic24e6c86ec93f002dc721d92309b3f880f281f20
* | Tweak makefile to let SELinux buildKenny Root2012-04-081-0/+6
| | | | | | | | | | | | fastboot now needs SELinux support when not on Windows. Change-Id: Ib32404ef5c9a1a183d7ae319cc94eaf7f12620d9