JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://webadb.github.io/webadb.js/webadb.js"></script>
<input type="button" id="try" value="Click Me" />
JavaScript
async function onclick() {
let webusb = await Adb.open("WebUSB");
let adb = await webusb.connectAdb("host::");
let shell = await adb.shell("uname -a");
let data = await shell.receive();
let decoder = new TextDecoder();
console.log(decoder.decode(data));
}
document.getElementById('try').onclick = onclick;