921 Commits

Author SHA1 Message Date
Xin Li
d7785982ac Merge "Merge QQ3A.200605.002 into master" 2020-06-06 01:41:11 +00:00
Sung Min Lee
2b3c00b99f Add CAPTURE_AUDIO_OUTPUT permission required for GTS test
GtsDialerAudioTestCases require this privileged permission for testing in GTS.

Bug: 157243201
Test: run gts -m GtsDialerAudioTestCases
Change-Id: I32516e5dcf966b05cfb8ab4956a0cdb183298f2a
Merged-In: I32516e5dcf966b05cfb8ab4956a0cdb183298f2a
2020-06-03 22:09:35 -07:00
Treehugger Robot
2aabf5f792 Merge "Revert "Add a null home activity to Shell.apk"" am: fa8eb3f146
Change-Id: I29823d88ad54c5c8cf67ebc100d0d00f8c7282fd
2020-05-19 03:47:24 +00:00
Treehugger Robot
fa8eb3f146 Merge "Revert "Add a null home activity to Shell.apk"" 2020-05-19 03:29:23 +00:00
Isaac Chen
5bc026a72d Revert "Add a null home activity to Shell.apk"
This reverts commit 6b1c4a9e09ea096d06351358d731290a11a1e337.

Bug: 149226068
Bug: 149307007
Bug: 149780604
Test: $ lunch aosp_crosshatch-userdebug; m
      # flash and boot on a crosshatch
      # Settings -> Apps & notifications -> Default apps -> Home apps
      # Only Quickstep home is there; no Shell home any more
      $ lunch csi_arm64-userdebug; m
      # flash the resulted system.img on a crosshatch and boot
      $ atest DeviceHealthTests # all passed
Change-Id: I927b7dae779da25589f2198e0480c0f2a788a7e4
Merged-In: I927b7dae779da25589f2198e0480c0f2a788a7e4
(cherry picked from commit 539298c1b9e1c0a42d041cbc845501cef289abf7)
2020-05-19 10:30:23 +08:00
Treehugger Robot
dbf9eed8c1 Merge "Add day-night-mode permission to Shell." am: 963c11e32d
Change-Id: Iad4aba4108aa1d60e470388bfadf2bdc78984324
2020-05-11 22:38:44 +00:00
Treehugger Robot
302bed33d8 Merge "Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing." am: 1b9f4b926c
Change-Id: I663020a8a74a913035cbbd7ceab31cac59871ba7
2020-05-11 22:36:42 +00:00
Treehugger Robot
963c11e32d Merge "Add day-night-mode permission to Shell." 2020-05-11 22:36:27 +00:00
Hai Zhang
68cc951bf6 Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing.
Bug: 154348597
Test: presubmit
Change-Id: I75f07b88c6eca9d2296d3bcdbcc43ad9ff382023
Merged-In: Ic721288e8f1e1a1f255eca95b2efb7b6e0c7c83b
2020-05-11 21:06:35 +00:00
Kweku Adams
6adfa79de1 Add day-night-mode permission to Shell.
Without the permission "adb shell cmd uimode night <mode>" doesn't work.
Adding the permission to the AndroidManifest file so the shell command
will work.

Bug: 155584597
Test: run `adb shell cmd uimode night <no|yes|auto>`
Change-Id: Ibfb145d762c73bba9de639d4050b9b26e4778cc9
2020-05-11 11:46:34 -07:00
Eugene Susla
bfb6efe93a RESTRICT AUTOMERGE am: b4aaa9d8ad am: 6015cb062b
Change-Id: I0a679eb49f46041f39edc7f3f166eaef4ffb1c1c
2020-04-01 21:10:24 +00:00
Eugene Susla
6015cb062b RESTRICT AUTOMERGE am: b4aaa9d8ad
Change-Id: I47af344ace38759669c9e13a03aee96d3ed40b9e
2020-04-01 20:58:33 +00:00
Treehugger Robot
5fe173c31f Merge "Shell: Allow usage of wifi usability score APIs" am: dfeb2a2bfc am: 025d303874
Change-Id: I6a197220e3b6d4f0206991937bddbb9986e01f56
2020-03-20 00:23:25 +00:00
Roshan Pius
7b0a22dcad Shell: Allow usage of wifi usability score APIs
This permission is needed for wifi CTS tests.

