Commit graph

67007 commits

Author SHA1 Message Date
Yifan Hong
2aa56ffdb3 Merge "health: Add CAP_BLOCK_SUSPEND" am: ae11855809 am: 7131b00862
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1461183

Change-Id: I7c48b86db388dbfcc1d86388de9b57bbfe861afc
2020-10-15 22:58:39 +00:00
Tom Cherry
bf71d24dbc Merge "Remove logcat, logd, and logwrapper symlinks" am: 3abb8b1485
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1455624

Change-Id: I92c0f6f9b4db85faaad9b88b5b9f681b3416b7bf
2020-10-15 21:50:51 +00:00
Yifan Hong
7131b00862 Merge "health: Add CAP_BLOCK_SUSPEND" am: ae11855809
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1461183

Change-Id: I06480aeb9a2c26fa5ee33adcdca061be1ea56dc2
2020-10-15 21:50:29 +00:00
Tom Cherry
3abb8b1485 Merge "Remove logcat, logd, and logwrapper symlinks" 2020-10-15 21:25:10 +00:00
Yifan Hong
ae11855809 Merge "health: Add CAP_BLOCK_SUSPEND" 2020-10-15 20:24:17 +00:00
Yifan Hong
a68ee762f7 Load boot image props.
This change does the following:

- Create /second_stage_resources empty dir at root.
- At runtime:
  - At first stage init:
    - mount tmpfs to /second_stage_resources.
    - Copy /system/etc/ramdisk/build.prop to
      /second_stage_resources/system/etc/ramdisk/build.prop
  - At second stage init:
    - Load prop from the above path
    - umount /second_stage_resources

Test: getprop -Z
Test: getprop
Bug: 169169031

Change-Id: I18b16aa5fd42fa44686c858982a17791b2d43489
2020-10-15 13:12:52 -07:00
Baligh Uddin
ccc73dc955 Add new path to visibility rule prior to migration.
BUG: 163786882
Test: TH
Change-Id: I9ee33e64c07384cc8a238a19cf9445085cf7b94f
2020-10-15 18:37:06 +00:00
Treehugger Robot
35af9f3f4e Merge "Update sysprop_library API txt" am: 34a0e57a25 am: 1922b4de78 am: e6620a2d46
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1460967

Change-Id: I09ae99d84b1321497a1215a03e91a45f555ddb67
2020-10-15 17:44:18 +00:00
Treehugger Robot
e6620a2d46 Merge "Update sysprop_library API txt" am: 34a0e57a25 am: 1922b4de78
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1460967

Change-Id: Ibc44b9495d456fc822c33f24d8a607f3ca771909
2020-10-15 16:41:28 +00:00
Treehugger Robot
1922b4de78 Merge "Update sysprop_library API txt" am: 34a0e57a25
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1460967

Change-Id: I2c21ef6082eeb7a552305bfcb538ce341672356d
2020-10-15 16:02:02 +00:00
Treehugger Robot
34a0e57a25 Merge "Update sysprop_library API txt" 2020-10-15 15:08:21 +00:00
David Anderson
3feb3237c0 libsnapshot: Add a source_partition parameter to OpenSnapshotWriter.
Reading from the base device is incorrect, because if the partition
shrinks, we may still have copy operations from the removed area in the
original partition. Ask the caller to explicitly name the source device
for AddCopy() operations.

Bug: 168554689
Test: vts_libsnapshot_test
Test: full OTA with update_device.py
Test: incremental OTA with update_device.py
Change-Id: If388e37c2a2f9288a43d2849312c921bf59d4918
2020-10-14 21:42:03 -07:00
David Anderson
767f3f7216 libsnapshot: Implement OpenSnapshotWriter for compressed snapshots.
This does not implement OpenReader() yet, however, it implements enough
for some vts_libsnapshot_tests to start passing with Virtual A/B
Compression enabled.

Note that OpenSnapshotWriter() has been disabled when linking with init
or recovery. This is to avoid pulling in all the compression libraries
in those places. OpenSnapshotWriter is only designed to be called by
update_engine and will not work outside of normal operation.

