Commit Graph

2096 Commits

Author SHA1 Message Date
Treehugger Robot aaee497db2 Merge "Enable fsverity signature checking" 2019-03-19 16:40:48 +00:00
Roland Levillain d503239292 Merge "Include tests directories in the linker legacy configuration." 2019-03-19 10:17:10 +00: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 fc0f79f8a8 Merge "List stable libraries media apex relies on." 2019-03-16 05:34:09 +00: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
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
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 822dbd8911 Merge "Add an env variable for the tzdata module root" 2019-03-13 08:49:30 +00: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
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
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
Roland Levillain ecef987a35 Merge "Fix a typo in linker configuration comments." 2019-03-08 11:48:43 +00: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
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
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
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
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 0c49d1759c Add a DEX2OAT_BOOTCLASSPATH variable.
Bug: 119800099
Test: m
Change-Id: I8ae4ecea6da2ef541736a38822b100a620d72a8a
2019-02-26 12:57:17 +00: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
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 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
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
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
Tom Cherry acfb705603 Merge "Export init.environ.rc in early-init instead of init" 2019-02-16 17:53:53 +00: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