Commit Graph

573 Commits

Author SHA1 Message Date
Jimmy Chen
a6b28ca5eb Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" am: 1bf4072c78 am: a29505af31
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2115076

Change-Id: Id14c36a6cdfc6b01e97846c38238f14fc231cfe0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 01:44:21 +00:00
Jimmy Chen
f46b780f16 p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test
Bug: 230699791
Test: atest android.net.wifi.cts.ConcurrencyTest#testP2pSetWfdInfo
Change-Id: Ic25dc6d7b18bad38863acfd32d839155da28141b
2022-06-08 15:38:18 +08:00
Neil Fuller
808b9f1b73 Merge "Add a Y2038 check into the time_detector" 2022-05-10 11:44:09 +00:00
Neil Fuller
2ff5ec1aad Add a Y2038 check into the time_detector
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.

This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.

The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.

Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Merged-In: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
2022-05-10 10:01:58 +00:00
Neil Fuller
4b8d4c830c Merge "Add a Y2038 check into the time_detector" into tm-dev-plus-aosp 2022-05-06 16:53:29 +00:00
Treehugger Robot
e0ceb9de72 Merge "Add USE_CUSTOM_VIRTUAL_MACHINE permission to Shell" am: 87e124332d am: ea4f257004
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2081684

Change-Id: I5f93d5daaaf09eb1d1a257df44bb2781828b734d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 02:19:17 +00:00
Neil Fuller
b1f132b5e6 Add a Y2038 check into the time_detector
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.

This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.

The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.

Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Ignore-AOSP-First: The change will be cherry-picked upstream
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
2022-05-03 19:19:53 +00:00
Inseob Kim
0052c6c370 Add USE_CUSTOM_VIRTUAL_MACHINE permission to Shell
The permission allows a package to create a protected VM with custom
config. It's used by MicrodroidHostTestCases.

Bug: 207769805
Test: atest MicrodroidHostTestCases
Change-Id: If049d26c0ef97695098979c4a36fe1f7f607af5a
2022-05-02 18:05:26 +09:00
Iris Yang
d24c070acb Make READ_NEARBY_STREAMING_POLICY adoptable by shell for CTS tests
Bug: 217224856
Test: atest android.devicepolicy.cts.NearbyAppStreamingPolicyTest && atest android.devicepolicy.cts.NearbyNotificationStreamingPolicyTest
Ignore-AOSP-First: This new permission is part of a T-targeting feature
Change-Id: I303549d4f9fcf639da3d4981a8887c3ba55434fc
2022-04-14 21:52:23 +08:00
Seth Moore
d690893b54 Merge "Add new privileged permission for unique id attestation" 2022-04-06 12:40:27 +00:00
Seth Moore
d18fe9e3ce Add new privileged permission for unique id attestation
This permission will eventually replace the sepolicy that we have now,
making it possible to test unique id attestation, which is no longer
possible due to the deprecation of shared uids.

Skipping automerger because the framework manifest has diverged too
much across aosp and tm-dev to allow for clean auto merges, and
presubmits block.

Test: KeyAttestationTest
Bug: 216778747
Merged-In: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Change-Id: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
2022-04-05 13:56:27 -07:00
Peiyong Lin
a2df99e5eb Merge "Allow Shell to have permission for CTS." into tm-dev 2022-04-05 02:23:55 +00:00
Peiyong Lin
7479cbc372 Allow Shell to have permission for CTS.
Add ACCESS_FPS_COUNTER to Shell in order to run CTS properly.

Ignore-AOSP-First: permission doesn't exist in AOSP yet.
Bug: b/220029298
Test: atest TaskFpsCallbackCtsTest
Test: atest TaskFpsCallbackCtsTest --instant
Change-Id: Ica37bafff368f4a0027f9549de6a31ce3254c986
2022-03-30 17:17:50 +00:00
Neil Fuller
fddc4e2741 Add Shell permission to support manual testing
Add android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE to the shell
process to enable command-line injection of time zone suggestions to the
time_zone_detector service.

Shell already has permissions like SET_TIME_ZONE that allow the time
zone to be set directly, so this is not a security regression.