Bug: 168554689
Test: vts_libsnapshot_test
Test: full OTA with update_device.py
Test: incremental OTA with update_device.py
Change-Id: I9737d28bdd5c5f4914bc30a2bb72f357d5f44d2b
2020-10-14 21:41:37 -07:00
David Anderson
3e68bd331e libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader.
Bug: 168554689
Test: vts_libsnapshot_test
Test: full OTA with update_device.py
Test: incremental OTA with update_device.py
Change-Id: Ic5eb99be8ab1f89070a0db231d4660e123ae3967
2020-10-14 21:41:37 -07:00
David Anderson
aca0beaf77 libsnapshot: Partially implement OpenSnapshotWriter.
This is a re-landing of the original CL, with a few changes:
 - The correct device is now returned in MapUpdateSnapshot.
 - The old API is used for tests, and the new API is only tested when
   used on a VABC device.
 - A sync() call has been added to ensure that writes to the base and
   target snapshot devices have been fully flushed. This makes
   IsPartitionUnchanged detect the MapUpdateSnapshot bug.

Implement OpenSnapshotWriter for non-compressed Virtual A/B. This is
done by adding an OnlineKernelSnapshotWriter class, which forwards all
writes to a dm-snapshot block device.

This also introduces a new ISnapshotWriter class which extends
ICowWriter, and adds features specific to libsnapshot (versus ICowWriter
which is intended only for the new COW format). The OpenSnapshotReader
call has been moved here since the writer retains all the information
needed to create the reader.

To test the new call, vts_libsnapshot_test has been modified to use
OpenSnapshotWriter.

As part of this change, all consumers of libsnapshot must now link to
libsnapshot_cow.

Bug: 168554689
Test: vts_libsnapshot_test
Test: full OTA with update_device.py
Test: incremental OTA with update_device.py
Change-Id: I90364a58902a4406a37cb14a816642c57a72bec2
2020-10-14 21:41:36 -07:00
Inseob Kim
340d28487a Update sysprop_library API txt
Internal props are no longer stored in the txt file.

Exempt-From-Owner-Approval: cherry pick

Bug: 170693240
Test: m
Change-Id: I8d30b21a18759e35382f25a0706962cebbdeb096
Merged-In: I8d30b21a18759e35382f25a0706962cebbdeb096
2020-10-15 04:04:15 +00:00
Yifan Hong
fde8caa3e3 Merge "Refactor: Move GSI AVB keys selection logic to common code." am: f536731e5a am: e49b06ecf9 am: 745c6d7004
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1457177

Change-Id: I1c41e25241ab562356b99fde57cd97d1d86f4d83
2020-10-14 19:40:12 +00:00
Subbaraman Narayanamurthy
28ebc23625 health: Add CAP_BLOCK_SUSPEND
Add CAP_BLOCK_SUSPEND to android.hardware.health@2.0 service so
that when epoll_wait() is waiting on uevents and timer_fd events
it can block suspend to take the necessary action. Without this
permission, eventpoll is going to ignore the flags EPOLLWAKEUP
used in health HAL or healthloop.

Bug: 169873088
Change-Id: I50d84dd853f718d46fb4f15113da032b60c34b0d
2020-10-14 12:30:19 -07:00
Yifan Hong
745c6d7004 Merge "Refactor: Move GSI AVB keys selection logic to common code." am: f536731e5a am: e49b06ecf9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1457177

Change-Id: I8716ebbf7d9962de9c5c50908991506689ad990b
2020-10-14 19:26:03 +00:00
Yifan Hong
e49b06ecf9 Merge "Refactor: Move GSI AVB keys selection logic to common code." am: f536731e5a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1457177

Change-Id: I37afc08103486a82b1b7be1d2fa40afd5b4cb4a9
2020-10-14 18:49:22 +00:00
Yifan Hong
f536731e5a Merge "Refactor: Move GSI AVB keys selection logic to common code." 2020-10-14 18:25:31 +00:00
Colin Cross
d973da3d3b Merge "Use ro.build.version.release_or_codename to reconstruct fingerprint" am: 219b3487f8 am: 90c57d4501 am: 8b04bfab62
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1459042

