Commit graph

56844 commits

Author SHA1 Message Date
Peter Collingbourne
843f7e645d Create a ProcessInfo structure with the process-wide information from the crasher.
We're now passing around a couple of addresses for GWP-ASan in addition
to abort_msg_address and fdsan_table_address, and I'm going to need to add
more of them for MTE. Move them into a data structure in order to simplify
various function signatures.

Bug: 135772972
Change-Id: Ie01e1bd93a9ab64f21865f56574696825a6a125f
2020-02-28 19:12:19 -08:00
Automerger Merge Worker
a9dc5bd711 Merge "Remove pairing_auth, pairing_connection from recovery." am: ad9d034e7d
Change-Id: I35ffbb402b920fd219898b08f0c0c331450812d6
2020-02-29 01:08:45 +00:00
David Anderson
478e1c191c snapshotctl: Not necessary to link to libdm.
The symbols are provided by libfs_mgr_binder.

Bug: 149942628
Test: snapshotctl builds
Change-Id: Ie4313c7add5c71bb9614a4d97eec41329425f23d
2020-02-28 17:04:36 -08:00
David Anderson
1a17e18f17 libdm: Make static std::string inline for DmTargetDefaultKey.
Bug: 149942628
Test: snapshotctl w/ ASAN build
Change-Id: I0f40b1f29e46bc9afaf19d8c21d62280e2c01074
2020-02-28 17:04:36 -08:00
Jaegeuk Kim
24d2a296bf fs_mgr: remain elapsed time of fsck in prop
Bug: 149595111
Bug: 149844577
Bug: 138909685
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I8f11ca2680558dc54efd6788ee0dd56e5d65a356
2020-02-28 17:00:22 -08:00
Joshua Duong
ad9d034e7d Merge "Remove pairing_auth, pairing_connection from recovery." 2020-02-29 00:47:44 +00:00
Automerger Merge Worker
d9bc96443f Merge changes Ib97acc6d,Id5bbfd6d,I4dfc3f52 am: 14c65f6fb6
Change-Id: I696a7447d2c073904b77240b62fcaff24f0c9433
2020-02-28 23:39:33 +00:00
Josh Gao
14c65f6fb6 Merge changes Ib97acc6d,Id5bbfd6d,I4dfc3f52
* changes:
  adbd: add runtime-configurable logging.
  adbd: add usb thread spawn logging.
  base: add CachedProperty.
2020-02-28 23:17:49 +00:00
Automerger Merge Worker
f2f69268b5 Merge "libsystem/libsync: Update OWNERS" am: e7e778bdef
Change-Id: I7d97838a143f457095edaaefafc5255c54a4e054
2020-02-28 21:09:39 +00:00
Josh Gao
52d0b67f19 adbd: add runtime-configurable logging.
Add some requested logging options that can be turned on at runtime
without having to restart adbd.

Bug: http://b/141959374
Test: manual
Change-Id: Ib97acc6d199e0b91238a6758e18b7cb75f8688d9
2020-02-28 12:58:42 -08:00
Treehugger Robot
e7e778bdef Merge "libsystem/libsync: Update OWNERS" 2020-02-28 20:53:41 +00:00
Joshua Duong
0f53d1794a Remove pairing_auth, pairing_connection from recovery.
Also remove statically linking libc++, because these libraries are not
exported native shared libraries.

We are slightly over the 12MB limit for ramdisk recovery size, so let's
remove the adb pairing libraries, since they won't be used in recovery
mode.

These are only used in normal boot mode, and currently, only by adb
client. The pairing server is used by system server.

Bug: 150317254

Test: Check size of ramdisk-recovery.img in walleye, walleye-hwasam
build to be under 12MB. Also verify installed-files-recovery.txt no
longer contains libadb_pairing*.
Also put phone into recovery mode, check system/lib64 for no
libadb_pairing*.

Change-Id: Ida7c4fdc9dda2b09091b853feac8df8f125e4274
Merged-In: Ida7c4fdc9dda2b09091b853feac8df8f125e4274
(cherry picked from commit afc2cf0dec)
Exempt-From-Owner-Approval: cherry-pick
2020-02-28 20:45:43 +00:00
Marissa Wall
8cb4c488c5 libsystem/libsync: Update OWNERS
marissaw@ is leaving Android.

Test: Compiles
Bug: 150462113
Change-Id: I63334466cc1b429c16f0011dcf4b43aa92324a6c
2020-02-28 10:50:50 -08:00
Alessio Balsini
5b210b0a6c snapshotctl: send snapshot merge report metrics
Add the --report flag to spshotctl to submit Android metrics on the final state
of the snapshot merge operation, the duration if the merge is completed in a
single session, or the number of reboots that happened before completing the
merge.

