1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4 * Copyright (C) 2015 The Android Open Source Project
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *     http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18-->
19<manifest xmlns:android="http://schemas.android.com/apk/res/android"
20        package="com.android.shell"
21        coreApp="true"
22        android:sharedUserId="android.uid.shell"
23        >
24
25    <!-- Standard permissions granted to the shell. -->
26    <uses-permission android:name="android.permission.SEND_SMS" />
27    <uses-permission android:name="android.permission.CALL_PHONE" />
28    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
29    <uses-permission android:name="android.permission.READ_CONTACTS" />
30    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
31    <uses-permission android:name="android.permission.READ_CALENDAR" />
32    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
33    <uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
34    <uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
35    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
36    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
37    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
38    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
39    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
40    <uses-permission android:name="android.permission.BLUETOOTH" />
41    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
42    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
43    <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" />
44    <!-- System tool permissions granted to the shell. -->
45    <uses-permission android:name="android.permission.REAL_GET_TASKS" />
46    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
47    <uses-permission android:name="android.permission.REORDER_TASKS" />
48    <uses-permission android:name="android.permission.SET_ANIMATION_SCALE" />
49    <uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS" />
50    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
51    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
52    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
53    <!-- Development tool permissions granted to the shell. -->
54    <uses-permission android:name="android.permission.SET_DEBUG_APP" />
55    <uses-permission android:name="android.permission.SET_PROCESS_LIMIT" />
56    <uses-permission android:name="android.permission.SET_ALWAYS_FINISH" />
57    <uses-permission android:name="android.permission.DUMP" />
58    <uses-permission android:name="android.permission.SIGNAL_PERSISTENT_PROCESSES" />
59    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
60    <!-- Internal permissions granted to the shell. -->
61    <uses-permission android:name="android.permission.FORCE_BACK" />
62    <uses-permission android:name="android.permission.BATTERY_STATS" />
63    <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
64    <uses-permission android:name="android.permission.INJECT_EVENTS" />
65    <uses-permission android:name="android.permission.RETRIEVE_WINDOW_CONTENT" />
66    <uses-permission android:name="android.permission.SET_ACTIVITY_WATCHER" />
67    <uses-permission android:name="android.permission.READ_INPUT_STATE" />
68    <uses-permission android:name="android.permission.SET_ORIENTATION" />
69    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
70    <uses-permission android:name="android.permission.MOVE_PACKAGE" />
71    <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" />
72    <uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
73    <uses-permission android:name="android.permission.DELETE_PACKAGES" />
74    <uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER" />
75    <uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
76    <uses-permission android:name="android.permission.DEVICE_POWER" />
77    <uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" />
78    <uses-permission android:name="android.permission.BACKUP" />
79    <uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" />
80    <uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
81    <uses-permission android:name="android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY" />
82    <uses-permission android:name="android.permission.GRANT_RUNTIME_PERMISSIONS" />
83    <uses-permission android:name="android.permission.REVOKE_RUNTIME_PERMISSIONS" />
84    <uses-permission android:name="android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS" />
85    <uses-permission android:name="android.permission.SET_KEYBOARD_LAYOUT" />
86    <uses-permission android:name="android.permission.GET_DETAILED_TASKS" />
87    <uses-permission android:name="android.permission.SET_SCREEN_COMPATIBILITY" />
88    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
89    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
90    <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
91    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
92    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
93    <uses-permission android:name="android.permission.CREATE_USERS" />
94    <uses-permission android:name="android.permission.MANAGE_DEVICE_ADMINS" />
95    <uses-permission android:name="android.permission.BLUETOOTH_STACK" />
96    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
97    <uses-permission android:name="android.permission.RETRIEVE_WINDOW_TOKEN" />
98    <uses-permission android:name="android.permission.FRAME_STATS" />
99    <uses-permission android:name="android.permission.BIND_APPWIDGET" />
100    <uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS" />
101    <uses-permission android:name="android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS"/>
102    <uses-permission android:name="android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS" />
103    <uses-permission android:name="android.permission.CHANGE_APP_IDLE_STATE" />
104    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
105    <uses-permission android:name="android.permission.MOUNT_FORMAT_FILESYSTEMS" />
106    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
107    <uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER" />
108    <uses-permission android:name="android.permission.REGISTER_CONNECTION_MANAGER" />
109    <uses-permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION" />
110    <uses-permission android:name="android.permission.GET_APP_OPS_STATS" />
111    <uses-permission android:name="android.permission.VIBRATE" />
112    <uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" />
113    <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
114    <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
115    <!-- Permission needed to rename bugreport notifications (so they're not shown as Shell) -->
116    <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
117
118    <application android:label="@string/app_label"
119                 android:defaultToDeviceProtectedStorage="true"
120                 android:directBootAware="true">
121        <provider
122            android:name="android.support.v4.content.FileProvider"
123            android:authorities="com.android.shell"
124            android:grantUriPermissions="true"
125            android:exported="false">
126            <meta-data
127                android:name="android.support.FILE_PROVIDER_PATHS"
128                android:resource="@xml/file_provider_paths" />
129        </provider>
130
131        <provider
132            android:name=".BugreportStorageProvider"
133            android:authorities="com.android.shell.documents"
134            android:grantUriPermissions="true"
135            android:exported="true"
136            android:permission="android.permission.MANAGE_DOCUMENTS"
137            android:enabled="false">
138            <intent-filter>
139                <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
140            </intent-filter>
141        </provider>
142
143        <activity
144            android:name=".BugreportWarningActivity"
145            android:theme="@android:style/Theme.Material.Light.Dialog.Alert"
146            android:finishOnCloseSystemDialogs="true"
147            android:excludeFromRecents="true"
148            android:exported="false" />
149
150        <receiver
151            android:name=".BugreportReceiver"
152            android:permission="android.permission.DUMP">
153            <intent-filter>
154                <action android:name="android.intent.action.BUGREPORT_STARTED" />
155                <action android:name="android.intent.action.BUGREPORT_FINISHED" />
156            </intent-filter>
157        </receiver>
158
159        <receiver
160            android:name=".RemoteBugreportReceiver"
161            android:permission="android.permission.DUMP">
162            <intent-filter>
163                <action android:name="android.intent.action.REMOTE_BUGREPORT_FINISHED" />
164            </intent-filter>
165        </receiver>
166
167        <service
168            android:name=".BugreportProgressService"
169            android:exported="false"/>
170    </application>
171</manifest>
172