The current fastbootd only supports USB protocol. But some Android TV
devices are built without USB port. The fastbootd cannot be used on
those ATV devices due to it. aosp/1295566 enables fastbootd over
ethernet.
This change adds an EthernetDevice to manage ethernet connection and set
fastbootd protcol property fastbootd.protocol to enable fastbootd over
ethernet in recovery mode. It uses IPv6 link-local address to not expose
the devices out of the network segment. The devices who want to use this
EthernetDevice should add
“TARGET_RECOVERY_UI_LIB := librecovery_ui_ethernet” into BoardConfig.mk.
BUG: 152544169
Test: Enter and exit fastboot mode and check eth0 IPv6 link-local address
on screen UI.
Change-Id: I73fe44be3790bdba5a6059fbba3f7264b21eed99
Virtual platforms may not have USB, but they can still use the SDCard
method. Allow the USB connection status to be faked so the 120s timeout
is not applied.
Bug: 155222461
Change-Id: I67f32c2b5b0941d5e3c0675dad23fe7121e5af86
Bug: 154760495
Test: make with WITH_TIDY=1 and DEFAULT_GLOBAL_TIDY_CHECKS=clang-analyzer-core.uninitialized.Branch
Change-Id: I03af58f9491f4abcface9abb12c80a35e0f97a40
libsnapshot_nobinder uses update_metadata-protos. This
used to be optimized out, but now that SnapshotManager is
virtual, CreateUpdateSnapshots can no longer be optimized
out.
Bug: 148956645
Test: compiles
Change-Id: Iab1c9d92de2e558c73cf7da736c543b2ac8c0aa5
Reduce the amount of wasted space on the recovery image by statically
linking all of the adb libraries into minadbd.
Bug: http://b/150317254
Test: booted aosp_walleye-eng into recovery
Change-Id: I5233b1a23c14f9d478bb77c25ebdbb0ce45bcc5a
If enabling the oem partition, it will be mounted by updater before
reading product properties from it. To be safety, we want to enable AVB
to this oem partition. But this means the oem partition can never be
mounted to writable. Otherwise, that partition will be corrupted to AVB
verifying.
This change follows fs_mgr to allow to pass more mounting options to the
updater.
BUG: 150156957
Test: make ota package which mounts AVB oem partition to read only and
run OTA.
Change-Id: I2ebbe3c8ac53c70112f3fed2703fcba9170405a6
After a reboot function call, we should always wait for it to finish
without executing other instructions.
Bug: 151110322
Test: build
Change-Id: I1dda291a0835ff96df7eaf42eba1a38267a3beeb
The following warnngs generate when compile with WITH_TIDY=1
.../bootable/recovery/applypatch/imgdiff.cpp:968:7: warning: 'src_ranges' used after it was moved [bugprone-use-after-move]
src_ranges.Clear();
^
.../bootable/recovery/applypatch/imgdiff.cpp:966:27: note: move occurred here
split_src_ranges->push_back(std::move(src_ranges));
The logic itself seems correct since the class is meant to be cleared
after move. I feel the std::move in 966 is actually useful to call the
move constructor in RangeSet. So I just modify L968 to suppress the
warning.
Less important ones:
bootable/recovery/applypatch/applypatch_modes.cpp:79:34: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg]
bootable/recovery/applypatch/imgdiff.cpp:1038:30: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg]
bootable/recovery/applypatch/imgdiff.cpp:1054:48: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg]
bootable/recovery/updater/include/private/commands.h:310:16: warning: std::move of the variable 'patch' of the trivially-copyable type 'PatchInfo' has no effect; remove std::move() [performance-move-const-arg]
bootable/recovery/updater/install.cpp:663:43: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg]
Bug: 150955971
Test: build
Change-Id: Ieb75f0229c47d470d4f5ac93fab39c5698d3f914
When display screen size is too small, some images in recovery
resource cannot caculate the right display position. So the
image cannot show in the screen.
Limit the calculated position to avoid such issue.
Change-Id: Iebebfe0dfbc568ee3a6b6a31b81d060b3ce5f940
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
The unit tests for imgpatch is comparing the compressed bytes. As
a result, these unit tests will fail with libz change.
Since the recovery image is just a gzipped ramdisk with some wrappings,
we can generate with minigzip it during the build time. This matches
the usage in the real world, where we generate the patch with the host
side libz; and apply the patch with the library on the device.
Bug: 149443852
Test: tests pass on Pixel3
Change-Id: I7885765a161c6bf765671bc55a72cfcaa04b4138
Requires to add "metadata_csum" in fsmgr_flag of fstab.
Bug: 149039306
Change-Id: I2b95dcaaf2ba224135ad51f117b7b01bbf342b7e
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This library is empty, and its functionality has moved
into libbinder/libhwbinder.
Bug: 148692216
Test: N/A
Change-Id: Ie50d9130a8e43de7d5b222883169c26ab958e6d7
For non A/B and Virtual A/B devices where sideloading may affect
the existing OS,
- If sideload has failed, show a warning message in recovery menu header.
- If sideload has interrupted, automatically reboot back into recovery and
show the warning message in recovery menu header.
Test: the above
Fixes: 140749209
Change-Id: Ifdfc28b45975cdc31b6fce2ecb99acc31bc61fa8
If previous installation fails, menu item 'Reboot system now'
and 'Power off' now prompts for confirmation from the user.
Known issues:
- If the sideload is interrupted, it'll still boot into normal
Android in the next cycle.
- If 'Enter fastbootd' is chosen, and then 'Enter recovery', such
prompt do not show up.
Test: manual
Fixes: 142892891
Change-Id: I929b80e0520bd3b9f56d88a4b2203fcdd8d7b013