Commit Graph

2231 Commits

Author SHA1 Message Date
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