Commit graph

8121 commits

Author SHA1 Message Date
Colin Cross
0e643e4d7f Use libcrypto_static instead of libcrypto
Replace libcrypto with libcrypto_static, which can be protected through
visibility to ensure only modules that don't affect FIPS certification
can use it.

Bug: 141248879
Test: m checkbuild
Change-Id: I0affaa292237bdbc772d3adc36086905ed6fbe9d
2019-09-23 13:54:09 -07:00
Tao Bao
2d6e8f2ea8 Merge "Update the instruction for building recovery image on Pixels." 2019-09-13 17:08:37 +00:00
Tobias Thierer
54100d3348 Merge "Link libcrypto dynamically for recovery unit tests." 2019-09-13 16:56:06 +00:00
Tobias Thierer
0af65d8c4a Merge "Set LOCAL_INJECT_BSSL_HASH for updater" 2019-09-13 16:56:06 +00:00
Pete Bentley
189d424ced Link libcrypto dynamically for recovery unit tests.
Tested by running recovery_unit_test as described in
https://android.googlesource.com/platform/bootable/recovery/+/refs/heads/master/README.md

Attempted to build and boot a recovery image with the
same change to confirm it still works, but
m recoveryimage-nodeps
fails for me.

Bug: 140940227
Test: See above
Change-Id: I00545968a0e5684823e505f2ddbe7e993319b5d4
2019-09-13 12:18:44 +01:00
Tao Bao
95656827dd Update the instruction for building recovery image on Pixels.
Test: N/A
Change-Id: I14d7bba5b214cc0bf43d6294cff1b7dcbea72ee8
2019-09-12 13:10:44 -07:00
David Anderson
4878f6a31c Merge "Improve error messaging when bootcontrol HAL fails to load." 2019-09-10 00:09:07 +00:00
Steven Moreland
a44f947b6d Merge "Remove reference to libhwbinder_noltopgo." 2019-09-06 17:59:21 +00:00
Colin Cross
d81519400c Set LOCAL_INJECT_BSSL_HASH for updater
updater is built in Make and statically links libcrypto,
so it needs to set LOCAL_INJECT_BSSL_HASH to make the FIPS self
test pass.

Bug: 137267623
Test: m checkbuild
Change-Id: Ib253c870090ac8026f5cbb005d6b0e935c73edd1
2019-09-05 15:34:50 -07:00
Steven Moreland
e4f1a781f5 Remove reference to libhwbinder_noltopgo.
No longer needed.

Bug: 135558503
Test: build only
Change-Id: Ia1257513c6276cdb01604fbedb411e7412d02b84
2019-09-05 14:29:23 -07:00
David Anderson
9c0f102828 Merge "boot_control: Don't allow current_slot_ to be -1." 2019-09-05 20:21:47 +00:00
Xin Li
e0364db712 Merge "DO NOT MERGE - Merge Android 10 into master" 2019-09-05 16:53:28 +00:00
David Anderson
b18f153b12 Improve error messaging when bootcontrol HAL fails to load.
Bug: N/A
Test: manual test
Change-Id: I6bf849dba4ae66353c44875ece30917283557327
2019-09-04 18:12:35 -07:00
David Anderson
643ddd99df boot_control: Don't allow current_slot_ to be -1.
If the HAL is run on a non-A/B device, it does not fail gracefully; it
will segfault because the current_slot is -1 and methods do not protect
against this. Instead, have Init() fail if we can't determine the
current slot.

Bug: 130078382
Test: vts tests
Change-Id: I2d3094518a842b1a764427d2da9d46781a9f26da
2019-09-04 18:12:23 -07:00
Xin Li
007ac2d5fb DO NOT MERGE - Merge Android 10 into master
Bug: 139893257
Change-Id: Id844b347e95335800502d9b5aeb15e18aabd29e1
2019-09-04 13:32:49 -07:00
David Anderson
388d2a591c Merge "Make libboot_control vendor available."
am: e3a35dc808

Change-Id: Ia5661bdf289cbff91faf629f6b746920b0299a8e
2019-09-03 13:00:16 -07:00
David Anderson
754e7fc190 Merge "Refactor boot_control into a separate library."
am: eb35817830

Change-Id: I330e599f7a8bf2aed111186ec54886b4c21b071a
2019-09-03 12:59:35 -07:00
David Anderson
e3a35dc808 Merge "Make libboot_control vendor available." 2019-09-03 19:36:59 +00:00
David Anderson
eb35817830 Merge "Refactor boot_control into a separate library." 2019-09-03 19:33:22 +00:00
David Anderson
f771484f4e Make libboot_control vendor available.
Bug: 138861550
Test: builds
Change-Id: Ib745b59931c6258073e47b00def84c9157df90a7
2019-08-30 10:21:00 -07:00
David Anderson
8108e2513f Refactor boot_control into a separate library.
This extracts the implementation of boot_control into a new library,
libboot_control. The bootctrl.default module now wraps this library.
This refactoring will allow us to re-use the same implementation in
HIDL.