Change-Id: I513c02bd09ed1fcd66c2a8e1df46ad84e8bb7763
2020-10-14 17:53:14 +00:00
Colin Cross
8b04bfab62 Merge "Use ro.build.version.release_or_codename to reconstruct fingerprint" am: 219b3487f8 am: 90c57d4501
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1459042

Change-Id: If7a8ba8bafb10370cd06fc34dde0c65f8b7aebfe
2020-10-14 17:09:36 +00:00
Colin Cross
90c57d4501 Merge "Use ro.build.version.release_or_codename to reconstruct fingerprint" am: 219b3487f8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1459042

Change-Id: Ie8e7929628ff1226d14156996bf54e41f2e813fe
2020-10-14 16:52:09 +00:00
Colin Cross
219b3487f8 Merge "Use ro.build.version.release_or_codename to reconstruct fingerprint" 2020-10-14 16:33:02 +00:00
Colin Cross
b519c71619 Use ro.build.version.release_or_codename to reconstruct fingerprint
The ro.build.version.release property was changed from being the
codename or final name of the current release to be the final name
of the most recent release.  Use ro.build.version.release_or_codename
to reconstruct the fingerprint to match what the build system does.

Bug: 158483506
Test: adb shell getprop | grep fingerprint
Change-Id: I3bd992b6f06ff90bb6024253339a2654afa069ee
2020-10-13 12:38:48 -07:00
Treehugger Robot
765229371c Merge "fastbootd: Add more logging for when the USB transport fails." am: f9c36a2ca6 am: bfbe2b6afe am: 25fa64c6a0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1457444

Change-Id: Ifca68f8fce5186fb0563a82f9d10aace869f15a1
2020-10-13 03:34:13 +00:00
Treehugger Robot
25fa64c6a0 Merge "fastbootd: Add more logging for when the USB transport fails." am: f9c36a2ca6 am: bfbe2b6afe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1457444

Change-Id: I8ce67b788844769cc5659ad4d77c3e2e9e093737
2020-10-13 03:21:42 +00:00
Treehugger Robot
bfbe2b6afe Merge "fastbootd: Add more logging for when the USB transport fails." am: f9c36a2ca6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1457444

Change-Id: If93c7e497ef6daac9a9168395254087d888d51be
2020-10-13 02:46:36 +00:00
Treehugger Robot
f9c36a2ca6 Merge "fastbootd: Add more logging for when the USB transport fails." 2020-10-13 02:18:06 +00:00
David Anderson
f74c1a9556 fastbootd: Add more logging for when the USB transport fails.
Bug: 161542676
Test: fastboot flashall
Change-Id: Ief4e7452b72504c51c807dd38a07765ad65c96a4
2020-10-12 15:55:48 -07:00
Yifan Hong
762d936911 Move GSI AVB keys to vendor_boot if BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT
If BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT is set, move GSI AVB keys
to vendor_boot. The existence of these keys are device-specific, and
should not exist in the generic boot image.

Test: manual
Bug: 156098440
Change-Id: Iabe002a9f1ecd2fdf109beed98db6edd3f092399
2020-10-12 13:01:14 -07:00
Yifan Hong
d65e4851e2 Refactor: Move GSI AVB keys selection logic to common code.
Test: pass
Change-Id: I5ac139ad171432e903c400077f7855d4e4bcf041
2020-10-12 13:01:14 -07:00
Steven Moreland
6231ed2635 Merge "libcutils: API to disable memory mitigations" am: 32535585fc am: c29cf50cf9 am: 187d665cc9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1449538

Change-Id: Id8a1fdeb521d421e8574569cd9b6e3b7d17ce5de
2020-10-12 17:53:47 +00:00
Steven Moreland
187d665cc9 Merge "libcutils: API to disable memory mitigations" am: 32535585fc am: c29cf50cf9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1449538

Change-Id: I7327e66d0736c480e789d0fed800abdd3fd18039
2020-10-12 17:42:07 +00:00
Steven Moreland
c29cf50cf9 Merge "libcutils: API to disable memory mitigations" am: 32535585fc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1449538

