The results from these functions have boolean semantics. They're
returning `int` prior to this CL, with some of them mixing 0 and
InstallResult. Note that SetUpNonAbUpdateCommands() was returning
INSTALL_CORRUPT / INSTALL_ERROR / 0 prior to this change, but all the
callers handle INSTALL_CORRUPT and INSTALL_ERROR the same way.
This CL changes them to return bool instead.
Test: `mmma -j bootable/recovery`
Test: TreeHugger
Test: Sideload on taimen.
Change-Id: Ic1b5dbf79aaca68b53ab8ea2c8ba3d19f988c571
Most of the tests in component/ are in fact unit tests. And it doesn't
look practically beneficial to distinguish between the two:
- They have the same test setup;
- We always run both (recovery_unit_test and recovery_component_test)
at the same time;
- Breaking any of them would be equally bad.
This CL merges the tests in recovery_component_test into
recovery_unit_test to save the effort to maintain both.
Test: Run recovery_unit_test on marlin (via `adb sync data`).
Test: `atest recovery_unit_test`
Change-Id: I93ff32e7219cd83425a4bcfe5613978a8dd48d75
am: 75321ade87 -s ours
am skip reason: change_id I5b7de9dfd898ed8e14bea0d4ad7385a9bae26e94 with SHA1 d9cb014d43 is in history
Change-Id: I5cf072d9b82c58e307c104257a12b3c45455d2f1
am: 7b9b7db877 -s ours
am skip reason: change_id I84daf63e3360b7b4a0af5e055149a4f54e10ba90 with SHA1 10f441a9db is in history
Change-Id: I77fba90b8a5506ff4754bee0b6dd569efe015685
am: 23f15fcfaf -s ours
am skip reason: change_id I2f073b701b25d7f1aafc59868a7a91a8cbefaf49 with SHA1 9c04eb46b7 is in history
Change-Id: I3500aab156ea8cde0ce18d277a06bf6550f1e677
am: e5c6446a10 -s ours
am skip reason: change_id Ibc25daf9fd13f7002e54789f67aaf85d06976bb8 with SHA1 ed717ca17d is in history
Change-Id: Icc2738f1cbc67ea9a1a23dcc7b96a3bab5c0c8eb
am: 178cdd4f5c -s ours
am skip reason: change_id I106bbaad05201227bbc5fe28890bbbb06fdcb67e with SHA1 2be9737cf4 is in history
Change-Id: I70d9a3f1ad8b1defc3435a4c16820702524481f5
am: 378bfbfc5c -s ours
am skip reason: change_id I913dbdbcffd3179e6fa72ca862f74ca8f1364b02 with SHA1 c6dc325e88 is in history
Change-Id: I44775c08042bbc949966fe828a031965e989432f
Test: Choose `Reboot system now`, `Power off`, `Reboot to bootloader`
from recovery UI respectively.
Test: `adb reboot recovery` while under sideload mode.
Change-Id: I0f3d55b80b472178ea4f6970b29cd9df0778b639
bootloader will set `boot-rescue` in BCB command field to indicate
booting into rescue mode. This CL adds the matching parsing code.
This CL changes the on-screen UI to display the default image while
waiting for each sideload / rescue command.
It also changes the minadbd reboot handlers to use REBOOT_ instead of
the previous ENTER_ actions. This ensures a reboot going through
bootloader, which may load a newly installed bootloader/recovery.
Bug: 128505466
Bug: 128415917
Test: Boot into rescue mode. Run `adb rescue getprop` and `adb rescue
install`. Check the UI. Then run `adb reboot rescue`.
Change-Id: I5b7de9dfd898ed8e14bea0d4ad7385a9bae26e94
Merged-In: I5b7de9dfd898ed8e14bea0d4ad7385a9bae26e94
(cherry picked from commit d9cb014d43)
Prior to this CL, GetWipePartitionList was declared in install.h
(libinstall) but defined in recovery.cpp (librecovery). This CL
addresses the issue by refactoring wipe-device related functions into
install/wipe_device.cpp.
Test: atest recovery_component_test
Change-Id: I7ebe04ccfda3d793e085403560a0a202752d9ee3
Ass some unit tests to check if the minadbd service exit correctly in
the failure case. Also start the fuse and verify the socket communication
between minadbd with adb host, and minadbd with recovery.
Bug: 131037235
Test: run unit tests repeatedly, injects some errors and test fails
without dangling process.
Change-Id: I2f073b701b25d7f1aafc59868a7a91a8cbefaf49
Merged-In: I2f073b701b25d7f1aafc59868a7a91a8cbefaf49
(cherry picked from commit 9c04eb46b7)
This leaves the FD implementation details to subclasses. In particular,
it allows minadbd to do additional works with the FD after sideloading.
Bug: 128415917
Test: atest recovery_component_test
Test: atest minadbd_test
Test: Sideload package on taimen.
Change-Id: I106bbaad05201227bbc5fe28890bbbb06fdcb67e
Merged-In: I106bbaad05201227bbc5fe28890bbbb06fdcb67e
(cherry picked from commit 2be9737cf4)
Also remove the AndroidTest.xml file, which is no longer needed (the
`data` property in Android.bp takes care of that). The AndroidTest.xml
file would otherwise block `atest recovery_host_test` from running.
Test: TreeHugger; check the test result.
Change-Id: If545878a1f3ae627986e19a94b42162f133b9098
bootloader will set `boot-rescue` in BCB command field to indicate
booting into rescue mode. This CL adds the matching parsing code.
This CL changes the on-screen UI to display the default image while
waiting for each sideload / rescue command.
It also changes the minadbd reboot handlers to use REBOOT_ instead of
the previous ENTER_ actions. This ensures a reboot going through
bootloader, which may load a newly installed bootloader/recovery.
Bug: 128505466
Test: Boot into rescue mode. Run `adb rescue getprop` and `adb rescue
install`. Check the UI. Then run `adb reboot rescue`.
Change-Id: I5b7de9dfd898ed8e14bea0d4ad7385a9bae26e94
Currently it triggers minadbd_test, recovery_unit_test and
recovery_component_test during presubmit.
Test: TreeHugger
Change-Id: Ie0e2ddc9519a7e9b66d059cdf0b81dcbba631c25