Commit graph

2042 commits

Author SHA1 Message Date
Ryan Haining
9a0804475d Merge "Allow dlopen()ing libraries from the netd APEX on pasan build" am: 0c2d673fcc am: 20f1be47d3
am: 137d547e40

Change-Id: Ibc5647f852ff5793df36bb971bf40dd1128d6ad8
2018-12-28 13:43:59 -08:00
Ken Chen
30200f1e24 Allow dlopen()ing libraries from the netd APEX on pasan build
This is a workaround to allow us to use libnetd_resolv.so from
the resolver APEX before b/120661824 is fixed.

We cannot put the APEX into the search path due to b/120661824,
but we can put it into the permitted path,

Bug: b/122073006
Test: builds, boots
Test: system/netd/tests/runtests.sh
Change-Id: If6f13ba9dc249d019b820a7c37cf6d4cdd8d0a7d
2018-12-28 17:20:01 +08:00
Martin Stjernholm
e7268de040 Merge "Revert^2 "Linker namespace configuration for the Runtime APEX."" am: f679c58787 am: 587ebc4bfb
am: 26b91d0eb4

Change-Id: I9705f4a9d323ba8d0cd5485b2a253b3029a47677
2018-12-21 05:53:45 -08:00
Martin Stjernholm
f679c58787 Merge "Revert^2 "Linker namespace configuration for the Runtime APEX."" 2018-12-21 13:30:22 +00:00
Martin Stjernholm
e71d91e729 Revert^2 "Linker namespace configuration for the Runtime APEX."
This reverts commit a0d9f2fd6c.

Original change: Needs to support e.g. app_process in "default" ->
libnativehelper in "runtime" -> platform libs in "default" -> libc etc in "runtime".

Always make sure to switch namespaces when switching library paths between
/system and the APEX, so that internal library dependencies in both
locations are loaded from their own directory. E.g. libc++ and libbase live
in both places, and their dependents must always load the version they were
compiled with.

This CL also adds a temporary workaround to not break hwasan builds
(b/121038155).

Bug: 119867084
Bug: 113373927
Bug: 121038155
Change-Id: I58d09ed091dd82b2162c4a0b51555174d9322e0e
Test: Flash and reboot device
Test: Remount / read-write, then on device: rm -f system/lib{,64}/lib{c,m,dl}.so; system/bin/dex2oat -h; stop && start
Test: mmma bionic/tests/ && adb root && adb shell rm -rf /data/nativetest\* && adb push out/target/product/taimen/data/nativetest* /data/ && adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests && adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Test: cts-tradefed run commandAndExit cts-dev -m CtsJniTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsCompilationTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsBionicTestCases (8 failures remain unchanged by this CL)
Test: Patch internal; lunch taimen_hwasan-userdebug && m SANITIZE_TARGET=hwaddress && vendor/google/tools/flashall -w && adb shell /vendor/bin/sh -c ls
2018-12-21 11:15:52 +00:00
Dario Freni
7e4dbeb34c Merge "Create staging directory for Staging Manager." am: d1ff11b94a am: 3cde91620f
am: 8ae96c92ef

Change-Id: I60ec39059b60734d1136368eb8fe7c2b24b5df67
2018-12-20 09:35:10 -08:00
Dario Freni
22cdf96697 Create staging directory for Staging Manager.
Staging Manager is a high-level service (yet to be committed) that
manages multi-package sessions requiring a reboot to be applied, for
example if one of the packages is an APEX file. This directory will
contain the session data and the temporary copies of the packages.

Bug: 118865310
Test: N/A
Change-Id: I8aceefab849cf5af17086cb6868b801d1c2615e9
2018-12-20 15:24:18 +00:00
Lorenzo Colitti
3618926adc Merge "Allow dlopen()ing libraries from the netd APEX." am: 95a8d0d0c7 am: e93f1bba90
am: 934b08a013

Change-Id: Ief8c006c230faa1fd6758754a98ba1a39f4bc640
2018-12-19 06:44:16 -08:00
Lorenzo Colitti
472c900f6b Allow dlopen()ing libraries from the netd APEX.
This is a workaround to allow us to use libnetd_resolv.so from
the resolver APEX before b/120661824 is fixed.

We cannot put the APEX into the search path due to b/120661824,
but we can put it into the permitted path,

Test: builds, boots
Test: system/netd/tests/runtests.sh
Test: atest FrameworksNetTests android.net.cts.ConnectivityManagerTest
Change-Id: Ia68df860b7edc92180284f62736146e6029d7655
2018-12-19 16:52:06 +09:00
Andreas Gampe
434e7d6389 Merge "Revert "Linker namespace configuration for the Runtime APEX."" am: ece144857b am: 3138ddb181
am: 3438ac260a