Bug: 227337462
Test: adb shell cmd time_zone_detector suggest_telephony_time_zone --slot_index 0 --zone_id Europe/London --quality single --match_type country
Merged-In: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
Change-Id: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
2022-03-30 13:28:57 +00:00
Neil Fuller
c55590c810 Add Shell permission to support manual testing
Add android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE to the shell
process to enable command-line injection of time zone suggestions to the
time_zone_detector service.

Shell already has permissions like SET_TIME_ZONE that allow the time
zone to be set directly, so this is not a security regression.

Bug: 227337462
Test: adb shell cmd time_zone_detector suggest_telephony_time_zone --slot_index 0 --zone_id Europe/London --quality single --match_type country
Ignore-AOSP-First: Merge conflict, AOSP cherry-pick will land after
Change-Id: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
2022-03-30 13:28:01 +00:00
arangelov
556bc1a363 Add ACCESS_PDB_STATE to shell permissions
This is needed for CtsPersistentDataBlockManagerTestCases

Bug: 220030410
Test: none
Change-Id: I8d3e75caa1eece052d5495fc06c8beb3ca76b480
2022-03-29 18:17:11 +00:00
Seth Moore
14e9f41072 Merge "DO NOT MERGE Add new privileged permission for unique id attestation" into tm-dev 2022-03-29 15:04:06 +00:00
Seth Moore
4d8825e4da DO NOT MERGE Add new privileged permission for unique id attestation
This permission will eventually replace the sepolicy that we have now,
making it possible to test unique id attestation, which is no longer
possible due to the deprecation of shared uids.

Skipping automerger because the framework manifest has diverged too
much across aosp and tm-dev to allow for clean auto merges, and
presubmits block.

Test: KeyAttestationTest
Bug: 216778747
Change-Id: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
2022-03-25 10:21:40 -07:00
Alex Johnston
f7a1a20815 Require TRIGGER_LOST_MODE permission for sendLostModeLocationUpdate
Changes:
* Use TRIGGER_LOST_MODE permission to gate the
  DevicePolicyManager API sendLostModeLocationUpdate

Bug: 223148704
Test: atest android.devicepolicy.cts.LostModeLocationTest
Change-Id: If15388a377c75b7581c9c2a35b3d9828f78e13fc
Merged-In: If15388a377c75b7581c9c2a35b3d9828f78e13fc
2022-03-24 12:29:28 +00:00
Jack He
9d8b6c7b32 Merge "Shell: Grant BLUETOOTH_PRIVILEGED permission to Shell" am: 69e560995c am: eada5871f4 am: 384882aada
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031463

Change-Id: Id694d0b7240a3ffb757b9ba0f87469b97aca0dd8
2022-03-19 00:55:12 +00:00
Jack He
fedd79c9d7 Shell: Grant BLUETOOTH_PRIVILEGED permission to Shell
* So that we can run CTS test with Shell permission

Bug: 225250442
Test: make
Change-Id: I9bf52d9325732c8ea1fef102591da1198b8c4fae
2022-03-18 00:33:22 -07:00
Etan Cohen
19b2879e24 Merge "Add MANAGE_WIFI_INTERFACES to the shell permission" am: dc2f8bfaee am: 8dcf52fdd9 am: ab6b6abfcd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2021397

Change-Id: I9356201e6a6817e3ab69c196e2f86ab622cc4c53
2022-03-15 00:21:17 +00:00
Etan Cohen
dc2f8bfaee Merge "Add MANAGE_WIFI_INTERFACES to the shell permission" 2022-03-14 23:03:25 +00:00
TreeHugger Robot
78a0333f67 Merge "Add a system API to make a package become visible to other package" into tm-dev 2022-03-11 05:21:08 +00:00
Rhed Jao
829792d752 Add a system API to make a package become visible to other package
Expose a system API PackageManager#makeUidVisible for
mainline module to make a package become visible to the caller.

Bug: 222205552
Test: atest AppEnumerationTests
Test: atest PermissionPolicyTest
Ignore-AOSP-First: (for packages/Shell/AndroidManifest.xml) Permission
Change-Id: I6cf322ddfea09a8a4c0c442a6789af4e79d294d7
2022-03-11 10:53:08 +08:00
Oscar Shu
6793c6fd69 Merge "Rename MANAGE_WIFI_AUTO_JOIN to MANAGE_WIFI_NETWORK_SELECTION" am: 2349f6f641 am: 64c4227b11 am: c917ab08d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2019225

