jabezwinston / WebMTP

Open-source implementation of the Media Transfer Protocol using WebUSB.

Home Page:https://stephenkingston.github.io/WebMTP/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebMTP

This is a proof-of-concept implementation of the MTP protocol over WebUSB. Works with all browsers which support WebUSB

Webpage at https://stephenkingston.github.io/WebMTP/

Setup

Windows

Replace default MTP driver with WinUSB driver.

  • Download Zadig.
  • Open Zadig and select Options → List All Devices.
  • Select your MTP device from list of devices and install WinUSB driver by clicking Replace Driver

Linux

Requires udev rule to be installed

Find Vendor ID and Product ID using lsusb

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 22b8:2e82 Motorola Device

Add a file /etc/udev/rules.d/webmtp.rules with the below content. Use your phone's Vendor ID & Product ID.

SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", ATTRS{idProduct}=="2e82", ACTION=="add", MODE="0666"

Reload udev rules

$ sudo udevadm control --reload-rules

Supported Operations

  • Reading list of storages and files.
  • Downloading & uploading files.
  • Deleting files.

Known limitations

  • Works with root folder only
  • Renaming files not supporte
  • Not tested with large files

Stephen Kingston © 2020

About

Open-source implementation of the Media Transfer Protocol using WebUSB.

https://stephenkingston.github.io/WebMTP/

License:BSD 2-Clause "Simplified" License


Languages

Language:JavaScript 89.9%Language:CSS 7.0%Language:HTML 3.1%