Commit graph

44385 commits

Author SHA1 Message Date
Tom Cherry
d2ae1c91ed Merge "Remove logic to fake /system in overlayfs" 2019-02-12 01:04:21 +00:00
Mark Salyzyn
88d308d786 bootstat: local GetProperty use libbase
libbase GetProperty collects the properties properly, which also
allow for content greater than 128 bytes in length.

Replace internal GetProperty and SetProperty helpers with libbase
version.

Test: unit tests
Bug: 121161069
Bug: 124114707
Change-Id: Ic0829955705ebaa19d747bb3f6942f4b9786316a
2019-02-11 13:16:59 -08:00
Elliott Hughes
01705e4f1d Clean up libcutils/libutils tests.
Move tests in the same directory as the corresponding code, so it's
easier to see what is/isn't tested.

Fix naming of libcutils_tests (plural) to match the singular that's more
common (even though the plural makes more sense to me).

Add these two to system/core/'s TEST_MAPPING.

Remove obsolete AndroidTest.xml.

Fix a flaky (timing-dependent) libcutils test.

Test: ran tests
Change-Id: I7e0a31ff45c8a152562bf66fc97161594249366e
2019-02-11 13:15:56 -08:00
Tom Cherry
cf80b6d6e5 Refactor fs_mgr_update_verity_state()
fs_mgr_update_verity_state() has two callers with generally different
intentions.  One caller loops through all entries in the default fstab
to set partition.<mount_point>.verified properties.  The other caller
is only interested in whether or a specific mount point has verity
enabled.

Given this, we refactor fs_mgr_update_verity_state() to
fs_mgr_get_verity_mount_point() which takes a single FstabEntry and
returns the mount point used for the dm-verity device or an empty
option if verity is not enabled on that mount point.

Test: adb-remount-test.sh test on blueline
Change-Id: Ic7dd8390509e95b2931b21e544c919a544138864
2019-02-11 12:50:22 -08:00
Dongwon Kang
9dff515bdb Exclude libvndksupport from APEXes.
Test: build, boot, and checked mount paths.
Bug: 123948402
Change-Id: I687dde4f3d1a7971f68c7c536de5002dcdaecfa4
2019-02-11 11:14:11 -08:00
Tom Cherry
ea57928f00 Merge "liblog: remove visibility macros" 2019-02-11 18:43:13 +00:00
Treehugger Robot
38c143e8c0 Merge "meminfo: make dmabuf_dump dependency on debugfs optional" 2019-02-10 14:55:19 +00:00
Treehugger Robot
2d31b4b023 Merge "libmeminfo: make libdmabufinfo and dmabuf_dump vendor available" 2019-02-10 14:54:53 +00:00
Jiyong Park
407b000fe4 apexd is started much earlier to create loopback devices
This change fixes the problem that apexd is delaying the entire boot
sequence while waiting for the loopback devices to be created. The delay
was as big as 50 ms per a loopback device.

With this change, apexd is started much earlier: from "on post-fs-data"
to "on init". When it is first started, it scans /system/apex to
determine the number of APEXes and creates that number of loopback
devices priori. Since then it enters into the binder loop.

