Commit Graph

61 Commits

Author SHA1 Message Date
Alexander Dorokhine
0b291791c8 DO NOT MERGE: Remove AppSearch from Android R.
Test: presubmit
Bug: 150249538

Change-Id: Idb86be6586ae400552f8ceeca5c667fba8e0c43a
2020-02-25 21:15:03 -08:00
Automerger Merge Worker
cc653d9b3c Merge "Add /sys/kernel/tracing/trace_marker to whitelist" am: e77dc7a00b am: 679c324ba7 am: e444680c96
Change-Id: I3fbd4d1644d8fa170532edefee9833b904175ba5
2020-02-01 07:26:01 +00:00
Hridya Valsaraju
dc0c12e5de Add /sys/kernel/tracing/trace_marker to whitelist
Add /sys/kernel/tracing/trace_marker to whitelist of paths
that the zygote is allowed to keep open. It currently contains
/sys/kernel/debug/tracing/trace_marker which is only created when
debugfs is mounted. tracefs will be mounted at /sys/kernel/tracing
when debugfs is not mounted.

Test: AtraceHostTest
Bug: 148436518
Change-Id: I734120e8c88ba9d5451a1bd1589e084323824285
2020-01-30 17:50:08 -08:00
Hai Zhang
82a6227fc7 Allow adding framework and service java code into permission APEX.
Along with two empty classes to make build happy.

Bug: 136503238
Test: presubmit
Change-Id: Ib706a7ac4d09374ce220961f9439f712a38f7c0c
2020-01-15 13:56:17 -08:00
Anton Hansson
87743c6d55 Rename sdkext module to sdkextensions
It's a better name.

Bug: 137191822
Test: presubmit
Change-Id: Icc39779d49bf31f911f9f72bd7610e84c5f49466
Merged-In: Icc39779d49bf31f911f9f72bd7610e84c5f49466
(cherry picked from commit 5b97269cff)
2020-01-08 11:42:58 +00:00
Anton Hansson
5b97269cff Rename sdkext module to sdkextensions
It's a better name.

Bug: 137191822
Test: presubmit
Change-Id: Icc39779d49bf31f911f9f72bd7610e84c5f49466
2020-01-08 10:20:33 +00:00
Jeff Davidson
5a9bc1a343 Revert submission 1182953-1576003954286-8455af5a
Reason for revert: Crashes telephony process when saving XML config from carrier apps (b/146727232)
Reverted Changes:
Ieaeec41f1: Whitelist telephony-common, ims-common.
I5588f7615: Add telephony-common, ims-common to telephony apex...
I81e922c0d: Add telephony-common, ims-common to telephony apex...

Change-Id: Ia925fad255fec002cb3d5c66ee41394d6355df2d
Merged-In: Ia925fad255fec002cb3d5c66ee41394d6355df2d
2019-12-26 23:26:55 +00:00
Jeff Davidson
edabc01c5a Revert submission 1182953-1576003954286-8455af5a
Reason for revert: Crashes telephony process when saving XML config from carrier apps (b/146727232)
Reverted Changes:
Ieaeec41f1: Whitelist telephony-common, ims-common.
I5588f7615: Add telephony-common, ims-common to telephony apex...
I81e922c0d: Add telephony-common, ims-common to telephony apex...

Change-Id: Ia925fad255fec002cb3d5c66ee41394d6355df2d
2019-12-26 15:20:48 -08:00
Jeff Sharkey
40182833f7 Move MediaStore.java inside APEX boundary.
Recent work has paved the way to get MediaStore.java building against
"core_platform", and this change is actually shifting MediaStore.java
inside the MediaProvider APEX boundary.

This involves defining a new "updatable-mediaprovider" library JAR
and ensuring that it's spliced into classpaths where needed to keep
everything building and working.

