Commit Graph

2718 Commits

Author SHA1 Message Date
Tobias Thierer 79dcab5b1f Merge "init.rc: Move /system/bin/boringssl_self_test{32,64} call to early-init."
am: 6f735df0d1

Change-Id: I929c1cfc6158b26e7f4472205529ecb8a23c763a
2019-09-13 01:33:07 -07:00
Treehugger Robot 6f735df0d1 Merge "init.rc: Move /system/bin/boringssl_self_test{32,64} call to early-init." 2019-09-13 08:22:29 +00:00
Tobias Thierer bda0554bb2 init.rc: Move /system/bin/boringssl_self_test{32,64} call to early-init.
This should ensure that the self tests run before any other binaries
that load libcrypto and which would otherwise run into SELinux denials
trying to create the marker file /dev/boringssl/selftest/[hash]

The invocation of the self test binaries from the Conscrypt apex
requires the apex to be mounted so it remains at a later point in
the boot process.

Bug: 137267623
Test: Treehugger
Change-Id: I34266d6e9d2f394fffa8a2c7725479b5770d119c
2019-09-13 03:31:42 +01:00
TreeHugger Robot 8aeccd0deb Merge "Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master" into stage-aosp-master 2019-09-11 20:31:33 +00:00
Colin Cross 537e4af235 Merge changes from topic "protobuf-3.9.1"
* changes:
  Use installed paths of vndk libraries for ld.config.txt
  Adapt to google::protobuf::int64 type change
2019-09-11 18:00:15 +00:00
Tobias Thierer 9caa15b5c3 init.rc: drop spurious trailing ':'.
The accidental trailing ':' appears to stop the line
triggering.

Bug: 137267623
Test: Checked the /system/bin/boringssl_self_test32
      now runs on aosp_cf_x86_phone-userdebug

Change-Id: I7b4b1d6b838d8d1a7a0db7f104a94b34962df030
2019-09-10 13:38:55 +00:00
Nikita Ioffe 8bdbea8df5 Remove `start vold` action from post-fs-data
vold is already started during early-fs which happens before
post-fs-data.

Trying to start it again in post-fs-data is a little bit confusing.

Test: device boots
Change-Id: I5faefe6d1f1bb7472ea3d032b1f157c69da565f1
2019-09-09 14:50:33 +01:00
Xin Li b13f817bb4 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: I0600f3b6f15c25247dc70b62d41f2dd6af2f33d8
Merged-In: I888fee03478bbf90a37cd9a905c49de614cc99ff
2019-09-08 13:07:02 -07:00
Tobias Thierer 983f76b3c6 Merge "Init: Run boringssl self test via separate binaries." 2019-09-07 23:46:00 +00:00
Victor Hsieh 8129f86141 Move fsverity_init to after class_start core
The script needs to run after keystore, which is now a core service.
Note the previous APEX requirement by ART is no longer needed.

Test: see keys loaded
Bug: 112038744
Change-Id: I02fb6ce193bb301488b259421f120e6aa6cd75b9
2019-09-06 15:49:58 -07:00
Colin Cross 6dfc460a41 Use installed paths of vndk libraries for ld.config.txt
The installed file name of modules may not match the module name.
Use module-installed-files to get the installed file name.

Bug: 117607748
Test: m checkbuild
Test: only libprotobuf-cpp-*-3.9.1.so changed in ld.config.R.txt
Change-Id: I83b7519f344b65b6cd98c4cabcf9bce0e753ba92
Merged-In: I83b7519f344b65b6cd98c4cabcf9bce0e753ba92
2019-09-05 14:46:16 -07:00
Treehugger Robot 50e408db2d Merge "Limit the compat symlinks to ART binaries." 2019-09-05 19:33:38 +00:00
Tobias Thierer 1136f1592a Init: Run boringssl self test via separate binaries.
Instead of init.cpp knowning about the boringssl self
test, use init.rc to exec dedicated self test executables.

Advantages:
 - The self test is run not only both the copy of libcrypto
   in /system but also /apex/com.android.conscrypt.
 - The self test is run not only for the primary (e.g. 64bit)
   ABI but also for a secondarry (e.g. 32bit) ABI.
 - The dependency on libcrypto is kept to the self test binary.
 - The self test binary abstracts the exact native API for
   running the self test (this will change soon because the
   self test will be run when the library is loaded).