Is the minimally scoped permission that needs to be added?
- Yes, this only allows the app to influnce wifi vs lte network
selection algorithm.

What options did you explore that did not need this permission?
- Without this permission, it would be impossible to test these API's:
WifiManager.setWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.addOnWifiUsabilityStatsListener()

Bug: 150236894
Test: Device boots up.
Change-Id: Ic173e44ab818cdfecebde80715ddaec347019db6
Merged-In: Ic173e44ab818cdfecebde80715ddaec347019db6
2020-03-19 23:14:31 +00:00
Treehugger Robot
d8f24b052d Merge "Add MODIFY_DEFAULT_AUDIO_EFFECTS permission to shell" am: a3161c6627 am: 3637bc567d
Change-Id: I2fbc86155d031625dfd68605bb632cfca63c714d
2020-03-19 17:51:15 +00:00
Eric Laurent
05388a0d50 Add MODIFY_DEFAULT_AUDIO_EFFECTS permission to shell
Add MODIFY_DEFAULT_AUDIO_EFFECTS permission to shell which
is needed to run GTS tests on @systemApis for
audio effects control.

Bug: 148703417
Test: run gts -m GtsAudioTestCases -t com.google.android.audio.gts.DeviceEffectTest#testCreateDeviceEffect
Change-Id: Iba579001aeffd85743850727135a6f536579ea17
Merged-In: Iba579001aeffd85743850727135a6f536579ea17
2020-03-18 21:23:50 +00:00
Eugene Susla
b4aaa9d8ad RESTRICT AUTOMERGE
Prevent accessing companion records from arbitrary uids

Test: manual
Fixes: 129476618
Change-Id: I7b18cfcdf58e62a445cbb508116c6ce7c1cea8d7
2020-03-16 14:15:22 -07:00
Automerger Merge Worker
89c4233ef2 Merge "Revert "Shell: Grant NETWORK_STACK permission for CTS"" am: 1e77133822 am: be8c96c95a
Change-Id: Id10c161a28492fbd9093be40190953a5dbb03d42
2020-03-11 04:55:34 +00:00
David Su
1e77133822 Merge "Revert "Shell: Grant NETWORK_STACK permission for CTS"" 2020-03-11 04:25:09 +00:00
Lorenzo Colitti
3ff68aeab2 Revert "Shell: Grant NETWORK_STACK permission for CTS"
This reverts commit 7df351b66fc2c5969fe1bbaa9734fe9f56a6f171.

Reason for revert: It is not appropriate from a security perspective for the shell to have this permission.

Test: None
Bug: 150236894
Change-Id: I1f2b69320540731f6d3044f31e2bc999281f8342
Merged-In: I5b933fe6850ebd5b5f230c16722357ead4ec4286
(This change was merged internally first.)
2020-03-11 03:27:53 +00:00
Automerger Merge Worker
437f6f134c Merge "Shell: Allow retrieval of wifi network credentials" am: 619cd57c1f am: b2c6b12cfb
Change-Id: I1637ec6e36fa52e2abd95c1cbbe11f9d593b7f7c
2020-03-03 21:40:31 +00:00
Roshan Pius
8679a96511 Shell: Allow retrieval of wifi network credentials
This permission is needed for some wifi CTS tests.

Is the minimally scoped permission that needs to be added?
- Yes, this only allows the retireval of the saved wifi network
credentials on the device.

What options did you explore that did not need this permission?
- Possibly creating a UI to ask for manual entry of network credentials.
But, that would not let us do automated CTS tests (will need to become
CTS verifier tests then).

Bug: 150236894
Test: atest android.net.wifi.cts.WifiNetworkSpecifierTest
Change-Id: I6881003510191f667950be1ab27a5399fe3914b4
Merged-In: I6881003510191f667950be1ab27a5399fe3914b4
2020-03-03 20:32:27 +00:00
Automerger Merge Worker
0e7c41cafc Merge "Shell: Grant NETWORK_STACK permission for CTS" am: 686594b470 am: dc701f5f56
Change-Id: I83958b23099f8a0633786ec6df27443b47d468fb
2020-03-02 23:45:47 +00:00
David Su
686594b470 Merge "Shell: Grant NETWORK_STACK permission for CTS" 2020-03-02 23:14:42 +00:00
David Su
7df351b66f Shell: Grant NETWORK_STACK permission for CTS
Grant NETWORK_STACK permission to the shell so
that CTS can use the shell identity to call
APIs protected with this permission.