Bug: 138817833
Bug: 148138124
Test: m + OTA + statsd_testdrive
Change-Id: Id657f33963bb9926553fa6eeb1721a5229f11e87
Signed-off-by: Alessio Balsini <balsini@google.com>
Merged-In: Id657f33963bb9926553fa6eeb1721a5229f11e87
2020-02-28 10:46:07 -08:00
Nikita Ioffe
6963f81a2b Stop & Resume property service when switching to bootstrap namespace
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 149745936
Change-Id: I9d30b75f4b4177175ce086c3b6a7c0bba9a17396
2020-02-28 11:37:22 +00:00
Automerger Merge Worker
3efbff8e13 Merge "adb: don't hardcode ports in test_adb." am: cb57583949
Change-Id: I41729dfa1d671da480280b76be0200eac355560f
2020-02-28 03:11:02 +00:00
Treehugger Robot
cb57583949 Merge "adb: don't hardcode ports in test_adb." 2020-02-28 02:56:48 +00:00
Automerger Merge Worker
9a2960f209 Merge "String8: operator<<" am: 3c22033c72
Change-Id: Ib74439d696a56a609abe529bcc29aedd399fc45d
2020-02-27 23:22:51 +00:00
Steven Moreland
3c22033c72 Merge "String8: operator<<" 2020-02-27 23:18:49 +00:00
Automerger Merge Worker
3a20e8a179 Merge "If userspace reboot watchdog triggers, don't store reason in persistent property" am: 18a65319fd
Change-Id: I749cfd4707022a5573e61281dd40edf95755892b
2020-02-27 23:14:42 +00:00
Nikita Ioffe
18a65319fd Merge "If userspace reboot watchdog triggers, don't store reason in persistent property" 2020-02-27 23:01:53 +00:00
Josh Gao
e8829c6bfc adb: don't hardcode ports in test_adb.
If we get unlucky and something else (or ourselves, in another thread)
beats us to listening on our hardcoded ports, we can deadlock.

Bug: http://b//149829737
Test: ./test_adb.py
Change-Id: I8f14004a6b2e77366abad6e88786ea8941629020
2020-02-27 14:30:35 -08:00
Josh Gao
e3d34e1f8b adbd: add usb thread spawn logging.
Bug: http://b/141959374
Test: adbd shell killall adbd; adb wait-for-device logcat | grep UsbFfs
Change-Id: Id5bbfd6d2198005bf10b94c691499059e130afe7
2020-02-27 13:56:48 -08:00
Josh Gao
891e6dad73 base: add CachedProperty.
Copy bionic's CachedProperty with some minor API tweaks, to allow for
efficient querying of properties that rarely change.

Bug: http://b/141959374
Test: treehugger
Change-Id: I4dfc3f527d30262b35e871d256cec69e69f2e1d7
2020-02-27 13:56:48 -08:00
Nikita Ioffe
3ad292025c Reset post_data_ and services_update_finished_ on userspace reboot
Test: adb reboot userspace
Bug: 143970043
Change-Id: I77d47a8460b1526337a318547a59141334e11cdd
2020-02-27 20:46:27 +00:00
Automerger Merge Worker
6796954be6 Merge "libsnapshot/test: Re-enable the failing tests" am: 4bd1f92e0b
Change-Id: I058829bee51069091267060279be311a12a962b2
2020-02-27 17:59:59 +00:00
Treehugger Robot
4bd1f92e0b Merge "libsnapshot/test: Re-enable the failing tests" 2020-02-27 17:42:38 +00:00
Automerger Merge Worker
c0d3b5c2b8 Merge "Revert "liblog: disable header_abi_checker"" am: 3638096424
Change-Id: Ie4c67bff24a1cb293c4f500dc84584458890d4ff
2020-02-27 16:52:44 +00:00
Tom Cherry
3638096424 Merge "Revert "liblog: disable header_abi_checker"" 2020-02-27 16:39:43 +00:00
Nikita Ioffe
d485bbbb51 If userspace reboot watchdog triggers, don't store reason in persistent property
If init is wedged, then the write will never succeed and reboot won't
happen.

Also, in case of normal reboot, move call to PersistRebootReason to the
top of DoReboot() function, to make sure we persist it even if /data is
not mounted.

Test: builds
Test: adb shell svc power reboot userspace
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 148767783
Change-Id: I4ae40e1f6fdc41cc0bcae57020fa3d3385dda1b4
2020-02-27 13:06:37 +00:00
Automerger Merge Worker
3d9c20fefd Merge "Always use shared memory for atrace." am: 2ddc5a1932
Change-Id: I178514bd3d57cd406f2e243a1856a2a13d0326f8
2020-02-27 10:49:04 +00:00
Florian Mayer
2ddc5a1932 Merge "Always use shared memory for atrace." 2020-02-27 10:36:48 +00:00
Howard Chen
2e1c6b26a1 Refine the exported DSU status
The new exported DSU status removes the need to make blocking binder
calls out of system server during device boot.

Bug: 149790245
Bug: 149716497
Test: adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
    -a android.os.image.action.START_INSTALL \
    -d file:///storage/emulated/0/Download/system.raw.gz \
    --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
    --el KEY_USERDATA_SIZE 8589934592
