Commit graph

55862 commits

Author SHA1 Message Date
Jiyong Park
ab8a7e35ec Merge "Mark updatable APEXes" 2020-03-01 00:39:18 +00:00
Nikita Ioffe
3efe4c37ea Merge changes from topic "userspace-reboot-bootstrap-namespace"
* changes:
  Stop & Resume property service when switching to bootstrap namespace
  Reset post_data_ and services_update_finished_ on userspace reboot
2020-02-29 13:04:17 +00:00
David Anderson
dc4585cbfa Merge changes Ie4313c7a,I0f40b1f2
* changes:
  snapshotctl: Not necessary to link to libdm.
  libdm: Make static std::string inline for DmTargetDefaultKey.
2020-02-29 05:58:08 +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
Joshua Duong
ad9d034e7d Merge "Remove pairing_auth, pairing_connection from recovery." 2020-02-29 00:47:44 +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
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
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
Treehugger Robot
cb57583949 Merge "adb: don't hardcode ports in test_adb." 2020-02-28 02:56:48 +00:00
Steven Moreland
3c22033c72 Merge "String8: operator<<" 2020-02-27 23:18:49 +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
Treehugger Robot
4bd1f92e0b Merge "libsnapshot/test: Re-enable the failing tests" 2020-02-27 17:42:38 +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
Florian Mayer
2ddc5a1932 Merge "Always use shared memory for atrace." 2020-02-27 10:36:48 +00:00
Tom Cherry
f2e5b4bade Merge "logwrap: add missing O_CLOEXEC" 2020-02-27 05:25:47 +00:00
Treehugger Robot
78464a0337 Merge "init: prevent persist.sys.usb.config initalized as none,adb" 2020-02-27 03:48:44 +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
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
Treehugger Robot
154bd7e031 Merge "fs_mgr: fix checking for casefold feature already enabled" 2020-02-26 23:37:34 +00: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
Eric Biggers
91bcfd8d7f fs_mgr: fix checking for casefold feature already enabled
EXT4_FEATURE_INCOMPAT_CASEFOLD is a flag in s_feature_incompat, not in
s_feature_ro_compat.

Bug: 138322712
Test: Treehugger
Change-Id: I07bb1d2b818d423196d8ceebda8900a8adbb19e9
2020-02-26 19:11:48 +00:00
Tom Cherry
b5b162e204 logwrap: add missing O_CLOEXEC
Bug: 150260863
Test: build
Change-Id: Ibe070d5d4f3a7ada0718f74c7cee12db7b9f920e
2020-02-26 10:29:04 -08:00
Steven Moreland
8ef1e1b535 Merge "String*: remove 'StaticLinkage' constructor" 2020-02-26 17:57:07 +00:00
David Anderson
a31834a4b6 Merge "init: Make sure ImageManager status files are labelled." 2020-02-26 17:56:03 +00:00
Victor Hsieh
98296fcf2a Mark fs-verity support for ext4 userdata if first_api_level >= R
fs-verity is required for new devices launched with R. This change
remove a manual setup for vendors going forward. The original fs mgr
flag still allows old devices to opt in, which can only to be done
manually because of kernel dependency.

Test: build
Bug: 150034150
Change-Id: I152b63d7889153d41f29677f72074afb1881b65d
2020-02-26 09:49:45 -08:00
Florian Mayer
fc0adaf89e Always use shared memory for atrace.
Remove ATRACE_SHMEM macro.

Test: atrace ss
      atrace wm
      sanity check output
Bug: 137366208
Change-Id: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
2020-02-26 15:55:22 +00:00
Steven Moreland
b1d3161b7b String8: operator<<
For parity with String16.

Bug: N/A
Test: N/A
Change-Id: I2d7d207138c96146814da31cf27a49cc310e5362
2020-02-25 17:59:54 -08:00
Matthew Maurer
1010727a48 trusty: keymaster: Remove legacy support
Library based HALs have been deprecated for several years now, and
Keymaster 2 based testing is woefully out of date compared to running
VTS against the modern 3.0 and 4.0 implementations.

Purging these modules and their resulting dependencies will make it
easier for the central system/keymaster repository to move forwards.

Test: mm
Bug: 150239636
Change-Id: Ic2ddbe685a50e65f9db25f682ad33105195efa8a
2020-02-26 00:43:23 +00:00
David Anderson
c991f347b2 init: Make sure ImageManager status files are labelled.
adb remount and snapshot-based updates use ImageManager in first-stage
init. This creates status files, which need to be labelled.

Bug: 148834619
Test: manual test
Change-Id: I72949fca2889f9e5612049844a78bf9355b48797
2020-02-25 09:09:08 -08:00
Jaegeuk Kim
7ef2b1d853 Merge "fs_mgr: use "-T now" for tune2fs" 2020-02-25 16:38:25 +00:00
Tom Cherry
0fcb22868d Merge "init: handle property service callbacks asynchronously" 2020-02-25 16:22:28 +00:00
Tom Cherry
9d04b677e3 Merge "logd: don't coalesce identical log messages in the security buffer" 2020-02-25 16:13:58 +00:00
Jaegeuk Kim
5283816074 fs_mgr: use "-T now" for tune2fs
No functional change.

Bug: 149039306
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ic9dd04f268fcd949ee2e9b30b1598f35ef37b5bf
2020-02-24 19:59:33 -08:00
Joshua Duong
7445a87101 Merge "Properly remove adb DNS services." 2020-02-24 23:19:11 +00:00
Treehugger Robot
19e4f2b5f3 Merge "Adds AID_CONTEXT_HUB" 2020-02-24 19:19:38 +00:00
Yifan Hong
98dc71f4ff Merge "libsnapshot: dump rollback indicator" 2020-02-24 19:00:11 +00:00
Joshua Duong
79a452a923 Properly remove adb DNS services.
Bug: b/150136878
Bug: b/111434128

Test: make
Change-Id: Ibfb92a7c197a25fd1913107d277fbc5f78108c05
2020-02-24 10:09:35 -08:00