Change-Id: I72166807c00e0d0719519516a484481989a872eb
2018-12-17 15:19:43 -08:00
Treehugger Robot
ece144857b Merge "Revert "Linker namespace configuration for the Runtime APEX."" 2018-12-17 22:55:15 +00:00
Tri Vo
54ed2bfe9e Merge "Reland "Remove obsolete ueventd.rc rules."" am: 80e191af8b am: fbcd5eacd6
am: f051cf7c68

Change-Id: I878464dc0f0e640c16af9c73b000370420ff4c00
2018-12-17 14:38:43 -08:00
Tri Vo
80e191af8b Merge "Reland "Remove obsolete ueventd.rc rules."" 2018-12-17 22:16:36 +00:00
Andreas Gampe
a0d9f2fd6c Revert "Linker namespace configuration for the Runtime APEX."
This reverts commit f1038896ad.

Reason for revert: Breaks CTS

Bug: 119867084
Bug: 113373927
Bug: 121149887
Change-Id: I44b3e708ff1c87520bcfb64f509bf3ae6871f7bc
2018-12-17 21:22:53 +00:00
Neil Fuller
2ebf239807 Merge "Track movement of tz files into the runtime module" am: 7eabef54ee am: 70d9e5f320
am: 1297a544d9

Change-Id: Ieb5e88cba216cf66f5f3e9ae9c92aea314b8e70e
2018-12-15 04:06:22 -08:00
Neil Fuller
7eabef54ee Merge "Track movement of tz files into the runtime module" 2018-12-15 11:25:52 +00:00
Tri Vo
16cdffe8cb Reland "Remove obsolete ueventd.rc rules."
/dev/* nodes referenced in the removed rules are not present on Pixel
devices, i.e. android platform doesn't depend on these nodes. If a
device relies on one of these rules, the rule should be added to the
device-specific ueventd.rc.

v1->v2:
Added back usb-specific rules
/dev/bus/usb/*            0660   root       usb
/dev/mtp_usb              0660   root       mtp

Bug: 110962171
Test: boot walleye
Test: init_tests
Test: wired headset plays audio
Test: USB PTP works between 2 devices
Change-Id: Ic2d77806a01c8918b2485fb5f0bd9b670b01d1df
2018-12-14 14:57:54 -08:00
Neil Fuller
c71a48ba55 Track movement of tz files into the runtime module
The main "base" copy of time zone data is now found in
the runtime module. The system files will likely be deleted.

Test: CTS: run cts -m CtsHostTzDataTests
Test: PTS (cp'd to internal master): run pts -m PtsTimeZoneTestCases
Bug: 116191025
Bug: 119293618
Bug: 113373927
Test: build / boot with logcat inspection
Change-Id: I8dc8ff0d17aac124262d9c7c54abce61d97397e5
2018-12-14 15:32:39 +00:00
Martin Stjernholm
581c9859ee Merge "Linker namespace configuration for the Runtime APEX." am: bd660496c8 am: 49b81b9332
am: ecc3a35e04

Change-Id: I304695b1444d704a759bdd1dd834c7b90d69392a
2018-12-12 08:07:52 -08:00
Martin Stjernholm
f1038896ad Linker namespace configuration for the Runtime APEX.
Needs to support e.g. app_process in "default" -> libnativehelper in
"runtime" -> platform libs in "default" -> libc etc in "runtime".

Always make sure to switch namespaces when switching library paths between
/system and the APEX, so that internal library dependencies in both
locations are loaded from their own directory. E.g. libc++ and libbase live
in both places, and their dependents must always load the version they were
compiled with.

Bug: 119867084,113373927
Test: Flash and reboot device
Test: Remount / read-write, then on device: rm -f system/lib{,64}/lib{c,m,dl}.so; system/bin/dex2oat -h; stop && start
Test: mmma bionic/tests/ && adb root && adb shell rm -rf /data/nativetest\* && adb push out/target/product/taimen/data/nativetest* /data/ && adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests && adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Test: cts-tradefed run commandAndExit cts -m CtsJniTestCases
Change-Id: I6c4fc2f1abea1fb8851546e258ffaaa4ef6fe7d0
2018-12-12 11:44:07 +00:00
Andy Hung
c97fbfb12d Merge "Revert "Remove obsolete ueventd.rc rules."" am: 36b5dd845c am: 5759ca8da2
am: 6e5643c14c

Change-Id: I0916de07e01f3bd30203335274137fc1b7134125
2018-12-11 10:12:24 -08:00
Treehugger Robot
36b5dd845c Merge "Revert "Remove obsolete ueventd.rc rules."" 2018-12-11 17:47:11 +00:00
Roland Levillain
bf95ac9c7b Merge "Revert "Add Android Runtime APEX lib directories to the system linker configuration."" am: c400ced93d am: 1e08eabf7c
am: c3e04a86dc

Change-Id: Icb8d669f76fa702cc93216f8828f39641a24b613
2018-12-11 06:12:06 -08:00
Treehugger Robot
c400ced93d Merge "Revert "Add Android Runtime APEX lib directories to the system linker configuration."" 2018-12-11 13:41:10 +00:00
Roland Levillain
9b79db5ebf Revert "Add Android Runtime APEX lib directories to the system linker configuration."
This reverts commit 2f56b1fff8.

Reason for revert: Breaks bionic-unit-tests's dlfcn.dladdr_libc
and x86 CtsJniTestCases' JniStaticTest.test_linker_namespaces.

Bug: 113373927
Bug: 120661824
Change-Id: I9b34bcb240a42bf99c6d8b58db4b18a4f6d36961
2018-12-11 10:20:33 +00:00
Andy Hung
3fddf92465 Revert "Remove obsolete ueventd.rc rules."
This reverts commit d3b0b2708b.

Reason for revert: Regression in USB audio handling

Test: USB audio playback on Crosshatch
Bug: 120795549
Change-Id: Ibd05cd9b419f3e7988ce24a45f800d4bfe91ef6a
2018-12-11 04:14:30 +00:00
Roland Levillain
5d0c8664b4 Merge "Add Android Runtime APEX lib directories to the system linker configuration." am: d768a0c13d am: 4bcae06f9b
am: 499bab62a6

Change-Id: Ibf3dfed292685475e04b33b59b76ae08042da2c3
2018-12-10 07:36:16 -08:00
Roland Levillain
d768a0c13d Merge "Add Android Runtime APEX lib directories to the system linker configuration." 2018-12-10 15:04:29 +00:00
Andreas Gampe
3269748028 Merge "Revert "Use apex/com.android.resolv/lib64/libned_resolv.so by default"" am: 40f96aff36 am: aac7fa53d4
am: 432a55e432

Change-Id: Ic2c03f96a0a19c361748404146544ea3e36d55dc
2018-12-07 20:51:49 -08:00
Treehugger Robot
40f96aff36 Merge "Revert "Use apex/com.android.resolv/lib64/libned_resolv.so by default"" 2018-12-08 04:36:35 +00:00
Andreas Gampe
d831773ec6 Revert "Use apex/com.android.resolv/lib64/libned_resolv.so by default"
This reverts commit eb4384c2a0.

Reason for revert: Breaks tests

Bug: 119527674
Bug: 120661824
Change-Id: I2f452f25e7b4e070e766b84cdefdf1800244b150
Test: N/A
2018-12-07 21:46:06 +00:00
Tri Vo
e506d78b83 Merge "Remove obsolete ueventd.rc rules." am: dc978cc15b am: f3f10cd4e3
am: 9a24da464f

Change-Id: I4780474daf2aa664f745b277fb576979b39288b4
2018-12-07 10:16:50 -08:00
Tri Vo
dc978cc15b Merge "Remove obsolete ueventd.rc rules." 2018-12-07 17:53:00 +00:00
Tom Cherry
b236eac292 Merge "ueventd: allow configuring SO_RCVBUF(FORCE) for the ueventd socket" am: a64e9e843d am: 7950973b79
am: dac0a6e1c0

Change-Id: I00eb672cc8babac826ce1a4783bb0bcbb55ab424
2018-12-07 08:50:27 -08:00
Tom Cherry
a64e9e843d Merge "ueventd: allow configuring SO_RCVBUF(FORCE) for the ueventd socket" 2018-12-07 16:27:20 +00:00
chenbruce
4980e769d3 Merge "Use apex/com.android.resolv/lib64/libned_resolv.so by default" am: 87e10ba280 am: 518bd1235c
am: 99c85bc053

Change-Id: Ibc074d4d5b8dc5efe51490d78dd498f163b75733
2018-12-06 23:27:54 -08:00
Treehugger Robot
87e10ba280 Merge "Use apex/com.android.resolv/lib64/libned_resolv.so by default" 2018-12-07 06:58:51 +00:00
Tri Vo
d3b0b2708b Remove obsolete ueventd.rc rules.
/dev/* nodes referenced in the removed rules are not present on Pixel
devices, i.e. android platform doesn't depend on these nodes. If a
device relies on one of these rules, the rule should be added to the
device-specific ueventd.rc.

Bug: 110962171
Test: boot walleye
Test: init_tests
Change-Id: I3262475d4ff22386e8da0436efaf98b208e4fa1c
2018-12-06 16:07:20 -08:00
Tom Cherry
e29101077c ueventd: allow configuring SO_RCVBUF(FORCE) for the ueventd socket
Some configurations won't allow ueventd to have CAP_NET_ADMIN, so the
new default size of 16M is not possible for those.  Those
configurations also won't need such a large buffer size, so this
change allows devices to customize the SO_RCVBUF(FORCE) size for the
uevent socket.

This is done by adding the line 'uevent_socket_rcvbuf_size <size>' to
your device's ueventd.rc file.  <size> is specified as a byte count,
for example '16M' is 16MiB.

The last parsed uevent_socket_rcvbuf_size line is the one that is
used.

Bug: 120485624
Test: boot sailfish
Test: ueventd unit tests
Change-Id: If8123b92ca8a9b089ad50318caada2f21bc94707
2018-12-06 13:35:52 -08:00
Tom Cherry
5af4236147 Merge "Fix /init -> /system/bin/init symlink creation race" am: 50f5246352 am: 24d37b9265
am: 7efd2770a0

Change-Id: I4fdbfba827bc95908fcf16133800e89f0c9f576f
2018-12-05 19:41:18 -08:00
Tom Cherry
c12e205ec5 Fix /init -> /system/bin/init symlink creation race
A symlink for TARGET_ROOT_OUT as a post install command of a package
that is also installed to TARGET_ROOT_OUT.  We hijack init.rc which
satisfies this requirement for this symlink.

Bug: 120402274
Bug: 120460755
Bug: 120509320
Bug: 120554662
Test: symlink is created
Test: make bootimage && ls -la $OUT/root/init
Change-Id: I6f1ac06ef152c36d7d7db4618d49a008338da39b
2018-12-05 23:42:07 +00:00
chenbruce
eb4384c2a0 Use apex/com.android.resolv/lib64/libned_resolv.so by default
netd will use apex/com.android.resolv/lib64/libned_resolv.so to replace
system/lib64/libned_resolv.so.
note:Without disabling selinux, we setenv LD_LIBRARY_PATH in netd.rc but
netd couldn't use libnetd_resolv.so under com.android.resolv/lib64 because
LD_LIBRARY_PATH is ignored when AT_SECURE is on. Directly add path to the
libnetd_resolv apex to /system/etc/ld.config.txt for temporarily.

Bug: 119527674
Test: make; flash; lsof -p $(pidof netd)
Change-Id: I011d2da625151bf43c10497bb84c15f3d8e6ad33
2018-12-05 17:25:24 +08:00
Neil Fuller
66d5f13de9 Merge "Add ANDROID_RUNTIME_ROOT environment variable" am: 87aa446d48 am: 8417fced93
am: 9fc9204dc3

Change-Id: I3e6c53f17968b32badf255f40c496ddee2089bb7
2018-12-04 05:35:09 -08:00
Neil Fuller
87aa446d48 Merge "Add ANDROID_RUNTIME_ROOT environment variable" 2018-12-04 12:39:16 +00:00
changho.shin
bc511b421f Merge "Support product partition for non-treblized devices" am: 79bd67bb2f am: 7a6df0832a
am: b1c845d003

Change-Id: I1c00c808f75ed9234f517a52288413673ed4e36b
2018-11-30 01:06:35 -08:00
Neil Fuller
d6e7f88e92 Add ANDROID_RUNTIME_ROOT environment variable
This change adds an ANDROID_RUNTIME_ROOT environment variable
to indicate the root of the Android runtime. This can be
used in place of ANDROID_SYSTEM to locate files when they
move inside the runtime APEX.

Bug: 119935277
Test: build / boot
Change-Id: Ic3b1ae3e3c98eea7d7c59e514ce62994679ab7b7
2018-11-29 16:13:21 +00:00
changho.shin
715b1aab50 Support product partition for non-treblized devices
Non-treblized devices use ld.config.legacy.txt, which does not
support product partition, leading to access denial from/to product partition.
Declare directly /product since search paths are resolved in linker config.

Test: m -j with non-treblized device upgraded to P.
Change-Id: Ic142b807f5dbffdfa5c774b3df8d0903b9626b6a
2018-11-28 17:17:05 +09:00
Siarhei Vishniakou
adace94df3 Merge "Permissions for /dev/uinput" am: 9f96cc20a2 am: e861121536
am: 89e868ddd1

Change-Id: I51cac3be64edb80cd9ba0a9b11f3cb8e5cb30091
2018-11-27 16:26:28 -08:00
Treehugger Robot
9f96cc20a2 Merge "Permissions for /dev/uinput" 2018-11-27 23:52:29 +00:00
Siarhei Vishniakou
e615b2aa76 Permissions for /dev/uinput
Currently /dev/uinput is owned by system/bluetooth.
But that's inconsistent with some of the sepolicies for uhid_device.
This also means that the new native tests for inputflinger aren't able
to execute properly, because they require the ability to register a new
input device via uinput.

Bug: none
Test: atest inputflinger_test
The newly added EventHub_test is still under review

Change-Id: I53524738db1a5d3ba962b9bec35ef322ed3028f2
2018-11-27 11:21:21 -08:00