When the data partition is mounted, init lets apexd to initiate the
apexd boot sequence where APEXes in /data is scanned, verified, and
activated. Since the creation of the loopback devices were requested far
before, it is very likely that dev nodes for the devices are ready at
this moment (even if not, this isn't a lose).

Bug: 123404717
Bug: 123772265
Test: compare boot times.
init_zygote_START_TIME_avg is improved from 2831ms to 2622ms on blueline
Change-Id: I12450cee44aa4d17a11def62261c2f82d3f2c718
2019-02-09 14:42:38 +09:00
Treehugger Robot
ea353cab91 Merge "Eliminate the APEX name in fs_config using wildcard" 2019-02-09 01:32:50 +00:00
Treehugger Robot
03cb8010ef Merge "Revert^2 "Enable APEX stubs for libnativeloader."" 2019-02-09 01:16:32 +00:00
Tom Cherry
6576e13995 Remove logic to fake /system in overlayfs
It is better to guarantee that a /system or / entry will be present in
first stage mount than it is to maintain the code to fake an entry if
its not present in the input fstab.

Test: adb-remount-test.sh on blueline
Change-Id: I8aa3e704903b8abf06b1c63be071913a9de58eb3
2019-02-08 16:25:24 -08:00
Treehugger Robot
c1fd33546e Merge "bootstat: crash when parsing ro.boot.boottime" 2019-02-08 23:50:42 +00:00
David Anderson
88045aef59 Enable metadata encryption for userdata_gsi.
Rather than constructing a userdata fstab entry from scratch, this patch
will modify the vendor fstab to preserve the desired encryption
properties and filesystem type.

Bug: 123906417
Test: manual test
Change-Id: I338715fc62628169e8eafbf4a3125e4aadf0ff15
2019-02-08 15:44:00 -08:00
Mark Salyzyn
9560f14755 Merge "fs_mgr: overlayfs: documentation: update kernel patch details" 2019-02-08 20:46:24 +00:00
Mark Salyzyn
7c72116c43 bootstat: crash when parsing ro.boot.boottime
If ro.boot.boottime is malformed or truncated, it will crash
bootstat operations.

Test: compile
Bug: 121161069
Bug: 124114707
Change-Id: Ie2edcffb6d54a8e0c7f2e9a89ae4b29cce246d75
2019-02-08 19:54:41 +00:00
Mark Salyzyn
60d5467bd8 fs_mgr: overlayfs: documentation: update kernel patch details
Confusion has occurred with respect to the kernel patch requirements,
added some clarity.

Corrected some spelling mistakes in other areas.

Test: inspect gitties and run spell
Bug: 118225373
Change-Id: I4ff9497aa5a584b20e9cb2028342aa4e7e4660c3
2019-02-08 11:49:05 -08:00
Tom Cherry
2d9779e87b liblog: remove visibility macros
Visibility is managed through version scripts now.

Bug: 123349183
Test: build
Change-Id: Ia388611a2ec14d0ff9c3896cfe97ccdce17dbb8b
2019-02-08 11:48:19 -08:00
Jiyong Park
defdb18675 Eliminate the APEX name in fs_config using wildcard
Bug: 123743953
Test: Marlin/sailfish boots to the UI
Change-Id: If1669122be78255879ffb8c8c0a7408a34b5e617
2019-02-09 02:59:17 +09:00
Treehugger Robot
2210f80e48 Merge "fs_config supports shell wildcard patterns" 2019-02-08 15:38:43 +00:00
Treehugger Robot
2dcb4160fa Merge "Fix 32-bit dmabuf_dump build" 2019-02-08 09:22:05 +00:00
Nicolas Geoffray
82503887fa Merge "Don't abort the build if a repo doesn't have the test/vts/tools/build/." 2019-02-08 08:48:28 +00:00
Nicolas Geoffray
646c6d902d Don't abort the build if a repo doesn't have the test/vts/tools/build/.
Test: build with master-art manifest
Exempt-From-Owner-Approval: Required for unbreaking ART development.
Change-Id: I6afc0e5444dfa21532a4c802f8c463091cab2b11
2019-02-08 08:47:12 +00:00
Treehugger Robot
9c4fda6cd2 Merge "adb: "support" O_CLOEXEC in adb_open on Windows." 2019-02-08 06:56:47 +00:00
Treehugger Robot
151499e47e Merge "adb: hopefully deflake test_adb.py." 2019-02-08 05:46:16 +00:00
Colin Cross
0a92453a14 Fix 32-bit dmabuf_dump build
Fixes:
system/core/libmeminfo/libdmabufinfo/tools/dmabuf_dump.cpp:109:39: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]

Test: lunch aosp_arm-eng && m dmabuf_dump
Change-Id: Ie605d9b94f5eff888f6a64801512216253a6babb
2019-02-07 21:35:03 -08:00
Wei Wang
575996837c Merge "bootstat: Update boot reason property earlier" 2019-02-08 02:55:13 +00:00
Wei Wang
4e9c653c93 bootstat: Update boot reason property earlier
bootstat updates boot reason upon boot_complete, however users of the
updated properties e.g. getLastShutdownReason from PowerManager could
be called before boot_complete. This introduces a inconsistency and
racing for those APIs.