Note that the MediaProvider APK itself is still bundled, so we're
manually including the MediaStore.java when building that APK so that
we can continue referencing @hide symbols, but there's a STOPSHIP
comment to remove that once we get the APK building against
"system_current".

Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I27ed3fde40751d9ac136a31710c62004b1b8962f
2019-12-19 22:16:00 +00:00
markchien
1db6c20884 [Tether14] Add tethering-client jar to whitelist
Allow putting tethering-client into bootclass path.

Bug: 144320246
Test: -build, flash, boot
Change-Id: I42c0f340d11045fbd8ae99fa60a467e643386eff
Merged-In: I42c0f340d11045fbd8ae99fa60a467e643386eff
2019-12-19 12:44:45 +00:00
markchien
e14231d523 [Tether14] Add tethering-client jar to whitelist
Allow putting tethering-client into bootclass path.

Bug: 144320246
Test: -build, flash, boot
Change-Id: I42c0f340d11045fbd8ae99fa60a467e643386eff
Merged-In: I42c0f340d11045fbd8ae99fa60a467e643386eff
2019-12-19 12:33:49 +00:00
Alexander Dorokhine
04a05a8bb2 Move framework-appsearch out of framework.jar.
Test: CtsAppSearchTestCases
Bug: 146218515
Change-Id: I55a8732e54e46877ee448973d735ded2870d9443
2019-12-17 10:41:21 -08:00
David Su
8a48ba7108 Move framework-wifi into the Wifi APEX
Bug: 140299412
Test: device boots up and connects to Wifi
Change-Id: I17e09a7f9b680719189baf96aa22f94f1e8160de
2019-12-16 17:16:07 -08:00
Muhammad Qureshi
237c774468 Create framework-statsd
Create framework-statsd jar in statsd apex.
Move StatsEvent to framework-statsd.jar.
Right now, frameworks jar links against framework-statsd directly. This
should be changed to link against framework-statsd-stubs.

Bug: 145923096
Bug: 145923116
Bug: 142810493

Test: m
Test: flashes successfully
Test: adb shell cmd stats print-logs && adb logcat "*:S statsd:*"

Change-Id: Ife224abd5c9b9b0eeab681dc4b7f71c0bdb856b1
2019-12-16 10:17:03 -08:00
Amit Mahajan
d03fd70f74 Whitelist telephony-common, ims-common.
These need to be whitelisted because they are not part of the jars
in /system/framework/ now. Earlier they were, due to which this was
not required since libs under /system/framework are already
whitelisted (through a separate rule).

Test: basic telephony sanity
Test: m com.android.telephony && adb install com.android.telephony.apex
Bug: 145555313
Change-Id: Ieaeec41f1db527f1dd8568a542697c5ba4a4c419
2019-12-09 14:08:14 -08:00
Anton Hansson
9a96a58496 Add sdkext jar to whitelisted zygote paths
Allows adding this jar to the bootclasspath.

Bug: 137191822
Test: boot
Change-Id: Ia8d77270eb4cd43d47ada6ab1df050110d168e99
2019-12-02 15:40:52 +00:00
Benedict Wong
1b70ca2b89 Add IKE to allowable zygote paths
This change adds the IKE apex to the whitelist of open paths. Without
this change, adding IKE to the boot classpath will fail.

Bug: 143905344
Test: Compiles, doesn't fail.
Change-Id: I63a2531e88b9d715e5089a6dc9fec721970d0de5
2019-11-19 18:47:43 -08:00
Nicolas Geoffray
abbd4a7aa0 Add checks to ensure only the ART memfd file is whitelisted.
A memfd file can be created with any name, but to protect ourselves
from unintended leakage, check that it's the name ART uses.

Test: boots
Bug: 119800099
Change-Id: Ibc684d09dd05f38933c6808b72fb402fc9d5e4eb
2019-10-29 15:45:46 +00:00
Nicolas Geoffray
813b9e8cb4 Whitelist file descriptors created through memfd_create.
ART has the need of creating such a file descriptor.

Bug: 119800099
Test: Device boots
Change-Id: Iefeab88e9f1b2dcf963ea913e416863191a52e8f
2019-10-24 15:33:01 +01:00
Jeongik Cha
3e725f2224 Consider overlay in system_ext as system's
When there is overlay package in system_ext, turn on POLICY_SYSTEM_PARTITION.
In other words, overlay pacakge in /system_ext is considered as system's one

