16 Commits

Author SHA1 Message Date
Jeff Sharkey
9a4a457622 Clear identity to handle ALLOCATE_AGGRESSIVE.
We're not actually clearing any files, only deciding how much free
space is available, so we're fine assuming the remote caller has the
permission.

Test: builds, boots
Bug: 37169076
Change-Id: I6cd42f77c43e9d2de40e2b8b937c7f2145f1b869
2017-04-14 16:29:04 -06:00
Jeff Sharkey
a4daf89f0f Grant Shell ability to clear cached app data.
It already has CLEAR_APP_USER_DATA to clear everything inside app
storage, and clearing cached data is a subset of that.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 36731175
Change-Id: Iefc5be6c80e2562a95424fd6fe413bdb018201a9
2017-04-11 13:03:54 -06:00
Tyler Gunn
e0d00e65ce Add SUBSTITUTE_NOTIFICATION_APP_NAME pregrant for Telecom.
Test: Manual
Bug: 36817809
Change-Id: I2d7439e3d0040b617a842812b6ae8bda3c32f1ee
2017-03-31 17:50:56 -07:00
Chris Tate
b1669bf22b Merge "Give shell the CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission" 2017-03-22 18:07:49 +00:00
Christopher Tate
ec3a9f3346 Give shell the CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission
Shell needs to have this permission in order for the deviceidle
tempwhitelist shell command to exist.

Bug 34715096
Test: cts-tradefed run cts -m CtsAppTestCases \
  -t android.app.cts.ActivityManagerTest#testBackgroundCheckService

Change-Id: Ic1fdd87b6020649705ba0c9349dd00dd096037f3
2017-03-21 17:52:42 -07:00
Conrad Chen
6dad6d41b8 Declare privileged permissions of Live TV app
Test: build
Bug: 35782070
Change-Id: Ia1e39dcf8fdd3345837ebec1729ad4d02699763b
2017-03-21 16:59:50 -07:00
Jeff Davidson
272fe5c338 Merge "Declare new com.android.phone permission in whitelist." 2017-03-06 18:57:48 +00:00
Jeff Davidson
7344159c71 Declare new com.android.phone permission in whitelist.
Bug: 35948554
Test: Will verify T/H build
Change-Id: I41773160aa6515983a15365905a2cbb6b13e10c6
2017-03-03 17:42:35 -08:00
Alex Klyubin
1991f57230 Restrict access from apps to bluetooth_address setting
BluetoothManagerService for some reason leaks the Android's Bluetooth
MAC address via Settings.Secure which is normally readable by all
apps. This lets apps bypass the restriction on access to Bluetooth MAC
address from apps.

This commit fixes the issue by restricting access to bluetooth_address
secure setting (Settings.Secure). Only packages which hold the
android.permission.LOCAL_MAC_ADDRESS permission retain access.

This commit accordingly grants LOCAL_MAC_ADDRESS permission to the
system Shell app because a number of scripts (including Android CTS)
use "adb shell settings get secure bluetooth_address" as a convenient
way to query the device's Bluetooth MAC address over ADB. This is
acceptable because the user of the device can see the Bluetooth MAC
address and thus it's fine for shell to be able to see the address as
well.

Test: See CTS test added in the cts project in this topic.
Test: "adb shell settings get secure bluetooth_address" returns the
      Bluetooth MAC address of the Android.
Test: "adb shell settings list secure | grep bluetooth_address"
      returns the Bluetooth MAC address of the Android.
Test: Bluetooth works (toggling off/on, pairing, file transfer)
Bug: 33701414

Change-Id: I17b110b96eb3794b25c1661e93d29a7a003e3c9a
2017-03-03 14:25:14 -08:00
Adam Lesinski
aea3cf40d6 Whitelist new CHANGE_OVERLAY_PACKAGES permission
The Shell application needs access to change which overlays are
enabled in OverlayManagerService.

Test: Manual: invoke adb exec-out cmd overlay enable some.package.name
when shell is not root (adb unroot on eng builds).
Change-Id: I1849f68e244cfc9b1e13eb0e673dde7be03cba6d
2017-02-23 18:52:30 -08:00
Jerry Zhang
f970636072 Allow the shell to set USB functions.
Bug: 25596495
Test: svc usb setFunction mtp true
Change-Id: I4472464a1c7ed100cb257dbad83d1d8cfef88fc7
2017-02-17 11:50:30 -08:00
Brad Ebinger
cab1dad44f Add BIND_IMS_SERVICE to permissions whitelist
Adds android.permission.BIND_IMS_SERVICE to the permissions
whitelist xml file.

Bug: 34813244
Test: Manual
Change-Id: I7a7ad1a361c9d2dcc51769bc74a436878ad4adc5
2017-02-03 10:51:05 -08:00
Fyodor Kupolov
02616eaac8 Whitelist CHANGE_DEVICE_IDLE_TEMP_WHITELIST for systemui
Test: device starts without warning
Change-Id: Ia13f7cee3da7eb2ac185415b44b6905f0f28c487
2017-01-24 11:39:23 -08:00
Fyodor Kupolov
f9a8bd2828 Updated platform privileged permissions
Change-Id: I84e27ec023b20205bacb026e0a7cc32c12f67a7b
Test: manual
Bug: 33499917
Bug: 34128772
2017-01-12 17:36:53 -08:00
Joe LaPenna
cd54da4595 Add networkrecommendation permissions to privapp perms list.
Bug: 34235587
Test: Flashed and checked logcat for crash.
Change-Id: Ib35070ea87e23a3be8804eb3796e02c76a5628d0
2017-01-11 20:54:03 -08:00
Fyodor Kupolov
964d2ebb94 Control privileged permissions for priv-apps
Added support for privapp-permissions config element. It allows to explicitly
control what privileged permissions applications should be granted.

Feature is controlled by ro.control_privapp_permissions property.
Possible values:
- 0/false, the feature is completely disabled - signature|privileged
  permissions are granted automatically without logging. *Default behavior*
- 1/true, enforce that only whitelisted permissions are granted. Only
  devices with ro.control_privapp_permission=1 will pass CTS tests.

Test: Manual
Bug:31008485
Change-Id: I93a8c2782cc72b3953f32c237086d08d82ac0d5b
2016-11-14 18:06:15 -08:00