1<?xml version="1.0" encoding="utf-8"?> 2<manifest xmlns:android="http://schemas.android.com/apk/res/android" 3 package="com.android.mtp" 4 android:sharedUserId="android.media"> 5 <uses-feature android:name="android.hardware.usb.host" /> 6 <uses-permission android:name="android.permission.ACCESS_MTP" /> 7 <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> 8 <uses-permission android:name="android.permission.MANAGE_USB" /> 9 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> 10 <uses-permission android:name="android.permission.MANAGE_USERS" /> 11 <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" /> 12 <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" /> 13 <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> 14 15 <application 16 android:process="android.process.media" 17 android:label="@string/app_label" 18 android:allowBackup="false" 19 android:usesCleartextTraffic="true"> 20 <provider 21 android:name=".MtpDocumentsProvider" 22 android:authorities="com.android.mtp.documents" 23 android:grantUriPermissions="true" 24 android:exported="true" 25 android:permission="android.permission.MANAGE_DOCUMENTS"> 26 <intent-filter> 27 <action android:name="android.content.action.DOCUMENTS_PROVIDER" /> 28 </intent-filter> 29 </provider> 30 31 <service android:name=".MtpDocumentsService" /> 32 33 <activity android:name=".ReceiverActivity" 34 android:label="@string/downloads_app_label" 35 android:icon="@mipmap/ic_launcher_download" 36 android:theme="@android:style/Theme.NoDisplay" 37 android:excludeFromRecents="true"> 38 <intent-filter> 39 <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> 40 </intent-filter> 41 <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" 42 android:resource="@xml/device_filter" /> 43 </activity> 44 45 <receiver android:name=".UsbIntentReceiver" android:exported="true"> 46 <intent-filter> 47 <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> 48 <action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" /> 49 </intent-filter> 50 <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" 51 android:resource="@xml/device_filter" /> 52 </receiver> 53 54 <receiver android:name=".MtpReceiver"> 55 <intent-filter> 56 <action android:name="android.intent.action.BOOT_COMPLETED" /> 57 </intent-filter> 58 <intent-filter> 59 <action android:name="android.hardware.usb.action.USB_STATE" /> 60 </intent-filter> 61 </receiver> 62 63 <service android:name="MtpService" /> 64 </application> 65</manifest> 66