Bug: 137267623
Test: Check that logcat shows both binaries being started as root,
      and finishing with exit code 0.

Change-Id: I1e716749ee2133993f0f7b2836483391fd1a62f0
2019-09-05 01:41:08 +01:00
Martin Stjernholm c72fd9a9ca Limit the compat symlinks to ART binaries.
For now, keep symlinks only to the binaries demonstrably in use by apps
(dex2oat and dalvikvm).

Test: adb shell ls -l /system/bin
Bug: 124106384
Change-Id: Id662beb4c13785ac9d44bf41f9f33907219b69be
2019-09-02 12:32:42 +00:00
Martin Stjernholm 9c72fb6f08 Merge changes from topic "art-without-bionic"
am: 0c100685dc

Change-Id: I814ac6be70ff8ec197b71d2b68578fba75ac3b4a
2019-09-02 03:46:05 -07:00
Martin Stjernholm bb55e0776f Update paths and names for the new ART APEX.
am: df96e1f25c

Change-Id: I971a44846276c7e8432bf27fa9465c86f33a1cd2
2019-09-02 03:45:36 -07:00
Martin Stjernholm df96e1f25c Update paths and names for the new ART APEX.
Test: Build & boot
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
Merged-In: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
2019-08-30 17:47:31 +01:00
Martin Stjernholm 391332d276 Include com.android.runtime in the "runtime" linker namespace.
This is a temporary fix to keep the Bionic-associated libraries accessible
in the runtime namespace, pending a proper namespace split.

Test: Build & boot with taimen_hwasan-userdebug
Bug: 139408016
Bug: 139916951
Exempt-From-Owner-Approval: Approved internally
Change-Id: I27069b20f7c7068b931340f548b284ce1676466c
Merged-In: I27069b20f7c7068b931340f548b284ce1676466c
2019-08-30 17:47:31 +01:00
Jooyung Han 57b4d65eff Merge "ld.config.txt: remove link from rs to vndk"
am: 059b8dacfd

Change-Id: I647b726e70d2c0710b45b15f1bad08ebe2524b19
2019-08-29 09:40:42 -07:00
Treehugger Robot 059b8dacfd Merge "ld.config.txt: remove link from rs to vndk" 2019-08-29 16:18:27 +00:00
Tom Cherry 21fd368dc2 Merge "Start serial console at the 'init' trigger"
am: c70fc1cbfd

Change-Id: I18b1fc5fb667d4938e9d2a8fb9098444ef53259b
2019-08-29 09:07:37 -07:00
Tom Cherry 71c3ef135d Start serial console at the 'init' trigger
Start the serial console at the 'init' trigger instead of much later
when property triggers happen.  This will help debugging early boot
issues.

Test: serial console starts early for a userdebug build
Test: serial console still doesn't start on a user build
Change-Id: I7112a8e7171c9fa865c8787c9a3d14515bc59478
2019-08-28 14:43:07 -07:00
Paul Crowley 95e7252fd8 Merge "Move layout_version to /data/misc/installd"
am: 24f955155a

Change-Id: Icf3e304aff7e4e1e556c6372be932e3c357d1bbe
2019-08-28 13:35:54 -07:00
Paul Crowley 24f955155a Merge "Move layout_version to /data/misc/installd" 2019-08-28 19:56:15 +00:00
Paul Crowley e7812e6787 Merge "Create the rollback directories in init"
am: 7a0948f6c4

Change-Id: Iee1c67c81b5809c645c35211431f5c003c07b167
2019-08-26 17:50:47 -07:00
Victor Hsieh 88da3c4943 Delete fsverity_init.sh for the C++ implementation
Test: fsverity keys are still loaded
Bug: 112038744
Change-Id: I0503ba6bfb7008872e30c1b5052b46d77b2b91d4
2019-08-26 11:22:46 -07:00
Paul Crowley 8184d7c2a5 Create the rollback directories in init
Init sets the encryption policy on these directores when created.