Test: mv vendor/overlay/framework-res__auto_generated_rro.apk system_ext/overlay
      and then check if it works properly.
Bug: 136715327

Change-Id: Ib225368eae41203a8630f4310d26e9cf1afa706a
Merged-In: Ib225368eae41203a8630f4310d26e9cf1afa706a
(cherry picked from commit cba9579158)
2019-09-23 22:01:29 +00:00
Martin Stjernholm
ca19446d9a Merge "Update path to the new ART APEX."
am: 0a4cf715f6

Change-Id: I7ab8cd227ce571041293880dfaca4e2ebb68e536
2019-09-02 03:44:58 -07:00
Martin Stjernholm
28f0a76486 Update path to the new ART APEX.
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ica35fc7f6adade19160cbb16adf5647d189ecc45
Merged-In: Ica35fc7f6adade19160cbb16adf5647d189ecc45
2019-08-30 17:47:31 +01:00
Nicolas Geoffray
e178e46054 Merge "Print the fd that isn't whitelisted." am: cf8db35738
am: 5127a760db

Change-Id: I3504cb8d53c852a46a63a54acba778a8db55f59c
2019-06-14 06:46:17 -07:00
Nicolas Geoffray
983f8a5d9c Print the fd that isn't whitelisted.
Helps diagnosing issues.

Test: boots

(cherry picked from commit a83cad6ac5)

Change-Id: I85eb5ea0e29a101ad0d4227e782778f51f614ea0
Merged-In: I6fb4d40b28233a07e679dda91978a4bdec6c2a24
2019-06-14 13:38:01 +01:00
TreeHugger Robot
b0815b80e8 Merge "Add support for /oem/overlay" into qt-dev 2019-04-24 08:33:38 +00:00
Chris Wailes
87c89eb057 Removed log spam from the Zygote.
This patch removes several debugging log messages.  These messages were
useful when the `FDs to ignore` list was usually empty, but with the
addition of USAPs this has become spammy.

(cherry picked from commit da0a9cd05c)

Test: Build
Bug: 130172109
Change-Id: Id166990a63f20efb3bf6ffd5b697efd436d50921
Merged-In: Id166990a63f20efb3bf6ffd5b697efd436d50921
2019-04-09 17:25:43 +00:00
Mårten Kongstad
eb8a5c0b91 Add support for /oem/overlay
Add support for runtime resource overlay (RRO) APKs in /oem/overlay.

Bug: 121033532
Test: manual (adb push apk to /oem/overlay, reboot, cmd overlay list)
Change-Id: I70b23b11831d57b3241e6057c745aa4ce9f795ef
2019-04-09 06:37:33 -07:00
Chris Wailes
da0a9cd05c Removed log spam from the Zygote.
This patch removes several debugging log messages.  These messages were
useful when the `FDs to ignore` list was usually empty, but with the
addition of USAPs this has become spammy.

Test: Build
Bug: 130172109
Change-Id: Id166990a63f20efb3bf6ffd5b697efd436d50921
2019-04-08 15:52:40 -07:00
Mårten Kongstad
48c24cf149 Add support for /odm/overlay
Add support for runtime resource overlay (RRO) APKs in /odm/overlay.

Bug: 121033532
Test: manual (adb push apk to /odm/overlay, reboot, cmd overlay list)
Change-Id: I0918d276dfa6a43054068d3f84ecd0d1639f1d0b
2019-04-02 11:07:10 -07:00
Chris Wailes
7e797b6f26 Renamed blastula to unspecialized app process (usap)
Bug: 123017829
Test: make & boot & launch apps
Change-Id: Icfb9f8f4ebabacece817735d60d232cf3afb4e08
2019-03-01 13:18:48 -08:00
Nick Kralevich
831cf61d80 Merge "more O_CLOEXEC" am: 350f48328b am: 51aec2267c
am: 8d26cdbd34

