Adding const decorator to class constructor to ensure Flashing Plan
isn't modified during task construction
Bug: 194686221
Test: tested Flashall on raven
Change-Id: I99b71b2b756beaf871a31a1a035545d754d128e8
Updating old clean up slot logic change. Some devices don't know current
slot so we can't always just call get_current_slot()
Test: tested flashall on raven
Change-Id: Id655f1c1ee0b1ff09331f0d91d77412836d0af8d
cleaning up main() code in fastboot.cpp to run off one task vector. The
eventual goal is to just have all functionality run off this vector.
Test: tested commands on raven
Bug: 194686221
Change-Id: I98d0ba33091eff31ff1bc338766c3689ffb54746
Modifying fastboot-info.txt to directly call reboot fastboot instead of
reboot userspace -> so no longer need "userspace" in reboot task. Also
moving skip_reboot check to task since in old code we can have
skip_reboot be true and still reboot to bootloader, fastboot, or
recovery
Test: tested reboot commands on Raven
Change-Id: I98ba51747bf7229a88ba737540c81d20b42e5981
Doesn't look like we actually need current_slot, since we can always
just call function get_current_slot
Test: tested flashall on raven
Change-Id: Icba64bc9fdd08f36d44965e32558a73d0beab0e1
Changed so if we call wipe on a partition that doesn't exist we'll get
some helpful error messages.
Test: tested wipe test
Bug: 194686221
Change-Id: I19dc0396a7a98d0b2be7859edbffeb8acdc9850a
is_logical shouldn't work in bootloader for some devices, so we also need to check
using should_flash_in_userspace to see if partition is dynamic
Test: tested to flash {partition} on raven and checked to see avb
footers are not copied from dynamic partitions
Change-Id: Iabb3ea535fa80b26cf1c08040beb3d4ea5e8c2ae
sparse_file_len is not actually infallible; on Windows it's pretty easy
to make it fail by embedding large files in the stream. fastboot didn't
handle this anywhere, leading to bad sparse images when libsparse
runs out of address space.
Bug: 273933042
Bug: 268872725
Test: fastboot flashall on Windows
Change-Id: Ie68aed2f1970e820350d9f97aa89a6c0242229b8
Fastboot has a lot of flags that are used by many different functions
including the Flashall Class and newly added FlashSuperTask. Passing all
of these flags as paramaters is cumbersome, so adding a Flashing Plan
that contains these flags simplifies the code.
Test: tested Flashall and update img.zip on raven
Change-Id: I9c842f25389a20b852d55f684e1b86040af1d86a
Bug: 194686221
Introduced positive and negative unit tests to cover
ParseNetworkSerial logic. Alongside with that move
result related stuff to the separate header.
Test: atest fastboot_test
Test: manually checked basic functionality works fine
Bug: 271155012
Change-Id: Icac6053c11b5a36daa64555209555826ea28cc61
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
Use more universal lseek instead of lseek64
Test: atest fastboot_vendor_boot_img_utils_test
Test: mm on mac os
Bug: 271152365
Change-Id: I4d094dd2c24e4ffec8ea7fe2f3b355122fd8cd19
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
During fastboot connect / disconnect introduction, we
completely broke the IPv6 support (it was considering
all IPv6 addresses as a USB serial).
Makeing sure this problem isn't reproducible anymore
alongside with fixing EXCPECT causing process crash
and improve network serial error detection.
Bug: 271152365
Change-Id: Ic52aa5fff1948a64ac3d2672f3cf4d2b022e5cea
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
Test: tested on raven device
Change-Id: I4935d720f567e70da95ea8da37f3404b80b313c8
Bug: 194686221
Changed reboot {target} to work off tasks. reboot-{target} commands are
also supported.
Test: tested reboot on raven device
Change-Id: I05aed269d121a5d651c1ab1180a1b4878ae213fd
Modified load_buf to be able to find images in $OUT directory
Test: tested flash {partition} and flash {partition} {img_name} on raven
device
Change-Id: I3879792d11ad15bc910670853d2a7fe200fcc66f
Trusty Benchmarks need to be evaluated in ABL which is much more
controlled than linux. However fastboot prints evry atomic message from
trusty/abl on its own line starting with "(bootloader)"
Bug: 263454481
Test: - "fastboot oem trusty runtest trusty.hwrng.bench"
Change-Id: I99847a8cc54457c8ec809e219736325dce0ac891