Commit Graph

6969 Commits

Author SHA1 Message Date
Ryan Prichard
4d713d73fe Merge "Stop exporting symbols from app_process" am: c6bd7008f8 am: 8dd59dbacf am: f3c96b232c am: 26b3515c57
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1727416

Change-Id: I34219aa6a2042b2a427b64ebad5398314d69ed05
2021-06-15 21:40:44 +00:00
Ryan Prichard
f3c96b232c Merge "Stop exporting symbols from app_process" am: c6bd7008f8 am: 8dd59dbacf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1727416

Change-Id: I92f7607c39944f62e94f09ddd6c891a7aa25ed88
2021-06-15 21:22:16 +00:00
Ryan Prichard
6b86dfb159 Stop exporting symbols from app_process
Any symbols exported from the executable override everything else in
every linker namespace. Previously, app_process exported the
signal/sigchain API, but that interposition is now handled by
libsigchain.so.

Bug: http://b/190100879
Test: `nm -D --defined-only app_process{32,64}` shows no symbols
Change-Id: I1ab1fc700c34e91535c3e679a471debbb4eb71e3
2021-06-11 16:27:32 -07:00
Ryan Mitchell
d2befedf9f Merge changes I6da18cdb,I9de6ba64,I1af88c6d,I154783ff into sc-dev am: dc628e77a1 am: 9246beb4bd am: fd8380f389
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14752601

Change-Id: I2a0ed41abe0c899184f1c34065a64d692b8eb584
2021-06-03 15:41:23 +00:00
Ryan Mitchell
dc628e77a1 Merge changes I6da18cdb,I9de6ba64,I1af88c6d,I154783ff into sc-dev
* changes:
  idmap2: fix cpplint warnings
  OMS: include idmap data in dump
  idmap2: create in-memory FRRO before creating file
  OMS: update shell command --help
2021-06-03 15:02:22 +00:00
Mårten Kongstad
1195a6bd46 idmap2: fix cpplint warnings
Bug: 189963636
Test: frameworks/base/cmds/idmap2/static-checks.sh
Change-Id: I6da18cdbbd2fc33db711696445230a9f316dc143
2021-06-02 21:55:28 +00:00
Mårten Kongstad
99ae898d3c OMS: include idmap data in dump
Teach the overlay manager to ask the idmap service to pretty print the
contents of each idmap file as part of OMS dump. This creates a single
entry point for dumping both OMS and idmap data, and circumvents the
problem of accessing the idmap service if it has been killed due to
inactivity.

Example idmap section:

---- 8< ----
IDMAP OF com.android.theme.color.sand
Paths:
    target path  : /system/framework/framework-res.apk
    overlay path : /product/overlay/AccentColorSand/AccentColorSandOverlay.apk
Debug info:
    W failed to find resource 'string/accent_color_overlay'
Mapping:
    0x0106006e -> 0x7f010000 (color/accent_device_default_dark -> color/accent_device_default_dark)
    0x01060070 -> 0x7f010001 (color/accent_device_default_light -> color/accent_device_default_light)
---- >8 ----

Bug: 189963636
Test: adb exec-out dumpsys
Test: adb exec-out cmd overlay dump
Test: adb exec-out cmd overlay dump <overlay-identifier>
Change-Id: I9de6ba646ad4714c9d0f0d8081fbf632577107e7
2021-06-02 21:54:40 +00:00
Mårten Kongstad
a384fb7637 idmap2: create in-memory FRRO before creating file
Re-order the serialization of an FRRO and creation of the backing file.
This prevents a dangling (empty) file if the serialization fails.

Bug: 189963636
Test: manual: cmd overlay fabricate <bad parameters>, verify no file created in /data/resource-cache
Change-Id: I1af88c6d2d1c3a881beecfb50ccaf541a249f39b
2021-06-02 19:33:50 +00:00
Ryan Mitchell
e72a6bcfc3 Merge changes from topic "inc-dis" into sc-dev am: 488522c9c5 am: a1cb15f54e am: 1e7576afd4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14505818