Change-Id: If94a79731f5a7605717e10cf978f9c42b78cea11
2022-03-11 01:32:42 +00:00
Etan Cohen
bee32e37f6 Add MANAGE_WIFI_INTERFACES to the shell permission
Enable CTS validatio of the protected APIs.

Bug: 223512835
Test: builds
Change-Id: Ie34564e2bc09937636629b395cc303b1f2c0a537
2022-03-10 22:23:32 +00:00
xshu
b869dbaee6 Rename MANAGE_WIFI_AUTO_JOIN to MANAGE_WIFI_NETWORK_SELECTION
Change to request for the updated permission.

Bug: 219947411
Test: compile
Change-Id: Iaf31a24080961a5e224bbd3871649fe7694dc3a5
2022-03-09 16:04:55 -08:00
kholoud mohamed
53a01ab1ed Add new permission PROVISION_DEMO_DEVICE
The new permission allows holders to provision a demo device as a fully
managed device.

Bug: 222476910
Test: N/A
Change-Id: Ie36b05d62a8972a142d5b9b8792b0e59dd1f5602
2022-03-03 17:04:13 +00:00
Treehugger Robot
cc2d08db85 Merge "Add shell permission for CTS test" am: 94dd832f60 am: 24d521a6bb am: a72c59093b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1972639

Change-Id: Icabb84612057b380a581236d7e638d687589bf2e
2022-02-24 08:02:20 +00:00
Brian Lindahl
ee41663e2c Add shell permission for CTS test
The MEDIA_RESOURCE_OVERRIDE_PID permission is needed to create codecs on
behalf of other processes for correct MediaCodec resource reclaiming
behavior.

Bug: 217746837
Test: atest MediaCodecResourceTest
Change-Id: I75f2b33f7fee6d6e84ed7aec94eccd8aee5e4b20
2022-02-23 20:29:53 +00:00
Xiaowen Lei
a650c2c4b7 Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager.
Bug: 216630470
CTS-Coverage-Bug: 220371902
Test: manual
Test: atest CtsAppTestCases:KeyguardLockedStateApiTest
Ignore-AOSP-First: (for packages/Shell/AndroidManifest.xml) Permission
not yet publicly announced.

Change-Id: I1f44ec6799b0f74791613389ce28aadf84c9fe5c
2022-02-19 03:48:40 +00:00
Hunter Knepshield
6297982e45 Merge "Give shell BIND_TELECOM_CONNECTION_SERVICE for CTS" 2022-02-17 18:55:25 +00:00
Treehugger Robot
08155b3fd2 Merge "p2p: add MANAGE_WIFI_AUTO_JOIN permission for CTS external approver tests" am: 2a491d487f am: 7faee6e286 am: 3cf3a321e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1985827

Change-Id: Iaec2d433251d6ea1a3c9ece2f73c1202e510fbb2
2022-02-17 05:40:42 +00:00
Jimmy Chen
6d7c9fa967 p2p: add MANAGE_WIFI_AUTO_JOIN permission for CTS external approver tests
Wi-Fi Direct external approver APIs require MANAGE_WIFI_AUTO_JOIN
permission and CTS tests need to use Shell to invoke these
privelege APIs.

Bug: 218166551
Bug: 159038892
Test: atest ConcurrencyTest
Change-Id: Ia5c1c749e38fe94992c6364d0fd6117707834eb5
2022-02-16 12:00:16 +08:00
Kathy Chen
17a4a4e2ff Fix a bug where after the client calls startConsentActivity(), the framework is not loading the test activity as expected. Add permission to shell for cts test.
Test: end-to-end test with dev aiai and wellbeing apks
Bug: 218708840
Change-Id: Ia1c6a3575d85df274b4e6fcbed4881e576fcbfac
Ignore-AOSP-First: to prevent new feature leak.
2022-02-10 23:59:25 +00:00
Kyeongkab.Nam
5e4c395cdb Guard TIF vendor extension APIs by new permission
Guard TvInputManager#getAvailableExtensionInterfaceNames() and
TvInputManager#getExtensionInterface() by
android.Manifest.permission.TIS_EXTENSION_INTERFACE.

