Commit Graph
10911 Commits
Author SHA1 Message Date
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 Andersonandandroid-build-merger 047e30d9a4 Merge "Make libboot_control vendor available." am: e3a35dc808 am: 388d2a591c am: bda485070c am: b9e7f63370
am: cf0a630371

Change-Id: I2f40f3184a10be17d96c6c7f6253830da143c95e
2019-09-03 13:28:22 -07:00
David Andersonandandroid-build-merger 0019bdf79c Merge "Refactor boot_control into a separate library." am: eb35817830 am: 754e7fc190 am: 6bf93864ce am: ef2ec5f840
am: 7e7a01662a

Change-Id: I0fbdf1f21100e97fd686426ad46d6179273e3c08
2019-09-03 13:27:45 -07:00
David Andersonandandroid-build-merger cf0a630371 Merge "Make libboot_control vendor available." am: e3a35dc808 am: 388d2a591c am: bda485070c
am: b9e7f63370

Change-Id: Ia70a4b63248d803c2154044f670539e4023ec3ae
2019-09-03 13:23:24 -07:00
David Andersonandandroid-build-merger 7e7a01662a Merge "Refactor boot_control into a separate library." am: eb35817830 am: 754e7fc190 am: 6bf93864ce
am: ef2ec5f840

Change-Id: I32efd5cf67f2cc4fc3d09f1de061630135c119d0
2019-09-03 13:22:45 -07:00
David Andersonandandroid-build-merger b9e7f63370 Merge "Make libboot_control vendor available." am: e3a35dc808 am: 388d2a591c
am: bda485070c

Change-Id: I84a07437b4976ac1c63421257355debb36ef067f
2019-09-03 13:14:21 -07:00
David Andersonandandroid-build-merger ef2ec5f840 Merge "Refactor boot_control into a separate library." am: eb35817830 am: 754e7fc190
am: 6bf93864ce

Change-Id: I457a7ca44f1c1f1cccbebff693ab5adb7c022768
2019-09-03 13:13:33 -07:00
David Andersonandandroid-build-merger bda485070c Merge "Make libboot_control vendor available." am: e3a35dc808
am: 388d2a591c

Change-Id: I9ee92e1609ea285c1ae63f7b427fd62c24aa6127
2019-09-03 13:07:06 -07:00
David Andersonandandroid-build-merger 6bf93864ce Merge "Refactor boot_control into a separate library." am: eb35817830
am: 754e7fc190

Change-Id: I9e8d4489984de6cf0dcc96fcec8b81722966797d
2019-09-03 13:06:29 -07:00
David Andersonandandroid-build-merger 388d2a591c Merge "Make libboot_control vendor available."
am: e3a35dc808

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

Change-Id: I330e599f7a8bf2aed111186ec54886b4c21b071a
2019-09-03 12:59:35 -07:00
David AndersonandGerrit Code Review e3a35dc808 Merge "Make libboot_control vendor available." 2019-09-03 19:36:59 +00:00
David AndersonandGerrit Code Review eb35817830 Merge "Refactor boot_control into a separate library." 2019-09-03 19:33:22 +00:00
bigbiff bigbiff 0be03b3217 Encryption: try wrapped key if the first time decryption fails
Change-Id: I108b7aeea41c6b85c851f40c1c4a7e25012e2463
2019-09-01 13:38:44 -04:00
Peter Caiandbig biff 05cd3f8616 ext4crypt: change to upgrade key if export fails
Add support to upgrade key when export fails with KEY_REQUIRES_UPGRADE.

Ported from
https://source.codeaurora.org/quic/la/platform/system/vold/commit/?h=LA.UM.7.9.r1-06100-sm6150.0&id=85c46eaacc60290db5e71380d89eb4d99ed67995

Change-Id: Ic64be8ade00c0b0d014370ecc9341b1ecc9b0d7a
2019-09-01 19:34:09 +02:00
Peter Caiandbig biff 90edd2e867 ext4crypt: support wrappedkey for FBE
Qualcomm devices use a special `wrappedkey` mode for FBE. This is ported
from CAF
https://source.codeaurora.org/quic/la/platform/system/vold/commit/?h=LA.UM.7.8.r4-01000-SDM710.0&id=9229262d893a8592f7bc1b4e8a8dab7aad8df68c,
originally by folks at Mokee for vold
https://mokeedev.review/c/MoKee/android_system_vold/+/34102.

