History log of /system/core/fastboot/fastboot.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
82ff315bb0fecb9127970e01b399be53c92ca14f 01-Sep-2016 Elliott Hughes <enh@google.com> Add android::base::GetExecutablePath, switch adb and fastboot over.

We'd long had two copies of this stuff, so rather than rewrite both
Linux versions to use android::base::Readlink, let's kill the duplication
too...

Bug: http://b/30988271
Change-Id: I4de58a94a22a4b1faf969a6fc70ca1560a4d5121
/system/core/fastboot/fastboot.h
2810d00dd95ed78fdd93f2ed68f06ee32bd8e1ac 25-Apr-2016 Elliott Hughes <enh@google.com> Use more std::string in fastboot.

Change-Id: Ic8c77eac1e0088627ab650050d9c97c5749e5c39
/system/core/fastboot/fastboot.h
9da9ac5b2a109fa61826bc2609011ea84f175c28 19-Jan-2016 Josh Gao <jmgao@google.com> fastboot: show progress when sending sparse images.

Bug: http://b/25443220
Change-Id: Ica0c88aea2a0661f39ff1415ebba464c037651da
/system/core/fastboot/fastboot.h
0b156638307db890e5539b52521fd24beb3440cb 30-Oct-2015 David Pursell <dpursell@google.com> fastboot: create Transport object (take 2).

(Second upload of this CL; original upload had the wrong version of
usb_windows.cpp that caused a compilation error. Fixed error and
re-tested.)

This CL creates a Transport object to provide a generic interface for
various transports. Specifically this is designed to be able to add UDP
support to fastboot in an upcoming CL without changing the main program
logic.

Also includes some minor code style fixes and replaces malloc/free
in the USB implementation files with smart pointers and std::string.

Bug: http://b/22029765
Change-Id: I1175bbce08690fbd15f51e68166be9b3e9973ea0
/system/core/fastboot/fastboot.h
c0504e18734ee87e737eb9d80311f5c3478974c3 14-Nov-2015 David Pursell <dpursell@google.com> Revert "fastboot: create Transport object."

This broke some stuff, will look into it Monday.

This reverts commit 6f233a7799a681e65c539e9c8287db0814c8948f.

Change-Id: I155bc85d21fda3b0ba1e5e17839059797fb15509
/system/core/fastboot/fastboot.h
6f233a7799a681e65c539e9c8287db0814c8948f 30-Oct-2015 David Pursell <dpursell@google.com> fastboot: create Transport object.

This CL creates a Transport object to provide a generic interface for
various transports. Specifically this is designed to be able to add UDP
support to fastboot in an upcoming CL without changing the main program
logic.

Also includes some minor code style fixes and replaces malloc/free
in the USB implementation files with smart pointers and std::string.

Bug: http://b/22029765
Change-Id: I68641af0da7d13db4647f5e20a18d04d67f0b327
/system/core/fastboot/fastboot.h
b7bd4ae529148e7f4d830d98ea0a75bdc5d1ac17 15-Sep-2015 Daniel Rosenberg <drosen@google.com> Fastboot changes to support A/B partitioning

Introduce support for -slot option for specifying slots,
and set_active, for changing the current slot.
Change-Id: Ib3b2a75491c0d0413534dd0c1d7bcb52555bba66
/system/core/fastboot/fastboot.h
8ab9a32323cee1f23c5ccbfeabd2cb2253f693d2 02-Nov-2015 Elliott Hughes <enh@google.com> Clarify and fix the intent of the partition-type checking code.

Change-Id: I202dab4ee91208b632bc2086d1e5c387a4c29edd
/system/core/fastboot/fastboot.h
2fd45a9cea9d31375a44ba36b065c2f8a2999993 30-Oct-2015 Elliott Hughes <enh@google.com> fastboot shouldn't erase non-existent cache partitions.

Check that the cache partition exists before trying to erase it.

Also clean up some of the C string handling and int booleans.