Bug: b/139193659
Test: Boot device without this, then try to boot with it without wiping.
Cherrypicked-From: 7bf42f148a
Change-Id: I6b26710674b51d62fa4a07b06e06c539571fb7ac
Merged-In: I6b26710674b51d62fa4a07b06e06c539571fb7ac
2019-08-25 11:24:40 -07:00
Xin Li d62c31d3ac DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: Ib69c986e30b903cc48ca835fb307acf569930806
2019-08-23 06:45:26 +00:00
Tobias Thierer 93c7c97047 Merge "Let init create /dev/boringssl/selftest/"
am: c3847f599c

Change-Id: I0eb2b4e57a7d5ba7e9bdcb7e3720d13d01c71a9e
2019-08-22 15:55:22 -07:00
Tobias Thierer 3536fdb927 Let init create /dev/boringssl/selftest/
This directory is intended to be used by boringssl
(through the bssl_self_test{,64} binaries) to create /
check for the existence of marker files indicating that
the self test has successfully run.

It appears that because this is an .rc script for init
rather than a shell,
  mkdir -p /dev/boringssl/selftest 0755 root root
wouldn't work.

Bug: 139348610
Bug: 136262690
Test: Checked that after booting, /dev/boringssl/selftest
  exists:
  $ su root ls -l /dev/boringssl
  total 0
  drwxr-xr-x 2 root root 40 1972-02-11 03:27 selftest
Test: Checked that if I instead try:
  mkdir -p /dev/boringssl/selftest 0755 root root
  in init.rc then the directory isn't created (there is
  no error message in logcat because logd is only
  started in line 311).

Change-Id: I12fdd08c8ead152ac4e62cbd0a2099a9d6170ddb
2019-08-22 21:51:09 +01:00
Jooyung Han 52c5aafb21 ld.config.txt: remove link from rs to vndk
Linker namespace 'rs' has /system/lib/vndk-sp in its search paths.
So we don't need to link 'rs' namespace to 'vndk' namespace.

Bug: 139706981
Test: run RS-using apps from Play
Change-Id: I14c1d6c4e7624bbd6551731ea88de1b4c2e5edb6
2019-08-22 12:18:16 +00:00
Paul Crowley 26aabfd1ed Move layout_version to /data/misc/installd
Bug: 139543295
Test: Boot, ensure file is properly created
Change-Id: I919b5599484b4c77f222e640a1f1b5d65198a0c7
2019-08-21 10:12:18 -07:00
Jiyong Park 5652f3898f Merge "neuralnetworks namespace links to system namespace in [vendor] section" am: 12b0eb363d am: 70961c7b9d
am: e9ea0ee930

Change-Id: I69af175c35ce33817c9c70ec41e7026c5452ab1e
2019-08-15 01:11:30 -07:00
Jiyong Park e9ea0ee930 Merge "neuralnetworks namespace links to system namespace in [vendor] section" am: 12b0eb363d
am: 70961c7b9d

Change-Id: I0fc571fce30a0a987f4969e023a3ad7ec55bbd88
2019-08-15 00:50:28 -07:00
Jiyong Park 70961c7b9d Merge "neuralnetworks namespace links to system namespace in [vendor] section"
am: 12b0eb363d

Change-Id: I4186ec14731331410edad536f1d5b3250ecf41a1
2019-08-15 00:41:38 -07:00
Jiyong Park 1d89a7e899 neuralnetworks namespace links to system namespace in [vendor] section
This change fixes a bug that neuralnetworks namespace is linked to the
default namespace in [vendor] section. Default namespace is for
/vendor/lib in [vendor] section. System libraries are available in the
'system' namespace.

Bug: 139113342
Test: N/A
Change-Id: I1b6751e5e33522f9829f3d9ad7371efdce01b0f0
2019-08-15 09:48:07 +09:00
Kiyoung Kim 534b2dd436 Merge "Remove unused link from postinstall section" am: a91d84b6c4 am: 48a396b390
am: 2a508a8705

Change-Id: I6f23fcf6000097c67273325c191f3b3c570c3b4e
2019-08-13 23:18:53 -07:00
Kiyoung Kim 2a508a8705 Merge "Remove unused link from postinstall section" am: a91d84b6c4
am: 48a396b390

Change-Id: I73194d3941ba4cbffd0622913cc7553ea41c3faa
2019-08-13 23:03:00 -07:00
Kiyoung Kim 48a396b390 Merge "Remove unused link from postinstall section"
am: a91d84b6c4

