webadb / webadb.github.io

Demo of webadb.js
https://webadb.github.io
12 stars 11 forks source link

no devices shown #1

Open Zibri opened 4 years ago

Zibri commented 4 years ago

there are not devices shown...

cavokz commented 4 years ago

Which OS are you using? If Linux, did you give any permission to access USB to your user?

Zibri commented 4 years ago
Ciao,Windows 1010.0.18363.592 (Win10 19H2 [1909] November 2019 Update) From: Domenico AndreoliSent: Tuesday, February 4, 2020 20:11To: webadb/webadb.github.ioCc: Zibri; AuthorSubject: Re: [webadb/webadb.github.io] no devices shown (#1) Which OS are you using? If Linux, did you give any permission to access USB to your user?—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. 
cavokz commented 4 years ago

I've just tried it on a Windows machine where I've never run it before, it worked out of the box.

Can you check that "USB debugging" is enabled on your phone and that you switch to it when connecting to your host? There is plenty of info about this topic, just search for "android USB debugging".

Zibri commented 4 years ago

I am not a newbie: usb debugging is enabled and working (with adb from command prompt) I really don't know what's wrong.

cavokz commented 4 years ago

Another possibility is that your device is still in use by the command line adb. Could you try with killing the adb server first and then use webadb.js?

Zibri commented 4 years ago

yes,

Zibri commented 4 years ago

I did some more digging. I really don't understand this. I have 3 phones: 1) Samsung Galaxy Note 4 (Android 6.0.1) 2) Samsung Galaxy Grand Prime Pro (Android 7.1.1) 3) Sony Expera Z3 (Android 6.0.1)

The experia shows up (if adb is killed on my host machine) The other 2 don't show up. (but work if I use adb) Host machine is windows 10 education (latest version) Chrome version is also the latest.

cavokz commented 4 years ago

There could be some problem with this function:

Adb.WebUSB.Transport.open = function() {
    let filters = [
        { classCode: 255, subclassCode: 66, protocolCode: 1 },
        { classCode: 255, subclassCode: 66, protocolCode: 3 }
    ];

    return navigator.usb.requestDevice({ filters: filters })
        .then(device => device.open()
            .then(() => new Adb.WebUSB.Transport(device)));
};

Maybe the classCode, subclassCode and protocolCode are different in the phones that are not showed.

If you have access to a Linux box, could you paste the output of 'lsusb' while those phones are connected? Mind that lsusb tells about all the USB devices, not only the phones, so copy only the relevant part.