In this CL, we change boot reason to be updated at the same time when
zygote starts where persist properties have been loaded already. Also
the initialization of bootloader's boot reason is pulled into post-fs
where all kernel command line arguments have been parsed in init already.

Bug: 122696730
Bug: 119509425
Test: trigger thermal shutdown and see warnings
Test: verify boot reason properties updated correctly post boot
Change-Id: Ia393b98ea072bc0ae6e4110d111393b34be0ee5d
Signed-off-by: Wei Wang <wvw@google.com>
2019-02-08 02:55:06 +00:00
Treehugger Robot
708d45979c Merge "meminfo: add tools/dmabufinfo_dump to dmabufinfo" 2019-02-08 02:53:54 +00:00
Jooyung Han
c624621554 Mark libs as double_loadable
libs(libasyncio libmemtrack libprocinfo libusbhost) have
vendor variants and they are also used by LLNDK(libmediandk)
which means these libs can be double-loaded.

deps:
- libmediandk -> libmedia_jni -> libmtp -> libasyncio
- libmediandk -> libmedia_jni -> libandroid_runtime -> libmemtrack
- libmediandk -> libmedia_jni -> libandroid_runtime -> libdebuggerd_client -> libprocinfo
- libmediandk -> libmedia_jni -> libmtp -> libusbhost

Bug: 121280180
Test: m -j
Change-Id: I2c2b5d67cf47b85a2aa8c08f85c7e1a84490cf4e
2019-02-08 11:48:04 +09:00
Treehugger Robot
a0b17a3d8b Merge "vts test for /proc/<pid>/smaps_rollup" 2019-02-08 02:05:55 +00:00
Josh Gao
aa95aa063f adb: hopefully deflake test_adb.py.
The reconnection test is spuriously failing on test infrastructure for
unclear reasons, which might be due to a race between the connection
attempt and the first command we send. Insert a sleep to hopefully
reduce the flakiness.