Change-Id: I2624180a9284beced0677de070b600c21fa24ae6
2019-01-25 18:10:33 -08:00
Nick Kralevich
0361ce1fdd more O_CLOEXEC
Bug: 120983106
Test: device boots and no obvious problems.
Change-Id: Ia7a426304a8e7fc41d7d8388dbb858b790d98cf1
2019-01-25 10:08:58 -08:00
Nicolas Geoffray
574c6134dd Merge "Add jar files from the runtime APEX in the whitelist." am: 4d3a2f95c6 am: b5a3c59d3a
am: 319db3e9f7

Change-Id: I08b7c53b7676966fa2f4cb6cea03b8f6dc7d9c4a
2019-01-24 07:18:08 -08:00
Nicolas Geoffray
fca69e95a9 Add jar files from the runtime APEX in the whitelist.
Those files moved from /system to the APEX.

Test: m && boots
Change-Id: I68c4c8243dae3eab321da4b0923c1a422d300c10
2019-01-24 09:41:32 +00:00
Chris Wailes
8b35ba25a9 Implemented native functions and types for blastula management.
This patch adds native support for spawning and managing blastula pools,
as well as several code cleanups and modernizations.

Changes includes:
* A function to fork blastulas
* A table for managing blastula-related data
* Functions for adding and removing blastula data from the
aforementioned table
* Switching from NULL to nullptr
* Replacing string-passing error handling with a curried failure
function
* Utility functions for handling managed objects
* JNI functions for blastula pool management

Topic: zygot-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
Change-Id: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
Merged-In: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
2019-01-23 13:34:40 -08:00
Chris Wailes
c0db63f6ac Add the blastula pool sockets to the Zygote whitelist.
This adds the blastula pool sockets from aosp/843736 to the Zygote FD
white list in fd_utils.cpp.

Bug: 68253328
Test: m & flash image & boot
Change-Id: I1ff4bea0a2ea163bf9c1ccc0d80ffd5d04c49191
Merged-In: I1ff4bea0a2ea163bf9c1ccc0d80ffd5d04c49191
2019-01-23 13:34:30 -08:00
Chris Wailes
aa1c962ded Implemented native functions and types for blastula management.
This patch adds native support for spawning and managing blastula pools,
as well as several code cleanups and modernizations.

Changes includes:
* A function to fork blastulas
* A table for managing blastula-related data
* Functions for adding and removing blastula data from the
aforementioned table
* Switching from NULL to nullptr
* Replacing string-passing error handling with a curried failure
function
* Utility functions for handling managed objects
* JNI functions for blastula pool management

Change-Id: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
Topic: zygot-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
2019-01-22 16:07:27 -08:00
Christian Wailes
afad518955 Merge "Add the blastula pool sockets to the Zygote whitelist." 2019-01-22 22:58:18 +00:00
Chris Wailes
032293a197 Add the blastula pool sockets to the Zygote whitelist.
This adds the blastula pool sockets from aosp/843736 to the Zygote FD
white list in fd_utils.cpp.

Bug: 68253328
Test: m & flash image & boot
Change-Id: I1ff4bea0a2ea163bf9c1ccc0d80ffd5d04c49191
2019-01-18 18:14:05 -08:00
Dongwon Kang
0d035539c2 Include updatable-media.jar in bootclasspath & apex
Test: build & boot & MediaPlayer2Test
Bug: 112766913
Change-Id: I66e0b5f9e12f14b1758c0281caac0dfdfe0b5729
2019-01-17 13:35:03 -08:00
Adam Vartanian
ca8cfacc4c Merge "Add APEX conscrypt.jar to Zygote whitelist" am: c586cdd9a9 am: ee87b785a9
am: 244cc0c9c7

Change-Id: I5f5d81ee77a19be699dcb46f3aaa4a4a060095ab
2019-01-15 08:32:34 -08:00
Adam Vartanian
2509575739 Add APEX conscrypt.jar to Zygote whitelist
We are going to use the APEX copy of Conscrypt rather than the
/system/framework copy, so allow the zygote to keep it open.

