Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upqvm-usb: Device attach failed for Android 6 in Debugging mode #2202
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Jul 27, 2016
Member
We closed #1375 on the grounds that Android devices are not block devices and therefore not among the supported device types for USB attachment.
Does toggling "debugging mode" affect whether the device appears as a USB mass storage device?
|
We closed #1375 on the grounds that Android devices are not block devices and therefore not among the supported device types for USB attachment. Does toggling "debugging mode" affect whether the device appears as a USB mass storage device? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
grote
Jul 27, 2016
Hi @andrewdavidwong,
thanks for answering so quickly. I read #1375 before opening this one, but it is unrelated. This is not about block devices, mass storage mode, MTP or PTP.
This is about an Android USB device failing to attach to a different AppVM when USB debugging or the Android Debug Brigde is activated. This is used by Android developers to test their apps on real hardware.
grote
commented
Jul 27, 2016
|
Hi @andrewdavidwong, thanks for answering so quickly. I read #1375 before opening this one, but it is unrelated. This is not about block devices, mass storage mode, MTP or PTP. This is about an Android USB device failing to attach to a different AppVM when USB debugging or the Android Debug Brigde is activated. This is used by Android developers to test their apps on real hardware. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jul 27, 2016
Member
I bet it was already reported some time ago, but can't find it just now. The result of debugging was that Android trigger device disconnect as soon as driver is detached from the device. Which is part of the process of attaching the device using qvm-usb. So, it won't fly, unfortunately.
But you can use ADB over TCP.
|
I bet it was already reported some time ago, but can't find it just now. The result of debugging was that Android trigger device disconnect as soon as driver is detached from the device. Which is part of the process of attaching the device using qvm-usb. So, it won't fly, unfortunately. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
grote
Jul 27, 2016
So, it won't fly, unfortunately.
:(
But you can use ADB over TCP.
Ok thank you very much, I will look into this then.
grote
commented
Jul 27, 2016
:(
Ok thank you very much, I will look into this then. |
andrewdavidwong
closed this
Jul 27, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
grote
Jul 28, 2016
Just in case other people stumble upon this:
ADB over TCP works nicely. To activate, go to Developer Options in Settings -> Debugging - > Activate "ADB over network" and note the IP:port (e.g. 192.168.0.1:5555) that shows up below the setting.
In your development AppVM type the following:
adb connect IP:port
Then your device should show up in Android Studio.
This is not a fix for this issue, but a workaround.
grote
commented
Jul 28, 2016
|
Just in case other people stumble upon this: ADB over TCP works nicely. To activate, go to Developer Options in Settings -> Debugging - > Activate "ADB over network" and note the In your development AppVM type the following:
Then your device should show up in Android Studio. This is not a fix for this issue, but a workaround. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rustybird
Oct 6, 2016
In my experience with Android 6 (CM13 on a Nexus 7), attaching works iff at least one of the following conditions is satisified before calling qvm-usb --attach:
1. ADB is enabled on the device and the screen is unlocked
2. The adb daemon is running (as root) on the target VM
Never mind - at some point in the CM13 release cycle, it broke for me too.
rustybird
commented
Oct 6, 2016
•
|
Never mind - at some point in the CM13 release cycle, it broke for me too. |
grote commentedJul 27, 2016
Qubes OS version
R3.2
Affected TemplateVMs
fedora-23
Expected behavior:
qvm-usb -a dev sys-usb:3-2attaches USB device to AppVM 'dev'.Actual behavior:
USB is not attached. This error is shown:
ERROR: Device attach failedstderrandstdoutof the call make byqubesutils.pyis empty andNone.Steps to reproduce the behavior:
qvm-usbto see where it got attachedqvm-usb -a dev sys-usb:3-2to attach it to running 'dev' AppVMGeneral notes:
This happens with an Android 6.0.1 device running CyanogenMod. Please note that attaching an old LG phone in Android debugging mode works just phone. I don't have other phones here at the moment to do more tests.
If I switch debugging mode off, the device attaches just fine. However, when I activate debugging mode on the device, it gets detached from the VM again. dmesg in
sys-usbshows this:Now I activate Android debugging mode on the device.
Of course, I also tried rebooting the phone, using other USB cables, etc.
The phone was working just fine before using QubesOS on the same hardware.
Help for debugging this further would be greatly appreciated as I need to attach this device for work.