Change-Id: Ie2f775bf589806c4d4982f78d3acd2291cf6472b
2021-05-28 03:19:30 +00:00
Ryan Mitchell
c0416698db Disable incremental hardening on own resources
When an application is incrementally installed, and a resources
operation fails due to the resources not being fully present,
the app should crash instead of swallowing the error and
returning default values to not alter the experience of
using the application.

Disable IncFsFileMap protections on ApkAssets that are a part of the
application that is running (base and splits).

Bug: 187220960
Test: atest ResourcesHardeningTest
Change-Id: Ibc67aca688720f983c7c656f404593285a54999b
2021-05-27 09:50:36 -07:00
Patrick Baumann
43628ca24c Updates OWNERS files
Bug: 186864416
Test: Builds
Change-Id: I04dfc5c2c7143825334ebc62742e335b8c889492
2021-05-21 14:13:18 -07:00
Patrick Baumann
fd55b563bb Merge changes I04dfc5c2,Idc7e1f3c am: 1ef34e9022 am: 4c56bac295 am: 62bf50bbd8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705089

Change-Id: I78aa27d7521a981d3ef7494c3c2d20b44b048213
2021-05-20 00:22:15 +00:00
Patrick Baumann
62bf50bbd8 Merge changes I04dfc5c2,Idc7e1f3c am: 1ef34e9022 am: 4c56bac295
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705089

Change-Id: Ibea92e6623d660b0bcbc324c8f188642841160dd
2021-05-18 23:16:02 +00:00
Patrick Baumann
e6c0a4f8ce Updates OWNERS files
Bug: 186864416
Test: Builds
Change-Id: I04dfc5c2c7143825334ebc62742e335b8c889492
2021-05-14 15:45:42 +00:00
Ricky Wai
101f1624ce Merge "Revert "Change mounting storage data and obb flag to on by default"" into sc-dev am: 1d42095ddb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14536504

Change-Id: I558b48ae6f982d430c85ae355f9b8695eb587a33
2021-05-14 13:42:24 +00:00
Ricky Wai
1d42095ddb Merge "Revert "Change mounting storage data and obb flag to on by default"" into sc-dev 2021-05-14 13:32:11 +00:00
Wale Ogunwale
6f5423bb8c Revert "Change mounting storage data and obb flag to on by default"
Revert "Remove storage app data isolation checking in CTS"

Revert submission 14325408-enable_storage_iso_2

Reason for revert: b/187939590
Reverted Changes:
I6391b7381:Change mounting storage data and obb flag to on by...
Ic2f3d1be2:Remove storage app data isolation checking in CTS
Iffa8339b1:Change mounting storage data and obb flag to on by...

Bug: 187939590
Bug: 148049767
Change-Id: I7fa2947593d0fe743def804bf4f7b57920978e40
2021-05-14 10:30:54 +00:00
Jing Ji
926b7808ff Merge "Fix the argument list to logcat from am instrument" into sc-dev am: 6dfd2c3105
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14475096

Change-Id: Idff05af0841dc4b797647bbd992e784dbababd11
2021-05-10 18:33:25 +00:00
Jing Ji
fa42613b96 Fix the argument list to logcat from am instrument
Bug: 186570682
Test: am instrument
Change-Id: I3290022c865ca16150c3392657f1fe9d31834fc5
2021-05-07 21:11:24 -07:00
Dominik Laskowski
7f76137fca Merge "screencap: Require display ID in -d switch" 2021-05-03 21:29:32 +00:00
Ricky Wai
b11309b1fc Change mounting storage data and obb flag to on by default
Change mounting storage data and obb flag to on by default

Test: unbundled/launcher/nexus_unit_test_multi_device_platform
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Test: atest AdoptableHostTest
Test: pass cts/cts_postsubmit_cf_stable-cloud-tf

Bug: 148049767
Change-Id: Iffa8339b10427bea96aa90030463ed18c96eafce
2021-04-29 15:59:00 +00:00
Kholoud Mohamed
da3d4e8608 Merge "Revert "Revert "Changed dpm shell commands to use 'cmd device_policy'""" into sc-dev 2021-04-28 08:59:23 +00:00
Kholoud Mohamed
4b2ce108a8 Revert "Revert "Changed dpm shell commands to use 'cmd device_policy'""
This reverts commit dc70c57eaf.