Change-Id: I8c3b4df50daccc79e08726a175a3752fdc98e2e9
2019-08-13 22:52:03 -07:00
Kiyoung Kim a91d84b6c4 Merge "Remove unused link from postinstall section" 2019-08-14 05:16:06 +00:00
Zimuzo Ezeozue a42fe44038 Merge "Allow switching between sdcardfs and FUSE mounts" am: 6c62ae7adb am: 1562c6cd8c
am: ce2f329675

Change-Id: I18edc45447f921af541c02a64eff2f44a88b0468
2019-08-13 02:47:53 -07:00
Zimuzo Ezeozue ce2f329675 Merge "Allow switching between sdcardfs and FUSE mounts" am: 6c62ae7adb
am: 1562c6cd8c

Change-Id: Iece2009781c52ba7b24eecb45324981b83968cf6
2019-08-13 02:41:26 -07:00
Zimuzo Ezeozue 1562c6cd8c Merge "Allow switching between sdcardfs and FUSE mounts"
am: 6c62ae7adb

Change-Id: I707ad8146f4318fd3adf0e641aaac68e76d790b4
2019-08-13 02:35:36 -07:00
Zim c9f8e5dfed Allow switching between sdcardfs and FUSE mounts
This change is part of enabling upcoming platform changes that are
described in the bug linked below.

Bug: 135341433
Test: builds, boots successfully and external storage remains
an sdcardfs mount by default and works correctly
Test: cat /proc/1/mountinfo is unchanged

Change-Id: Idf851b3a42910e0ce8fdd75daea1cce91dd1aa98
2019-08-12 21:37:12 +01:00
Kiyoung Kim d3a3097927 Remove unused link from postinstall section
Linker ignores link configuration if either namespace is not valid.
However there was a link configuration from postinstall section which
target link namespace does not exist. Also, there was no binary within
postinstall from hwasan build (checked with bonito), so there may be no
usage for this section now. Removing this line for better human
readability, and behavior of the linker would be same as before.

Test: m -j && tested from cuttlefish
Change-Id: I0c7b2949d055ba767e1429238e8764ee7798fe44
2019-08-12 03:56:42 +00:00
vichang 6c4a7d3380 Merge "Move ICU .dat" am: ef0bc63043 am: d9153800b4
am: 90954c62d0

Change-Id: Ie0331af8bbef316f0500d8924b91ce2929e7024d
2019-08-08 04:44:25 -07:00
vichang 90954c62d0 Merge "Move ICU .dat" am: ef0bc63043
am: d9153800b4

Change-Id: If12a24762dd0cfce6b82cb7313813daad6d8f6e5
2019-08-08 04:34:24 -07:00
vichang d9153800b4 Merge "Move ICU .dat"
am: ef0bc63043

Change-Id: I263e6dd27acf9c322756bb0111873f7efe156d5c
2019-08-08 04:24:56 -07:00
vichang ef0bc63043 Merge "Move ICU .dat" 2019-08-08 11:06:53 +00:00
David Anderson bdd8164a5f Merge "Implement basic libsnapshot functionality." am: 23a87716b5 am: aa6b5176fb
am: e5878ed97e

Change-Id: I19c8b7b81e44899dc8dbe375bfd58d18cfdf8b3a
2019-08-04 01:59:49 -07:00
David Anderson e5878ed97e Merge "Implement basic libsnapshot functionality." am: 23a87716b5
am: aa6b5176fb

Change-Id: I80df3b72007f52ed761fae0565d94fb21bc75106
2019-08-04 01:41:19 -07:00
David Anderson aa6b5176fb Merge "Implement basic libsnapshot functionality."
am: 23a87716b5

Change-Id: I2c29c0839d7cfefbc4791ab9a447c648e3ed73c0
2019-08-04 01:24:24 -07:00
David Anderson 456e50193b Implement basic libsnapshot functionality.
This CL implements some of the libsnapshot internals necessary to work
with update_engine. In particular it implements snapshot and update
state, as well as creating and mapping snapshot devices. It does not
implement anything related to merging, nor does it implement the full
update_engine flow.

Update state is stored in /metadata/ota/state. To synchronize callers of
libsnapshot, we always flock() this file at the top of public functions
in SnapshotManager. Internal functions are only called while the lock is
held, and a "LockedFile" guard object is always passed through to
indicate proof-of-lock.

