Propagate from (CR)
Because fastboot max response size is 64 bytes, and fingerprint
info more than 64 bytes, so fastboot getvar all return FAILED(
Device sent unknown status code), the return FAIELD behavior
happened on windows OS, linux OS running "fastboot getvar all"
will be ignore these INFO message(message size more than 60).
Change-Id: I31757a6a751e0cb0e0a4bdbea990287b4a9e7b78
Signed-off-by: luodw1 <luodw1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1787168
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1945706
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Ling Jin <lingjin@motorola.com>
Tested-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Vijayakumar Gn <vijaygn@motorola.com>
Reviewed-on: https://gerrit.mot.com/2265607
Reviewed-by: Qing Chang <qing@motorola.com>
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
The functions load_buf_fd()/load_buf() are not guaranteed to write all
struct members, e.g. buf->sz doesn't get an assignment in some
circumstances and as such is used uninitialized in various places, which
leads to code paths being taken that shouldn't be (e.g. in
copy_avb_footer).
See https://gitlab.archlinux.org/archlinux/packaging/packages/android-tools/-/issues/4
Change-Id: Ibdeda8fa47b95df46dd69a87e04d0e66734db2fe
Propagate from (CR)
Previous 5 seconds timeout time is not enough to cover all cases.
Sometimes phone takes longer time to respond.
So prolong this timeout time to 5 minutes.
Picked from http://gerrit.mot.com/508201
Change-Id: Id79274deb32d6926a1134407a8a00e44d59ddb02
Reviewed-on: https://gerrit.mot.com/1013029
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1244781
Reviewed-by: Master Yoda
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1335208
Reviewed-by: Dong-Hua Yan <a18317@motorola.com>
Reviewed-on: https://gerrit.mot.com/1945701
Reviewed-by: Vijayakumar Gn <vijaygn@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Ling Jin <lingjin@motorola.com>
Tested-by: Ling Jin <lingjin@motorola.com>
Reviewed-on: https://gerrit.mot.com/2265602
* Use different endpoint addresses for sinks and sources
* Consider locked only explicitely `green` devices
* [npjohnson] Updated for 12's logic
Change-Id: If093556e8e839cadf29f9e8f995f09ed3f188ed1
ro.revision defaults to 0 if it's not set in cmdline.
Some devices might want to set it in their device specific init files,
however it's not possible to override ro properties.
Test: Set ro.boot.hardware.revision in device specific init.rc and
observe fastboot getvar hw-revision in fastbootd
Change-Id: I6e785c3fe3a49409e815af269a9a8db732b80ada
This enhances the security requirement by only allowing
the owner app to change a locked DSU.
(Cherry-picked from aosp/2744993)
Bug: 277691885
Bug: 296985785
Test: 1. ensure device is OEM locked
2. adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
--el KEY_USERDATA_SIZE 2147483648 \
--es KEY_DSU_SLOT foo.lock
3. adb reboot fastboot
4. `fastboot gsi disable|wipe` should be blocked
Merged-In: I1a0cb8a074412468d16043ddf4101fbb76490115
Change-Id: I1a0cb8a074412468d16043ddf4101fbb76490115
The command will be used by RMA tool to skip
device wiping when it is already in GSI mode.
This change also makes it easier to add more
gsi commands in the future without needing to
update the host side tool (fastboot).
(Cherry-picked from aosp/2735077)
Bug: 298533290
Bug: 298138572
Test: 1. reboot into fastboot mode
2. fastboot gsi status
Merged-In: Ic81f89a93b854f9ec70aebe2d209bfd1f98e3645
Change-Id: Ic81f89a93b854f9ec70aebe2d209bfd1f98e3645
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