Change-Id: I27fae316214498407a73474ca8b93aec3518e4b5
2020-02-27 16:34:30 +08:00
Automerger Merge Worker
c70004f863 Merge "logwrap: add missing O_CLOEXEC" am: f2e5b4bade
Change-Id: Ic4a317e13af407861b2aba51d017f2bfa9b9a6d8
2020-02-27 05:38:37 +00:00
Tom Cherry
f2e5b4bade Merge "logwrap: add missing O_CLOEXEC" 2020-02-27 05:25:47 +00:00
Automerger Merge Worker
807edd3e5c Merge "init: prevent persist.sys.usb.config initalized as none,adb" am: 78464a0337
Change-Id: Ib903adce0ac6ed502c595dac670b5c7ec1d84963
2020-02-27 04:08:12 +00:00
Treehugger Robot
78464a0337 Merge "init: prevent persist.sys.usb.config initalized as none,adb" 2020-02-27 03:48:44 +00:00
Automerger Merge Worker
eacb8dd031 Merge "Use optional for nullable types" am: 0e49bfa809
Change-Id: I0a4adc474ad910bb24a7ebbed6a4c6e3f9862128
2020-02-27 03:22:55 +00:00
Jooyung Han
0e49bfa809 Merge "Use optional for nullable types" 2020-02-27 03:06:14 +00:00
Jiyong Park
49c3dc51c7 Mark updatable APEXes
Mark updatable APEXes as updatable: true so that they are opted-out from
optimizations that make sense only for non-updatable modules; such as
symlinking to the libs in the system partition.

Bug: 149805758
Test: m and check that there is no symlink from the APEX to the system
partition.

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Ic3edc7e285e9eafbdaa20b18ccbc0b2231370779
(cherry picked from commit 7c2ae1f02c)
Change-Id: Ic3edc7e285e9eafbdaa20b18ccbc0b2231370779
2020-02-27 10:52:47 +09:00
Automerger Merge Worker
d5fd1b7e86 Merge "Mark fs-verity support for ext4 userdata if first_api_level >= R" am: b03ff7dbbf
Change-Id: If72620a065d2ae33a5a40bd28b04d3758ffbe6b5
2020-02-27 00:38:37 +00:00
Treehugger Robot
b03ff7dbbf Merge "Mark fs-verity support for ext4 userdata if first_api_level >= R" 2020-02-27 00:26:15 +00:00
Howard Yen
bb578203a6 init: prevent persist.sys.usb.config initalized as none,adb
Prevent appending ",adb" to persist.sys.usb.config if "none" is
explicitly defined in default prop.

Bug: 150130503
Test: persist.sys.usb.config initalized correctly
Change-Id: I3b5de6fd102e252019e843f39f0875f5aaea7486
Merged-In: I3b5de6fd102e252019e843f39f0875f5aaea7486
2020-02-27 07:53:48 +08:00
Automerger Merge Worker
06f8bd9e37 Merge "fs_mgr: fix checking for casefold feature already enabled" am: 154bd7e031
Change-Id: I3c23d4bc78dca61397e4720dfe4752fcb570fef5
2020-02-26 23:41:35 +00:00
Treehugger Robot
154bd7e031 Merge "fs_mgr: fix checking for casefold feature already enabled" 2020-02-26 23:37:34 +00:00
Automerger Merge Worker
5a04435a63 Merge "trusty: keymaster: Remove legacy support" am: 23ba0d425e
Change-Id: I1f37917b3e58864a6630d0804426df81940df866
2020-02-26 23:36:58 +00:00
David Anderson
940c6b26ef libdm: Fix WaitForFile early-returning on failed accesses.
WaitForFile/WaitForDeletedFile both early return true if an error like
EPERM occurs. This was intentional because the code was modeled off
earlier fs_mgr code, but it makes libdm inherently racy if sepolicy is
not configured correctly. It's better to have these result in explicit
and consistent failures.

Bug: 148103327
Test: fastboot flashall
Change-Id: I0c78818962e1db91b556e523c418db28f7d78fae
Merged-In: I0c78818962e1db91b556e523c418db28f7d78fae
2020-02-26 15:21:53 -08:00
Matthew Maurer
23ba0d425e Merge "trusty: keymaster: Remove legacy support" 2020-02-26 23:19:27 +00:00
Alessio Balsini
e7f1087fa1 libsnapshot/test: Re-enable the failing tests
Some tests were temporarily disabled due to errors in Cuttlefish.
Now that the issues were fixed, the tests can be put back in presubmit.

Bug: 148889015
Test: vts_libsnapshot_test (Cuttlefish + Pixel 4)
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: Idcb2b7831b2183b2d734bdf8821fd34746f2beee
2020-02-26 21:49:25 +00:00
Tom Cherry
cfcf684c83 Revert "liblog: disable header_abi_checker"
All planned changes to liblog have been made, so it's time to
re-enable this.

This reverts commit 896fb9e57a.

Test: build
2020-02-26 13:43:31 -08:00