Low-level functions, such as snapshot management, have been moved to
private methods. Higher-level methods designed for update_engine will
ultimately call into these.

This CL also adds some functional tests for SnapshotManager. Test state
is stored in /metadata/ota/test to avoid conflicts with the rest of the
system.

Bug: 136678799
Test: libsnapshot_test gtest
Change-Id: I78c769ed33b307d5214ee386bb13648e35db6cc6
2019-08-02 13:30:08 -07:00
Victor Chang 7ea6c1691c Move ICU .dat
Move the symlink destination of /system/usr/icu from Runtime APEX to
i18n APEX

Bug: 137009149
Test: Device boots
Change-Id: I86ff83a28d4124892d2b5d84ff09bc539f76c941
2019-07-26 18:40:33 +01:00
Kiyoung Kim 66c96a84ad Merge "Add libraries txt file to build target" am: becbf6cb5f am: 7e48c78a82
am: 3778a88cb0

Change-Id: If7bc2486444e9862f64b255d14b528196b70770b
2019-07-25 04:03:21 -07:00
Kiyoung Kim 3778a88cb0 Merge "Add libraries txt file to build target" am: becbf6cb5f
am: 7e48c78a82

Change-Id: Ib683165c48b76f2811125c64a2a041cf85e3ed46
2019-07-25 03:53:18 -07:00
Kiyoung Kim 7e48c78a82 Merge "Add libraries txt file to build target"
am: becbf6cb5f

Change-Id: Idb3ea1628ad7d46c60a66fb32954e83dc324f94a
2019-07-25 03:43:24 -07:00
Treehugger Robot becbf6cb5f Merge "Add libraries txt file to build target" 2019-07-25 10:29:39 +00:00
Kiyoung Kim 178129d1c7 Add libraries txt file to build target
Linkerconfig requires more libraries txt files to get library list
related variable values. To make this available from runtime, those
should be added as build target and included in system image.

Bug: 137511540
Test: m -j && tested from cuttlefish
Change-Id: Id3304eea5a7d8f2ffc171cd3b110b7d65e881f8c
2019-07-24 19:19:01 +09:00
Przemyslaw Szczepaniak e9495bb069 Merge "ld.config for com.android.neuralnetworks APEX." am: 2f40aa0f60 am: d91345d64c
am: 18c64a08d6

Change-Id: I522cb101e0dfbcd5a37b47a0f733a1e1aeddfc40
2019-07-24 02:44:41 -07:00
Przemyslaw Szczepaniak 18c64a08d6 Merge "ld.config for com.android.neuralnetworks APEX." am: 2f40aa0f60
am: d91345d64c

Change-Id: I4d0da2ec61249b6cb0f6a3b3d37f1047c444d43c
2019-07-24 02:35:39 -07:00
Przemyslaw Szczepaniak d91345d64c Merge "ld.config for com.android.neuralnetworks APEX."
am: 2f40aa0f60

Change-Id: I64f4f2253d0bf0f789f80a17cecb62ed7a2eb997
2019-07-24 02:25:36 -07:00
Przemyslaw Szczepaniak 2f40aa0f60 Merge "ld.config for com.android.neuralnetworks APEX." 2019-07-24 09:12:18 +00:00
Przemyslaw Szczepaniak 0bb871dc9f ld.config for com.android.neuralnetworks APEX.
Makes updated libneuralnetworks.so in /apex/com.android.neuralnetworks/{LIB}
loadable from all relevant namespaces.

Test: Verified that right library is being loaded using lsof and
Test: verbose debug logs from bionic/ld.
Bug: 137320025
Change-Id: I38140bb9915a3f85f10456e15ed0f492dbdba802
2019-07-22 11:28:42 +01:00
Kiyoung Kim 91467658f1 Merge "Replace xargs with other shell command" am: 18545d3852 am: 6aa4d948b9
am: 08e56a5826

Change-Id: Idc1163dc5a6002addacf174c78c4f79af6192b4a
2019-07-18 19:00:38 -07:00
Kiyoung Kim 08e56a5826 Merge "Replace xargs with other shell command" am: 18545d3852
am: 6aa4d948b9

Change-Id: I5f9d7149598e14dd446bd63722152a0757c86dbe
2019-07-18 18:51:32 -07:00
Kiyoung Kim 6aa4d948b9 Merge "Replace xargs with other shell command"
am: 18545d3852