Bug: 138861550
Test: mm bootctrl.default
Change-Id: Ic0558da3c2d8e6f5ebec63a497825c24b51623b7
2019-08-30 10:20:59 -07:00
Xin Li
bc7898323c DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: Ibe6f21e2e0fd3a6626674595e4950d6adaff40fb
2019-08-23 06:44:50 +00:00
Xin Li
5ac14106ff DO NOT MERGE - Merge build QP1A.190711.001 into stage-aosp-master history
Bug: 139893257
Change-Id: I3192a663f542955f012bcdcc42774624cc9e1891
2019-08-23 06:42:00 +00:00
Yifan Hong
41fd3c3ad9 Merge "updater: Fix build for new CreateLogicalPartition signature."
am: 18c3f78779

Change-Id: Id0deb6160cf5b1bd04c99081a766df412a26e7f5
2019-08-16 11:24:53 -07:00
Yifan Hong
18c3f78779 Merge "updater: Fix build for new CreateLogicalPartition signature." 2019-08-16 17:41:22 +00:00
Tianjie Xu
03fd851f61 Merge "Remove common.h"
am: 899f7b5105

Change-Id: Ic5b9e24cb87ef292f5d8e53de485e44e455f3185
2019-08-15 18:05:25 -07:00
Tianjie Xu
899f7b5105 Merge "Remove common.h" 2019-08-16 00:24:41 +00:00
Tao Bao
f934163f4c Merge "minui: Support input device hotplug in recovery mode."
am: ecc208286f

Change-Id: Ic20b0a1459e3b77413ec6b5869b184272a559284
2019-08-15 16:13:31 -07:00
Tao Bao
ecc208286f Merge "minui: Support input device hotplug in recovery mode." 2019-08-15 22:43:30 +00:00
Tianjie Xu
b63a2215b5 Remove common.h
Additionally kill the global variable: reason, stage; move them to a
separate BootState class instead. Vendor specific recovery code will
need to call getters from Device() class to access these variables.

Bug: 137705917
Test: unit tests pass, boot sailfish into recovery, code search and no
code includes common.h in vendor specific recovery.
Change-Id: Ia50a5ea951212c25548562f29cc9cf78505b5e34
2019-08-15 13:40:16 -07:00
Xihua Chen
a7952ac141 minui: Support input device hotplug in recovery mode.
In the old code, the recovery only enumerated the input devices at the
startup, and read the input events from these devices.
So if a USB input device is probed after the recovery startup, then the
recovery can't read the events from this device.
This patch use inotify to monitor /dev/input for new added input
device, then support input device hotplug in recovery mode.

Bug: 111847510
Test: can use USB keyboard hotplugged in recovery mode
Change-Id: I7e7dcbd619d3c66a2f40a43418f5dac6a50c859e
Signed-off-by: Liu Shuo A <shuo.a.liu@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
2019-08-14 14:18:58 -07:00
David Anderson
3cbd7ae687 updater: Fix build for new CreateLogicalPartition signature.
Bug: 135752105
Test: mm libupdater_device
Change-Id: I9dc6dc1e9112177ee5c0a96b8969dc3dc02d95f2
2019-08-14 12:32:55 -07:00
Xin Li
1ba485fbde DO NOT MERGE - Skip qt-dev-plus-aosp-without-vendor (5713463) in stage-aosp-master
Bug: 134405016
Change-Id: I98da75f9e4ab07527759b5cc372e14e1f79f2498
2019-08-14 11:35:07 -07:00
Vic Yang
76d80ba102 Merge "bootloader_message: Remove global std::string"
am: 7b87949ae1

Change-Id: I9a374505c325b041876bc7d659d5b211a6d50ca3
2019-08-07 18:47:47 -07:00
Treehugger Robot
7b87949ae1 Merge "bootloader_message: Remove global std::string" 2019-08-08 01:24:29 +00:00
Vic Yang
e94b64ae86 bootloader_message: Remove global std::string
A global std::string, even if not used, pollutes the bss section
unnecessarily.  Since this object is only there for testing, make it
std::optional<std::string>, which is constexpr constructible.

Bug: 138856262
Test: Along with a fix in fs_mgr, see that the bss section for
      libbootloader_message.so is now clean on cuttlefish for several
      processes.