Change-Id: Ie5cc92e3bbd6b05a2351ba2b143d92f4ff6e4e79
2020-10-12 17:22:08 +00:00
Steven Moreland
32535585fc Merge "libcutils: API to disable memory mitigations" 2020-10-12 16:59:23 +00:00
Wenhao Wang
5910317f1d Merge "rpmb_dev: Switch to RPMB provisioning scheme" am: 323353413f am: d969516a1c am: cb8aa65bad
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1446626

Change-Id: I1788d9f8171a37dc9cfe4fb90bfcb6749c7a8c27
2020-10-10 06:11:37 +00:00
Wenhao Wang
cb8aa65bad Merge "rpmb_dev: Switch to RPMB provisioning scheme" am: 323353413f am: d969516a1c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1446626

Change-Id: Id5d9450a5364361a710dee43f36c5259ab6a47e8
2020-10-10 05:57:44 +00:00
Wenhao Wang
d969516a1c Merge "rpmb_dev: Switch to RPMB provisioning scheme" am: 323353413f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1446626

Change-Id: Ic1bb9f2cb2b84f535fa8bd7a05f85199658d7f48
2020-10-10 05:26:59 +00:00
Wenhao Wang
323353413f Merge "rpmb_dev: Switch to RPMB provisioning scheme" 2020-10-10 05:06:56 +00:00
Steven Moreland
d22659b8ea libcutils: API to disable memory mitigations
Convenience API to disable memory mitigations, where we can specify
logging and also have a single place to update once a related bug is
fixed.

Bug: 166675194
Test: use API to disable memory mitigations
Change-Id: I4a3529ea1911925c49e31cc3809c2743e401c196
2020-10-10 00:16:24 +00:00
Tom Cherry
93490d0d17 Remove logcat, logd, and logwrapper symlinks
We should only need liblog

Bug: 170387172
Test: treehugger
Change-Id: I3cb2a4a37ae2f04cd8f0d991e360db6bd23fb02c
2020-10-09 14:47:19 -07:00
Treehugger Robot
45fbbc196f Merge changes from topic "bug_168791309" am: 8d96bfa9bd am: 68cd2d7c81 am: a0d503616a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1454640

Change-Id: I0341d9d9021ffd008ae5cb01bb57b2fe28984b43
2020-10-09 04:19:48 +00:00
Baligh Uddin
68c3c5a8c5 Remove liblog, logcat, logd, logwrapper am: d2c21a10d3 am: e55e30f5d9 am: 108197fb8b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1454058

Change-Id: I42b65d18b8915c7bc26c4dbda8453bc167ab151e
2020-10-09 04:19:46 +00:00
Xin Li
d071bfc734 [automerger skipped] Skip ab/6749736 in stage. am: 3deb0ae5fe -s ours am: 1d29796fb3 -s ours
am skip reason: Change-Id Ib9e04266b47bdc6129c10c72ee35222c49beff1e with SHA-1 11a0227d2a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12797522

Change-Id: Ia52f3b64e61c469ce0b8d0375488973baf2aa83b
2020-10-09 04:17:53 +00:00
Treehugger Robot
a0d503616a Merge changes from topic "bug_168791309" am: 8d96bfa9bd am: 68cd2d7c81
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1454640

Change-Id: Id0972a51de501ffcaf7a5bb204d93f0c81d9db10
2020-10-09 03:41:57 +00:00
Baligh Uddin
108197fb8b Remove liblog, logcat, logd, logwrapper am: d2c21a10d3 am: e55e30f5d9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1454058

Change-Id: I0ee2333ef52b1cfe7d89b4462b48ededc0273ea8
2020-10-09 03:41:56 +00:00
Xin Li
1d29796fb3 [automerger skipped] Skip ab/6749736 in stage. am: 3deb0ae5fe -s ours
am skip reason: Change-Id Ib9e04266b47bdc6129c10c72ee35222c49beff1e with SHA-1 11a0227d2a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12797522

Change-Id: Ie43b085c56809b19cccf55d2de28f56029fb0c35
2020-10-09 03:39:56 +00:00
Treehugger Robot
68cd2d7c81 Merge changes from topic "bug_168791309" am: 8d96bfa9bd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1454640

Change-Id: I40f47d42101e9e62ec27341a3fb0847d9b5f3d2b
2020-10-09 03:30:44 +00:00