Change-Id: I08355acaa6c57a557ca53791c00a6e51c02020fb
2019-07-18 18:40:06 -07:00
Treehugger Robot 18545d3852 Merge "Replace xargs with other shell command" 2019-07-19 01:20:15 +00:00
David Anderson f683ab3e97 Merge "Add a metadata folder for libsnapshot." am: 45a1c998d1 am: f1ce0e51bb
am: 888c5f53aa

Change-Id: I3e0f0c6b7e160c41a6006ef6dbd5b1e2c8979827
2019-07-18 16:20:23 -07:00
David Anderson 888c5f53aa Merge "Add a metadata folder for libsnapshot." am: 45a1c998d1
am: f1ce0e51bb

Change-Id: Icd9a9ee21accb3cc6c79f30efe2f4af753b4a51b
2019-07-18 16:10:13 -07:00
David Anderson f1ce0e51bb Merge "Add a metadata folder for libsnapshot."
am: 45a1c998d1

Change-Id: I450ae649c089b3c5108cc26a714d851e6615d298
2019-07-18 16:00:31 -07:00
David Anderson 45a1c998d1 Merge "Add a metadata folder for libsnapshot." 2019-07-18 22:42:13 +00:00
Kiyoung Kim 95d55818a4 Replace xargs with other shell command
Recently Android build team changed environment to use prebuilt toybox
binaries for common tools (aosp/852849). However, as toybox xargs does
not support -I option, update_and_install_ld_config.mk started to fail
filtering out private vndk libraries from the list. To resolve this,
xargs usages are replaced with other shell command (read).

Bug: 137832162
Test: m -j && tested on Cuttlefish
Change-Id: I218ce6272c781f826b87c8efc0d3c77bf6bc3af5
2019-07-18 20:30:44 +09:00
David Anderson 001747e890 Add a metadata folder for libsnapshot.
/metadata/ota will store the update state ("none", "applying",
"booting", "merging") for each dynamic partition. The data will be
managed by libsnapshot, whose primary consumer will be update_engine
but will also be available to recovery/fastbootd.

Bug: 136678799
Test: /metadata/ota exists
Change-Id: I3e06484cafeb363904914767abc8984adaa37021
2019-07-17 19:17:27 -07:00
Elliott Hughes b0fff2743c Merge "Remove perfprofd reference." am: 97c06703f6 am: 03cca21541
am: fa66ee3411

Change-Id: I49cf6f641759d28eedbe262dbcaaab952073feee
2019-07-17 12:05:10 -07:00
Elliott Hughes fa66ee3411 Merge "Remove perfprofd reference." am: 97c06703f6
am: 03cca21541

Change-Id: Ie9e1f86fdbfaa5e1f73fc6d1e4f052c90412b85c
2019-07-17 11:56:06 -07:00
Elliott Hughes 03cca21541 Merge "Remove perfprofd reference."
am: 97c06703f6

Change-Id: If6374e130ff430e7171ac71c7889844aab10775f
2019-07-17 11:47:44 -07:00
Treehugger Robot 97c06703f6 Merge "Remove perfprofd reference." 2019-07-17 18:30:37 +00:00
Elliott Hughes ffaabf54ba Remove perfprofd reference.
Dead and gone.

Test: treehugger
Change-Id: I8c08cada5313ddede5ebb4973d61cef2bb8a0a7e
2019-07-17 08:17:44 -07:00
Tri Vo f474068ae0 Merge "Set /sys/power/wake_lock permissions on init." am: e75c6c841b am: b00894dc64
am: b95867eb30

Change-Id: Id2391be3c5f5f1cd735f09855e86faae2d3d8d93
2019-07-16 19:16:34 -07:00
Tri Vo b95867eb30 Merge "Set /sys/power/wake_lock permissions on init." am: e75c6c841b
am: b00894dc64

Change-Id: I2e3cbbb520fb9451e77ebbe78c3642a2ef152583
2019-07-16 19:05:39 -07:00
Tri Vo b00894dc64 Merge "Set /sys/power/wake_lock permissions on init."
am: e75c6c841b

