Search code examples
shelladbgsmmodemwebusb

Webusb adb shell from php node js it is possible to communicate usb device like mobile phone via website


I am interesting in building a web application to read and write inforomation of a mobile phone using webusb or adb shell or node js to open port and communicate device with at command or adb command

but I am struggle which the propre and secure way and i have problems of permissions

Webusb works fine but I can't integert at command or adb shell ?


Solution

  • The webadb.js library provides an implementation of the ADB protocol in Javascript using WebUSB to communicate with a local device. This assumes that the device is local to the computer running the web browser.

    If you want to control the device from the server you will need to provide a way for the server to command the browser to forward commands to the device. This could be done, for example, using a Web Socket.

    If you want to use the browser to control a device connected to the server however a different approach is needed. In that case you would use a library like adbkit to connect to the device directly from Node.