1 ## 7.7\. USB 2 3 If device implementations have a USB port, they: 4 5 * SHOULD support USB peripheral mode and SHOULD support USB host mode. 6 7 ### 7.7.1\. USB peripheral mode 8 9 If handheld device implementations include a USB port supporting peripheral 10 mode, they: 11 12 * [H-1-1] MUST implement the Android Open Accessory (AOA) API. 13 14 If device implementations include a USB port supporting peripheral mode: 15 16 * [C-1-1] The port MUST be connectable to a USB host that has a standard 17 type-A or type-C USB port. 18 * [C-1-2] MUST report the correct value of `iSerialNumber` in USB standard 19 device descriptor through `android.os.Build.SERIAL`. 20 * [C-1-3] MUST detect 1.5A and 3.0A chargers per the Type-C resistor 21 standard and MUST detect changes in the advertisement if they support 22 Type-C USB. 23 * [SR] The port SHOULD use micro-B, micro-AB or Type-C USB form factor. 24 Existing and new Android devices are **STRONGLY RECOMMENDED to meet these 25 requirements** so they will be able to upgrade to the future platform releases. 26 * [SR] The port SHOULD be located on the bottom of the device 27 (according to natural orientation) or enable software screen rotation for 28 all apps (including home screen), so that the display draws correctly when 29 the device is oriented with the port at bottom. Existing and new Android 30 devices are **STRONGLY RECOMMENDED to meet these requirements** so they will 31 be able to upgrade to future platform releases. 32 * [SR] SHOULD implement support to draw 1.5 A current during HS chirp 33 and traffic as specified in the [USB Battery Charging specification, revision 1.2](http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip). 34 Existing and new Android devices are **STRONGLY RECOMMENDED to meet these 35 requirements** so they will be able to upgrade to the future platform releases. 36 * [SR] STRONGLY RECOMMENDED to not support proprietary 37 charging methods that modify Vbus voltage beyond default levels, or alter 38 sink/source roles as such may result in interoperability issues with the 39 chargers or devices that support the standard USB Power Delivery methods. While 40 this is called out as "STRONGLY RECOMMENDED", in future Android versions we 41 might REQUIRE all type-C devices to support full interoperability with standard 42 type-C chargers. 43 * [SR] STRONGLY RECOMMENDED to support Power Delivery for data and 44 power role swapping when they support Type-C USB and USB host mode. 45 * SHOULD support Power Delivery for high-voltage charging and support for 46 Alternate Modes such as display out. 47 * SHOULD implement the Android Open Accessory (AOA) API and specification as 48 documented in the Android SDK documentation. 49 50 If device implementations including a USB port, implement the AOA specification, 51 they: 52 53 * [C-2-1] MUST declare support for the hardware feature 54 [`android.hardware.usb.accessory`](http://developer.android.com/guide/topics/connectivity/usb/accessory.html). 55 * [C-2-2] The USB mass storage class MUST include the string "android" at the 56 end of the interface description `iInterface` string of the USB mass storage 57 * SHOULD NOT implement [AOAv2 audio](https://source.android.com/devices/accessories/aoa2#audio-support) 58 documented in the Android Open Accessory Protocol 2.0 documentation. AOAv2 audio 59 is deprecated as of Android version 8.0 (API level 26). 60 61 62 ### 7.7.2\. USB host mode 63 64 If device implementations include a USB port supporting host mode, they: 65 66 * [C-1-1] MUST implement the Android USB host API as documented in the 67 Android SDK and MUST declare support for the hardware feature 68 [`android.hardware.usb.host`](http://developer.android.com/guide/topics/connectivity/usb/host.html). 69 * [C-1-2] MUST implement support to connect standard USB peripherals, 70 in other words, they MUST either: 71 * Have an on-device type C port or ship with cable(s) adapting an on-device 72 proprietary port to a standard USB type-C port (USB Type-C device). 73 * Have an on-device type A or ship with cable(s) adapting an on-device 74 proprietary port to a standard USB type-A port. 75 * Have an on-device micro-AB port, which SHOULD ship with a cable adapting 76 to a standard type-A port. 77 * [C-1-3] MUST NOT ship with an adapter converting from USB type A or 78 micro-AB ports to a type-C port (receptacle). 79 * [SR] STRONGLY RECOMMENDED to implement the [USB audio class]( 80 http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO) 81 as documented in the Android SDK documentation. 82 * SHOULD support charging the connected USB peripheral device while in host 83 mode; advertising a source current of at least 1.5A as specified in the 84 Termination Parameters section of the 85 [USB Type-C Cable and Connector Specification Revision 1.2]( 86 http://www.usb.org/developers/docs/usb_31_021517.zip) for USB Type-C 87 connectors or using Charging Downstream Port(CDP) output current range as 88 specified in the [USB Battery Charging specifications, revision 1.2]( 89 http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip) 90 for Micro-AB connectors. 91 * SHOULD implement and support USB Type-C standards. 92 93 If device implementations include a USB port supporting host mode and the USB 94 audio class, they: 95 96 * [C-2-1] MUST support the [USB HID class](https://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_HID) 97 * [C-2-2] MUST support the detection and mapping of the following HID data 98 fields specified in the [USB HID Usage Tables](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) 99 and the [Voice Command Usage Request](http://www.usb.org/developers/hidpage/Voice_Command_Usage.pdf) 100 to the [`KeyEvent`](https://developer.android.com/reference/android/view/KeyEvent.html) 101 constants as below: 102 * Usage Page (0xC) Usage ID (0x0CD): `KEYCODE_MEDIA_PLAY_PAUSE` 103 * Usage Page (0xC) Usage ID (0x0E9): `KEYCODE_VOLUME_UP` 104 * Usage Page (0xC) Usage ID (0x0EA): `KEYCODE_VOLUME_DOWN` 105 * Usage Page (0xC) Usage ID (0x0CF): `KEYCODE_VOICE_ASSIST` 106 107 108 If device implementations include a USB port supporting host mode and 109 the Storage Access Framework (SAF), they: 110 111 * [C-3-1] MUST recognize any remotely connected MTP (Media Transfer Protocol) 112 devices and make their contents accessible through the `ACTION_GET_CONTENT`, 113 `ACTION_OPEN_DOCUMENT`, and `ACTION_CREATE_DOCUMENT` intents. . 114 115 If device implementations include a USB port supporting host mode and USB 116 Type-C, they: 117 118 * [C-4-1] MUST implement Dual Role Port functionality as defined by the USB 119 Type-C specification (section 4.5.1.3.3). 120 * [SR] STRONGLY RECOMMENDED to support DisplayPort, SHOULD support USB 121 SuperSpeed Data Rates, and are STRONGLY RECOMMENDED to support Power Delivery 122 for data and power role swapping. 123 * [SR] STRONGLY RECOMMENDED to NOT support Audio Adapter Accessory Mode as 124 described in the Appendix A of the 125 [USB Type-C Cable and Connector Specification Revision 1.2]( 126 http://www.usb.org/developers/docs/). 127 * SHOULD implement the Try.\* model that is most appropriate for the 128 device form factor. For example a handheld device SHOULD implement the 129 Try.SNK model.