Commit Graph

2718 Commits

Author SHA1 Message Date
Hung-ying Tyan 346c17bbc9 Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev 2019-07-12 09:27:01 +00:00
Kiyoung Kim 74c229232c Run linkerconfig from init process
Create linkerconfig tmpfs mount and create ld.config.txt using
linkerconfig during init

Bug: 135004088
Test: m -j & tested from device
Change-Id: Iea30259871ef26d6c04beebf42b17ba7b494db0d
2019-07-12 12:27:11 +09:00
Gerry Fan 891a011394 Revert "rootdir / sdcard : Stop creating /data/media/obb."
This reverts commit c6ca823710.
Reason for revert: Q-GSI on Pie devices would crash kernel.

Bug: 136199978

Change-Id: I16a2cb81a1f21627db0cb00324679a322ba42fe0
2019-07-12 00:16:06 +00:00
Justin Yun fbb4f7a7ce Merge "Rename product_services to system_ext" am: 6da50e319c am: e0b1eb8d65
am: 7cc7b64a44

Change-Id: I9f0d83a714810bed43c7177d3cda4f057450777b
2019-07-11 00:35:11 -07:00
Justin Yun e0b1eb8d65 Merge "Rename product_services to system_ext"
am: 6da50e319c

Change-Id: If9eaecca2382b3ace74ae721e80d51c79bb9b0fb
2019-07-11 00:15:28 -07:00
Justin Yun 6da50e319c Merge "Rename product_services to system_ext" 2019-07-11 05:36:23 +00:00
Jaegeuk Kim 9c11e4a193 rootdir: init.rc: use gc_urgent_sleep_time for f2fs
am: bb0838b511

Change-Id: I94f870ee7330c18272f95d673b678d3a34e53ae3
2019-07-10 16:05:08 -07:00
Jaegeuk Kim bb0838b511 rootdir: init.rc: use gc_urgent_sleep_time for f2fs
This accelerates f2fs GC when IdleMaint.

Bug: 128594671
Bug: 137190790
Change-Id: I1cea7c99ffd5963711c66460f1c8368b43aeaee2
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-07-10 17:02:12 +00:00
Xin Li 3fd963ed5e DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master
Bug: 136196576
Change-Id: I127ae61add2e34184b3c65ca64693cccf62b8a6d
2019-07-09 17:00:47 -07:00
Justin Yun 7eaf9b58ec Rename product_services to system_ext
Update ld.config.txt and init.

Bug: 134359158
Test: make && check boot and ld.config.txt file
Change-Id: Ie1dce42e690414fb45b26759506ea7f64d06740d
2019-07-09 23:34:17 +00:00
Justin Yun 6069891e84 Merge "Rename product_services to system_ext"
am: 5ffffb4f30

Change-Id: I4bdddd6074461f1db7f6be85120ad5f32f45fbb3
2019-07-09 02:15:04 -07:00
Justin Yun 5d0ac62995 Rename product_services to system_ext
Update adb, fastboot and mount point

Bug: 134359158
Test: build and check if system_ext.img can be flashed
Change-Id: I6219f72242c5fe42a508008c0b1fd218d74da5b6
2019-07-09 08:56:53 +00:00
Jooyung Han b7a8f6e0d8 Merge "init: Create /data/apex/hashtree folder at boot" am: 4a8d436ad1
am: 15e01c675c

Change-Id: I5d4d75df534681c39d2095e2c671f95a5897295a
2019-06-18 22:50:38 -07:00
Treehugger Robot 4a8d436ad1 Merge "init: Create /data/apex/hashtree folder at boot" 2019-06-19 04:37:56 +00:00
Daniel Rosenberg 23c454fa3d Merge "Start Vold on early-fs" into qt-dev
am: d6253fc917

Change-Id: I64a4f4a557bf737c0fac1b2f5f94ed28f263ee06
2019-06-18 12:58:08 -07:00
Daniel Rosenberg ca8f5ade91 Merge "Start Vold on early-fs" into qt-dev
am: d6253fc917

Change-Id: Ifc23a45193c3b615f1e64d1ab5b48dfa86aa5df7
2019-06-18 12:55:55 -07:00
Daniel Rosenberg c6e8972588 Start Vold on early-fs
We need vold on early-fs so we can handle userdata checkpointing.
Without this, devices will take an extra minute or two as checkpointing
related vdc calls attempt to reach vold before it is available.

Bug: 134114000
Test: Boot, see vold has started before vdc checkpointing tries to call
      out to vold.
Merged-In: Idfdb304503a163fbb91f9317949eb98c06fecce1
Change-Id: Idfdb304503a163fbb91f9317949eb98c06fecce1
2019-06-18 19:25:56 +00:00
TreeHugger Robot d6253fc917 Merge "Start Vold on early-fs" into qt-dev 2019-06-18 19:17:01 +00:00
Daniel Rosenberg 1be83e30c5 Start Vold on early-fs
We need vold on early-fs so we can handle userdata checkpointing.
Without this, devices will take an extra minute or two as checkpointing
related vdc calls attempt to reach vold before it is available.

Bug: 134114000
Test: Boot, see vold has started before vdc checkpointing tries to call
      out to vold.

Change-Id: Idfdb304503a163fbb91f9317949eb98c06fecce1
2019-06-17 22:30:44 +00:00
Peter Collingbourne c58c10a973 Link the sanitizer runtime libraries to the default unrestricted namespace.
Without this, binaries can't be run out of /data/local/tmp on a HWASANified
device.

Bug: http://b/134503977
Test: Chromium's /data/local/tmp/md5sum/md5sum_bin works on walleye_hwasan-userdebug
Change-Id: Ieceaab8aae0024864022ca42b38aa36e6212cf31
(cherry picked from commit 563ca38154)
2019-06-14 14:57:45 -07:00
Peter Collingbourne 0070e92aff Merge "Link the sanitizer runtime libraries to the default unrestricted namespace." am: 2d620c00f3
am: 41e3b68758

Change-Id: Ie138c5a1373ded873c80312b101eb5738d99a80e
2019-06-13 23:58:03 -07:00
Jooyung Han baa7c13c31 init: Create /data/apex/hashtree folder at boot
/data/apex/hashtree is internal to apexd, hence 0700

Bug: 120058143
Test: m && boot device
Change-Id: I3637a3cbedf871e982e02d50c21e0fe53e6b4824
2019-06-14 15:35:49 +09:00
Peter Collingbourne 563ca38154 Link the sanitizer runtime libraries to the default unrestricted namespace.
Without this, binaries can't be run out of /data/local/tmp on a HWASANified
device.

Test: Chromium's /data/local/tmp/md5sum/md5sum_bin works on walleye_hwasan-userdebug
Change-Id: Ieceaab8aae0024864022ca42b38aa36e6212cf31
2019-06-13 18:50:46 -07:00
Min Yun 702981f54f Merge "Add libcgrouprc to ld.config.txt." into qt-dev
am: 4e5fddd5f5

Change-Id: Ia28f8fb8e68deb24e17504ea8369da61501f0b5b
2019-06-12 15:49:23 -07:00
Jiyong Park 6b5f5a202d Merge "Add libcgrouprc to ld.config.txt." am: 210b56e9a8
am: 875326a506

Change-Id: I502624287fc3cbffb7364c0a6850bae3fc5080f6
2019-06-12 08:35:13 -07:00
Min Yun 8d502fc150 Add libcgrouprc to ld.config.txt.
- In GSI, media.extractor has follow dependency.
media.extractor -> libmpeg2extractor (media ns) ->
libprocessgroup (media ns) -> libcgrouprc (default ns).
If libcgroupsrc can't link from libmpeg2extractor, media.extractor is crashed.

Test: media.extractor didn't die.
Bug: 134981805
Merged-In: I7d3e7e6477708a505b87a884e05cd719f5a3d496
(cherry picked from commit d695733df9)

Change-Id: I7d3e7e6477708a505b87a884e05cd719f5a3d496
2019-06-12 13:56:31 +09:00
Min Yun d695733df9 Add libcgrouprc to ld.config.txt.
- In GSI, media.extractor has follow dependency.
media.extractor -> libmpeg2extractor (media ns) ->
libprocessgroup (media ns) -> libcgrouprc (default ns).
If libcgroupsrc can't link from libmpeg2extractor, media.extractor is crashed.

Test: media.extractor didn't die.
Bug: 134981805
Change-Id: I7d3e7e6477708a505b87a884e05cd719f5a3d496
2019-06-12 11:19:59 +09:00
Neil Fuller 8daada6499 Merge "Switch tzdatacheck to comparing tzdata module file" am: e59703319f
am: 91f35c08cd

Change-Id: I95813932709c8c80d954cb7330793644b11ebaf5
2019-06-10 11:03:24 -07:00
Neil Fuller e59703319f Merge "Switch tzdatacheck to comparing tzdata module file" 2019-06-10 17:40:51 +00:00
Neil Fuller 09bdb325a7 Switch tzdatacheck to comparing tzdata module file
The old "time zone updates via APK" feature installs time zone data
files in /data. tzdatacheck is run during boot to guard against an
OTA leaving the data in /data older, or in a different format, than the
files that exist elsewhere on device. If such files existed the system
could use old versions of tzdb (and related) data or even end up
unstable.

Soon, the time zone data mainline module will be made "functionally
mandatory" by the removal of most time zone data files from the
runtime module APEX, i.e. the time zone data module cannot be absent,
and the runtime module won't have files to compare against.

This change modifies the command line args for tzdatacheck to reference
the contents of time zone data module instead of the runtime module.

Bug: 132168458
Test: Build / boot / inspect logcat
Change-Id: Iac8023b7cbb72213df344d603c121caa867a196f
2019-06-10 11:02:44 +00:00
Tom Cherry 0c10a4c1f5 Merge "init.rc: move rlimit setting earlier" am: acf19e8031
am: c3d485fa1a

Change-Id: If8fe3b572537f360bdb2bd5164a3d7f99af18a35
2019-06-07 09:09:25 -07:00
Tom Cherry acf19e8031 Merge "init.rc: move rlimit setting earlier" 2019-06-07 15:59:40 +00:00
Martin Stjernholm 308fa0b38d Merge "Update TODOs for ICU library links." am: b78de85272
am: 419a3fa241

Change-Id: Ia17d7b5e8a44395aa88d11b4b0fd77146c816a4c
2019-06-06 19:29:20 -07:00
Tom Cherry fdeca99c4b init.rc: move rlimit setting earlier
There is no reason that rlimits cannot be set earlier than they are,
and apexd-bootstrap may want to set the priority service option, which
would require that these rlimits have been set, so we move these to
the beginning of early-init.

Bug: 134668377
Test: apexd-bootstrap can set the priorty service option
Change-Id: I8040190cd4dc5e141784496ae65cfab80d9cad53
2019-06-06 18:18:14 +00:00
Martin Stjernholm 0d28abc5b1 Update TODOs for ICU library links.
Test: Presubmit boot test
Bug: 120786417
Bug: 134659294
Change-Id: I362e0e67c5adfd510dda12bed52629af92bfcc3d
2019-06-06 14:11:04 +01:00
Peter Collingbourne 3bdd3cfab6 Link the "runtime" namespace to more namespaces.
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved
to the runtime APEX. It is apparently the first LL-NDK library in the runtime
APEX that does not require a legacy symlink in /system/${LIB}. Therefore we
need to link the HWASAN runtime in the runtime namespace to various namespaces
so that the library can be loaded from outside of the namespace.

Also, add $SANITIZER_RUNTIME_LIBRARIES to
namespace.default.link.system.shared_libs. This is necessary because in
the accompanying Soong change, we cause the HWASAN runtime to be removed
from $LLNDK_LIBRARIES. In most cases, except for this one, this was a no-op
because we were already including both sets of libraries in shared_libs.

Bug: http://b/134503977
Test: Builds

Change-Id: I67d64788855d28f3a156a1b9cf8a897617277730
Merged-In: I67d64788855d28f3a156a1b9cf8a897617277730
(cherry picked from commit fb1c5a724e)
2019-06-06 02:12:30 -07:00
Narayan Kamath 66fe4cc16a rootdir / sdcard : Stop creating /data/media/obb.
am: c6ca823710

Change-Id: I9771c08e1e9195956196c2404fb2876ad29199b6
2019-05-24 04:24:32 -07:00
Narayan Kamath c6ca823710 rootdir / sdcard : Stop creating /data/media/obb.
This directory is no longer used. OBB content is
placed in /data/media/$user/Android.

Test: make
Test: manually verify the path doesn't exist.
Bug: 129167772

Change-Id: I8549826586b9a68c8cfa3fe2e51295363f9b4e11
2019-05-23 15:09:54 +01:00
Victor Chang 28904625b8 Merge "Allow linking to libicuuc.so and libicui18n.so from executable in /data" into qt-dev 2019-05-22 15:43:44 +00:00
Peter Collingbourne b9b9d3754c Merge "Link the "runtime" namespace to more namespaces." am: 3e48b66578
am: 1b9a1c20db

Change-Id: Ic33fc84d752fa3fd487401f348be38c7531bfdea
2019-05-20 21:51:24 -07:00
Peter Collingbourne 3e48b66578 Merge "Link the "runtime" namespace to more namespaces." 2019-05-21 02:29:46 +00:00
Victor Chang 32190f45e0 Allow linking to libicuuc.so and libicui18n.so from executable in /data
Executable in /data/ runs in default linker namespace, not
classloader namespace.
In Q, we moved libicuuc.so and libicui18n into the runtime
namespace, and allow linking from runtime namespace and classloader
namespace.

This change further allows linking from default namespace, and tries
to fix the regression temporarily.

Bug: 130788466
Test: The app issue is fixed after this CL
Merged-In: Ifae52b554124514e433cfe78875643a7450fbabd
Change-Id: Ifae52b554124514e433cfe78875643a7450fbabd
(cherry picked from commit 0c7edece94)
2019-05-20 11:59:51 +01:00
vichang 17db1bef04 Merge "Allow linking to libicuuc.so and libicui18n.so from executable in /data" am: de725e6e75
am: 5c75fb81e8

Change-Id: I7bc0ba6a06d7b32c6de61d14658c4c3e9f43d417
2019-05-20 03:08:58 -07:00
vichang de725e6e75 Merge "Allow linking to libicuuc.so and libicui18n.so from executable in /data" 2019-05-20 09:49:21 +00:00
Alistair Strachan 85ee72f0ef Merge "Add asan.permitted.paths for the media namespace" into qt-dev
am: 9924f7ee2d