Bug: 215189795
Bug: 193052431
Test: run cts -m CtsTvTestCases -t
android.media.tv.cts.TvInputManagerTest

Change-Id: I43d4f063b0a602f00f7f71e8fe08fb09c7a763bf
2022-02-07 12:19:54 -08:00
Dave McCloskey
994e4e4b70 Merge "Add TRUST_LISTENER to the shell for use in CTS tests" am: f4a4508e64 am: 9845deb4e9 am: 911482e768 am: 1a22e966e5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962480

Change-Id: Icfd3343b7a629878201f04013afa3d9dfc4f499a
2022-02-05 00:09:28 +00:00
Dave McCloskey
f4a4508e64 Merge "Add TRUST_LISTENER to the shell for use in CTS tests" 2022-02-04 22:58:26 +00:00
Peiyong Lin
817d4a78eb Allow Shell to access MANAGE_GAME_ACTIVITY.
Allow Shell to have MANAGE_GAME_ACTIVITY permission in order to run CTS.

Bug: b/202414447
Test: atest GameServiceTest
Ignore-AOSP-First: not-yet-published new permission.
Change-Id: I11a64d4e2819e5a94ae59d280eaa165dce51f518
2022-02-04 08:00:27 +00:00
Maciej Żenczykowski
1ff3c31349 Merge "Revert "Allow Shell to access MANAGE_GAME_ACTIVITY."" 2022-02-04 02:43:44 +00:00
Michael Eastwood
8563bb2bd3 Revert "Allow Shell to access MANAGE_GAME_ACTIVITY."
This reverts commit 9d9268e635.

Reason for revert: DroidMonitor: Potential culprit for Bug b/217792792 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I8f0f469a8fd83b8096e2d2c595a588a762443a88
2022-02-04 01:21:02 +00:00
Peiyong Lin
2a3f3807aa Merge "Allow Shell to access MANAGE_GAME_ACTIVITY." 2022-02-03 22:54:38 +00:00
Treehugger Robot
698279f7d4 Merge "Add NEARBY_WIFI_DEVICES to shell permissions for CTS" am: 5d4effbd23 am: e4ee7f0e2e am: c144be7ef4 am: 0ff22a2817
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1966019

Change-Id: Iefec7643bc26a244a107eaadda7b55667258dd8e
2022-02-03 02:37:36 +00:00
Treehugger Robot
5d4effbd23 Merge "Add NEARBY_WIFI_DEVICES to shell permissions for CTS" 2022-02-03 00:51:24 +00:00
Peiyong Lin
9d9268e635 Allow Shell to access MANAGE_GAME_ACTIVITY.
Allow Shell to have MANAGE_GAME_ACTIVITY permission in order to run CTS.

Bug: b/202414447
Test: atest GameServiceTest
Ignore-AOSP-First: not-yet-published new permission.
Change-Id: I595c3b36c79c08b6c4092b6eb3fad8f704a11d65
2022-02-02 23:51:35 +00:00
Antonio Kantek
3237ec6669 Merge "(TouchMode Permission) Update shell permission" am: 9d625f5392 am: 74927c2995 am: 952554a16f am: 822f1965c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959747

Change-Id: I3e3075eea443242d67ce9f05156b379772e467fe
2022-02-01 23:28:36 +00:00
Antonio Kantek
e06f3d2e3f (TouchMode Permission) Update shell permission
Update shell permission with MODIFY_TOUCH_MODE_STATE

Bug: 198487159
Test: manual
Change-Id: Ib5d5fd6298f281fe1339781026f4a2f471267747
2022-02-01 17:00:54 +00:00
xshu
a8460ad918 Add NEARBY_WIFI_DEVICES to shell permissions for CTS
Bug: 197776854
Test: build
Change-Id: I51f8441e3744a4137042abe602d700a4ab757fe1
2022-01-28 17:05:48 -08:00
Robert Horvath
5dfac22224 Merge changes from topics "low-power-standby-api", "lps-wakelock-testapi"
* changes:
  Add API to configure LPS maintenance mode behavior
  Add TestApi to force Low Power Standby to be active
  Add TestApi wakelock flag to have system acquire wakelock
  Allowlist active voice interaction session from Low Power Standby
  Introduce Low Power Standby API and wakelock restrictions
2022-01-28 12:27:05 +00:00