summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
AgeCommit message (Collapse)Author
2015-11-12Cope with angler's whitespace-padded partition size reporting.Elliott Hughes
Before: $ fastboot -w wiping userdata... Couldn't parse partition size '0x 0x66257ee00'. wiping cache... Couldn't parse partition size '0x 0x6400000'. erasing 'userdata'... Bug: http://b/25653580 Change-Id: I301b8410689c1e52681796c240a149d270360edf
2015-11-11Update fastboot help command with long optionsDaniel Rosenberg
Change-Id: I8fb6b5139f81893b324202d4c68f29393213ee6f
2015-11-11Changed set_active to be a flagDaniel Rosenberg
set_active must be able to accept flag like arguments Change-Id: I6dd162453835d2d64fd8d877f2a7b98e8dd8a907
2015-11-11Fix fastboot variable nameDaniel Rosenberg
Change-Id: I0c2753e2b79d715f227ee314c071ce68d91779b3
2015-11-06Merge "Fastboot changes to support A/B partitioning"Daniel Rosenberg
2015-11-05Fastboot changes to support A/B partitioningDaniel Rosenberg
Introduce support for -slot option for specifying slots, and set_active, for changing the current slot. Change-Id: Ib3b2a75491c0d0413534dd0c1d7bcb52555bba66
2015-11-03Merge "Fix fastboot to cope with hammerhead\'s implicit hex."Elliott Hughes
am: 2b7b3bd100 * commit '2b7b3bd100747fb7a02f1d8c7c2e8a5ee6cdc82f': Fix fastboot to cope with hammerhead's implicit hex.
2015-11-03Fix fastboot to cope with hammerhead's implicit hex.Elliott Hughes
Before: wiping userdata... Couldn't parse partition size '3321fa800'. wiping cache... Couldn't parse partition size '2bc00000'. Groan. So much variation between bootloaders. I wish we had a reference bootloader like ChromeOS does. I've also removed a harmless warning: couldn't parse max-download-size '' Change-Id: Ia1099d2f87000ebb96622ad9171819a1326fa249
2015-11-03Merge "Work around an angler bootloader bug."Elliott Hughes
am: 9eab787560 * commit '9eab7875602dec9910002f080df513077f56a2dd': Work around an angler bootloader bug.
2015-11-02Work around an angler bootloader bug.Elliott Hughes
It's probably not the only device whose bootloader is similarly broken. NVIDIA did a sufficiently good job with Nexus 9 that it's almost a bad idea for me to do most of my development there... Change-Id: I71436cc5c33023be077ca77f6dad5dbe75b11b09
2015-11-02Merge "Clarify and fix the intent of the partition-type checking code."Elliott Hughes
am: d0f45aa24c * commit 'd0f45aa24c09c0802784263fe2dccd38e226e23a': Clarify and fix the intent of the partition-type checking code.
2015-11-02Clarify and fix the intent of the partition-type checking code.Elliott Hughes
Change-Id: I202dab4ee91208b632bc2086d1e5c387a4c29edd
2015-11-02Merge "Fix ParseInt/ParseUint to handle explicit "0x" hex."Elliott Hughes
am: ddf5edacc2 * commit 'ddf5edacc24125730b537265f69a081b19606246': Fix ParseInt/ParseUint to handle explicit "0x" hex.
2015-11-02Fix ParseInt/ParseUint to handle explicit "0x" hex.Elliott Hughes
Also improve fastboot error reporting around max-download-size. Change-Id: Ic3aec9460de01e5264a2803a0a6be3706d73026b
2015-10-30Merge "fastboot shouldn\'t erase non-existent cache partitions."Elliott Hughes
am: 9ebdf72a54 * commit '9ebdf72a5465b75ab4ce359e11c1ff6c2f3e376a': fastboot shouldn't erase non-existent cache partitions.
2015-10-30fastboot shouldn't erase non-existent cache partitions.Elliott Hughes
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
2015-09-02Fix the fastboot build.Elliott Hughes
load_file takes an int64_t rather than a size_t to support large files on LP32. Change-Id: I8d3032cab63c30c4158dbc521d3d520415cdf58f
2015-09-02resolved conflicts for merge of 7af48652 to mnc-dr-dev-plus-aospElliott Hughes
Change-Id: Icde642757a1335da49d2f884de33b368888ae709
2015-09-01fastboot: add flashing bootloader commandsPatrick Tjin
add the following commands: flashing unlock_bootloader flashing lock_bootloader flashing get_unlock_bootloader_nonce Change-Id: Ia4f56ebdcb6785a5196cc669d68da1553ed53c58 Signed-off-by: Patrick Tjin <pattjin@google.com>
2015-08-25Use 64-bit file sizes in fastboot.Elliott Hughes
Bug: 20110580 Change-Id: I5d3718103ff581ff3b5241c8b0e52b585b4f37e5
2015-08-19fastboot should say which device it's waiting for.Elliott Hughes
Change-Id: Ia8a04b2727983cb05a9a3e85d9a9586b15c71600
2015-08-10Remove the USB vendor id whitelist from fastboot.Elliott Hughes
Change-Id: I661a0538776d4ba74fcee37e2964d987eb861342
2015-06-26Rename ZipEntryName to ZipStringYusuke Sato
since the struct is now used for other purposes. Also add some comparator functions to the struct to simplify zip_archive.cc. This is a follow-up CL for f1d3d3b2477a813805b71099c60e07d36dbb225a. Bug: 21957428 Change-Id: I60d4171eeacc561d59226d946e9eb5f9c96d80cf
2015-06-10Fix fastboot --help formatting.Elliott Hughes
Bug: http://b/21755417 Change-Id: I827d8e9ebe7ba8e8f75c2fa0ca975560817c18fa
2015-06-05Add a working Windows tmpfile(3) to fastboot.Elliott Hughes
Windows' tmpfile(3) implementation requires administrator rights because it creates temporary files in the root directory. Write an alternative that uses the user's temporary directory instead. Bug: http://b/21558406 Change-Id: Ic9aece5c69429797a332a97681a76b76ac3551bf (cherry picked from commit a26fbeeaa4298ea3bb09c53bdaefb6d968c6b72f)
2015-06-04Don't say "update package missing" unless we mean it.Elliott Hughes
unzip_to_file reports failures itself these days, so there's it's unhelpful of the caller to just guess what might have gone wrong. Bug: http://b/21558406 Change-Id: I1e3d06c6cf902b8c6ef333dc60fd8f49680a493b (cherry picked from commit acdbe92c60e662a4913f1fca09c2b8913791376c)
2015-06-04'usb' doesn't need to be global in fastboot.Elliott Hughes
Bug: http://b/21558406 Change-Id: Id014399640865d889918661bae0161b3165eee48 (cherry picked from commit c0ce65f9613eefc7bb2b14daae395bde52339ab7)
2015-06-04Add "fastboot --version".Elliott Hughes
So bug reporters can actually tell us what they're running. Bug: http://b/21558406 Bug: http://b/21583225 Change-Id: If2a4ae97b4792aa321566603ce2c354a72d32307 (cherry picked from commit 379646b2ca2cf681be3489eb74a421b3f8c80e26)
2015-06-03Add a working Windows tmpfile(3) to fastboot.Elliott Hughes
Windows' tmpfile(3) implementation requires administrator rights because it creates temporary files in the root directory. Write an alternative that uses the user's temporary directory instead. Bug: http://b/21558406 Change-Id: Ic9aece5c69429797a332a97681a76b76ac3551bf
2015-06-03Fix file descriptor leak when opening invalid archives.Narayan Kamath
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.)
2015-06-03Don't say "update package missing" unless we mean it.Elliott Hughes
unzip_to_file reports failures itself these days, so there's it's unhelpful of the caller to just guess what might have gone wrong. Bug: http://b/21558406 Change-Id: I1e3d06c6cf902b8c6ef333dc60fd8f49680a493b
2015-06-03Merge "Add "fastboot --version"."Elliott Hughes
2015-06-02Add "fastboot --version".Elliott Hughes
So bug reporters can actually tell us what they're running. Bug: http://b/21583225 Change-Id: If2a4ae97b4792aa321566603ce2c354a72d32307
2015-06-02'usb' doesn't need to be global in fastboot.Elliott Hughes
Change-Id: Id014399640865d889918661bae0161b3165eee48
2015-05-28fastboot: Add support for fastboot flashing commandsBadhri Jagan Sridharan
Commands added: fastboot flashing lock - Prevents flashing partitions fastboot flashing unlock - Enable user to flashing partitions fastboot flashing lock_critical - Prevents flashing bootloader related paritions fastboot flashing unlock_critical - Enables user to flash bootloader related partitions fastboot flashing get_unlock_ability - Query bootloader to check if device is locked. (cherry picked from commit bf11095f92c9278cb794a5336e1cce264f9b734d) Change-Id: Id6db16ba32f7a2b1c3f041a76bd3bdf2d3ab471e
2015-05-15fastboot: Add support for fastboot flashing commandsBadhri Jagan Sridharan
Commands added: fastboot flashing lock - Prevents flashing partitions fastboot flashing unlock - Enable user to flashing partitions fastboot flashing lock_critical - Prevents flashing bootloader related paritions fastboot flashing unlock_critical - Enables user to flash bootloader related partitions fastboot flashing get_unlock_ability - Query bootloader to check if device is locked. Change-Id: Id6db16ba32f7a2b1c3f041a76bd3bdf2d3ab471e
2015-05-13Fix file descriptor leak when opening invalid archives.Narayan Kamath
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
2015-04-01am a15881a9: am ed926596: am 6900d34e: Merge "Add verbose param to ↵Mohamad Ayyash
sparse_file_import_auto" * commit 'a15881a9e9d2951eda7a7a85fbaadd93bfb9da9b': Add verbose param to sparse_file_import_auto
2015-03-31Add verbose param to sparse_file_import_autoMohamad Ayyash
Change-Id: I0c5607f7aa5e964abc2031bbe71ff5c6e6ef56cc Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-03-19am a782173a: am 261a82a6: Merge "Switch fastboot to ExtractEntryToFile."Elliott Hughes
* commit 'a782173a26f192fe9f51e1ee53e8d329501df409': Switch fastboot to ExtractEntryToFile.
2015-03-19Switch fastboot to ExtractEntryToFile.Elliott Hughes
Rather than malloc, ExtractToMemory, and write. Also fix the tmpfile error check (tmpfile returns NULL on failure), and improve error reporting. Bug: 19765860 Change-Id: I236923e883128083377607f1519bb2e27b8f03f8
2015-03-19am 41233fcc: am 294d3f74: Merge "Remove a prehistoric fastboot hack."Elliott Hughes
* commit '41233fcc35ce8c5efa06348f013c31072505229b': Remove a prehistoric fastboot hack.
2015-03-19am f99e47a0: am 445e5ede: Merge "Switch fastboot to libziparchive."Elliott Hughes
* commit 'f99e47a0a0604aef2f3b1d07953d5f220662353c': Switch fastboot to libziparchive.
2015-03-19Remove a prehistoric fastboot hack.Elliott Hughes
If you don't have android-info.txt in your zip file, you're probably not using a current fastboot binary anyway. Change-Id: Ic721dc5f068f704c6792493d1e99f05f907678ba
2015-03-19am 8e70f63a: am 57bf3109: Merge "Prepare for switching to libziparchive."Elliott Hughes
* commit '8e70f63aba8e14f3b40b2a0769522505c1019c33': Prepare for switching to libziparchive.
2015-03-18Switch fastboot to libziparchive.Elliott Hughes
Bug: 19765860 Change-Id: I83ea56e3b317893995d7106852b65584f99c0e64
2015-03-18Prepare for switching to libziparchive.Elliott Hughes
Bug: 19765860 Change-Id: I58249d28fbc4975428d0dcac5107d1994c35676c