Reason for revert: Fixed failing test

Change-Id: Ib434365f441d69853ea3af6da7f3c663c16e5e1e
2021-04-27 12:54:46 +00:00
Jooyung Han
ed4e70f537 resolve merge conflicts of 2028343503 to sc-dev
Change-Id: I2c9c8597a967a3af3b9bf07df562c6e0f51ca3dd
2021-04-27 04:15:41 +00:00
Jooyung Han
2028343503 Merge "Make OverlayablePolicy as enum type" am: 8e87bfb4fb am: 7e9f9ed9f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1686174

Change-Id: I0127ff53eec8c1e8d9847574a097160fc3e84be6
2021-04-27 03:14:42 +00:00
Robert Horvath
79ff669777 Merge "Conditionally show bootanimation for quiescent boots" into sc-dev 2021-04-26 10:59:51 +00:00
Jooyung Han
274b7bbfbd Make OverlayablePolicy as enum type
It's been used as a container of constants. "enum" suits better.

Fixes: 179836191
Test: m
Change-Id: Icbcda5707c0d2528dcbfad7e5add8d50bc4ec5b9
2021-04-26 13:52:40 +09:00
Martin Stjernholm
8cf06f75a6 Merge "Revert "Changed dpm shell commands to use 'cmd device_policy'"" into sc-dev 2021-04-23 15:56:02 +00:00
Martin Stjernholm
dc70c57eaf Revert "Changed dpm shell commands to use 'cmd device_policy'"
This reverts commit e311f273d4.

Reason for revert: Suspected to break git_sc-dev: https://android-build.googleplex.com/builds/tests/view?invocationId=I95100008561539923&testResultId=TR98321419962361792

Bug: 186208038
Change-Id: I0dc3ee2d509f395677600590d0cbb42b4d9f1682
2021-04-23 13:54:54 +00:00
Kholoud Mohamed
3a7975ee33 Merge "Changed dpm shell commands to use 'cmd device_policy'" into sc-dev 2021-04-23 10:02:54 +00:00
kholoud mohamed
e311f273d4 Changed dpm shell commands to use 'cmd device_policy'
Added the missing commands to DevicePolicyManagerServiceShellCommand and
changed 'adb shell dpm' to call 'adb shell cmd device_policy'

Fixes: 173381875
Test: atest com.android.bedstead.nene.devicepolicy.DevicePolicyTest
Test: atest com.android.bedstead.nene.devicepolicy.ProfileOwnerTest
Test: atest com.android.bedstead.nene.devicepolicy.DeviceOwnerTest
Test: manually tested the migrated commands
Change-Id: Id86382f11cf8197230ef62c33961e01b0b541358
2021-04-22 18:21:49 +01:00
Chun-Yi Lee
1b90144b39 Merge "Move CtsDevicePolicyManagerTestCases to group presubmit-large" into sc-dev 2021-04-22 12:30:10 +00:00
Nicolas Geoffray
db45defb94 Merge "bootanimation: ensure that if a percent is shown, we'll get to 100." am: 87c254de0e am: 10e844df41 am: 55b2ba298c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1681127

Change-Id: I1ee402945af4207affb77d61eb76a21c175ac1fc
2021-04-21 09:54:52 +00:00
Nicolas Geoffray
55b2ba298c Merge "bootanimation: ensure that if a percent is shown, we'll get to 100." am: 87c254de0e am: 10e844df41
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1681127

Change-Id: I6c86286bdb5eb45231ea1106d0e439970b3ec7bc
2021-04-21 09:28:44 +00:00
Nicolas Geoffray
87c254de0e Merge "bootanimation: ensure that if a percent is shown, we'll get to 100." 2021-04-21 08:56:29 +00:00
easoncylee
ac72e3c10c Move CtsDevicePolicyManagerTestCases to group presubmit-large
The test config takes longer than 15mins to run. Move it to a dedicated
group for running slow presubmit Test Mapping test.

Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.

Bug: 174654670
Bug: 174495337
Test: none
Change-Id: I71b6e5b285d0f12b43bf5312f9cde814d2f5f7da
2021-04-21 07:10:36 +00:00
Daulet Zhanguzin
f84ac0f599 Fix build error due to null annotations in core platform API
Change https://r.android.com/1667508 adds nullability annotations to
the core platform APIs which broke this code with the error:

javadoc: error - In doclet class com.google.doclava.Doclava,  method
start has thrown an exception
java.lang.reflect.InvocationTargetException
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
androidx.annotation.RecentlyNonNull not found

Bug: 183938110
Bug: 185929373
Test: m checkbuild

Change-Id: I83e3071f851720a9f719cb226f0e84fd731a8f37
Merged-In: I83e3071f851720a9f719cb226f0e84fd731a8f37
2021-04-20 22:06:32 +01:00
Nicolas Geoffray
a12987512c bootanimation: ensure that if a percent is shown, we'll get to 100.
Seeing 100 while booting is not finished, or seeing eg 90 while booting
is not finished isn't user-friendly.

Test: update ART module, see percent progress
Change-Id: I5509c83f661f937f00a7d28c789df509e3528a37
2021-04-20 15:15:06 +01:00
Daulet Zhanguzin
db11353c46 Merge "Fix build error due to null annotations in core platform API" into rvc-qpr-dev-plus-aosp am: b016acc8c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14236420

Change-Id: Iedceb78f447cdaaadf1a816f0ea073c3043d70fa
2021-04-20 13:14:59 +00:00
Daulet Zhanguzin
fc7efcbaa6 Fix build error due to null annotations in core platform API
Change https://r.android.com/1667508 adds nullability annotations to
the core platform APIs which broke this code with the error:

javadoc: error - In doclet class com.google.doclava.Doclava,  method
start has thrown an exception
java.lang.reflect.InvocationTargetException
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
androidx.annotation.RecentlyNonNull not found

Bug: 183938110
Test: m checkbuild

Change-Id: I83e3071f851720a9f719cb226f0e84fd731a8f37
Merged-In: I83e3071f851720a9f719cb226f0e84fd731a8f37
2021-04-20 09:13:18 +00:00
Robert Horvath
8c878d61bb Conditionally show bootanimation for quiescent boots
Allow bootanimation to play if the boot is quiescent and the system
property ro.bootanim.quiescent.enabled is set to true.
This allows the bootanimation to become visible if the display is
turned on during the bootanimation. If OEMs want this behavior and the
device implements suppression of video/audio during quiescent boot,
they can set the system property
ro.bootanim.quiescent.enabled.

Bug: 185118020
Test: PRODUCT_PRODUCT_PROPERTIES += ro.bootanim.quiescent.enabled=true
      adb reboot quiescent
      Spam `adb shell input keyevent POWER` during boot
Test: Repeat the above test with the property set to 0
Change-Id: I54a4ad552704106ca06c4992fed4a2d501aa3fa5
2021-04-15 16:47:59 +02:00
Bill Yi
4167bf213c Merge RQ2A.210405.006 to aosp-master - DO NOT MERGE
Merged-In: I735b41ed53ce7d374b5d36c4aee79f73d0334234
Merged-In: I9999bfe514fffa9f300643e74942db5ae556670a
Change-Id: If4b670a158e561d8feb03e12aef2d295c5109d43
2021-04-13 19:36:45 -07:00
Jeffrey Huang
090ceb3af9 Merge "Close the FD after opening the file" into sc-dev 2021-03-31 19:57:57 +00:00
Jeffrey Huang
ab40ab67ce Close the FD after opening the file
Bug: 183758470
Test: Manually took incident report and verified the file is deleted
Change-Id: I040306c2365bcf98efde94fcc15575c9131f3b0e
2021-03-30 15:03:39 -07:00
Svet Ganov
8d2ed50604 Runtime permission attribution improvements
When an app is proxying access to runtime permission protected
data it needs to check whether the calling app has a permission
to the data it is about to proxy which leaves a trace in app ops
that the requesting app perofmed a data access. However, then the
app doing the work needs to get the protected data itself from the
OS which access gets attributed only to itself. As a result there
are two data accesses in app ops where only the first one is a
proxy one that app A got access to Foo through app B - that is the
one we want to show in the permission tracking UIs - and one
for the data access - that is the one we would want to blame on
the calling app, and in fact, these two accesses should be one -
that app A accessed Foo though B. This limitation requires fragile
one off workarounds where both accesses use the same attribution
tag and sys UI has hardcoded rules to dedupe. Since this is not
documented we cannot expect that the ecosystem would reliably
do this workaround in apps that that the workaround in the OS
would be respected by every OEM.