This patch ports the above changes to `ext4crypt`, which we can use in
recovery. Note that since we do not have `fs_mgr` in the recovery, we
cannot read the `wrappedkey` flag from fstab. Instead, similar to
`fbe.contents`, we use a special property `fbe.data.wrappedkey` to
indicate support for wrappedkey mode. Devices that need to use this
should set this property to `true` to activate corresponding code.

Change-Id: I79c2855d577156670b45c10c7c7b1fcd9fece8d9
2019-09-01 19:33:30 +02: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 Liandandroid-build-merger 809177c32c [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master am: bc7898323c -s ours am: b3aeafddca am: 8fb95b5ae3
am: 483637a524 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib3e1a41f90719bb4cc34a385f285db9d82cb9cd0
2019-08-26 13:23:14 -07:00
Xin Liandandroid-build-merger 5a379607ad [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.001 into stage-aosp-master history am: 5ac14106ff -s ours am: 6e3d8bed97 am: 584da181c5
am: 58c7edfedf -s ours
am skip reason: subject contains skip directive

Change-Id: I14d10451f3192fc444359e52d91e16616fde3249
2019-08-26 12:37:57 -07:00
Xin Liandandroid-build-merger 483637a524 [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master am: bc7898323c -s ours am: b3aeafddca
am: 8fb95b5ae3

Change-Id: Ieb922cc0dcc8e2d973fa5b09bb20c3a3e8e7eb9a
2019-08-26 12:20:15 -07:00
Xin Liandandroid-build-merger 58c7edfedf [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.001 into stage-aosp-master history am: 5ac14106ff -s ours am: 6e3d8bed97
am: 584da181c5

Change-Id: I6a0b183150727d3ebc1ff2a9b48fe6b9ff69df3c
2019-08-26 11:26:32 -07:00
Xin Liandandroid-build-merger 8fb95b5ae3 [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master am: bc7898323c -s ours
am: b3aeafddca

Change-Id: Id759775f6eb82eb580f30c0fba9de8ad07e095a0
2019-08-24 01:33:50 -07:00
Xin Liandandroid-build-merger b3aeafddca [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
am: bc7898323c -s ours
am skip reason: subject contains skip directive

Change-Id: Ibce509308710e29ac01e64d5a3194460d69eabc1
2019-08-23 21:39:14 -07:00
Xin Liandandroid-build-merger 584da181c5 [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.001 into stage-aosp-master history am: 5ac14106ff -s ours
am: 6e3d8bed97

Change-Id: I59a5ac4213c90a360aa8621513df0d8711b4eb93
2019-08-23 21:17:12 -07:00
Xin Liandandroid-build-merger 6e3d8bed97 [automerger skipped] DO NOT MERGE - Merge build QP1A.190711.001 into stage-aosp-master history
am: 5ac14106ff -s ours
am skip reason: subject contains skip directive

Change-Id: I2f78ea8d7588dafe0bee2a4cab198f4b02395b15
2019-08-23 20:25:20 -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 Hongandandroid-build-merger dc178d9737 Merge "updater: Fix build for new CreateLogicalPartition signature." am: 18c3f78779 am: 41fd3c3ad9 am: 0df5805d21 am: 8f2745c31d
am: fc7e2911e8

Change-Id: I71c001f8a08f4d6bdedd26898321390e4a3e7d3c
2019-08-16 12:03:27 -07:00
Yifan Hongandandroid-build-merger fc7e2911e8 Merge "updater: Fix build for new CreateLogicalPartition signature." am: 18c3f78779 am: 41fd3c3ad9 am: 0df5805d21
am: 8f2745c31d

Change-Id: I8060efa434110b8c53661cda43f6e2a781ff7551
2019-08-16 11:54:23 -07:00
Yifan Hongandandroid-build-merger 8f2745c31d Merge "updater: Fix build for new CreateLogicalPartition signature." am: 18c3f78779 am: 41fd3c3ad9
am: 0df5805d21

Change-Id: Ib90ad40cbe99ebe0154ea439e0560d8e5bd109b8
2019-08-16 11:45:13 -07:00
Yifan Hongandandroid-build-merger 0df5805d21 Merge "updater: Fix build for new CreateLogicalPartition signature." am: 18c3f78779
am: 41fd3c3ad9

Change-Id: Iea08b41ba9c710f7394e8e0bf5ac34cd9dd50490
2019-08-16 11:34:48 -07:00
Yifan Hongandandroid-build-merger 41fd3c3ad9 Merge "updater: Fix build for new CreateLogicalPartition signature."
am: 18c3f78779

Change-Id: Id0deb6160cf5b1bd04c99081a766df412a26e7f5
2019-08-16 11:24:53 -07:00
Yifan HongandGerrit Code Review 18c3f78779 Merge "updater: Fix build for new CreateLogicalPartition signature." 2019-08-16 17:41:22 +00:00
Tianjie Xuandandroid-build-merger 61fb1bbaf7 Merge "Remove common.h" am: 899f7b5105 am: 03fd851f61 am: 9387e5cd61 am: 9f1625a115
am: 6718707817

Change-Id: I7e26523515a6e7e28842716b98c3e332e62d1cac
2019-08-15 19:47:19 -07:00
Tianjie Xuandandroid-build-merger 6718707817 Merge "Remove common.h" am: 899f7b5105 am: 03fd851f61 am: 9387e5cd61
am: 9f1625a115

Change-Id: I49abe7e4b856e8acca573b6c510884f5f9092d64
2019-08-15 19:24:56 -07:00
Tianjie Xuandandroid-build-merger 9f1625a115 Merge "Remove common.h" am: 899f7b5105 am: 03fd851f61
am: 9387e5cd61

Change-Id: Ia6abd2750228e98662f04b241489285b7dcb9eb5
2019-08-15 19:10:55 -07:00
Tianjie Xuandandroid-build-merger 9387e5cd61 Merge "Remove common.h" am: 899f7b5105
am: 03fd851f61

Change-Id: I810c6fb8a57b9ce3283d15f10d29cb0848a200c5
2019-08-15 18:59:51 -07:00
Tianjie Xuandandroid-build-merger 03fd851f61 Merge "Remove common.h"
am: 899f7b5105

Change-Id: Ic5b9e24cb87ef292f5d8e53de485e44e455f3185
2019-08-15 18:05:25 -07:00
Tianjie XuandGerrit Code Review 899f7b5105 Merge "Remove common.h" 2019-08-16 00:24:41 +00:00
Tao Baoandandroid-build-merger cbc7e79dd9 Merge "minui: Support input device hotplug in recovery mode." am: ecc208286f am: f934163f4c am: 9c9d845ae5 am: 15f088a2e6
am: 3b572fb15c

Change-Id: Ie6aa64535346bbf8b3c4c30478ac3029ef158951
2019-08-15 16:59:47 -07:00
Tao Baoandandroid-build-merger 3b572fb15c Merge "minui: Support input device hotplug in recovery mode." am: ecc208286f am: f934163f4c am: 9c9d845ae5
am: 15f088a2e6

Change-Id: I901ceba1cfff2f51c6eec4255bad8129560b95d2
2019-08-15 16:44:34 -07:00
Tao Baoandandroid-build-merger 15f088a2e6 Merge "minui: Support input device hotplug in recovery mode." am: ecc208286f am: f934163f4c
am: 9c9d845ae5

Change-Id: I09fb6f4a0a38d5330a65319c52580e548d0f9111
2019-08-15 16:34:32 -07:00
Tao Baoandandroid-build-merger 9c9d845ae5 Merge "minui: Support input device hotplug in recovery mode." am: ecc208286f
am: f934163f4c

Change-Id: I485d8d39465c0f8d224e5e13fc50964ffca2e890
2019-08-15 16:23:31 -07:00
Tao Baoandandroid-build-merger f934163f4c Merge "minui: Support input device hotplug in recovery mode."
am: ecc208286f

Change-Id: Ic20b0a1459e3b77413ec6b5869b184272a559284
2019-08-15 16:13:31 -07:00
Tao BaoandGerrit Code Review 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
Xin Liandandroid-build-merger d3f582d1ef [automerger skipped] DO NOT MERGE - Skip qt-dev-plus-aosp-without-vendor (5713463) in stage-aosp-master am: 1ba485fbde -s ours am: 2e3532fa96 am: 11a2fb92c2
am: 32ddaab773 -s ours
am skip reason: subject contains skip directive

Change-Id: I9273b8e72df12b02a322d17633fcd432f1530f16
2019-08-14 14:52:25 -07:00
Xihua ChenandTao Bao 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