Bug: 150236894
Test: atest android.net.wifi.cts.WifiManagerTest#testGetCountryCode
Change-Id: I4f93e76bcda83c528f1f2c7bcf800965886ea8da
2020-02-28 15:39:45 -08:00
Shafik Nassar
4ec80cc67d Merge "Revert "Request MANAGE_EXTERNAL_STORAGE permission"" am: e21d0ea642
Change-Id: I044ef75eace6125620c1781e1eec1d80b247a66b
2020-02-14 13:51:21 +00:00
Shafik Nassar
e21d0ea642 Merge "Revert "Request MANAGE_EXTERNAL_STORAGE permission"" 2020-02-14 13:35:34 +00:00
Shafik Nassar
7a49c869b8 Revert "Request MANAGE_EXTERNAL_STORAGE permission"
This reverts commit 349b2c11e91260ff5d6a6e55355722fad09626ea.

Reason for revert: This change was already made in aosp/1205113 and now Shell requests the permission twice.

Change-Id: Ice5522d7095f9b0dbc96c2ff31a976bfdd942c5a
2020-02-12 16:50:13 +00:00
Automerger Merge Worker
285f6781c1 Merge "Give CONTROL_DEVICE_LIGHTS permission to the shell" am: 668daf0341
Change-Id: I8f0d55f7a310e6dff8cf552e5ddf929eb8d0c2b7
2020-02-11 22:14:58 +00:00
Treehugger Robot
668daf0341 Merge "Give CONTROL_DEVICE_LIGHTS permission to the shell" 2020-02-11 21:55:09 +00:00
Robin Lee
9be54b5b67 Give CONTROL_DEVICE_LIGHTS permission to the shell
Bug: 144979010
Bug: 144978691
Test: atest LightsManagerTest
Change-Id: I2924460c76ce4545c9c3dd3875456b936fe3fc69
Merged-In: I2b4224e79e013bae27ee068b0a0898b5afa5489a
2020-02-11 17:46:40 +00:00
Automerger Merge Worker
24f93a2b48 Merge "Add a null home activity to Shell.apk" am: fd2ba540df
Change-Id: I6f789c032dfd105ff81944ff3d6965673485fcac
2020-02-07 08:21:01 +00:00
Treehugger Robot
fd2ba540df Merge "Add a null home activity to Shell.apk" 2020-02-07 07:59:39 +00:00
Isaac Chen
6b1c4a9e09 Add a null home activity to Shell.apk
In configurations where AOSP Settings.apk is not included, there might
not be any home activity. E.g. CSI doesn't have Settings.apk.

This CL adds a null home activity to Shell.apk, which is in CSI,
so the framework can be in a sane state. Without such null home
activity in CSI, package manager fails to install any APKs.

Bug: 148044842
Test: $ lunch csi_arm64-userdebug; m -j
      # Flash CSI to a Pixel (with AVB disabled) and reboot
      $ m DeviceHealthChecks
      $ adb install $OUT/testcases/DeviceHealthTests/arm64/DeviceHealthTests.apk
      Performing Streamed Install
      Success

Change-Id: I87999e30298bbe42af64f28e88fc6dc5975f1ca3
2020-02-07 12:50:39 +08:00
Automerger Merge Worker
69ca2fcfa0 Merge "Add permissions for using PlatformCompat methods" am: 7202e904c9
Change-Id: Iffdf7ffc1265fce941eb4cd519031da4575ac53a
2020-02-06 13:51:30 +00:00
Andrei-Valentin Onea
7202e904c9 Merge "Add permissions for using PlatformCompat methods" 2020-02-06 13:40:34 +00:00
Andrei Onea
26559bcb40 Add permissions for using PlatformCompat methods
- READ_COMPAT_CHANGE_CONFIG is required to read the current state of the
config
- LOG_COMPAT_CHANGE is required to log the status of a compat change for
a package and/or uid to statsd
- OVERRIDE_COMPAT_CHANGE_CONFIG is required to add overrides

The permissions must be signature|privileged, as there are already
examples of code which this would not be sufficient (e.g.
MediaProvider).

This is a re-landing of https://r.android.com/1209240, which was
reverted due to http://b/142942524. The actual fix was done in
http://ag/10234812.


