Gerrit
Gerrit

Reputation: 852

Reading files from Android devices using WebUSB on Windows

I was wondering whether it is possible implement a subset of MTP on top of WebUSB, connect to an Android device from Windows, and retrieve files from the device?

If I install a WinUSB driver with Zadig, I can claim the interface. However, when I try to use the default "MTP USB Device" driver, I'm not able to claim the interface. I'm assuming that this is because the Windows MTP stack automatically claims the interface, even if the "MTP USB Device" is also a WinUSB driver?

The reason why I can't just use the WinUSB driver from Zadig, is that it breaks MTP access for programs that use the Windows Portable Device API. Is it at all possible to create a USB driver that will allow both MTP access and USB access, to allow for a user-space MTP driver, as there's no MTP functionality built into Chrome?

Upvotes: 0

Views: 726

Answers (1)

Reilly Grant
Reilly Grant

Reputation: 6093

Trying to share access to the device between two low-level USB drivers (MTP and Chrome) is likely to cause data corruption if the device cannot differentiate between requests from each. I am not too familiar with the MTP driver built into Windows but this is a place where the experimental Native File System API should be able to provide access to the device at a high level where access can be shared.

Upvotes: 1

Related Questions