This change adds a mechaism to resolve this issue. It allows for
an app to create an attribution context for another app and then
any private data access thorugh this context would result in a
single app op blame that A accessed Foo though B, i.e. we no longer
have double accounting. Also this can be nested through apps, e.g.
app A asks app B which asks app C for contacts. In this case app
B creates an attribution context for app A and calls into app C
which creates an attribution context for app B. When app C gets
contacts the entire attribution chain would get a porper, single
blame: that C accessed the data, that B got the data from C, and
that A got the data form B. Furthermore, this mechanism ensures
that apps cannot forget to check permissions for the caller
before proxying private data. In our example B and C don't need
to check the permisisons for A and B, respectively, since the
permisisons for the entire attribution chain are checked before
data delivery. Attribution chains are not forgeable preventing
a bad actor to create an arbitrary one - each attribution is
created by the app it refers to and points to a chain of
attributions created by their corresponding apps.

This change also fixes a bug where all content provider accesses
were double counted in app ops due to double noting. While at
this it also fixes that apps can now access their own last ops.
There was a bug where one could not pass null getting the attributed
ops from a historical package ops while this is a valid use case
since if there is no attribution everything is mapped to the null
tag. There were some app op APIs not being piped thorough the app
ops delegate and by extension through the app ops policy. Also
now that we have nice way to express the permission chain in a
call we no longer need the special casing in activity manager to
handle content provider accesses through the OS. Fixed a bug
where we don't properly handle the android.os.shell calls with
an invlaid tag which was failing while the shell can do any tag.

Finally, to ensure the mechanims is validated and works end-to-end
we are adding support for a voice recognizer to blame the client
app for the mic access. The recognition service can create a blaming
context when opening the mic and if the mic is open, which would
do all permission checks, we would not do so again. Since changes
to PermissionChercker for handling attribution sources were made
the CL also hooks up renounced permissoins in the request permission
flow and in the permission checks.

bug:158792096
bug:180647319

Test:atest CtsPermissionsTestCases
     atest CtsPermissions2TestCases
     atest CtsPermissions3TestCases
     atest CtsPermissions4TestCases
     atest CtsPermissions5TestCases
     atest CtsAppOpsTestCases
     atest CtsAppOps2TestCases

Change-Id: Ib04585515d3dc3956966005ae9d94955b2f3ee08
2021-03-29 16:49:33 +00:00
Dominik Laskowski
0bda2e3cfb screencap: Require display ID in -d switch
Remove undocumented fallback to layer stack, since virtual displays can
now be specified by their unambiguous IDs.

Bug: 182939859
Test: screencap -d <id>
Change-Id: I86a8e713d8076abe55aeeb327fd9d746c46e5a40
2021-03-23 19:12:58 -07:00
Ricky Wai
5b7bdf95bc Merge "Revert "Change mounting storage data and obb to on by default"" into sc-dev 2021-03-19 16:03:54 +00:00
Ricky Wai
6a47d1fe93 Revert "Change mounting storage data and obb to on by default"
Revert submission 13469849-turn_on_iso-sc-dev

Reason for revert: Failing existing CTS b/182843583
Reverted Changes:
If819ee161:Change mounting storage data and obb to on by defa...
I46a095448:Change mounting storage data and obb to on by defa...

Change-Id: I7b33baebe150ab78551c7b4368320f056cdcbceb
2021-03-19 14:21:46 +00:00
Nicolas Geoffray
f920684a60 Merge "Make libsigchain a regular shared library dependency of app_process." am: 2fea6f3f77 am: 5040afaa3e am: 07618a5539
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1621159

Change-Id: Ide62fa6706d8d473f00372864e989c8579d3bf44
2021-03-17 15:57:46 +00:00
Ricky Wai
4f1ad7e423 Merge "Change mounting storage data and obb to on by default" into sc-dev 2021-03-15 14:03:43 +00:00