I have an Android device (Samsung Galaxy A20e) and a Windows computer. If I connect both with the USB cable and enable the USB debugging inside the settings of Android, I can connect from my Windows App (.Net C#) by using the ADB interface of the USB device.
The device ID of this interface is \\?\USB#VID_04E8&PID_6860&ADB#8&324af34&11&0003#{dee824ef-729b-4a0e-9c14-b7117d33a817}
.
To connect the Android device, I can use CreateFile
with FILE_FLAG_OVERLAPPED
with the device ID as filename to get a file handle. With this and the WinUsb_Initialize
method, I can get a WinUsb handle. This allows me to send data to the Android device.
For example, I can use WinUsb_ControlTransfer
with the commands 51, 52 and 53 to start the Android Accessoy Mode.
What else can I do with the ADB USB interface of an Android device?
Is there a description of all features available somewhere?