Commit graph

1953 commits

Author SHA1 Message Date
Treehugger Robot
ece144857b Merge "Revert "Linker namespace configuration for the Runtime APEX."" 2018-12-17 22:55:15 +00: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
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
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
Treehugger Robot
36b5dd845c Merge "Revert "Remove obsolete ueventd.rc rules."" 2018-12-11 17:47:11 +00: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
d768a0c13d Merge "Add Android Runtime APEX lib directories to the system linker configuration." 2018-12-10 15:04:29 +00: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
dc978cc15b Merge "Remove obsolete ueventd.rc rules." 2018-12-07 17:53:00 +00:00
Tom Cherry
a64e9e843d Merge "ueventd: allow configuring SO_RCVBUF(FORCE) for the ueventd socket" 2018-12-07 16:27:20 +00: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
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
87aa446d48 Merge "Add ANDROID_RUNTIME_ROOT environment variable" 2018-12-04 12:39:16 +00: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
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
Roland Levillain
2f56b1fff8 Add Android Runtime APEX lib directories to the system linker configuration.
Test: Device boot test with Android Runtime APEX.
Test: Device boot test without Android Runtime APEX.
Bug: 113373927
Change-Id: Iff32fcd79a667b07df839f4e6ef2cdb3cf70e9d3
2018-11-21 19:41:59 +00:00
Haibo Huang
d60a19b184 Writes cpu variant information to dev/
This change adds a command to init.rc to write cpu variant information to a file under dev/

Test: sync to device and make sure corresponding files are created.
Change-Id: Ibf90967f13f72af925c82ff79bd973ef4cdc4068
2018-11-19 18:57:50 +00:00
Jiyong Park
c240440eec init parses *.rc files from APEXes
Init now parses *.rc files from the APEXs when the apexd notifies the
mount event via apexd.status sysprop.

Bug: 117403679
Test: m apex.test; adb root; adb push <builtfile> /data/apex; adb reboot
adb root; adb shell setprop ctl.start apex.test; dmesg shows that init
tries to start the service which doesn't exist.

[   47.979657] init: Could not ctl.start for 'apex.test': Cannot find '/apex/com.android.example.apex/bin/test': No such file or directory

Change-Id: I3f12355346eeb212eca4de85b6b73257283fa054
2018-11-10 04:18:09 +09:00
Anton Hansson
c38a63646b Create /data/preloads on post-fs-data
This directory is used for preloads that are typically placed in
the system_other image and copied to /data on first boot if the
cppreopts script is installed.

Bug: 80508492
Test: make
Change-Id: I4121b07ee2fc96d533075d1907557de7e4be4ee0
2018-10-24 15:29:16 +01:00
Evgenii Stepanov
d33653a26e Remove bcp_dep.
Since the build system move to kati/ninja, build command is an
implicit dependency of a target. This makes the bcp_dep / bcp_md5
thing obsolete.

Test: make

Change-Id: I4ce9ebdabfc72b188e49f12888054d63b3cda64d
2018-10-22 16:08:01 -07:00
Tom Cherry
f18b748b91 Start logd and service managers during the 'init' trigger
Now that we mount partitions early, services can be started before the
'fs' trigger.  We therefore start the service managers as early as
possible to ensure their transports are online, without device
specific rc files needing to handle that.  We also start logd even
one step earlier to ensure that we capture all possible logd.

Bug: 89689596
Test: logging works for early services, include the servicemanagers
Change-Id: I75dbfcd26eb6fa77f002de10afd00f085c93aa07
2018-10-17 14:21:37 -07:00
Treehugger Robot
03ea74aa91 Merge "Adding /odm/usr -> /vendor/odm/usr symlink" 2018-10-17 00:20:07 +00:00
Bowgo Tsai
15f872aee4 Adding /odm/usr -> /vendor/odm/usr symlink
Bug: 112880217
Test: build and checks symlink is created
Change-Id: Ib9635fc1cd425664cfa8f79d8f034f3cb615cbbc
2018-10-16 18:24:08 +08:00
Treehugger Robot
8e842dd365 Merge "Call markBootAttempt when serice manager available" 2018-10-16 01:45:51 +00:00
Daniel Rosenberg
6156b9b8ba Call markBootAttempt when serice manager available
This causes adds a call the fucntion to decrement the
checkpoint's retry count as soon as service manager is
available.

Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: Ie0a78b1eb05b340718e76175509d1ebefae68017
2018-10-15 22:16:19 +00:00
Elliott Hughes
4b38722c12 rootdir: add ccross to OWNERS.
Bug: N/A
Test: N/A
Change-Id: I285f66a69fa86e03cfc213abc2fe85e938f849df
2018-10-15 14:18:04 -07:00
Evgenii Stepanov
b3bc842750 Merge "Export HWASAN_OPTIONS when SANITIZE_TARGET:=hwaddress" 2018-10-12 21:45:56 +00:00
Evgenii Stepanov
30917f77ba Export HWASAN_OPTIONS when SANITIZE_TARGET:=hwaddress
Bug: 112438058
Test: adb shell env | grep HWASAN_OPTIONS
Change-Id: I6ea4ef03269a7413b97cc62ea5b76597137bd980
2018-10-09 15:33:59 -07:00
Paul Lawrence
b920cb44aa Handle retry count correctly
Test: vdc startCheckpoint 2 then reboot 3 times checking state