Change-Id: Ia49e3e6a5d3f49c53bbbcf5c6d8e412ae3e1285e
2019-05-16 07:55:56 -07:00
Jiyong Park 78e6b181ac Add asan.permitted.paths for the media namespace
Permitted paths were empty for ASAN builds with the media namespace.

Bug: 131625115
Test: no dlopen failure on libflacextractor.so in aosp_cf_x86_pasan
Change-Id: I90050fc54820ba68d64931412572f3b0954e6616
2019-05-15 12:41:01 +09:00
Victor Chang 0c7edece94 Allow linking to libicuuc.so and libicui18n.so from executable in /data
Executable in /data/ runs in default linker namespace, not
classloader namespace.
In Q, we moved libicuuc.so and libicui18n into the runtime
namespace, and allow linking from runtime namespace and classloader
namespace.

This change further allows linking from default namespace, and tries
to fix the regression temporarily.

Bug: 130788466
Test: The app issue is fixed after this CL
Change-Id: Ifae52b554124514e433cfe78875643a7450fbabd
2019-05-14 20:22:34 +01:00
Michael Groover 69277fb9c5 Merge "Notify the framework when an adb key is authorized" into qt-dev
am: b9c555e2cf

Change-Id: I664ba3acfb8295ccf7b773e07d2d007ff942bc40
2019-05-10 17:21:47 -07:00
Michael Groover b9c555e2cf Merge "Notify the framework when an adb key is authorized" into qt-dev 2019-05-10 22:54:55 +00:00
Tao Bao c61ef45379 DO NOT MERGE Start update_verifier early in late-fs.
We used to start update_verifier after mounting userdata (post-fs-data),
as part of zygote-start. This leads to issues in practice for security
updates, where an A/B device falls back into the old slot (for any
reason, which unrelates to this change) but failing to boot due to
upgraded key blob. It essentially breaks the fallback capability offered
by A/B OTA.

This CL mitigates the issue by starting update_verifier early, before
mounting userdata. This avoids the device from falling back to the old
slot with an already-upgraded key blob. update_verifier loses the
opportunity of verifying _all_ the updated blocks based on the info
that's stored in userdata.  Instead it will only trigger the minimal
read to finish the work of marking a successful boot. This is a
trade-off in P to avoid putting the device in a bad state after
fallback, which will be improved in Q by better handling the fallback
path in vold.

Bug: 131176531
Test: Flash and boot crosshatch. Check the start of update_verifier and
      it marks a successful boot.
Change-Id: I3f4c4333ff38772a9a93c9d027d497db11de1d63
(cherry picked from commit 79cfc7d5a8)
2019-05-10 21:52:50 +00:00
Michael Groover 7eeda6ba03 Notify the framework when an adb key is authorized
Bug: 124076524
Test: atest AdbDebuggingManagerTest
Change-Id: If73b81ca73ba4d64763cf49c1bbe42de81fa1cb6
2019-05-09 16:05:40 -07:00
Rick Yiu c7bf1a01fd Apply initial settings for blkio cgroup
Bug: 117857342
Test: values are applied
Change-Id: Id28d9619fc2fd2287fe656b8032025184ae7f631
(cherry picked from commit a8aaf198d5)
Merged-In: Id28d9619fc2fd2287fe656b8032025184ae7f631
2019-05-09 03:14:11 +00:00
Rick Yiu 6353cb738f Merge "Apply initial settings for blkio cgroup" am: 9243da9008
am: c78c3be5cf

Change-Id: Iae287bef4afefc27e5f52d86234a46e698f172ee
2019-05-07 01:33:10 -07:00
Treehugger Robot 9243da9008 Merge "Apply initial settings for blkio cgroup" 2019-05-07 08:15:35 +00:00
Martijn Coenen fc78be2935 Merge "Support for stopping/starting post-data-mount class subsets." 2019-05-07 06:41:01 +00:00
Rick Yiu a8aaf198d5 Apply initial settings for blkio cgroup
Bug: 111422845
Test: values are applied
Change-Id: Id28d9619fc2fd2287fe656b8032025184ae7f631
2019-05-03 11:58:13 +08:00
Martin Stjernholm 2a371889e5 Merge "Reland: Fix libnativeloader to correctly link to the platform namespace." am: 2d3becd361
am: 547c7b6d44

Change-Id: I7d7f820443f1709b46a5ab7b368656b079529bbb
2019-05-02 03:56:36 -07:00
Peter Collingbourne fb1c5a724e Link the "runtime" namespace to more namespaces.
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved
to the runtime APEX. It is apparently the first LL-NDK library in the runtime
APEX that does not require a legacy symlink in /system/${LIB}. Therefore we
need to link the HWASAN runtime in the runtime namespace to various namespaces
so that the library can be loaded from outside of the namespace.

Also, add $SANITIZER_RUNTIME_LIBRARIES to
namespace.default.link.system.shared_libs. This is necessary because in
the accompanying Soong change, we cause the HWASAN runtime to be removed
from $LLNDK_LIBRARIES. In most cases, except for this one, this was a no-op
because we were already including both sets of libraries in shared_libs.

Change-Id: I67d64788855d28f3a156a1b9cf8a897617277730
2019-05-01 18:00:33 -07:00
Martijn Coenen 534ad2851a Merge "Support for stopping/starting post-data-mount class subsets." into qt-dev
am: 7a2d54df84

Change-Id: I6abe761f548837728baadd9ee8a1d57f4be55679
2019-05-01 12:42:28 -07:00
Martin Stjernholm c57ed29dd5 Reland: Fix libnativeloader to correctly link to the platform namespace.
This relands http://r.android.com/951440:

This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".

Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.

Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.

Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Test: lunch aosp_cf_x86_phone-eng;
  atest android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile \
    com.android.cts.dexmetadata.InstallDexMetadataHostTest#testProfileSnapshotAfterInstall \
    installd_dexopt_test
Bug: 130293232
Bug: 121117762
Change-Id: I3d9f2102a03e83843e15bc78b5ad347220c52769
2019-05-01 16:46:06 +01:00
Martin Stjernholm 74950c035d Merge "Add linker entries for the new libdexfiled_external.so." am: cc30f4d7dd
am: a36eda0e18

Change-Id: I0f260d303bb305500ea71d0e3158a7d76cc1e850
2019-05-01 07:55:44 -07:00
Martin Stjernholm 8a50dad467 Add linker entries for the new libdexfiled_external.so.
Follow up to http://r.android.com/943476. This library is only available in
debug builds of the Runtime APEX.

Test: Flash and boot with eng build
Change-Id: I260f9b838f44ba3f8976c117d9e42fc456239e88
2019-04-30 16:11:30 +01:00
Martin Stjernholm 8dc3adfb2c Merge "Revert "Fix libnativeloader to correctly link to the platform namespace."" am: 68cf801ad9
am: affe1f2617

Change-Id: Ide5ec7791838db081c666f7aa7a137a92e4be460
2019-04-29 17:41:28 -07:00
Martin Stjernholm b9259a9cbe Revert "Fix libnativeloader to correctly link to the platform namespace."
This reverts commit 4ca0ca67bf.

Reason for revert: Breaks android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile and others: http://g/art-team/R2nEDA1Ka_s

Change-Id: Ia6285648133d21e61040efafc73cac97d702a7c4
2019-04-29 20:57:16 +00:00
Martin Stjernholm 71a0804f95 Merge "Fix libnativeloader to correctly link to the platform namespace." am: bce25d2363
am: 487b5784b6

Change-Id: I8b96f74250d2dc2f42e2392c8b8705e5d3fd95bc
2019-04-29 08:27:05 -07:00
Martin Stjernholm 4ca0ca67bf Fix libnativeloader to correctly link to the platform namespace.
This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".

Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.

Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.

Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Bug: 130293232
Bug: 121117762
Change-Id: I7ebaf5370dd0f533b1bb5f0e67e7c3c1df48e512
2019-04-29 13:09:08 +01:00
Martijn Coenen 70788f93ba Support for stopping/starting post-data-mount class subsets.
On devices that use FDE and APEX at the same time, we need to bring up a
minimal framework to be able to mount the /data partition. During this
period, a tmpfs /data filesystem is created, which doesn't contain any
of the updated APEXEs. As a consequence, all those processes will be
using the APEXes from the /system partition.

This is obviously not desired, as APEXes in /system may be old and/or
contain security issues. Additionally, it would create a difference
between FBE and FDE devices at runtime.

Ideally, we restart all processes that have started after we created the
tmpfs /data. We can't (re)start based on class names alone, because some
classes (eg 'hal') contain services that are required to start apexd
itself and that shouldn't be killed (eg the graphics HAL).

To address this, keep track of which processes are started after /data
is mounted, with a new 'mark_post_data' keyword. Additionally, create
'class_reset_post_data', which resets all services in the class that
were created after the initial /data mount, and 'class_start_post_data',
which starts all services in the class that were started after /data was
mounted.

On a device with FBE, these keywords wouldn't be used; on a device with
FDE, we'd use them to bring down the right processes after the user has
entered the correct secret, and restart them.

Bug: 118485723
Test: manually verified process list
Change-Id: I16adb776dacf1dd1feeaff9e60639b99899905eb
2019-04-26 14:04:59 +02:00
Martijn Coenen f0bc58a42d Support for stopping/starting post-data-mount class subsets.
On devices that use FDE and APEX at the same time, we need to bring up a
minimal framework to be able to mount the /data partition. During this
period, a tmpfs /data filesystem is created, which doesn't contain any
of the updated APEXEs. As a consequence, all those processes will be
using the APEXes from the /system partition.

This is obviously not desired, as APEXes in /system may be old and/or
contain security issues. Additionally, it would create a difference
between FBE and FDE devices at runtime.

Ideally, we restart all processes that have started after we created the
tmpfs /data. We can't (re)start based on class names alone, because some
classes (eg 'hal') contain services that are required to start apexd
itself and that shouldn't be killed (eg the graphics HAL).

To address this, keep track of which processes are started after /data
is mounted, with a new 'mark_post_data' keyword. Additionally, create
'class_reset_post_data', which resets all services in the class that
were created after the initial /data mount, and 'class_start_post_data',
which starts all services in the class that were started after /data was
mounted.

On a device with FBE, these keywords wouldn't be used; on a device with
FDE, we'd use them to bring down the right processes after the user has
entered the correct secret, and restart them.

Bug: 118485723
Test: manually verified process list
Change-Id: I16adb776dacf1dd1feeaff9e60639b99899905eb
2019-04-26 11:54:19 +02:00
Dongwon Kang b0bdf2685b Merge "Fix a warning on namespace.media.link.default.shared_libs" am: 4b43299132
am: 47a38645c4

Change-Id: I9101d639351cfb184a4f7f049f1bad3a13c2f9d9
2019-04-24 16:36:39 -07:00
Dongwon Kang a04e48dbec Merge "Fix a warning on namespace.media.link.default.shared_libs" into qt-dev 2019-04-24 17:57:14 +00:00
Dongwon Kang 5744cc4e99 Fix a warning on namespace.media.link.default.shared_libs
Test: build & dumpsys media.extractor
Bug: 130882530
Change-Id: Ifd46858b5a864f0fbed87baa3321f233ea12954e
Merged-In: Ifd46858b5a864f0fbed87baa3321f233ea12954e
2019-04-23 23:15:24 +00:00
Dongwon Kang 9d7a979a99 Fix a warning on namespace.media.link.default.shared_libs
Test: build & dumpsys media.extractor
Bug: 130882530
Change-Id: Ifd46858b5a864f0fbed87baa3321f233ea12954e
2019-04-23 14:56:21 -07:00
TreeHugger Robot 347f1ccf4b Merge "Adding adb_debug.prop into debug ramdisk" into qt-dev 2019-04-23 16:30:24 +00:00
Bowgo Tsai 6386c3207b Adding adb_debug.prop into debug ramdisk
The debug ramdisk can only be used if the device is unlocked.
When it's used, init will load adb_debug.prop and the userdebug
sepolicy from the debug ramdisk, to allow adb root on a user build.

Bug: 126493225
Test: 'make' and checks the file is installed
Change-Id: Id6962414197fc8f47f7c07818e8fb16107dc17a3
Merged-In: Id6962414197fc8f47f7c07818e8fb16107dc17a3
(cherry picked from commit 05f07d89a6)
2019-04-23 11:13:46 +08:00
Bowgo Tsai 1c3bf03121 Merge "Adding adb_debug.prop into debug ramdisk" am: 2ddb8df2ef
am: 8c1ea2ba7b

Change-Id: Ie0e9ee248236b9aab8b3dfbdc46bcbbe4ca2c993
2019-04-22 19:28:26 -07:00
Treehugger Robot 2ddb8df2ef Merge "Adding adb_debug.prop into debug ramdisk" 2019-04-23 02:01:36 +00:00
Wei Wang ec78cca331 init.rc: set fsck log permission on post-fs-data
Fixes: 130829745
Test: build and trigger fsck
      crosshatch:/ # ls -l /dev/fscklogs/log
      -rwxrwx--- 1 root system 1584 1970-04-08 14:48 /dev/fscklogs/log
Change-Id: Ifd0734e121d07b941a73d7cabde04928ce5e5c59
Merged-In: Ifd0734e121d07b941a73d7cabde04928ce5e5c59
2019-04-22 18:24:55 -07:00
Bowgo Tsai 05f07d89a6 Adding adb_debug.prop into debug ramdisk
The debug ramdisk can only be used if the device is unlocked.
When it's used, init will load adb_debug.prop and the userdebug
sepolicy from the debug ramdisk, to allow adb root on a user build.

Bug: 126493225
Test: 'make' and checks the file is installed
Change-Id: Id6962414197fc8f47f7c07818e8fb16107dc17a3
2019-04-20 06:08:51 +00:00
Wei Wang 3251fb09a8 Merge "init.rc: set fsck log permission on post-fs-data" am: e7d0c83d3c
am: d830060459

Change-Id: I3dab19fc19f47d43ca0c28b56e2abf34c4d502a8
2019-04-19 18:13:46 -07:00
Bowgo Tsai 619e646ec2 Merge "Copying debug ramdisk files to /debug_ramdisk/*" am: 72d8d2f2c6
am: b1eba916f1