Test: system boots
Bug: 110404540
Change-Id: I052b31223fa9220d0c67f579d230f06adf8800ba
2019-01-08 11:00:40 +00:00
Chih-Hung Hsieh
90bfeeef5e Merge "Fix/suppress core/jni google-explicit-constructor warnings" am: ddeab2c144 am: e053f576b1
am: a13a9ee327

Change-Id: I48005e97647a95843bd0fd14701493717fa798bb
2018-12-20 17:58:18 -08:00
Chih-Hung Hsieh
0727be1706 Fix/suppress core/jni google-explicit-constructor warnings
* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I15ac3511154b652402c5a21a22ff0c306d806d84
2018-12-20 13:43:46 -08:00
Nick Kralevich
ba43dba34c Merge "fd_utils: carry over O_CLOEXEC on duplicated FDs" am: a4d036e98b am: ac9d96a03c
am: bb67b501f9

Change-Id: I72708593cf1038a5723ab5492d7087a6936c02e6
2018-12-17 00:39:17 -08:00
Nick Kralevich
d9765a4cc0 fd_utils: carry over O_CLOEXEC on duplicated FDs
Due to b/30963384, every time zygote creates a new child, zygote reopens
all existing file descriptors, taking careful measures to preserve the
file status flags, file descriptor flags, and seek offset. However, dup2
resets the sole file descriptor flag (FD_CLOEXEC) on duplication,
defeating the hard work done to preserve the flag.

From "man dup"

  NAME
    dup, dup2, dup3 - duplicate a file descriptor

  DESCRIPTION
    The dup() system call creates a copy ...
    ...
    The two file descriptors do not share file descriptor flags
    (the  close-on-exec flag).  The close-on-exec flag
    (FD_CLOEXEC; see fcntl(2)) for the duplicate descriptor is off.
    ...
    The  dup2() system call performs the same task as dup() ...

Use dup3 instead to allow us to preserve the FD_CLOEXEC status.

Bug: 120983106
Test: Android compiles and boots
Change-Id: Idbb27c83092f30d8394c254cfbdf33406f74eb94
2018-12-14 21:34:44 -08:00
Mårten Kongstad
06a1ac8229 Prepare for switch to idmap2
Prepare the idmap and asset managers for interfacing with idmap2 instead
of today's installd + idmap pipeline, but don't make the switch just
yet.

Instead, idmap2 runs as its own native daemon with an AIDL interface.
This removes the need for installd to fork and exec on each idmap call,
saving about 50 ms per call.

Bug: 78815803
Test: atest OverlayDeviceTests OverlayHostTests
Change-Id: I60852e15d99329896ff9de6559d1e7cd1c67e33d
2018-11-12 13:24:33 -08:00
Florian Mayer
cb397475de Merge "Allow zygote to keep socket to heapprofd." am: 4db6cb15de am: ce9b090733
am: f644eaaaa6

Change-Id: I07b1d821f34c427364260d843d6326305aec19c3
2018-10-31 15:27:35 -07:00
Florian Mayer
6ce2d9966d Allow zygote to keep socket to heapprofd.
This allows users to target zygote for heap profiling without
causing it to crash on ForkCommon.

This also allows us to profile zygote in benchmark runs where we want to
profile as many processes as possible.

Bug: 117821125

Test: m
Test: flashed walleye

Change-Id: I3f41b64e0a64e362eafd02cd4e86cb77e434d94c
2018-10-31 10:32:14 +00:00
Dario Freni
4ce4679309 androidfw changes to support /product-services.
See CL I7a6a30bf8e8db9f2738594d187bb9148f138b8da for a more detailed
description of the change.

Test: see CL I7a6a30bf8e8db9f2738594d187bb9148f138b8da description
Bug: 80741439
Change-Id: I6cc9d713c07c319fc2ee1c531af41243bd1d4aee
2018-08-17 16:34:18 +00:00