Change-Id: I4eeda7f73d82a7c8b2469571fa558df2fac47354
2018-10-08 14:06:06 -07:00
Martijn Coenen
c3b40a5793 Merge "Add /apex tmpfs mount and mount it." 2018-10-04 07:08:54 +00:00
Martijn Coenen
344a91a5f1 Add /apex tmpfs mount and mount it.
APEX filesystem images will now be mounted in /apex.

Also, make sure /data/apex is created with the right ACL.

Bug: 112455435
Test: flash and wipe, /apex is mounted as tmpfs, /data/apex is created
Change-Id: Ie27775e9f40a27b510272f212762624a04e94f1d
2018-10-03 09:48:38 +02:00
Paul Lawrence
786d0b27a2 make checkpointing work on ext4
Test: Test script passes

Change-Id: Iafa337947f2fd456aa692ecb112ccc56638f7947
2018-10-02 10:12:33 -07:00
Martijn Coenen
1e3764575e Merge "init: start apexd as early as we can." 2018-09-26 06:56:26 +00:00
Anton Hansson
ece0a74691 Add product_services support to ld.config.vndk_lite
We're moving apps and their libs to product_services for older
devices too, so mimic the rules in the default ld.config related
to product_services.

Also fix a one-off disparity between /product and /product_services
in ld.config.txt.

Bug: 114804489
Test: m out/target/product/marlin/system/etc/ld.config.vndk_lite
Change-Id: I166275c035c85b4d69cff8e9d51af3d6d0ff4857
2018-09-19 02:53:33 +01:00
Anton Hansson
0244428c8e Update ld config to use build-time determined paths.
A few places had /product and /product_services hardcoded. Update
them to use values that get set at build time.

Bug: 114804489
Test: m out/target/product/marlin/system/etc/ld.config.vndk_lite.txt
Change-Id: Ie48dbb2453ae941c1b5ee57f092d12a5497d878f
2018-09-19 00:47:12 +01:00
Steven Moreland
a285a8416c Merge "Add libbinder_ndk to public.libraries.*" 2018-09-18 15:19:44 +00:00
Steven Moreland
dd8eee871b Add libbinder_ndk to public.libraries.*
Bug: 111445392
Test: atest android.binder.cts.NdkBinderTest
Change-Id: I8ccb1f74654dcb925cd3ac20042cbffd2f594bb9
Merged-In: I8ccb1f74654dcb925cd3ac20042cbffd2f594bb9
2018-09-17 20:05:27 +00:00
Justin Yun
79d07bcfc3 Restore "Check if current ld.config.txt files is backward compatible"
This reverts commit bd2b0c78a1.

Reason for revert:
Solved the build error on mac_sdk build by using python2

Bug: 112738739
Bug: 111417344
Test: make ld.config.txt

Change-Id: Ic5a3ed2e6b091813c0310f859b7d20935514a7c6
2018-09-11 09:45:09 +09:00
Yohei Yukawa
bd2b0c78a1 Revert "Check if current ld.config.txt files is backward compatible"
This reverts commit 15bac6bdaf.

Reason for revert:
This caused build errors in mac_sdk build.
Seems that our mac builders do not have python3.

  env: python3: No such file or directory

Bug: 112738739
Bug: 111417344
Test: presubmit
Change-Id: I9796f2e9a54a66fc7a4e1c780c8c272b98ed437f
2018-09-10 16:40:59 +00:00