Bug: http://b/25375777
Change-Id: I1880e542b729f2026ab3a2943d4bee9d659b1eeb
/system/core/fastboot/fastboot.h
fc79767fc26d8782403e7b1afa7b93d518a86b19 08-Apr-2015 Elliott Hughes <enh@google.com> Use 64-bit file sizes in fastboot.

Bug: 20110580
Change-Id: I5d3718103ff581ff3b5241c8b0e52b585b4f37e5
/system/core/fastboot/fastboot.h
f6e9ffbc734c7100914e8164f735317a85151033 11-May-2015 Narayan Kamath <narayan@google.com> Fix file descriptor leak when opening invalid archives.

Also add -Wunreachable-code to the set of compiler flags, otherwise
noreturn becomes considerably less useful.

bug: https://code.google.com/p/android/issues/detail?id=171099
Change-Id: I9a95d45633c731c7046d4e4a39844d9cebfd1718
(cherrypick of 241bcf05e0e394bbf2681f359f52646dd6c707f6.)
/system/core/fastboot/fastboot.h
253c18d2fbab6c16886af8bdfd528df3ebf82b93 19-Mar-2015 Elliott Hughes <enh@google.com> Prepare for switching to libziparchive.

Bug: 19765860
Change-Id: I58249d28fbc4975428d0dcac5107d1994c35676c
/system/core/fastboot/fastboot.h
8d7ddb35d510824e50833a9b31ae6486393b1436 08-May-2014 Alexander Levitskiy <sanek@google.com> Revert "System: Fastboot: warning fixit, misc bugs and cleanup."

This reverts commit 782111b3bc5d372afc8d66ab6023e834b7c23b88.

Change-Id: Ib66400dfaeef7f01e6461a57b9f09be08de2f1fe
/system/core/fastboot/fastboot.h
782111b3bc5d372afc8d66ab6023e834b7c23b88 06-May-2014 Sasha Levitskiy <sanek@google.com> System: Fastboot: warning fixit, misc bugs and cleanup.

Change-Id: Ib8517a852977962de3f05c879ba7dce89bcef644
Signed-off-by: Sasha Levitskiy <sanek@google.com>
/system/core/fastboot/fastboot.h
7e85974fc2fc48a0cea7bb9bafcfcda863138eb6 07-May-2014 JP Abgrall <jpa@google.com> fastboot: support for overriding format fs-type and size

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>
/system/core/fastboot/fastboot.h
e6f3e9bd2656fe132f829ed035fdea0cb111369d 12-Mar-2014 Dmitry Grinberg <dmitrygr@google.com> fastboot: allow format on devices with small buffers

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
/system/core/fastboot/fastboot.h
157b00171a06f9ac2fd25ee3a86e801e896713d6 02-Oct-2013 Mark Wachsler <wachsler@google.com> Wait for device to disappear after reboot-bootloader.