Change-Id: I300152717163bc5419015c03b5dc23a2beb62422
2019-07-16 18:55:40 -07:00
Tri Vo c6a84e873b Set /sys/power/wake_lock permissions on init.
system_suspend need to be an early_hal as it's required before storage
encryption can get unlock on FDE devices.

/sys/power/wake_lock is a dependency of system_suspend (only in Q and
earlier). Permissions on this file need to be set early enough.

Bug: 136777986
Bug: 133175847
Test: boot blueline
Change-Id: I8a9d3374b327e451fb98d2279d1bac9477a9560d
2019-07-16 14:33:00 -07:00
Daniel Rosenberg d7d475d470 Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 997a2d93d7.

Reason for revert: This revert is needed, just also need some selinux rules for changes to the script that runs if this folder is present.

Bug: 136199978
Change-Id: Ie0544954965e3c90abc2f833c41949976c3bea65
(cherry picked from commit 35708b9d7b)
2019-07-16 02:55:21 +00:00
Kiyoung Kim 4a98682a56 Merge "Run linkerconfig from init process" am: 2f174171d7 am: 7b64a9a73a
am: 78f234e0a4

Change-Id: I3f66fa2247ea11d302d209b84f2439767778767d
2019-07-15 18:12:39 -07:00
Kiyoung Kim 78f234e0a4 Merge "Run linkerconfig from init process" am: 2f174171d7
am: 7b64a9a73a

Change-Id: I6956a7fb29162d0209ab496ecb378d0a7ff42aaa
2019-07-15 17:50:29 -07:00
Kiyoung Kim 7b64a9a73a Merge "Run linkerconfig from init process"
am: 2f174171d7

Change-Id: I1c228374303842ce7d02cb30ee23c83ef43808d9
2019-07-15 17:39:34 -07:00
Kiyoung Kim 2f174171d7 Merge "Run linkerconfig from init process" 2019-07-16 00:32:13 +00:00
Daniel Rosenberg 93e092b214 Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev am: 11bf3545ab
am: e48e3c8931

Change-Id: I77e41d1c4c186f48d7c1b7f9de1ed903cb1f1c15
2019-07-15 13:33:03 -07:00
Daniel Rosenberg e48e3c8931 Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: 11bf3545ab

Change-Id: I33b45da532ba677053c0866504a22ca43b1284b2
2019-07-15 13:22:02 -07:00
Daniel Rosenberg 11bf3545ab Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-15 19:56:35 +00:00
Daniel Rosenberg 35708b9d7b Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 997a2d93d7.

Reason for revert: This revert is needed, just also need some selinux rules for changes to the script that runs if this folder is present.

Bug: 136199978
Change-Id: Ie0544954965e3c90abc2f833c41949976c3bea65
2019-07-12 23:43:56 +00:00
Gerry Fan 85316e7bad Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev am: ff7da227db
am: c9aff9869d

Change-Id: If7bdc7163796d078ff8bc968849089087129d3d8
2019-07-12 10:33:02 -07:00
Gerry Fan 3f17869556 Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: ff7da227db

Change-Id: I6f6ec4b8472a3017c47d49a910e9ca982cae6eff
2019-07-12 10:24:00 -07:00
Gerry Fan c9aff9869d Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: ff7da227db

Change-Id: I42b5fdcdb6b87afe44353d830f6b1b5c0c645fc0
2019-07-12 10:24:00 -07:00
Gerry Fan ff7da227db Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-12 17:11:23 +00:00
Gerry Fan 997a2d93d7 Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 891a011394.

Reason for revert: Some Test failed, need more investigation

Bug: 136199978
Change-Id: Ibad0dad02a6701447c39ddcc805d44c9e68bdcce
2019-07-12 15:23:12 +00:00
Hung-ying Tyan 415110595b Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev am: 346c17bbc9
am: b8aaa13a5f

Change-Id: Ib33cd581f66b470ec5d8c289e34d4866931517a9
2019-07-12 02:58:08 -07:00
Hung-ying Tyan 3061693f5d Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev
am: 346c17bbc9

Change-Id: I1c99ad74d9b1ee7e486183b4c62ec732d2d23114
2019-07-12 02:49:38 -07:00
Hung-ying Tyan b8aaa13a5f Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev
am: 346c17bbc9

Change-Id: I501695115c2c84345db0c78e8694fd31686b7ee7
2019-07-12 02:49:37 -07:00
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