Change-Id: I6df837dded88d979ffe14d5b2770b120bcf87341
2019-08-07 14:12:36 -07:00
Tianjie Xu
be3f56543e Merge "Simulator: add the argument to keep the updated images"
am: c34e4e7fb5

Change-Id: Idb86f6ee1b5a99c626150acaa86d8152b2a8ba99
2019-07-31 16:16:56 -07:00
Tianjie Xu
c34e4e7fb5 Merge "Simulator: add the argument to keep the updated images" 2019-07-31 22:34:34 +00:00
Tianjie Xu
60b242cfd5 Simulator: add the argument to keep the updated images
Add the command line option to select the work directory and save the
updated image files. Because some people might have interested in
getting updated images from an ota file.

Also, fix a minor issue that the destination of package_extract_file
needs to be updated if it's a block device. Otherwise, an unintended
file may be extracted in the callers' directory.

Test: run simulation, run unit tests

Change-Id: Ic6a7db0580bc1748d6e080102e4654da4e41fd8c
2019-07-30 17:11:35 -07:00
Tianjie Xu
b25d741563 Merge "Create a new function to return the help message for menu"
am: 5d9f963e4e

Change-Id: I216097c1aea8ae73999ad9b880dd6898a3c94def
2019-07-26 11:13:22 -07:00
Tianjie Xu
5d9f963e4e Merge "Create a new function to return the help message for menu" 2019-07-26 17:39:20 +00:00
Tianjie Xu
e5032219fe Create a new function to return the help message for menu
Then we can override this function in the device specific recovery ui;
and allow customizing the help message.

Bug: 137965958
Test: Check the menu on sailfish
Change-Id: I09f23166f4205c5edf6c62eb42c8ada0fa710b26
2019-07-25 13:22:03 -07:00
Tianjie Xu
168ce56022 Merge "Clean up some global variables in common.h"
am: 80c405f692

Change-Id: Id50b466efaed118a6e7d1bac71c95000822be855
2019-07-24 17:26:53 -07:00
Tianjie Xu
80c405f692 Merge "Clean up some global variables in common.h" 2019-07-24 22:45:32 +00:00
Tianjie Xu
164c60a4f3 Clean up some global variables in common.h
Some global variables are only used for recovery.cpp and
recovery_main.cpp, remove them from common.h and handle their usage
accordingly. Variables include:
static constexpr int kRecoveryApiVersion;
extern struct selabel_handle* sehandle;
extern RecoveryUI* ui;
extern bool has_cache;
bool is_ro_debuggable();

Test: unit tests pass, boot into recovery mode and run graphic tests
Change-Id: If83a005786c9b38412731da97aaf85af69a3b917
2019-07-24 11:36:03 -07:00
Tianjie Xu
94bc9e1010 Merge "Add command line parser for simulator"
am: 7965a95adc

Change-Id: Ifa759b9f07a671ad509b0847c30bda4c17edac6c
2019-07-17 10:44:25 -07:00
Tianjie Xu
7965a95adc Merge "Add command line parser for simulator" 2019-07-17 17:19:51 +00:00
android-build-team Robot
5a6cde8b02 Merge cherrypicks of [8673593, 8673409, 8673796, 8673797, 8673798, 8673855, 8673151, 8673594, 8673499, 8673799, 8673895, 8673896] into qt-release
Change-Id: I7e089c85c21dbbad3bb7a4b56dfe2edcf2c1c54d
2019-07-17 03:11:39 +00:00
Tao Bao
793e8943eb minadbd sends heartbeat to rescue service for getprop command.
We start minadbd and rescue services in two processes. In particular,
minadbd handles the requests from host, then communicates with rescue
service to do install/wipe works. When resuce service doesn't see any
request in a pre-defined timeout (currently 300s), rescue service will
exit to avoid endless waiting.

This CL changes minadbd to additionally send a no-op command to rescue
service as a heartbeat signal, so that host side can finish
time-consuming operations (e.g. downloading over network) while keeping
rescue service alive.

Bug: 136457446
Test: Enter resuce mode on blueline. Send `adb rescue getprop
      ro.build.fingerprint` and check that rescue service doesn't exit.
Test: Stop sending the getprop command. Check that rescue service exits
      after 300s.
Change-Id: Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531
Merged-In: Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531
(cherry picked from commit 2223e6a9f8)
(cherry picked from commit 0bbb2ed53e)
(cherry picked from commit dd0158ac60)
2019-07-17 03:10:07 +00:00
Tianjie Xu
7efd23338a Add command line parser for simulator
Add a command line parser. Also add the support to parse the oem
property file and skip certain functions.

Bug: 131911365
Test: run simulator for wear builds
Change-Id: Ide306b53d3f42b29c02279969aeb18bec4045d6f
2019-07-16 13:03:41 -07:00