(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
/system/core/fastboot/fastboot.h
5ee5d389d6cb90b3cd2856730f8ff12211bc95d2 29-Sep-2012 Ken Sumrall <ksumrall@android.com> Update fastboot to wipe ext4 partitions before flashing

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
/system/core/fastboot/fastboot.h
9a70e5c33891632c89c9f3f03e30d7183227d661 18-Jul-2012 Colin Cross <ccross@android.com> resolved conflicts for merge of 4d72d881 to master

Change-Id: Ic092d27d3fc2bcc4db8a375bbcb5b86c111bf062
f838788e6a4d57634a53eb597ee76a597feffcb5 25-May-2012 Colin Cross <ccross@android.com> fastboot: add support for auto-resparsing large files

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
/system/core/fastboot/fastboot.h
80f2d036a9dff894df27961c4aed300f1a5ebbc4 25-May-2012 Colin Cross <ccross@android.com> fastboot: add fb_getvar

Add an fb_getvar helper that can be used to get values from the
target.

Change-Id: I0da088fcbc8d40076c7bf5ef6e5bbd97fae61471
/system/core/fastboot/fastboot.h
3447b11d3e72bdc7409f63ec76ceba1babe06486 14-May-2012 JP Abgrall <jpa@google.com> am 177a74ac: am c1f88106: Merge "fastboot: Change -w to format after the erase of userdata & cache" into jb-dev

* commit '177a74aced971b89c319fb61ee12da0ca40f0c12':
fastboot: Change -w to format after the erase of userdata & cache
30ae5806e920cb824d019defd856068f09dd0db6 08-May-2012 JP Abgrall <jpa@google.com> 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>
/system/core/fastboot/fastboot.h
a61bcad58ba1f7359183a333ee58303ed67e4a2f 02-May-2012 Scott Anderson <saa@android.com> resolved conflicts for merge of 13081c69 to master

Change-Id: I631e466fc53e9b0f4a39f24f959b4ae9b626bdda
13081c6915220db03886b177f1a8e0b2c63467c9 06-Apr-2012 Scott Anderson <saa@android.com> fastboot: Add ability to specify device path

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>
/system/core/fastboot/fastboot.h
5ae3f93f3bafbeb1fc9a3324475c58c725749c5e 28-Feb-2012 Anatol Pomazau <anatol@google.com> Remove trailing whitespaces

Change-Id: I6f83333a6ee0fbc562a12bb9555c43a44c98768e
/system/core/fastboot/fastboot.h
c8ba5366da7e23ebf1cd76bcf49449b878563102 16-Dec-2011 Anatol Pomazau <anatol@google.com> Implement 'fastboot format' command

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
/system/core/fastboot/fastboot.h
714052ba4d86a2d411a3944f5034c5a5833ffbb6 05-Feb-2012 Mike J. Chen <mjchen@google.com> DO NOT MERGE

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>
/system/core/fastboot/fastboot.h
ca2074b78d44ce5fb60fae64da84e53c2b82cb8a 13-Feb-2012 Mike Lockwood <lockwood@google.com> Revert "Implement 'fastboot format' command"

until Windows support is done

This reverts commit 452e11885afb53d59b2aa38b15e3be41c568d1e6.
/system/core/fastboot/fastboot.h
452e11885afb53d59b2aa38b15e3be41c568d1e6 16-Dec-2011 Anatol Pomazau <anatol@google.com> Implement 'fastboot format' command

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
/system/core/fastboot/fastboot.h
6f53225ef9f60a18a69b4ad3ba920ada168b719e 04-Feb-2012 Anatol Pomazau <anatol@google.com> Revert "Implement 'fastboot format' command"

This reverts commit 230d160a718333651f7ca1557404f96682795b37
/system/core/fastboot/fastboot.h
230d160a718333651f7ca1557404f96682795b37 16-Dec-2011 Anatol Pomazau <anatol@google.com> Implement 'fastboot format' command

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
/system/core/fastboot/fastboot.h
21311f87c60bb75588e12227e7c0b9812e751b4a 03-Feb-2012 Anatol Pomazau <anatol@google.com> Revert "Implement 'fastboot format' command"

This reverts commit 049dff53ef368bd84d0bddcb4c91f408774949c1
/system/core/fastboot/fastboot.h
65cf84f3ff959eec0c97229489d58279feaf3bcb 16-Dec-2011 Anatol Pomazau <anatol@google.com> Implement 'fastboot format' command

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
/system/core/fastboot/fastboot.h
049dff53ef368bd84d0bddcb4c91f408774949c1 16-Dec-2011 Anatol Pomazau <anatol@google.com> Implement 'fastboot format' command

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
/system/core/fastboot/fastboot.h
b98762f7824c291dc5d9a9b757af434ef31d8c81 05-Apr-2011 Wink Saville <wink@google.com> Teach fastboot to allow required variables per product.

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
/system/core/fastboot/fastboot.h
eb31c0bdc0eac0898f01cdc1737cea94269f8f27 23-Apr-2010 Brian Carlstrom <bdc@google.com> fastboot should return non-zero exit code on error

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
/system/core/fastboot/fastboot.h
dd7bc3319deb2b77c5d07a51b7d6cd7e11b5beb0 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/fastboot/fastboot.h
e54eebbf1a908d65ee8cf80bab62821c05666d70 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/fastboot/fastboot.h
4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/system/core/fastboot/fastboot.h