Bug: http://b/123247844
Test: ./test_adb.py (but it didn't fail for me in the first place)
Change-Id: Ic36924c16bae424accfec700af4623794fd1f123
2019-02-07 17:53:29 -08:00
Erick Reyes
32afafa67e Merge "meminfo: Fix dmabufinfo total ref accounting" 2019-02-08 01:48:01 +00:00
Steven Laver
57a740eca2 Allow properties to be derived from partition-specific properties during init
If not present, ro.product.[brand|device|manufacturer|model|name] and
ro.build.fingerprint will be resolved during init from
partition-specific properties.

Test: booted system image, verified properties
Test: booted recovery image, verified properties
Bug: 120123525
Change-Id: I7fe2793a7d9eb65645d92ceb408f1f050acf9a81
2019-02-07 16:15:55 -08:00
Treehugger Robot
3dbdf65afc Merge "Freshen libsystem/OWNERS" 2019-02-07 22:33:39 +00:00
Josh Gao
4b019a5f25 adb: "support" O_CLOEXEC in adb_open on Windows.
Previously, we were rejecting the flag and failing with EINVAL. File
handles aren't inherited by default, so just ignore the flag.

Bug: http://b/123753498
Test: adb install --streaming foo.apk
Change-Id: I17401fcdd58024956d47a5c4c0c57b06831d9817
2019-02-07 14:23:39 -08:00
Jiyong Park
a2159c493b fs_config supports shell wildcard patterns
It now supports shell wildcard pattern matching using fnmatch(3).

Bug: 123743953
Test: atest libcutils_test
Change-Id: Ib82ae3bf717cbdba267024e1c9d3da004274b95c
2019-02-08 03:53:52 +09:00
Mark Salyzyn
c6a2d7d5cd Merge "fs_mgr: overlayfs: fs_mgr_overlay_setup true if already mounted" 2019-02-07 18:25:55 +00:00
Jesse Hall
9c8e3c3a93 Freshen libsystem/OWNERS
Test: none
Change-Id: I6ce1f28bdc6553910a4e4dafb125d05d9e11035a
2019-02-07 10:19:01 -08:00
Mark Salyzyn
4e3a5f61a4 Merge "fs_mgr: overlayfs support legacy devices (marlin)" 2019-02-07 18:03:55 +00:00
Jiyong Park
186661d135 Merge "Configure /system/apex/com.android.runtime.[debug|release]/bin/*" 2019-02-07 16:08:24 +00:00
Elliott Hughes
5f5ffc8e19 Merge "MappedFile and FileMap should support zero-length mappings." 2019-02-07 15:45:03 +00:00
Martin Stjernholm
a015ad2779 Revert^2 "Enable APEX stubs for libnativeloader."
This reverts commit 5c8c6a90fd.

Reason for revert: Another try with http://r.android.com/892234 in place.

Test: Flash and boot
Bug: 113373927
Change-Id: I508c217a177e9cdd65d8a405d1315aeeacabe18d
2019-02-07 15:23:49 +00:00
Joel Fernandes
3133b695e0 Merge changes from topic "memfd-support"
* changes:
  init: set the sys.use_memfd property to false
  Add support for memfd
2019-02-07 14:17:13 +00:00
Treehugger Robot
d338c1f8e6 Merge "Add some overview docs for classloader-namespace." 2019-02-07 05:35:46 +00:00
Suren Baghdasaryan
3a22225ac6 Merge "libprocessgroup: Fix file mode parsing that requires octal values" 2019-02-07 04:54:28 +00:00
Erick Reyes
c4cac8f17f meminfo: make dmabuf_dump dependency on debugfs optional
dmabuf_dump had a hard dependency on debugfs to gather the initial list
of buffers for all proceses, make it optional.

Change-Id: I1d271297c0ad6124b321a1ee8aa01d3e88ca9fed
Signed-off-by: Erick Reyes <erickreyes@google.com>
2019-02-06 18:47:38 -08:00
Erick Reyes
2f6792e286 libmeminfo: make libdmabufinfo and dmabuf_dump vendor available
Removed dependency on libc++fs and changed liblog to shared linkage to
cope with build errors derived from the change.

Removed dmabuf_dump unnecessary dependencies and made it soc_specific.

Removed reference to std::filesystem::is_symlink to workaround the
following error when linking with the library:

ld.lld: error: undefined symbol:
std::__1::__fs::filesystem::__symlink_status(std::__1::__fs::filesystem::path
const&, std::__1::error_code*)
>>> referenced by filesystem:1743
(external/libcxx/include/filesystem:1743)
>>>
dmabufinfo.o:(android::dmabufinfo::AppendDmaBufInfo(int,
std::__1::vector<android::dmabufinfo::DmaBuffer,
std::__1::allocator<android::dmabufinfo::DmaBuffer> >*)) in archive

Bug: 63860998

Change-Id: Ieafdc87c64f153625df9e21fc8299292b2447aef
Signed-off-by: Erick Reyes <erickreyes@google.com>
2019-02-06 18:47:31 -08:00
Suren Baghdasaryan
40673c9250 Merge "libprocessgroup: Fix cgroup directory ownership setup" 2019-02-07 01:42:00 +00:00
Joel Fernandes
ae7f052328 init: set the sys.use_memfd property to false
The sys.use_memfd property is set by default to false in Android
to temporarily disable memfd, till vendor and apps are ready for it.
The main issue: either apps or vendor processes can directly make ashmem
IOCTLs on FDs they receive by assuming they are ashmem, without going
through libcutils. Such fds could have very well be originally created with
libcutils hence they could be memfd. Thus the IOCTLs will break.

Set default value of sys.use_memfd property to true once the issue is
resolved, so that the code can then self-detect if kernel support is present
on the device. The property can also set to true from adb shell, for
debugging.

Bug: 113362644

Change-Id: I0f572ef36cac2a58fe308ddb90bbeffbecdaed3b
Signed-off-by: Joel Fernandes <joelaf@google.com>
2019-02-07 00:40:22 +00:00