Bug: 142650523
Test: atest PlatformCompatTest
Test: atest PlatformCompatPermissionsTest
Change-Id: Ie9429477c9a1725b5cb67756787bf742038e5d2b
2020-02-06 12:22:42 +00:00
Automerger Merge Worker
1e43248938 Merge "Grant shell REBOOT permission" am: a656dd889d
Change-Id: I103de65e0ac50151556c69efafaa63911a821acb
2020-02-04 23:14:07 +00:00
Nikita Ioffe
a656dd889d Merge "Grant shell REBOOT permission" 2020-02-04 23:01:44 +00:00
Automerger Merge Worker
d6e6068ded Merge "Add UPGRADE_RUNTIME_PERMISSIONS permission to support testing." am: 602faa961a
Change-Id: Ic76f1ffd8ec2b954e9a2ebb6c326662a8d3ace0d
2020-02-04 00:02:14 +00:00
Treehugger Robot
602faa961a Merge "Add UPGRADE_RUNTIME_PERMISSIONS permission to support testing." 2020-02-03 23:50:29 +00:00
Nikita Ioffe
bf19417b0d Grant shell REBOOT permission
Shell already can reboot a device (via `adb reboot` command). This
change allows shell to also trigger a reboot logic inside the
system_server.

Additionally, it allows to CTS test PowerManager.reboot API.

Test: adb shell svc reboot
Change-Id: I4545c4f3587fee2840a00648c569f75bb57501fc
Merged-In: I4545c4f3587fee2840a00648c569f75bb57501fc
2020-02-03 23:35:24 +00:00
Hai Zhang
e244583ef0 Add UPGRADE_RUNTIME_PERMISSIONS permission to support testing.
Bug: 136503238
Test: presubmit
Merged-In: I7e40296120e18f2dfbbf04b5ae9d148724afa920
Change-Id: I7e40296120e18f2dfbbf04b5ae9d148724afa920
2020-02-03 13:05:28 -08:00
Treehugger Robot
8ca170d09a Merge "Import translations. DO NOT MERGE" 2020-02-01 20:33:25 +00:00
Bill Yi
25dbc49cfc Import translations. DO NOT MERGE
Change-Id: Id295f834c169dfc9fda8d12fe93efbd95ffa6d4b
Auto-generated-cl: translation import
2020-01-31 18:42:05 -08:00
sqian
dfdee636e3 Add LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH into Shell permission
> Is the minimally scoped permission that needs to be added?
This is a minimal permission for always listening to signal strength.

> What options did you explore that did not need this permission?
CTS is required by API council; Telephony CTS is using shell to have
system permission. I don't see other options.

Integrate the callback of LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH

Test: CTS; https://paste.googleplex.com/5811446241820672
Bug: 147322848
Change-Id: Id5afd261a7f00c25e3af3558f30fb92aad42f060
2020-01-30 14:14:43 -08:00
Steven Ng
733ac0d946 Grant READ_DREAM_STATE & WRITE_DREAM_STATE permissions to shell
This is required for ambient display tests

Bug: 147874708
Test: Run newly added ambient display tests.
Merged-In: I61c28e15c4e5c3d0ffee4137ecb86e33f7e8f64d
Change-Id: I26ab1cd48816ddb3aa8b30708726a3e1a3a20b9a
2020-01-29 09:54:19 +00:00
Zim
349b2c11e9 Request MANAGE_EXTERNAL_STORAGE permission
With the deprecation of WRITE_MEDIA_STORAGE in R. Apps should migrate
to requesting MANAGE_EXTERNAL_STORAGE permission

Test: m
Bug: 144914977
Change-Id: Ie42b5ceaf01111a1d3151f697ce173ddc3c7fd9b
2020-01-24 22:45:09 +00:00
Treehugger Robot
3095c56b3a Merge "Make com.android.shell request MANAGE_EXTERNAL_STORAGE" 2020-01-10 19:39:53 +00:00
shafik
ae42afc937 Make com.android.shell request MANAGE_EXTERNAL_STORAGE
This helps in testing using adoptShellPermissionIdentity.
Also, as a nice side-effect, it solves the problem where Settings app
crashes if no packages are requesting the permission.

Bug: 146778323
Fixes: 147434040
Test: device boots
Change-Id: I0982f854ad8260cab247882d04aea9bdcdf5d586
2020-01-10 16:16:29 +00:00