Change-Id: I93308b3ef9f969031ebe86ef973d81680736a7b3
2019-04-19 17:46:24 -07:00
Treehugger Robot e7d0c83d3c Merge "init.rc: set fsck log permission on post-fs-data" 2019-04-20 00:12:47 +00:00
Bowgo Tsai 630fcdf153 Copying debug ramdisk files to /debug_ramdisk/*
In previous implementation, userdebug sepoilcy and property files are
loaded from the system.img. This CL changes this to:

  - first-stage init copies userdebug files from ramdisk to /debug_ramisk/*
  - second-stage init loads files from /debug_ramdisk/*.

Note: same as before, the above can only be triggered, if the device
is UNLOCKED

With this, we don't have to put userdebug related files into the USER
system.img.

Bug: 126493225
Test: boot device with a ramdisk with /force_debuggable, checks related
      files are loaded
Change-Id: I63f5f846e82ba78427062bf7615c26173878d8f3
Merged-In: I63f5f846e82ba78427062bf7615c26173878d8f3
(cherry picked from commit 30afda71c0)
2019-04-20 08:01:06 +08:00
Treehugger Robot 72d8d2f2c6 Merge "Copying debug ramdisk files to /debug_ramdisk/*" 2019-04-19 23:54:53 +00:00
Wei Wang a91c5f700e init.rc: set fsck log permission on post-fs-data
Fixes: 130829745
Test: build and trigger fsck
      crosshatch:/ # ls -l /dev/fscklogs/log
      -rwxrwx--- 1 root system 1584 1970-04-08 14:48 /dev/fscklogs/log
Change-Id: Ifd0734e121d07b941a73d7cabde04928ce5e5c59
2019-04-19 11:46:21 -07:00
Wei Wang 50b7b4c113 Merge "init: set oom_adj early before fork vendor_init" into qt-dev 2019-04-19 17:13:39 +00:00
Wei Wang 011f5a20d2 Merge "init: set oom_adj early before fork vendor_init" am: a7c103eb8e
am: 099ffa2f37

Change-Id: I8882ccf5f3532fd5da9b6d20bb019a10d65fd86b
2019-04-18 19:46:18 -07:00
Treehugger Robot a7c103eb8e Merge "init: set oom_adj early before fork vendor_init" 2019-04-19 02:17:50 +00:00
Bowgo Tsai 30afda71c0 Copying debug ramdisk files to /debug_ramdisk/*
In previous implementation, userdebug sepoilcy and property files are
loaded from the system.img. This CL changes this to:

  - first-stage init copies userdebug files from ramdisk to /debug_ramisk/*
  - second-stage init loads files from /debug_ramdisk/*.

Note: same as before, the above can only be triggered, if the device
is UNLOCKED

With this, we don't have to put userdebug related files into the USER
system.img.

Bug: 126493225
Test: boot device with a ramdisk with /force_debuggable, checks related
      files are loaded
Change-Id: I63f5f846e82ba78427062bf7615c26173878d8f3
2019-04-19 09:56:14 +08:00
Wei Wang bb2bc1586d init: set oom_adj early before fork vendor_init
right now vendor_init is forked before we set oom_adj for init which
leaves a chance vendor_init could be killed in heavy memory pressure.

this CL set the oom_adj before forking everything to ensure all native
have correct oom_adj settings.

Fixes: 130824864
Test: procrank -o

(cherry picked from commit 45d8174fe7)

Change-Id: I68c18f9db24d55239f7f0608592fcc702f04542e
2019-04-18 16:31:11 -07:00
Wei Wang 45d8174fe7 init: set oom_adj early before fork vendor_init
right now vendor_init is forked before we set oom_adj for init which
leaves a chance vendor_init could be killed in heavy memory pressure.

this CL set the oom_adj before forking everything to ensure all native
have correct oom_adj settings.

Fixes: 130824864
Test: procrank -o
Change-Id: I8af129076c3efa29f7b781459449f8f2dc853c98
2019-04-18 16:14:08 -07:00
Dongwon Kang aa952fa545 Merge "Remove libandroid.so from media namespace." 2019-04-18 20:54:40 +00:00
Dongwon Kang f34a08f8b7 Merge "Remove libandroid.so from media namespace." into qt-dev
am: 2b107b8b6b

Change-Id: I5b83476196221d71db4137b4cbc2a3f5f786c3b3
2019-04-18 10:30:23 -07:00
Tom Cherry fbb2c91647 Merge "Do not create /sbin" am: 3016f2527c
am: b4f982146d

Change-Id: I7c166420b514f5b1951a0ba841bec670589c9d21
2019-04-17 17:08:36 -07:00
Dongwon Kang 4b2b76e101 Remove libandroid.so from media namespace.
Test: adb shell dumpsys media.extractor
Bug: 130637522
Change-Id: I6bcdac60a740d19a97bbac19e6339e0552b0d572
Merged-In: Ia6366834613d1e12498fa90377e79f62a2149776
2019-04-17 18:05:51 +00:00
Dongwon Kang a8e4b89768 Remove libandroid.so from media namespace.
Test: adb shell dumpsys media.extractor
Bug: 130637522
Change-Id: Ia6366834613d1e12498fa90377e79f62a2149776
2019-04-17 10:47:33 -07:00
Tom Cherry 3ec821fcfb Do not create /sbin
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.

Bug: 73660730
Test: build
Change-Id: I0d0aa052e1eaf529d18921c45169473df0ee51ff
2019-04-16 15:22:33 -07:00
Martin Stjernholm b6adac48f8 Merge "Describe the reason for the allow_all_shared_libs from the runtime namespace better." am: 8a9a1c5056
am: 49492bc586

Change-Id: Ie4f29ea47b8af4b8e9fd4f0deacbaf1d10b5ab4a
2019-04-12 09:07:23 -07:00
Martin Stjernholm 609236f66c Describe the reason for the allow_all_shared_libs from the runtime namespace
better.

Test: N/A - comment change only
Bug: 119867084
Change-Id: I80743236f95cedc43b8f80ac32a09ac0094f779e
2019-04-11 13:54:44 +01:00
Yifan Hong 1710e7e7bd Merge "charger: Allow to rw /sys/power/[state,wakeup_count]" into qt-dev
am: 83e52ce905

Change-Id: I1b6ccdda49904869767bbfc62c29da6a00892978
2019-04-09 22:13:10 -07:00
Yifan Hong 122e78248e charger: Allow to rw /sys/power/[state,wakeup_count]
charger needs to suspend the device when the power goes away
when it doesn't have root. These two files are marked with
group system, user system, mode 0600 in 'on boot', but
it is not executed in charger. Hence, move these actions
to 'on init'.

Test: no failure in libsuspend in charger

Bug: 129138950

Change-Id: I787b935b4ff6177601329aeedccdac361b119ca3
Merged-In: I787b935b4ff6177601329aeedccdac361b119ca3
2019-04-09 13:35:07 -07:00
Yifan Hong c9a9d279ef charger: Allow to rw /sys/power/[state,wakeup_count]
charger needs to suspend the device when the power goes away
when it doesn't have root. These two files are marked with
group system, user system, mode 0600 in 'on boot', but
it is not executed in charger. Hence, move these actions
to 'on init'.

Test: no failure in libsuspend in charger

Bug: 129138950

Change-Id: I787b935b4ff6177601329aeedccdac361b119ca3
2019-04-09 13:13:33 -07:00
Oliver Nguyen 9399245480 Merge "Move gcov output to /data/misc/trace" am: 3a6a01bdee
am: af4a358461

Change-Id: I3274fab9240b86b5121daa4ace529eb6a562ec83
2019-04-08 11:56:28 -07:00
Victor Hsieh b85e4ab41f Merge "Do not restrict .fs-verity keyring in debuggable build" am: be51525424
am: 0cf9bfd4a6

Change-Id: If032a3d33f149ca6aa2fb809e13025a14398e245
2019-04-05 11:20:09 -07:00
Oliver Nguyen 3a6a01bdee Merge "Move gcov output to /data/misc/trace" 2019-04-05 18:11:30 +00:00
Victor Hsieh 851026d569 Do not restrict .fs-verity keyring in debuggable build
Test: add logs, see expected behavior
Bug: 112038861
Change-Id: Ib133d2206a7696caaf42ab5f0a6d79aa5308b332
2019-04-04 16:48:57 -07:00
Oliver Nguyen 360eb055e0 Move gcov output to /data/misc/trace
Gcov output location has world write on debuggable builds.

Test: N/A
Bug: 128524141
Change-Id: Ia6b94e26352dd66f5c6819f6157b4b73dd777a90
2019-04-04 13:57:59 -07:00
Yifan Hong bd5853cb48 Merge changes from topic "libprocessgroup_rc"
* changes:
  CgroupSetupCgroups -> CgroupSetup
  Add libcgrouprc to ld.config.*.txt.
  libprocessgroup: use libcgrouprc to read cgroup.rc
  libprocessgroup_setup: use libcgrouprc_format
  libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
  libprocessgroup: Add libcgrouprc
  libprocessgroup: Add libcgrouprc_format
2019-04-03 16:41:21 +00:00
Yifan Hong 063b6beef0 Add libcgrouprc to ld.config.*.txt.
Test: boots (sanity)
Bug: 123664216
Change-Id: I23c3ece44816e4e213f9630b915e19978a259823
Merged-In: I23c3ece44816e4e213f9630b915e19978a259823
2019-04-02 22:31:57 -07:00
Yifan Hong 169a3e6095 Add libcgrouprc to ld.config.*.txt.
Test: boots (sanity)
Bug: 123664216
Change-Id: I23c3ece44816e4e213f9630b915e19978a259823
2019-04-02 17:34:37 -07:00
Jiyong Park 28429ff8c1 Merge "Search rs namespace prior to vndk namespace" am: 5ccb6a5cdc am: 8b524e9b45
am: deeedf9783

Change-Id: Id1f3e8d310bd1b8f3b7c67e0ab7485d96fd541bb
2019-04-02 01:47:06 -07:00
Treehugger Robot 5ccb6a5cdc Merge "Search rs namespace prior to vndk namespace" 2019-04-02 08:24:42 +00:00
Jiyong Park fa4971f3c3 Search rs namespace prior to vndk namespace
With the recent change that removed get_exported_namespace out of libdl,
the RenderScript SP-HAL stopped using android_dlopen_ext which it used
to load libRS_internal.so in the "rs" namespace. Instead, it now falls
back to the ordinary dlopen() call. The dlopen() call tries to load the
lib in the current namespace (which is sphal) and then falls back to the
linked namespaces: default, vndk, rs.

The problem is that rs is listed as the last namespace and therefore the
linker tries the namespace only when it failed to load the library in
other namespaces: default and vndk. libRS_internal.so is accessible to
both vndk and rs namespaces. So, the dlopen() call always goes into the
vndk namespace and there is no chance for the lib to be loaded in the rs
namespace.

To fix the problem, the rs namespace is placed before vndk so that the
namespace is tried first.

Bug: 129550847
Test: runtest -x cts/tests/camera/src/android/hardware/
Change-Id: Idafc32f8a309dd12495768931d7ea17a2f791c50
2019-04-02 02:43:23 +00:00
Jaegeuk Kim cc563077bf Merge "init.rc: tune F2FS to be aligned to system settings" am: 99ba4b36e8 am: d2060b771d
am: e727f6612c

Change-Id: I7a6b250ebb79baf726de6f6493fc2f11262682c4
2019-04-01 09:34:17 -07:00
Treehugger Robot 99ba4b36e8 Merge "init.rc: tune F2FS to be aligned to system settings" 2019-04-01 16:10:28 +00:00
Bowgo Tsai d03dfdf984 Merge "Adding GSI public keys" am: ddaf736a88 am: aea89ed3ea
am: 7e4834ce7f

Change-Id: If46aa415528d998afc4fbac7a2d6992fc285045d
2019-04-01 07:14:57 -07:00
Treehugger Robot ddaf736a88 Merge "Adding GSI public keys" 2019-04-01 13:43:34 +00:00
Bowgo Tsai 5fdd7861bb Adding GSI public keys
This CL adds three GSI keys, to allow booting a GSI with AVB
to enable dm-verity.

   https://android.googlesource.com/platform/external/avb/

The keys for R and S GSI is to allow a device boots a new
version of GSI in a Treble-compatible manner.

For more information about GSI, please visit:

    https://source.android.com/setup/build/gsi

Bug: 112293933
Test: m q-gsi.avbpubkey r-gsi.avbpubkey s-gsi.avbpubkey
Change-Id: I4439e44fbd5da3240d7f6c7987f66445ec4590c5
2019-03-30 03:07:31 +00:00
Jaegeuk Kim f65df964c0 init.rc: tune F2FS to be aligned to system settings
Android sets /proc/sys/vm/dirty_expire_centisecs to 200, so f2fs
doesn't need to do checkpoint in 60 seconds.

Bug: 127511432
Change-Id: I2ba0623053d4480b82003eb1cca85ff03c61fc0f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-03-29 22:43:29 +00:00
Suren Baghdasaryan f33436d720 Merge "Set /proc/pressure/memory file permissions" am: 3cf9850cef am: e337910a35
am: d8a1ee860c

Change-Id: I46d066d35a97a0d0fc01240c58a8060a40d6cea7
2019-03-29 13:36:57 -07:00
Tim Murray 1504cb5b6e Set /proc/pressure/memory file permissions
Change access mode and ownership for /proc/pressure/memory file
to allow system components access memory pressure information.

Bug: 129476847
Change-Id: I25b6bc9d47aee857936f050b66e7bee6363b53be
Signed-off-by: Tim Murray <timmurray@google.com>
2019-03-28 22:12:06 +00:00
Martin Stjernholm d2c8014b13 Merge "Apply the standard system linker config to all of /data." am: 60de348654 am: 0ec4836b71
am: e7540ff272

Change-Id: I928e2d7f4e274d753a23c7a10b647abefa6096b7
2019-03-28 05:59:01 -07:00
Martin Stjernholm 60de348654 Merge "Apply the standard system linker config to all of /data." 2019-03-28 12:37:29 +00:00
Victor Hsieh c4430f3489 Merge "Initialize fs-verity keys in shell script" am: 7f43e9fa40 am: ef787edd24
am: 98d7696248

Change-Id: Ie144188d08d295b1c34b1593772f74fed96a4197
2019-03-27 13:51:14 -07:00
Treehugger Robot 7f43e9fa40 Merge "Initialize fs-verity keys in shell script" 2019-03-27 20:31:19 +00:00
Martin Stjernholm 6ba5d996d7 Merge "Remove links to libart(d).so in the runtime." am: fdf70f1ba8 am: fd7f92372d
am: 0c0deebf98

Change-Id: If5fcd8b69ac72c436141140f155ad1c4d99524a4
2019-03-27 10:43:21 -07:00
Martin Stjernholm adf4503de1 Apply the standard system linker config to all of /data.
This is necessary to get the correct APEX namespace setup for apps that
executes binaries from there.

In older releases no linker config applied to binaries in /data, so the
fallback config in /system/bin/linker was used, which basically just looked
up libraries in /system/{lib,lib64}. With the introduction of APEXes that
location no longer contains the complete set of libraries, so this is
necessary to retain functional parity.

Strictly speaking this fallback rule should apply as last resort for a
binary in any location, but the linker does not accept "dir.system = /".

Test: Flash and boot
Test: The app regression in b/128569634
Bug: 128569634
Change-Id: Icfcd66f0a7d8d898618be1b6186bb1111d20d688
2019-03-26 18:10:51 +00:00
Martin Stjernholm 5c074e0ab9 Remove links to libart(d).so in the runtime.
They are not needed since the binaries and relevant exported libraries have
moved to the Runtime APEX.

Test: Flash and boot
Test: atest CtsJniTestCases CtsJdwpTestCases
Bug: 119867084
Change-Id: If416fbae7057aec02059bb31a4dcd8b63dcc0cad
2019-03-26 17:24:12 +00:00
Pete Bentley 57616a7307 Merge "Tighten native API surface." am: d2c4eb0dae am: 5f920a0a57
am: ae89bfb67d

Change-Id: I73608d1d987c00a08452d98ebe13620eb1237d1b
2019-03-26 02:48:14 -07:00
Pete Bentley d2c4eb0dae Merge "Tighten native API surface." 2019-03-26 09:19:37 +00:00
Vic Yang 034bfeba6f Merge "Fix sed command on Mac builds" am: 42a5dd9c41 am: ad7bf56b1d
am: e22977e8fa

Change-Id: I672a5fbbff66fb98a4dcbbf714532f628dab57d7
2019-03-25 06:58:18 -07:00
Victor Hsieh 59183120c2 Initialize fs-verity keys in shell script
This gives us two benefits:
  - Better compatibility to keyctl(1), which doesn't have "dadd"
  - Pave the way to specify key's security labels, since keyctl(1)
    doesn't support, and we want to avoid adding incompatible option.

Test: See keys loaded in /proc/keys
Bug: 128607724
Change-Id: Ia45f6e9dea80d037c0820cf1fd2bc9d7c8bb6302
2019-03-22 09:18:00 -07:00
Vic Yang 4a85f3c92a Fix sed command on Mac builds
Bug: 119423884
Test: Manually test sed command on Mac
Change-Id: I8df32b2476a01e2b758ea81f00dae0b6179ba79a
2019-03-21 10:16:06 -07:00
Pete Bentley cc6c50a123 Tighten native API surface.
AsynchronousCloseMonitor is moved into libandroidio by
r.android.com/910073 and so libjavacore no longer needs to
be linked to the conscrypt namespace.

Bug: 123744297
Test: m && flashall
Test: atest CtsLibcoreOkHttpTestCases
Test: atest CtsLibcoreTestCases
Change-Id: Id720b59e4ef42a2c0226b497a1cc3c54f7a837d0
2019-03-21 17:13:14 +00:00
Vic Yang 60e3c55900 Merge "Add support for no-vendor-variant VNDK" am: c3e96512c0 am: 5e9c91c404
am: 1a41a41bcc

Change-Id: I13d4a8e9a97f6b229581f29400fbe50647f8fdde
2019-03-20 21:59:29 -07:00
Vic Yang c3e96512c0 Merge "Add support for no-vendor-variant VNDK" 2019-03-21 04:30:47 +00:00
Xiaoyong Zhou ed98d4f249 Merge "Enable fsverity signature checking" am: aaee497db2 am: 0d8d105e32
am: f0ac994384

Change-Id: I400ba966f1e23400bb3e4a2f3bb8ab0b3ba10368
2019-03-19 10:11:11 -07:00
Treehugger Robot aaee497db2 Merge "Enable fsverity signature checking" 2019-03-19 16:40:48 +00:00
Roland Levillain 44cbfa1ac7 Merge "Include tests directories in the linker legacy configuration." am: d503239292 am: 5481e3aec8
am: 315a0513f1

Change-Id: I56ada3fd79c09e2f52e12e233d06a5980e02611b
2019-03-19 05:37:09 -07:00
Roland Levillain d503239292 Merge "Include tests directories in the linker legacy configuration." 2019-03-19 10:17:10 +00:00
Neil Fuller 5f2e4f7871 Merge "Address syntax / error case nits" am: ed6b5177e2 am: 6ac873c3b9
am: d836b1dca9

Change-Id: Ia2ce435666fa3d2cc1f5ff171e5612878afdceb0
2019-03-19 02:58:50 -07:00
Neil Fuller ed6b5177e2 Merge "Address syntax / error case nits" 2019-03-19 09:37:55 +00:00
Xiaoyong Zhou 66fc7eb195 Enable fsverity signature checking
This CL enable fsverity signature checking.

Bug: 112038861
Test: cat /proc/sys/fs/verity/require_signatures -> 1
Change-Id: I57aaf6094aa503bdcac93306cafd7f71f202e711
2019-03-18 14:28:18 -07:00
Roland Levillain 5c99a0c067 Include tests directories in the linker legacy configuration.
Make ld.config.legacy.txt similar to other linker configurations with
respect to tests in /data/{nativetest,benchmarktest}{,64}.

Note: The linker legacy configuration is used by the ART generic build
targets, defined in project device/generic/art.

Test: ART chroot-based on-device testing using the master-art
Bug: 121117762
Change-Id: I6c8fafa2568862e450aa7b9fea1177a184cb9705
2019-03-18 19:07:32 +00:00
Dongwon Kang aca2e799ee Merge "List stable libraries media apex relies on." am: fc0f79f8a8 am: 5698f77f5f
am: cd557657bc

Change-Id: Ib6b863c7b07f587c2a1d54e1c686d03b75c527ac
2019-03-15 22:47:37 -07:00
Dongwon Kang fc0f79f8a8 Merge "List stable libraries media apex relies on." 2019-03-16 05:34:09 +00:00
Andreas Gampe 514fc03638 Merge "Init: Load fsverity keys earlier" am: f09ef56056 am: a0cc42381c
am: a7597deed2

Change-Id: Ibe40afdbed4af22f207600a94307448191287f29
2019-03-15 19:34:32 -07:00
Dongwon Kang a013e3d53d List stable libraries media apex relies on.
With allow_all_shared_libs, the libs under /system/lib may be used
instead of libs included in the apex. This change adds stable libraries
the media apex relies on to prevent this case.

Test: dumpsys media.extractor, atest MediaPlayer2Test
Bug: 127791685

Change-Id: I6a0419e6da9e9f48a394257b1e8f977ec2dfa9a1
2019-03-15 17:23:03 -07:00
Andreas Gampe e8565ac94a Init: Load fsverity keys earlier
Keys may be required for apex updates (post-installs), so load them
before starting apexd.

Bug: 125474642
Test: m
Test: manual
Change-Id: I32ddb6ae6854334e8ee7e195173ecfaed565d783
2019-03-15 15:14:35 -07:00
Neil Fuller 3b0da85b22 Address syntax / error case nits
Observe some best practices in the APEX symlink
shell commands. No functional changes intended except with error
handling.

Bug: 128687472
Bug: 124106384
Bug: 122985829
Bug: 128249030
Test: make installclean / make droid / inspect one symlink
Change-Id: I099fed5ac8f25cc3911ce0e7ea2b9f74c2172193
2019-03-15 19:05:05 +00:00
Jiyong Park 190cee3519 Don't bind-mount bionic files am: 7b4801a921 am: 2f2b99a20d
am: f90d8479c9

Change-Id: I06ceb206ce8b95176fa7a74802d2d0b7d34f444c
2019-03-15 02:42:54 -07:00
Jiyong Park 2f2b99a20d Don't bind-mount bionic files
am: 7b4801a921

Change-Id: I80ded3b5efbee209eb705556bc92e2708497da20
2019-03-15 02:17:48 -07:00
Treehugger Robot 4cd0914048 Merge changes from topic "apex_earlymount_no_bionic_bindmount"
* changes:
  /bionic path is gone
  Revert "Handle adb sync with Bionic under /bionic"
  Don't bind-mount bionic files
2019-03-15 09:02:18 +00:00
Neil Fuller cb7ac9d752 Merge "Move the logic for creating APEX-related symlinks" 2019-03-14 16:06:08 +00:00
Gavin Corkery ff3c13f52f Merge "Rename data/pkg_staging to data/app-staging." 2019-03-14 14:14:38 +00:00
Neil Fuller 16e5ae3b39 Move the logic for creating APEX-related symlinks
The existing location of logic for creating symlinks to files that have
moved into APEX does not get executed for -user builds, only
-userdebug and -eng. The new location is equally arbitrary but appears
to be invoked for -user, -userdebug and -eng targets.

Tested with:
make cleaninstall && lunch taimen-[user|userdebug|eng] && make droid

Inspected:
ls -l out/target/product/taimen/system/usr/icu

Bug: 128249030
Bug: 122985829
Bug: 124106384
Test: see above
Merged-In: I92a52d0b5ef97e8cb4f780691f8594e40f2fa6b3
Change-Id: I92a52d0b5ef97e8cb4f780691f8594e40f2fa6b3
(cherry picked from commit 0ed52b789d)
2019-03-14 10:38:54 +00:00
Neil Fuller cd29f37e39 Merge "Move the logic for creating APEX-related symlinks" 2019-03-14 08:54:33 +00:00
Jiyong Park 7b4801a921 Don't bind-mount bionic files
Bind-mounting of the bionic files on /bionic/* paths no longer required
as there are direct symlinks from bionic files in /system partition to
the corresponding bionic files in the runtime APEX. e.g.,

/system/lib/libc.so -> /apex/com.android.runtime/lib/bionic/libc.so

Bug: 125549215
Test: m; devices boots
Change-Id: I4a43101c3e3e2e14a81001d6d65a8a4b727df385
2019-03-14 07:35:54 +09:00
Neil Fuller 0ed52b789d Move the logic for creating APEX-related symlinks
The existing location of logic for creating symlinks to files that have
moved into APEX does not get executed for -user builds, only
-userdebug and -eng. The new location is equally arbitrary but appears
to be invoked for -user, -userdebug and -eng targets.

Tested with:
make cleaninstall && lunch taimen-[user|userdebug|eng] && make droid

Inspected:
ls -l out/target/product/taimen/system/usr/icu

Bug: 128249030
Bug: 122985829
Bug: 124106384
Test: see above
Change-Id: I92a52d0b5ef97e8cb4f780691f8594e40f2fa6b3
2019-03-13 18:14:56 +00:00
Neil Fuller 43ffdff20d Merge "Add an env variable for the tzdata module root" am: 822dbd8911 am: 8c8d8f5df9
am: 4f92416fa1

Change-Id: I60406b56c060a3e3775709aacf5cf38ad66db820
2019-03-13 02:03:17 -07:00
Neil Fuller 822dbd8911 Merge "Add an env variable for the tzdata module root" 2019-03-13 08:49:30 +00:00
Martijn Coenen 4fa4c2a6f9 Merge "Create /metadata/apex/[sessions]." am: 13b5c3bee7 am: 5cdb3a9af8
am: 3d62bd2e16

Change-Id: Ida561b285efae52985149ab90ad7bc6b96eb536b
2019-03-13 01:27:08 -07:00
Martijn Coenen 13b5c3bee7 Merge "Create /metadata/apex/[sessions]." 2019-03-13 07:46:32 +00:00
Martijn Coenen 4517e57ff5 Create /metadata/apex/[sessions].
For storing persistent apex session state.

Bug: 126740531
Test: builds
Change-Id: Ibf280764977768956b5512b2252d22ceaba31c1e
2019-03-12 22:05:20 +01:00
Vic Yang 19b3a51f64 Add support for no-vendor-variant VNDK
When no-vendor-variant VNDK is enabled, the vendor variant of VNDK
libraries are not installed.  In this case, the vendor binaries need to
be able to link in the core variant.

Update the linker config so that we export such VNDK libraries to the
proper linker namespaces.

Bug: 119423884
Test: Enable no-vendor-variant VNDK for a dummy VNDK library.  Boot and
      check the vendor variant does not exist and only the core variant
      is used.

Change-Id: I71274fdf61373663603a5fbc3497400420094fcf
2019-03-12 13:30:46 -07:00
Neil Fuller 9358e0972f Add an env variable for the tzdata module root
The ANDROID_TZDATA_ROOT maps to the /apex/com.android.tzdata
location on device like ANDROID_RUNTIME_ROOT maps to the
/apex/com.android.runtime location.

Bug: 128422035
Test: build only
Change-Id: Id90006004ca652564e530f3694600ac4afd798ed
2019-03-12 16:52:36 +00:00
Gavin Corkery 8df32193f3 Rename data/pkg_staging to data/app-staging.
Test: atest apex_e2e_tests
Bug: 126330086

Change-Id: Ic5729d60046e8825a2a94e3c3483ea8232a69ed2
Merged-In: Ic5729d60046e8825a2a94e3c3483ea8232a69ed2
2019-03-12 15:38:44 +00:00
Gavin Corkery 8d73048209 Merge "Rename data/pkg_staging to data/app-staging." 2019-03-09 12:41:28 +00:00
Xiaoyong Zhou 27c13df54b Merge "Change mini-keyctl command format." am: 34e1b402a6 am: 3c6e86bc11
am: 4b0a6092cc

Change-Id: I6e4179f6a2b4dfece070d196d343e5b497f37385
2019-03-08 16:08:30 -08:00
Treehugger Robot 34e1b402a6 Merge "Change mini-keyctl command format." 2019-03-08 23:17:01 +00:00
Xiaoyong Zhou b29b27ec7f Change mini-keyctl command format.
This CL change the mini-keyctl tool to make it compitable with libkeyctl
tool to make it more useful.

Bug: 112038861
Test: mini-keyctl padd asymmetric 'desc' .fs-verity < /path/to/cert.der
Test: mini-keyctl unlink <key_id> <keyring_id>
Test: mini-keyctl restrict_keyring <keyring_id>

Change-Id: I950f07c7718f173823ce5a5cd08e0d1a0e23a007
2019-03-08 09:59:42 -08:00
Gavin Corkery ad0b2473dc Rename data/pkg_staging to data/app-staging.
Test: atest apex_e2e_tests
Bug: 126330086

Change-Id: Ic5729d60046e8825a2a94e3c3483ea8232a69ed2
2019-03-08 15:47:25 +00:00
Roland Levillain 2144c6703e Merge "Fix a typo in linker configuration comments." am: ecef987a35 am: 58e3b61d1e
am: fcd734a433

Change-Id: I5f5bd69b84688456615ea4027479ed8363e122de
2019-03-08 04:05:52 -08:00
Roland Levillain ecef987a35 Merge "Fix a typo in linker configuration comments." 2019-03-08 11:48:43 +00:00
Dongwon Kang 9778fdaec4 Merge "allow_all_shared_libs for media namespace in ld.config.legacy.txt" am: fc6e441a1a am: 6cec105df9
am: 3642244f9d

Change-Id: I6e12d0eecfce92436415c26e2210f76ef2fbb8ce
2019-03-07 21:11:05 -08:00
David Anderson ef35aa87de Merge "Create /metadata/password_slots during boot." am: 1c1850fad2 am: 7d5cf4e04c
am: c31a6f760c

Change-Id: I3922e7b616e159628b5381bebee0e19edfc15e3e
2019-03-07 12:19:57 -08:00
Roland Levillain e51c87634a Fix a typo in linker configuration comments.
Test: n/a
Change-Id: I3fa36094cf3eb45b0e1400712f22b8477a096b59
2019-03-07 19:06:57 +00:00
Dongwon Kang 787e09a1de allow_all_shared_libs for media namespace in ld.config.legacy.txt
This is a temporal fix. With this change, the extractor plug-ins uses
unstable libs under /system/lib[64]. The right resolution is being
discussed.

Test: applied the same change to ld.config.txt and checked
      the memory map of media.extractor on cuttlefish.
Bug: 127791685

Change-Id: Ifd5b79831f27ef4017bb8aa774671aa9b2c5264e
2019-03-07 10:14:02 -08:00
David Anderson 1c1850fad2 Merge "Create /metadata/password_slots during boot." 2019-03-07 16:20:01 +00:00
Jiyong Park 1a789db2e3 Don't defer zygote
Removing 'updatable' from zygote as zygote is started after apexd. All
APEXes are guaranteed to be activated at the moment.

Sequence of actions:
1) /data mounted. post-fs-data is triggered.
2) apexd starts. APEXes are activated. Init does not execute more
commands until the activation finishes.
3) all post-fs-data sections from other *.rc are executed.
4) zygote-start is triggered.

Bug: 123404717
Bug: 126555629
Bug: 125549215
Test: device boots
Test: no following message on the logcat log
Could not restart 'zygote': Cannot start an updatable service 'zygote' before configs from APEXes are all loaded. Queued for execution.

Merged-In: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
Change-Id: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
(cherry picked from commit 3bddd540dd)
2019-03-07 22:21:32 +09:00
Jiyong Park 3bddd540dd Don't defer zygote
Removing 'updatable' from zygote as zygote is started after apexd. All
APEXes are guaranteed to be activated at the moment.

Sequence of actions:
1) /data mounted. post-fs-data is triggered.
2) apexd starts. APEXes are activated. Init does not execute more
commands until the activation finishes.
3) all post-fs-data sections from other *.rc are executed.
4) zygote-start is triggered.

Bug: 123404717
Bug: 126555629
Bug: 125549215
Test: device boots
Test: no following message on the logcat log
Could not restart 'zygote': Cannot start an updatable service 'zygote' before configs from APEXes are all loaded. Queued for execution.

Change-Id: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
2019-03-07 12:41:16 +09:00
David Anderson 0664f31dd0 Create /metadata/password_slots during boot.
This directory is used to store the Weaver/GateKeeper slot map so GSIs
do not overwrite host keys in secure storage.

Bug: 123716647
Test: /metadata/password_slots exists after boot
Change-Id: Ib0ca13edec38e68cba1fc2124465571feedc4be7
2019-03-05 22:18:14 -08:00
Jiyong Park b537934ab7 Merge changes from topic "apex_earlymount_base" am: c676cca4f6 am: a192ff7ad3
am: 7e933b1e07

Change-Id: I038cfec65219659dbd0ae6a886476be7aeb25d5b
2019-03-04 23:14:51 -08:00
Jiyong Park 27e93c1f11 mount /apex during first_stage init am: 4ba548d845 am: 854c5bc218
am: 5675349df0

Change-Id: Ic97ed52ae158225945542bc810a4ac5295c05f39
2019-03-04 23:14:03 -08:00
Jiyong Park 854c5bc218 mount /apex during first_stage init
am: 4ba548d845

Change-Id: I2f86489449b0a81c4173981a8ffe1bcb945df129
2019-03-04 23:02:24 -08:00
Treehugger Robot c676cca4f6 Merge changes from topic "apex_earlymount_base"
* changes:
  Activate system APEXes early
  mount /apex during first_stage init
2019-03-05 06:49:02 +00:00
Jiyong Park dcbaf9f41b Activate system APEXes early
Summary: Boot sequence around apexd is changed to make it possible for
pre-apexd processes to use libraries from APEXes. They no longer need to
wait for the apexd to finish activating APEXes, which again can be
done only after /data/ is mounted. This improves overall boot
performance.

Detail: This change fixes the problem that processes that are started
before apexd (so called pre-apexd processes) can't access libraries
that are provided only by the APEXes but are not found in the system
partition (e.g. libdexfile_external.so, etc.). Main idea is to activate
system APEXes (/system/apex/*.apex) before /data is mounted and then
activate the updated APEXes (/data/apex/*.apex) after the /data mount.

Detailed boot sequence is as follows.

1) init prepares the bootstrap and default mount namespaces. A tmpfs is
mounted on /apex and the propagation type of the mountpoint is set to
private.

2) before any other process is started, apexd is started in bootstrap
mode. When executed in the mode, apexd only activates APEXes under
/system/apex. Note that APEXes activated in this phase are mounted in
the bootstrap mount namespace only.

3) other pre-apexd processes are started. They are in the bootstrap
mount namespace and thus are provided with the libraries from the system
APEXes.

4) /data is mounted. init switches into the default mount namespace and
starts apexd as a daemon as usual.

5) apexd scans both /data/apex and /system/apex, and activate latest
APEXes from the directories. Note that APEXes activated in this phase
are mounted in the default namespaces only and thus are not visible to
the pre-apexd processes.

Bug: 125549215
Test: m; device boots
Change-Id: I21c60d0ebe188fa4f24d6e6861f85ca204843069
2019-03-05 09:47:49 +09:00
Felix 6f79379fbc Merge "ld.config: Permit legacy /system/vendor paths" am: 6521bf3c98 am: 7334915cf5
am: 7690f38b1b

Change-Id: I0d51064f17be05d2191f749c0df5a628c3d163e7
2019-03-04 05:16:21 -08:00
Jiyong Park 4ba548d845 mount /apex during first_stage init
/apex is not mounted via init.rc but directly by the first_stage init
before the mount namespaces are configured.

This allows us to change the propagation type for /apex mount point to
private to isolate APEX activatesions across post- and pre-apexd
processes.

Bug: 125549215
Test: m; device boots to the UI

Change-Id: I10e056cd30d64cb702b6c237acd8dab326162884
2019-03-04 16:22:41 +09:00
Felix 9e40e12cea ld.config: Permit legacy /system/vendor paths
Because /vendor is a symlink to /system/vendor on devices without a
dedicated /vendor partition, /system/vendor/lib/* needs to be added to
the permitted paths whereever /vendor/lib/* is permitted.

Reasoning:
Legacy devices are forced to use ld.config.legacy.txt, which is very
permissive. We can prolong support for them and enable them to use the
VNDK if we extend the search paths to include the resolved symlink dirs.

Change-Id: I6b3bb7b86ed82395345a16bdc857353b1b15c704
2019-03-03 14:31:37 +01:00
Christian Wailes eabbed9c31 Merge "Renamed blastula to unspecialized app process (usap)" 2019-03-02 01:38:11 +00:00
Rick Yiu 39e881576f Merge "Add blkio cgroup to libprocessgroup" am: d5345f58fd am: b6d02ff175
am: 85c9d7758d

Change-Id: I91308d425bdf1945822c82d9e692627b2fdb67ab
2019-02-27 05:24:34 -08:00
Rick Yiu 2b3bf84373 Add blkio cgroup to libprocessgroup
To differentiate IO priority for different groups.

Bug: 111422845
Bug: 117857342
Test: tasks are assigned to the group as expected
Change-Id: Ibb108d1b8e0f720f7ac4cab248b3c33d35e5483d
2019-02-27 11:23:14 +08:00
Nicolas Geoffray 5af7e33f5c Merge "Add a DEX2OAT_BOOTCLASSPATH variable." am: 1706eb08fe am: e25fa6da1b
am: f2472a1d72

Change-Id: I87229520c03855fac9d56fcd98f20a19ac5061e2
2019-02-26 13:19:14 -08:00
Nicolas Geoffray 0c49d1759c Add a DEX2OAT_BOOTCLASSPATH variable.
Bug: 119800099
Test: m
Change-Id: I8ae4ecea6da2ef541736a38822b100a620d72a8a
2019-02-26 12:57:17 +00:00
Neil Fuller f54ccb8dd1 Merge "Move tzdatacheck execution after apex is mounted" am: 61b2016881 am: 3305192d3a
am: 6916a8fc05

Change-Id: Ibe63dfc1aa23b6626e98688d5d1d334d79bb85c8
2019-02-25 23:13:00 -08:00
Martin Stjernholm 59b44c16cc Merge "Add compat symlink preferred-arch /system/bin/dalvikvm." am: ef3429dae6 am: 3c469804ed
am: 677552f14b

Change-Id: I981b49ded873bc2ab74421f408101388b6a0dba1
2019-02-25 21:28:29 -08:00
Dongwon Kang 6ac42d7363 Merge "Add permitted path in media namesapce for extractor process." am: ed7458e03e am: 0dfb54f747
am: 38259e37f4

Change-Id: Id81221bd564fe520e87c0fdf84ea96833ee1ff32
2019-02-25 19:27:05 -08:00
Treehugger Robot 61b2016881 Merge "Move tzdatacheck execution after apex is mounted" 2019-02-25 13:30:36 +00:00
Treehugger Robot ef3429dae6 Merge "Add compat symlink preferred-arch /system/bin/dalvikvm." 2019-02-25 00:19:36 +00:00
Martin Stjernholm 96949370ce Add compat symlink preferred-arch /system/bin/dalvikvm.
Test: Flash and boot
Test: adb shell ls -l /system/bin/dalvikvm
Bug: 124106384
Bug: 124924906
Change-Id: I1766af561e6b268a1c914808e872fce97a09631e
2019-02-22 20:14:15 +00:00
Chris Wailes 4a25816c22 Renamed blastula to unspecialized app process (usap)
Bug: 123017829
Test: make & boot & launch apps
Change-Id: Id780245f2d86e57cc4964abb2fd10ead9b64da1f
2019-02-22 11:35:08 -08:00
Neil Fuller ada7e4928a Move tzdatacheck execution after apex is mounted
tzdatacheck references files in the runtime apex so should
not be executed before the apex mounts are ready.

Test: Manual tests (see b/123270813); observed tzdatacheck running after
      apex files are mounted
Bug: 123270813
Bug: 116191025
Bug: 119293618
Bug: 113373927
Change-Id: I249d127c1d568bc5025d81b0bb4187c81363d897
2019-02-22 16:07:22 +00:00
Dongwon Kang 3408eaa914 Add permitted path in media namesapce for extractor process.
Test: build, boot, dumpsys media.extractor
Bug: 125134086
Change-Id: I5ed67d7d8d3ad7abf2cff7da8f33fdaab842acff
2019-02-22 01:16:54 -08:00
Yifan Hong 19cddf3a38 Move rootdir/*.json to libprocessgroup am: 98a61dd583 am: b9a1840e9b
am: ca11cdc4d9

Change-Id: I1b157a82638fc828a33abe393d7637ed1c78afa7
2019-02-20 15:17:46 -08:00
Tom Cherry c43f04e263 Merge "liblog: add stubs variant" am: 4e47753338 am: 66e34e6147
am: 26b3802435

Change-Id: I1b2971f0396305d8d992b149b32368b5be38242a
2019-02-20 15:08:43 -08:00
Jiyong Park 147253fe22 Merge "Add the 'unrestricted' config section for vndk_lite devices" am: 14efb903bb am: 914c7e9924
am: 3e8a07b27c

Change-Id: Ibf111128185ad8de01af7aaae830cdfbb4fe194d
2019-02-20 14:31:29 -08:00
Yifan Hong b9a1840e9b Move rootdir/*.json to libprocessgroup
am: 98a61dd583

Change-Id: I0c37fccffec8f17a519656c941d3b08ec40f1be9
2019-02-20 14:06:31 -08:00
Yifan Hong 4bb7b18fe1 Merge changes from topic "libprocessgroup_json"
* changes:
  Add schema for task profiles
  Move rootdir/*.json to libprocessgroup
2019-02-20 20:35:47 +00:00
Tom Cherry 4e47753338 Merge "liblog: add stubs variant" 2019-02-20 20:33:36 +00:00
Tom Cherry fe1f701761 liblog: add stubs variant
Ensure that only the symbols in liblog.map.txt can be used by the
platform.

Bug: 123349183
Test: build
Change-Id: I99ae5d0e8ba8f5061ec20701c941d861c9eb615d
2019-02-20 12:32:12 -08:00
Treehugger Robot 14efb903bb Merge "Add the 'unrestricted' config section for vndk_lite devices" 2019-02-20 18:12:27 +00:00
Jiyong Park 137e0308b7 Add the 'unrestricted' config section for vndk_lite devices
This is essentially the same change as
bcb5ba75a5
for ld.config.vndk_lite.txt.

Bug: 124789446
Test: atest CtsBionicTestCases on marlin
Change-Id: I6b65ec4df1626d625975c9834bf96ac9ff6cc3f3
2019-02-20 16:43:22 +09:00
Kevin Chyn 700ac86a65 Merge "Expose libandroidicu to llndk namespace" am: 4275d9b887 am: 65999091ae
am: 6c2143c82d

Change-Id: I9f860d30cf606f748f5f30cc4be589f6d45ea47a
2019-02-19 22:57:41 -08:00
Victor Chang ff67ef3c7d Expose libandroidicu to llndk namespace
Bug: 124772622
Test: Treehugger
Change-Id: If936eb377c7f0994a9225b8099a672addb2f9ed6
2019-02-20 01:10:06 +00:00
Gavin Corkery e8510cec19 Merge "Rename data/staging to data/pkg_staging." 2019-02-19 19:44:13 +00:00
Gavin Corkery 124a4bc791 Rename data/staging to data/pkg_staging.
Test: Build and flash, atest apex_e2e_tests
Fixes: 122999313
Change-Id: I878ee41f804956ee7533d64e844ce98e5a8afacc
Merged-In: I878ee41f804956ee7533d64e844ce98e5a8afacc
2019-02-19 15:46:22 +00:00
Gavin Corkery dce38e8a71 Merge "Rename data/staging to data/pkg_staging." 2019-02-19 14:40:59 +00:00
vichang e357682485 Merge changes from topic "dup_icu4c" am: ce912aadda am: 055708f26b
am: 1ab3de395d

Change-Id: I04801cb9d98d0b6072f32a89ab0891a729a25f5d
2019-02-19 02:55:23 -08:00
vichang ce912aadda Merge changes from topic "dup_icu4c"
* changes:
  Linker namespace changes for moving ICU4C to APEX
  Remove the public libs in runtime namespace
2019-02-19 10:14:31 +00:00
Gavin Corkery ac1eeb7f78 Rename data/staging to data/pkg_staging.
Test: Build and flash, atest apex_e2e_tests
Fixes: 122999313
Change-Id: I878ee41f804956ee7533d64e844ce98e5a8afacc
2019-02-17 20:58:26 +00:00
Tom Cherry 06e0bd4e9a Merge "Export init.environ.rc in early-init instead of init" am: acfb705603 am: 8f442d5efa
am: 3b236e9a6f

Change-Id: Ife12bf3e2b664c6f8388d2cd2313eb7d5438b9f4
2019-02-16 12:20:50 -08:00
Tom Cherry acfb705603 Merge "Export init.environ.rc in early-init instead of init" 2019-02-16 17:53:53 +00:00
Jiyong Park 877aba97c3 Merge "Replace bionic-unit-tests with CtsBionicTestCases" am: 00c767d177 am: 08557e6fa9
am: 9669d8f312

Change-Id: Ieea4949f7931e97520b84c156c7c40502c963eb6
2019-02-15 19:28:30 -08:00
Tom Cherry d540e527e1 Export init.environ.rc in early-init instead of init
Now that we always have system mounted early, we're starting to load
various daemons during the `init` trigger and these daemons need the
environment set up from init.environ.rc, so we move it to early-init.

This shouldn't need to go any further earlier in the future, since
nothing besides ueventd should ever start in early-init.

Test: systems boot, early daemons get right environment
Change-Id: I02f425a1500377c5de3427afa7872073e77a066f
2019-02-15 15:55:18 -08:00
Jiyong Park d8b07f8c05 Replace bionic-unit-tests with CtsBionicTestCases
Bug: 124437796
Test: monitor treehugger
Change-Id: I8bf8d1bb1af3f4ccfca434846adcc1f4eda3fb69
2019-02-15 15:20:59 +09:00
Yifan Hong 98a61dd583 Move rootdir/*.json to libprocessgroup
They are installed to /system/etc, not /. Hence, move
out of rootdir/ and move into the code that parse these
files (i.e. libprocessgroup).

Also, Android.mk->bp.

Test: builds

Change-Id: I1763c26f81ae51ee159552e39d252fd643c35b94
2019-02-14 16:06:49 -08:00
Suren Baghdasaryan 01e2c6e857 Merge "Fix cgroup support for recovery mode" am: da20bc763e am: e95fd681f7
am: 0a613c94df

Change-Id: I2a9665b4e16c9a93c49b0af350c82d9afd14f967
2019-02-14 10:27:16 -08:00
Suren Baghdasaryan d032a92c04 Fix cgroup support for recovery mode
In recovery mode a separate set of cgroups should be mounted. Add a
cgroups.recovery.json file to describe cgroups mounted during recovery.
Change cgroups descriptor parset to allow cgroups and cgroups2 sections
to be omitted.

Bug: 124270406
Test: "adb reboot sideload; adb devices" shows 'sideload' as expected

Change-Id: Ic32bd2b4612ec8390064f87d4655d1bd1183d741
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-14 17:08:40 +00:00
Victor Chang 785ba2e68e Linker namespace changes for moving ICU4C to APEX
libandroidicu is used by various libraries, e.g. libxml2, minikin.
Thus, expose libandroidicu to default namespace.

libpac is only used by libjni_pacprocessor (part of framework).

libicuuc, libicui18n are not exposed to default namespace,
because everyone else, except app, should use libandroidicu.
They are exposed to classloader namespace from runtime namespace
via the work done in libnativeloader in http://r.android.com/887453
b/120786417 has more details about these 2 libraries.

Bug: 120659668
Test: m droid
Change-Id: I2cd3378f1eb94b7bb1c942738b59d7e577a5f8f0
2019-02-14 10:42:27 +00:00
Jiyong Park 7f233a43c5 Merge "Add TEST_MAPPING for system/core/rootdir/etc" am: ebadad5c56 am: f472ffff49
am: d5b50b5443

Change-Id: I1506d8cfafbc180df8ecbbcd53530e0f37441169
2019-02-13 18:32:19 -08:00
Martin Stjernholm d8bb1d2f3c Merge "Add compat symlinks into the Runtime APEX for the ART binaries." am: 48c6d139b3 am: 542a73be66
am: 33f1fb107b

Change-Id: I53901b1231c3ff3ce78880813800b5966b57e736
2019-02-13 17:00:48 -08:00
Treehugger Robot ebadad5c56 Merge "Add TEST_MAPPING for system/core/rootdir/etc" 2019-02-14 00:11:36 +00:00
Martin Stjernholm 7f77dbfe64 Add compat symlinks into the Runtime APEX for the ART binaries.
This is a precaution in case there are dependencies on the binaries in the
old location. b/124106384 tracks eliminating them (if any).

Test: Flash and check symlinks are there with adb shell ls -l system/bin
Test: adb shell system/bin/<binary>
Bug: 113373927
Bug: 124106384
Change-Id: Ib4102fe55117611f68184102e68a10ea47de0065
2019-02-13 15:10:11 +00:00
Martin Stjernholm 242440e79c Merge "Introduce a separate linker config section for native tests." am: 18de135031 am: 1ab2ba789f
am: 1f8c10c6b1

Change-Id: Ic677ee09e7595acac16b9b08acd301c4e2f8bb59
2019-02-13 02:55:31 -08:00
Martin Stjernholm 18de135031 Merge "Introduce a separate linker config section for native tests." 2019-02-13 10:32:29 +00:00
Jiyong Park 8011f03eb2 Add TEST_MAPPING for system/core/rootdir/etc
bionic-unit-tests runs when one of the linker config files is changed.

Test: N/A
Change-Id: I8af1a9728dab4492fe34a3b4daab9c5f9973d84f
2019-02-13 16:40:47 +09:00
Logan Chien 172f147a64 Merge "Fix APEX run-time ld.config.txt for ASAN targets" am: 8540f50887 am: 321b1a6345
am: 5d42b599ef

Change-Id: Ie571a679d43de4f34f119647040bbacea6a4f010
2019-02-12 21:11:14 -08:00
Justin Yun 4e429dd370 Merge "Change search order for vendor processes in vndk_lite." am: 47e8300412 am: c8631a3e1f
am: 16826ca953

Change-Id: If404f2af92bb352186df50b35c5b29bd9bd32666
2019-02-12 19:50:13 -08:00
Logan Chien 8540f50887 Merge "Fix APEX run-time ld.config.txt for ASAN targets" 2019-02-13 02:24:08 +00:00
Justin Yun 023ff46e18 Change search order for vendor processes in vndk_lite.
Originally, vndk_lite does not include system/lib/vndk-* directory but
searching the required files in system/lib instead. However, in GSI,
they are using the vndk libs which has symbols than core variants.
To avoid this problem, allow the vendor processes in vndk_lite devices
to search system/lib prior to vndk libs.

Bug: 124063441
Test: Check boot for vndk_lite devices.
Change-Id: I89a72e9d43d6fb05f4b6d87bbd4500f8febfe970
2019-02-13 01:56:28 +00:00
Dongwon Kang 88e1ac5abe Merge "Exclude libvndksupport from APEXes." am: 0b4f2532a7 am: 1fd25add88
am: 6588014f98

Change-Id: Ia619ae950238d18f404b30ece8480ee8d96b7a19
2019-02-12 17:13:29 -08:00
Dongwon Kang 0b4f2532a7 Merge "Exclude libvndksupport from APEXes." 2019-02-13 00:40:53 +00:00
Martin Stjernholm bcb5ba75a5 Introduce a separate linker config section for native tests.
There are tests that require access to both system and vendor libraries,
like what the linker sets up when there is no matching config section.

Test: atest cameraservice_test libsurfaceflinger_unittest perfprofd_test \
  inputflinger_tests (no new failures, but 3 old ones)
Test: Internal test can load libandroid.so
Bug: 124127405
Bug: 123700170

Change-Id: I4f5cb2e09bdf1ae510259198c08c252b41249d94
2019-02-12 18:45:37 +00:00
Logan Chien f7b46a2eb1 Fix APEX run-time ld.config.txt for ASAN targets
This commit fixes the search paths for vendor binaries in ASAN targets.

Test: Boot aosp_walleye-userdebug to home screen
Change-Id: Id87ceee3c43098bd453f6fae4f32ea62355f922b
2019-02-12 20:02:05 +08:00
Jiyong Park 9d851839ca Merge "apexd is started much earlier to create loopback devices" am: 34f3660e2c am: bc08d9d207
am: e5633c18a4

Change-Id: I97743dea1fa022844b7dcf5f33a42bc240e81708
2019-02-11 19:53:43 -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
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
Joel Fernandes 915a112b95 Merge changes from topic "memfd-support" am: 3133b695e0 am: b03663ebdf
am: e3b45e5c31

Change-Id: Id23b2e9a60e290c6401c9dc69a718e908fc19557
2019-02-07 06:31:53 -08: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
Suren Baghdasaryan 3377db0fe8 Merge "libprocessgroup: Fix file mode parsing that requires octal values" am: 3a22225ac6 am: 71eee1e10c
am: 642b89df0f

Change-Id: I02f2d9d1a6fb2281405f034d8374ee9dde5b072b
2019-02-06 21:14:50 -08: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
Suren Baghdasaryan c760231891 libprocessgroup: Fix file mode parsing that requires octal values
JSON supports only decimal values and therefore file mode which should
use octal values has to be represented as strings. Fix the implicit
octal-to-decimal conversion and convert from string to octal in the code.

Bug: 111307099
Test: confirmed by verifying correct file permissions

Change-Id: I3ef9de0aea259f93bf74efeffca72d37d4740e15
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-06 21:01:41 +00:00
Nikita Ioffe 575be95c44 Merge "apexd: Create top-level /data/apex folders at boot" am: 4fdc2ce2bb am: 2d3aeba767
am: d52ed3f08f

Change-Id: Iacd68739f2868b9f0cb77bfae6e7a12b6a9ef3bd
2019-02-06 09:24:40 -08:00
Treehugger Robot 4fdc2ce2bb Merge "apexd: Create top-level /data/apex folders at boot" 2019-02-06 16:58:23 +00:00
Nikita Ioffe bc744dc98f apexd: Create top-level /data/apex folders at boot
- package manager needs to read from /data/apex/active, hence 0750
- both /data/apex/backups and /data/apex/sessions are internal to apexd,
  hence 0700

Bug: 123927167
Fixes: 123927167
Test: apex_e2e_tests, flashall -w & checked folders were created
Change-Id: I06c28328afe4945d082acd890401651bd37fcb20
2019-02-06 11:49:46 +00:00
Anton Hansson 68eff143c6 Merge "Fix asan paths in ld.config" am: a13b119c3d am: 1464eebca3
am: 4d3b18c515

Change-Id: I90ef79370e8e8a8d79991e7cdb779c5886b47045
2019-02-05 08:57:55 -08:00
Anton Hansson a13b119c3d Merge "Fix asan paths in ld.config" 2019-02-05 16:28:05 +00:00
Anton Hansson f59e72952e Merge "Remove product_services rules if it's merged away" am: b40f72d0ba am: 38d914132d
am: 04f3b9c9ea

Change-Id: Ib84cedf07300e8e12d2f7f0dbef0885fa98b8cac
2019-02-05 08:17:42 -08:00
Anton Hansson b40f72d0ba Merge "Remove product_services rules if it's merged away" 2019-02-05 16:00:44 +00:00
Anton Hansson 2dae6f035e Fix asan paths in ld.config
As of Id663c5f284e3b4fc65ed8cb8c2da6bcf6542e034, the asan libs
are in the TARGET_COPY_OUT_X subpath of the /data/asan/ dir, rather
than just 'x' unconditionally.

Test: presubmit
Change-Id: I3a515791e237ad10703415ea532c7a089660d8e9
2019-02-05 12:36:58 +00:00
Anton Hansson 74e8d18a0b Remove product_services rules if it's merged away
TARGET_COPY_OUT_PRODUCT_SERVICES can be equal to
TARGET_COPY_OUT_PRODUCT, in which case the ld.config
lines containing PRODUCT_SERVICES are redundant.

Test: make and diff
Change-Id: I1dc24eb49d37f1ab0faa6eecdb0ccc974321f4ac
2019-02-05 12:27:43 +00:00
Martin Stjernholm c1f712be3c Merge "Some tests are run from /data/local/tmp, and they need proper namespaces." am: 31fd0ba559 am: fc2c45cc62
am: 555ce45093

Change-Id: If075bf2245ac07c3848f169f02536df9a57b1ade
2019-02-05 03:20:15 -08:00
Martin Stjernholm 4a7138fe37 Some tests are run from /data/local/tmp, and they need proper namespaces.
Bug: 123700170
Test: atest cameraservice_test libcompositionengine_test librenderengine_test libsurfaceflinger_arc_test libsurfaceflinger_unittest perfprofd_test inputflinger_tests
Change-Id: Id3c628175c0037944ccc0d53a2d5327e688ef99e
2019-02-04 14:10:31 +00:00
Suren Baghdasaryan 82b72a5667 libprocessgroup: Add support for task profiles
Abstract usage of cgroups into task profiles that allows for changes
in cgroup hierarchy and version without affecting framework codebase.
Rework current processgroup and sched_policy API function implementations
to use task profiles instead of hardcoded paths and attributes.
Mount cgroups using information from cgroups.json rather than from init.rc

Exempt-From-Owner-Approval: already approved in internal master

Bug: 111307099
Test: builds, boots

Change-Id: If5532d6dc570add825cebd5b5148e00c7d688e32
Merged-In: If5532d6dc570add825cebd5b5148e00c7d688e32
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-03 16:48:35 +00:00
Suren Baghdasaryan 503cf84f76 rootdir: Add cgroups and task profiles description files
Add cgroups.json and task_profiles.json file to be places under /etc/ on
the device to describe cgroups to be mounted and task profiles that
processes can request. This adds additional layer of abstraction between
what a process wants to achieve and how system implements that request.

Bug: 111307099
test: builds, boots

Change-Id: If92f011230ef5d24750e184bad776f30ba226f86
Merged-In: If92f011230ef5d24750e184bad776f30ba226f86
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 21:28:05 -08:00
Suren Baghdasaryan 192aee782d libprocessgroup: Add support for task profiles
Abstract usage of cgroups into task profiles that allows for changes
in cgroup hierarchy and version without affecting framework codebase.
Rework current processgroup and sched_policy API function implementations
to use task profiles instead of hardcoded paths and attributes.
Mount cgroups using information from cgroups.json rather than from init.rc

Bug: 111307099
Test: builds, boots

Change-Id: If5532d6dc570add825cebd5b5148e00c7d688e32
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 05:53:20 +00:00
Suren Baghdasaryan b1db592226 rootdir: Add cgroups and task profiles description files
Add cgroups.json and task_profiles.json file to be places under /etc/ on
the device to describe cgroups to be mounted and task profiles that
processes can request. This adds additional layer of abstraction between
what a process wants to achieve and how system implements that request.

Bug: 111307099
test: builds, boots

Change-Id: If92f011230ef5d24750e184bad776f30ba226f86
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 05:53:07 +00:00
Xiaoyong Zhou 4edb10b6b0 Merge "Loads fsverity keys" am: 59a0149939 am: 818546b32c
am: 0b764ce566

Change-Id: I2981a6a8162cbd79e161f1c3d02f6aa10aff7ede
2019-02-01 03:15:50 -08:00
Treehugger Robot 59a0149939 Merge "Loads fsverity keys" 2019-02-01 10:57:30 +00:00
Jesse Hall 5a470dbbf9 Merge "Search/permit /vendor/${LIB}/hw in sphal namespace" am: afc2ac106a am: e9e72c0a04
am: a63b03a3c2

Change-Id: I33021f16c204e282a0a3294b568a17196ea737f8
2019-01-31 22:09:16 -08:00
Jesse Hall bdebda2bba Search/permit /vendor/${LIB}/hw in sphal namespace
The vulkan runtime loads drivers into the sphal namespace and relies
on them being in the sphal search path so that it doesn't have to
hardcode /vendor/${LIB}/hw.

These paths used to be allowed, but were removed by commit 2498e1b
because they were believed not to be required. Things didn't break
immediately because the vulkan runtime has a (supposed to be
temporary) fallback to hw_get_module, which loads from
/vendor/${LIB}/hw using absolute paths.

Bug: 123600276
Test: Launch Vulkan app on device with hw_get_module disabled
Change-Id: I07ac43bc9d2d877d8f427058b2d62c62d065c558
2019-01-31 18:13:03 -08:00
Martin Stjernholm b024cac947 Merge "Make libnative*.so from the Runtime APEX libs accessible to vendor binaries." am: d664c9d952 am: 27b6f13af2
am: 601a7c37d1

Change-Id: Ia6ec7ce93391b0f63fe64ecae95bbadaf2b027d2
2019-01-31 13:51:23 -08:00
Xiaoyong Zhou 66e2127c47 Loads fsverity keys
This CL calls mini-keyctl to load fsverity keys.

Bug: 112038861
Test: cat /proc/keys
Change-Id: I3b7cf85c2f64116a56349c54ed5fa4e8cf14a730
2019-01-31 13:48:04 -08:00
Treehugger Robot d664c9d952 Merge "Make libnative*.so from the Runtime APEX libs accessible to vendor binaries." 2019-01-31 21:15:28 +00:00
Pete Bentley a358fbe73e Merge "Export libjavacore into the conscrypt linker namespace." am: 43c17b0c03 am: e29eba6ce1
am: a47bd41419

Change-Id: Ic6c52c442e379232d20f57dfc6eb45c658b4cd06
2019-01-31 11:47:49 -08:00
Martin Stjernholm 60b259b93a Make libnative*.so from the Runtime APEX libs accessible to vendor binaries.
Test: Flash and boot
Test: Boot test on internal tree
Bug: 119840313
Change-Id: I7c87519f94af2eeef9ebfd0d1e46e7bfca8df5c5
2019-01-31 17:03:16 +00:00
Pete Bentley 7b967bf6cf Export libjavacore into the conscrypt linker namespace.
Needed to allow access to AsynchronousCloseMonitor.

Bug: 123121395
Bug: 122881655
Test: atest CtsLibcoreOkHttpTestCases:com.squareup.okhttp.CallTest
Change-Id: I1c73a9beb7a083a61ed52e437d7377b2486a34f7
2019-01-31 11:06:41 +00:00
Jiyong Park 06a982691c Proper mount namespace configuration for bionic am: 6866041ff0 am: 43505e3f22
am: 9829a8c5aa

Change-Id: I624273bf06ad96dfee5def80dc16050c52a7a640
2019-01-30 21:29:34 -08:00
Jiyong Park 43505e3f22 Proper mount namespace configuration for bionic
am: 6866041ff0

Change-Id: I2bcb6f2d3e855f1c8b7c3df36c8c3c1ca9e88a4e
2019-01-30 20:59:10 -08:00
Treehugger Robot a15f385821 Merge changes from topic "move_bionic_to_apex3"
* changes:
  Handle adb sync with Bionic under /bionic
  Proper mount namespace configuration for bionic
2019-01-31 04:46:49 +00:00
chenbruce 770bdd9ebe Merge "Add more comments for resolv apex." am: dd70df2e69 am: 38944bba7f
am: 8a3db3d4fb

Change-Id: I13200df139dfd08d6d93b579daf89a1cd53cc51b
2019-01-30 06:21:55 -08:00
Treehugger Robot dd70df2e69 Merge "Add more comments for resolv apex." 2019-01-30 13:56:30 +00:00
Jiyong Park 6866041ff0 Proper mount namespace configuration for bionic
This CL fixes the design problem of the previous mechanism for providing
the bootstrap bionic and the runtime bionic to the same path.

Previously, bootstrap bionic was self-bind-mounted; i.e.
/system/bin/libc.so is bind-mounted to itself. And the runtime bionic
was bind-mounted on top of the bootstrap bionic. This has not only caused
problems like `adb sync` not working(b/122737045), but also is quite
difficult to understand due to the double-and-self mounting.

This is the new design:

Most importantly, these four are all distinct:
1) bootstrap bionic (/system/lib/bootstrap/libc.so)
2) runtime bionic (/apex/com.android.runtime/lib/bionic/libc.so)
3) mount point for 1) and 2) (/bionic/lib/libc.so)
4) symlink for 3) (/system/lib/libc.so -> /bionic/lib/libc.so)

Inside the mount namespace of the pre-apexd processes, 1) is
bind-mounted to 3). Likewise, inside the mount namespace of the
post-apexd processes, 2) is bind-mounted to 3). In other words, there is
no self-mount, and no double-mount.

Another change is that mount points are under /bionic and the legacy
paths become symlinks to the mount points. This is to make sure that
there is no bind mounts under /system, which is breaking some apps.

Finally, code for creating mount namespaces, mounting bionic, etc are
refactored to mount_namespace.cpp

Bug: 120266448
Bug: 123275379
Test: m, device boots, adb sync/push/pull works,
especially with following paths:
/bionic/lib64/libc.so
/bionic/bin/linker64
/system/lib64/bootstrap/libc.so
/system/bin/bootstrap/linker64
Change-Id: Icdfbdcc1efca540ac854d4df79e07ee61fca559f
2019-01-30 19:18:22 +09:00
chenbruce d771740030 Add more comments for resolv apex.
Describe the link of resolv apex detailedly.

Bug: 119527674
Test: make; flash; lsof -p $(pidof netd)
Change-Id: I0f6038eb9950c6b862a257d0a6f35f19cb83a328
2019-01-30 17:03:09 +08:00
Martin Stjernholm 019d501145 Merge "Add libnativebridge.so link to vndk_lite linker config." am: 0b6d56e68b am: 8f13a7f400
am: 8da4c5243c

Change-Id: Icdcd1889df0031fc1541f623ca9539ede5287c56
2019-01-29 00:39:18 -08:00
Martin Stjernholm 626c7ca588 Add libnativebridge.so link to vndk_lite linker config.
Getting it back in line with the normal ld.config.txt. This was missed in
http://r.android.com/854740.

Test: Flash and boot on marlin
Bug: 119867084
Bug: 113373927
Change-Id: Ic7e482133250eda20ff2c94c27bdee30e015ab5c
2019-01-28 19:11:29 +00:00
chenbruce 919554343f Merge "Linker namespace configuration for the Resolv APEX." am: 2d3ef2a22f am: c114fa270d
am: 17cc1c07cc

Change-Id: I43bf5b8960003d5a012f87a349e680599bb8e792
2019-01-28 09:09:09 -08:00
Treehugger Robot 2d3ef2a22f Merge "Linker namespace configuration for the Resolv APEX." 2019-01-28 15:21:52 +00:00
Nicolas Geoffray 9fa65fc307 Merge "Make runtime namespace visible." am: 3ea7785ee9 am: 79c48f1a83
am: 5e3f606bf4

Change-Id: Id4dfdc3f7a7229ee8bfe315b9830432768fab467
2019-01-28 01:57:52 -08:00
Nicolas Geoffray 3ea7785ee9 Merge "Make runtime namespace visible." 2019-01-28 09:16:21 +00:00
chenbruce aa87fd5f7d Linker namespace configuration for the Resolv APEX.
Support netd to load resolv Apex.
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.

Bug: 119527674
Test: make; flash; lsof -p $(pidof netd)
Test: 1. manual test datacall/wifi work
      2. manual test tethering work
      3. system/netd/tests/runtests.sh
Change-Id: I3f69e85f2f529636f0ef29a2d9d71ad582c46dfb
2019-01-28 16:42:58 +08:00
Jiyong Park 6d7affb54f Merge "Remove permitted path for non-isolated namespace" am: ce17f19bc8 am: 8f6b3ed826
am: d7add90cd3

Change-Id: I08debb40a730cf511b1e02c21db46bd7dd29e305
2019-01-25 22:19:43 -08:00
Treehugger Robot ce17f19bc8 Merge "Remove permitted path for non-isolated namespace" 2019-01-26 06:01:48 +00:00
Wei Wang 6379e920be Merge "Fix path for default prop" am: 3c2c9d8d43 am: 9155524429
am: e1c2e0d283

Change-Id: I467ca7aa10a9546d759f4232b56ef7eae1228f6f
2019-01-25 20:45:21 -08:00
Treehugger Robot 3c2c9d8d43 Merge "Fix path for default prop" 2019-01-26 04:22:37 +00:00
Jiyong Park c84bbb0079 Remove permitted path for non-isolated namespace
No reason to have permitted path for non-isolated namespace.

Bug: 123303398
Test: N/A
Change-Id: Iaddb358efab7a2017c17f74ee53a9d711646b57c
2019-01-26 11:34:40 +09:00
Nicolas Geoffray a9b4f2b66b Make runtime namespace visible.
So that ART can look it up by name.

Test: m && boots
Change-Id: Ib747a92e7decad2f9effe976a771a4eb0becc440
2019-01-26 01:06:43 +00:00
Dongwon Kang 61f1908142 Merge "Add mediametrics to ld.config.legacy.txt" am: 9819ade714 am: 1d80f81bd3
am: 22bfd8727c

Change-Id: I889f80ed5c9efb4e47cf2492f192b0f64df2223a
2019-01-25 14:10:43 -08:00
Dongwon Kang 9819ade714 Merge "Add mediametrics to ld.config.legacy.txt" 2019-01-25 21:40:33 +00:00
Neil Fuller 21c7e44754 Merge "Move APEX symlink creation to alternative module" am: e41489a9a1 am: 76ff6282e8
am: 8dd123cda9

Change-Id: I1728fe8f5688b4e60509b2ee7ede73bac11e4889
2019-01-25 11:09:36 -08:00
Neil Fuller e41489a9a1 Merge "Move APEX symlink creation to alternative module" 2019-01-25 18:42:12 +00:00
Wei Wang 0d78bfbc09 Fix path for default prop
Bug: 123407630
Test: boot
Change-Id: Ia10ac6ad141e980abb07d7b37487f9de9ef64796
2019-01-25 10:30:47 -08:00
Dongwon Kang 0095e35fdd Add mediametrics to ld.config.legacy.txt
Test: TH
Bug: 119675363
Change-Id: Ic2fa2cf1931b40f0f476e8be797aa0db9a2582b7
2019-01-25 09:26:17 -08:00
Justin Yun 6f0d756bec Merge "vndk: workaround for building ld.config.<ver>.txt" am: c6792c3643 am: 9483b21143
am: d4628bec66

Change-Id: Ie58af30ae0864cb9a750282e3f201dd405b002e0
2019-01-25 08:15:37 -08:00
Justin Yun 5579bf14f6 vndk: workaround for building ld.config.<ver>.txt
ld.config.27.txt requires additional search paths for vendor
processes. Substitute '#VNDK27#' when building ld.config.<ver>.txt.
If <ver> equals 27, remove '#VNDK27#'. Otherwise, remove whole line
that starts with '#VNDK27#'.

Bug: 123209911
Bug: 123390078
Test: build ld.config.27.txt
Change-Id: Ie3a284ab39f17fa2f9a3285e080b2ba0da3663dc
2019-01-25 19:49:19 +09:00
Nicolas Geoffray 42ec8b24b5 Merge "Add APEX namespaces in ld.config.legacy.txt." am: 0e964ad1e8 am: dcdbd53a2b
am: 390f961d2a

Change-Id: Ia5f891d1981db2a12cab44541809f03d0787bdb5
2019-01-25 02:02:41 -08:00
Nicolas Geoffray 0e964ad1e8 Merge "Add APEX namespaces in ld.config.legacy.txt." 2019-01-25 09:44:20 +00:00
Ray Essick aba9905402 Merge "give media apex access to libmediametrics" am: 6a92b5c9c3 am: 8123770797
am: ea4d6d33ab

Change-Id: I04f534befefa7362ee977d515c8b823997a44720
2019-01-25 00:46:14 -08:00
Ray Essick baa0ce3785 give media apex access to libmediametrics
Bug: 112555455
Test: build, ctsmedia
Change-Id: I5455449533a6647fb2b4f617728ae693b2156fb9
2019-01-24 19:45:00 -08:00
Nicolas Geoffray ad12560306 Add APEX namespaces in ld.config.legacy.txt.
Used by chrome-os and potentially automotive.

Test: m
Bug: 123092860
Bug: 123303398
Change-Id: I21d166d5866da2049aa5383ce856df329332e2a8
2019-01-24 21:20:47 +00:00
Neil Fuller 48a92d715d Move APEX symlink creation to alternative module
Move APEX symlink creation to alternative module, one that
is targeted at /system not /. Also added comments to reflect
the tenuous connection between the module chosen and the
symlink creation.

Tested with:
rm -rf out/target/product/taimen/system \
  && make droid \
  && ls -l out/target/product/taimen/system/usr

Test: See above
Bug: 122985829
Bug: 123333111
Change-Id: I841dd42827ac2e082505ebf039f40fd394514e54
2019-01-24 13:01:38 +00:00
Jiyong Park 51460dba19 Merge "Add search paths for asan build" am: 6b6259a083 am: 8e206db77b
am: b00159449f

Change-Id: Ib9138ee5707a66226a04b704e804079b195da606
2019-01-24 04:46:34 -08:00
Treehugger Robot 6b6259a083 Merge "Add search paths for asan build" 2019-01-24 12:23:36 +00:00
Neil Fuller 254becca98 Merge "Add a symlink for the ICU .dat file" am: 792fd03955 am: 9ce21c1911
am: 88d1451e98

Change-Id: I72f26533024f4202b69cb8893288c38cc15dc95f
2019-01-24 02:36:05 -08:00
Neil Fuller 792fd03955 Merge "Add a symlink for the ICU .dat file" 2019-01-24 10:02:26 +00:00
Jiyong Park 59e355c441 Add search paths for asan build
Bug: 123292626
Test: aosp_cf_x86_pasan boots
Change-Id: Ifdc86285cbb2d7eb2b1e39983981e7b81aec59c9
2019-01-24 15:08:06 +09:00
Justin Yun 8d43e3b369 Merge "vndk: do not use prebuilt ld.config.<ver>.txt" am: e72308c6b1 am: 2ab4e5a353
am: e1ae4b40c5

Change-Id: Ida915f98b5b87b1c5ea31cb0d18d83f39d186f8b
2019-01-23 19:24:12 -08:00
Treehugger Robot e72308c6b1 Merge "vndk: do not use prebuilt ld.config.<ver>.txt" 2019-01-24 02:47:06 +00:00
Chris Wailes e45bda10e2 Added a new socket to Zygote init scripts.
This change adds new socket declarations to the init scripts for the
Zygote processes.  This socket is used for communication between the
System Server and the Blastula pool.

Bug: 68253328
Topic: zygote-prefork
Test: build image; flash device; launch apps
Change-Id: I5dbb87770b1a3100c6c122bb39ca854006bb0b0d
Merged-In: I5dbb87770b1a3100c6c122bb39ca854006bb0b0d
2019-01-23 13:37:27 -08:00
Martin Stjernholm ba01a4cc5b Merge changes from topic "runtime-ld-configs" am: d35c4ccc40 am: 00f2f79179
am: 432c4cd11f

Change-Id: Ia1a199a51a601e38180f44b18842b79b348d5bab
2019-01-23 10:00:01 -08:00
Martin Stjernholm d35c4ccc40 Merge changes from topic "runtime-ld-configs"
* changes:
  Make libdexfile_external.so accessible from binaries and libraries in /system.
  The runtime namespace needs to be visible since libopenjdk is loaded through dlopen().
2019-01-23 17:03:12 +00:00
Martin Stjernholm c02464ced9 Make libdexfile_external.so accessible from binaries and libraries in /system.
There are dependencies on libdexfile_external from some central libraries
that are widely used (b/123186083).

One example is vendor/bin/hw/android.hardware.media.omx@1.0-service, which
requries the link from "system" to "runtime" in the [vendor] section.

The direct dependants are libunwindstack and simpleperf, so it's enough to
link from namespaces containing /system/{lib,lib64,bin}.

Test: Flash and boot
Test: Flash and boot with Runtime APEX enabled (http://r.android.com/q/topic:art-move-libs-to-runtime-apex)
Bug: 123186083
Bug: 113373927
Change-Id: I081aa7392c875202acdaf1185c2ff28e17ac7e76
2019-01-23 15:45:59 +00:00
Neil Fuller f40156d69c Add a symlink for the ICU .dat file
The ICU .dat file was moved into the runtime APEX file
in commit b6d855f081c232309961f31c7c7c8a76abf79c3c.
There are some apps that know the old location and its
absence causes them to fail.

This change adds a symlink from the old directory to
the new directory. The ICU .dat file changes its name
with every ICU major release so this is simpler than
linking the file itself.

Bug: 119293618
Bug: 120853401
Bug: 122985829
Test: make droid / inspect output
Test: Confirm broken app works on an internal master build
Change-Id: I452dcb5e52975011c9ebd3db2caa621bbefedaf3
2019-01-23 12:03:48 +00:00
Justin Yun ebe4e2404b vndk: do not use prebuilt ld.config.<ver>.txt
Regardless of VNDK version, use template ld.config.txt instead of
using prebuilt ld.config.txt.

Bug: 74658756
Bug: 123209911
Test: PRODUCT_EXTRA_VNDK_VERSIONS=27 m -j vndk_snapshot_package
Change-Id: I0eb527b71e56c555079c524542508a093bf53111
2019-01-23 19:22:29 +09:00
Nicolas Geoffray 119e95b3b6 Merge "Conscrypt should only link against bionic." am: 1cab2c6bec am: 31e937429c
am: 06710823aa

Change-Id: Ic884d79df46b625e78f1b0bda03a368322bcef50
2019-01-23 01:30:49 -08:00
Martin Stjernholm 1fc8a55ba7 The runtime namespace needs to be visible since libopenjdk is loaded through dlopen().
Test: Flash and boot
Test: Flash and boot with Runtime APEX enabled (http://r.android.com/q/topic:art-move-libs-to-runtime-apex)
Bug: 113373927

Change-Id: I555ea988f56d1ee8e7488997a923207de044630f
2019-01-22 18:32:09 +00:00
Chris Wailes ca11579b6c Added a new socket to Zygote init scripts.
This change adds new socket declarations to the init scripts for the
Zygote processes.  This socket is used for communication between the
System Server and the Blastula pool.

Bug: 68253328
Change-Id: I5dbb87770b1a3100c6c122bb39ca854006bb0b0d
Topic: zygote-prefork
Test: build image; flash device; launch apps
2019-01-22 09:42:06 -08:00
Nicolas Geoffray 88bdf80d17 Conscrypt should only link against bionic.
Also remove useless code in native_loader.cpp

Test: m
Change-Id: Id176256cc36fa32d3f722e1443429cb9fbec05f2
2019-01-22 15:32:23 +00:00
Nicolas Geoffray abc1c8b905 Merge "Revert "Revert "Introduce conscrypt linker namespace.""" am: 4d30819263 am: af8e980ed1
am: fd6a05085c

Change-Id: Ie935c28c91dd88fc99b04fc556d2fcba71246fbd
2019-01-22 06:43:47 -08:00
Nicolas Geoffray 56bbf65ecf Merge "Add 'media' namespace in ld.config.txt" am: 7fa20386c3 am: f495d92287
am: bc60897aec

Change-Id: I9714df74f50dc6ebe72b3cc564ef7d2de41577e0
2019-01-22 01:34:15 -08:00
Nicolas Geoffray 1cd3d41313 Merge "Delay zygote startup until after the Runtime APEX has been mounted." am: 876cd75748 am: ce0abc4d93
am: 3639043906

Change-Id: Ifb657a5725de5092d1202b32d4e0288433882726
2019-01-22 01:18:39 -08:00
Nicolas Geoffray 890e3bf4e7 Revert "Revert "Introduce conscrypt linker namespace.""
This reverts commit 5701a47685.

Bug: 123185917
Test: CtsJdwpTestCases
Test: android.signature.cts.api.killswitch_debug_class

Reason for revert: Fixed CtsJdwpTestCases and KillSwitchTest.

Change-Id: I6a074038a4e974875d68ca6a371f6a87ad48bce9
2019-01-22 09:15:22 +00:00
Nicolas Geoffray 7fa20386c3 Merge "Add 'media' namespace in ld.config.txt" 2019-01-22 08:51:10 +00:00
Dongwon Kang c19263bcd0 Add 'media' namespace in ld.config.txt
Test: build & boot & atest MediaPlayer2Test
Bug: 112766913, Bug: 123185917
Change-Id: I6bccc5d767c108af5e71ad5cf64a1d4d48227761
2019-01-21 11:23:04 -08:00
Nicolas Geoffray 97f0c48712 Merge "Revert "Introduce conscrypt linker namespace."" am: e606e00042 am: 3326da5bb7
am: 9ea6ac833b

Change-Id: I50c9696c6049a4183da388dd659fe87e88982a4d
2019-01-21 09:44:38 -08:00
Nicolas Geoffray 5701a47685 Revert "Introduce conscrypt linker namespace."
This reverts commit 67a09e5791.
Exempt-From-Owner-Approval: Fixes P0 failures.

Bug: 123185917


Reason for revert: media namespace needs to be introduced.

Change-Id: I0c28798a3143c1e627278c3a908207e670171416
2019-01-21 17:23:31 +00:00
Nicolas Geoffray 95cb5d8303 Merge "Introduce conscrypt linker namespace." am: 8922048185 am: 70df103b96
am: a3370d6bd4

Change-Id: I87d60938dc7c32865a6ea8aad4dd3514450e14c5
2019-01-21 04:21:41 -08:00
Nicolas Geoffray 67a09e5791 Introduce conscrypt linker namespace.
And have the linker translate a java library path from an apex
to a linker namespace.

Bug: 122874359
Test: m, boots, gtest, run-test, CtsJdwpTests
Change-Id: I216c3509c45589d28acdac068aec53877aeb104a
Exempt-From-Owner-Approval: Carrying Jiyong's +2
2019-01-21 12:05:13 +00:00
Martin Stjernholm 440efa5796 Delay zygote startup until after the Runtime APEX has been mounted.
It depends on libdexfile_external, libnative{bridge,helper,loader} and
libart(d), which are provided by the Runtime APEX.

Test: flash & boot
Test: atest CtsJdwpTestCases
Bug: 113373927
Change-Id: I0df99f444e892c47a5f06bd1bcf5d184defb4517
2019-01-21 10:55:31 +00:00
Dan Willemsen 621cff03f7 Merge "Remove LOCAL_MODULE_TAGS := debug" am: 763bac7826 am: 67d1b381f9
am: 151bc1c2de

Change-Id: Ic9b215432453476130a0d45b4e4387c7159de9de
2019-01-19 00:14:30 -08:00
Dan Willemsen 763bac7826 Merge "Remove LOCAL_MODULE_TAGS := debug" 2019-01-19 07:39:56 +00:00
Sudheer Shanka b8b6df2ae9 Merge "Reland "Create new mount directory /mnt/runtime/full."" am: c39ed35d82 am: 5e4c507abd
am: ec21712d16

Change-Id: I59446c2d66b016119579b4c2b17e65997d4a3f10
2019-01-18 17:46:58 -08:00
Sudheer Shanka c39ed35d82 Merge "Reland "Create new mount directory /mnt/runtime/full."" 2019-01-19 00:24:23 +00:00
Sudheer Shanka 81c687dff8 Reland "Create new mount directory /mnt/runtime/full."
This will be used for system internals to access
secondary volumes without having to bypass sdcardfs.

This reverts commit 54b8844b13

Bug: 121277410
Test: manual
Change-Id: Id5b995dc5899b5999f1dea662ba1c3ee475a0e46
2019-01-19 00:21:10 +00:00
Dan Willemsen ceaf4e76e5 Remove LOCAL_MODULE_TAGS := debug
It's replaced with entries in PRODUCT_PACKAGES_DEBUG in
build/make/target/product/base_system.mk

Test: treehugger
Change-Id: I4dc69c34ddc2c494fc74bc4afee6efa240c9b0d3
2019-01-18 15:16:50 -08:00
Srinivas Paladugu 6fabbecd97 Merge "Allow write access to system_server on zram sysfs" 2019-01-18 23:00:32 +00:00
Jiyong Park d7daac2c75 Merge changes from topic "revert_move_bionic_to_apex" am: e0c7a8bbdd am: 555b7ead70
am: e9f4339db8

Change-Id: Ic4054f6ea0845ff6576b0ada314e01e7b0eb7299
2019-01-18 02:41:06 -08:00
Jiyong Park 8b73dfc0a4 Revert "Bionic libs and the dynamic linker are bind mounted"
This reverts commit 2599088ff6.
Reason: Breaks some 3p apps.

Bug: 122920047
Test: run the app, login.
Change-Id: Idea332b1f91e9d2ac6ebd3879da7820c8ba2284f
2019-01-18 12:30:51 +09:00
Srinivas Paladugu 3a63283aff Allow write access to system_server on zram sysfs
System server needs to be able to write to idle and
writeback nodes in the zram sysfs directory.

Bug: 117682284
Bug: 122674343
Test: Test writeback on go ref device
Change-Id: I1cd663b73a7ebb255fe7e459601e720961bbd69e
2019-01-16 20:54:58 -08:00
Sudheer Shanka 285767556c Merge "Revert "Create new mount directory /mnt/runtime/full."" am: 3daecf5977 am: 9ced0aae27
am: 7b4f851966

Change-Id: I4db125c3daeda219d41b47f163851f5a70acee1c
2019-01-16 18:24:34 -08:00