Intermittent USB connection when launching adb - ONE Q&A, Help & Troubleshooting

Hello,
connecting my OnePlus One to my Linux machine without running adb works just fine. But as soon as I launch adb, the phone keeps connecting and disconnecting. adb does not find any devices.
Code:
Okt 21 20:15:52 asaru kernel: usb 2-3: new high-speed USB device number 8 using xhci_hcd
Okt 21 20:15:52 asaru kernel: usb 2-3: USB disconnect, device number 8
and so it goes on every second.
Code:
# adb --version
Android Debug Bridge version 1.0.39
Revision 8.0.0_r17
Linux is 4.13.7-1-ARCH. The mobile device is at the OEM firmware, most recent version *lol*.
I tried it on different USB ports and two different machines, the behavior is identical.
Any idea?
Thanks a lot!

Solved for me at least (ADB in arch is out of date)
EDIT:: TLDR: It's adb for sure. Download the latest version from google via HERE (direct link here
So I know this doesn't really add to the issue but I think this may be an adb or kernel issue. I have the same kernel and same ADB version as you (Actually running arch as well ^_^)
The odd thing is the udev rules work just fine in creating the initial links and the flakiness in the usb attachment doesn't start until after I spawn the adb server (I'm not sure if yours is the same way). The only difference between our behavior that I can see is that I'm using a Samsung S8+ :/ (sorry for the wrong thread and if this is hijacking please let me know and I'll delete it.). I am just trying to lend evidence to his/her issue.
udev version
Code:
root at locallaptop.local in ~
$ udevadm --version
235
kernel version
Code:
root at locallaptop.local in ~
$ uname -r
4.13.7-1-ARCH
adb version:
Code:
root at locallaptop.local in ~
$ adb --version
Android Debug Bridge version 1.0.39
Revision 8.0.0_r17
unplugging and then Plugging in my phone prior
Prior to starting the adb server:
Code:
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[6495.318173] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[6495.318456] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6495.318563] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
KERNEL[6495.318717] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
KERNEL[6495.318851] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
UDEV [6495.320466] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[6495.320719] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
UDEV [6495.321900] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
UDEV [6495.322998] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
UDEV [6495.323727] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
UDEV [6495.324702] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
UDEV [6495.344709] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
KERNEL[6510.098862] add /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
KERNEL[6510.101484] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[6510.102087] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
KERNEL[6510.102905] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6510.103484] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
KERNEL[6510.104179] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
UDEV [6510.677580] add /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
UDEV [6510.680327] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
UDEV [6510.682239] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
UDEV [6510.683855] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
UDEV [6510.684237] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
UDEV [6510.686602] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
Now when I start ADB the device is repeatedly disconnected:
Code:
KERNEL[6600.187212] add /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
KERNEL[6600.190544] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[6600.190930] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
KERNEL[6600.192065] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6600.192586] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
KERNEL[6600.194047] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
UDEV [6600.750663] add /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
UDEV [6600.756551] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
UDEV [6600.756820] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
UDEV [6600.758959] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
UDEV [6600.762960] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
UDEV [6600.763358] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6601.181364] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
UDEV [6601.186369] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6601.500084] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6601.500886] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[6601.501316] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6601.501415] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
KERNEL[6601.501566] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
KERNEL[6601.501811] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
KERNEL[6601.502434] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
UDEV [6601.504065] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
UDEV [6601.504908] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
UDEV [6601.505005] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
UDEV [6601.505985] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
UDEV [6601.506638] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
UDEV [6601.507346] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
UDEV [6601.524724] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
KERNEL[6601.994357] add /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
KERNEL[6601.996190] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[6601.996697] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1 (usb)
KERNEL[6601.997695] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/tty/ttyACM0 (tty)
KERNEL[6601.998163] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2 (usb)
KERNEL[6601.998534] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.3 (usb)
Corresponding kernel log:
Code:
Oct 27 16:43:45 locallaptop.local kernel: usb 1-1: new high-speed USB device number 47 using xhci_hcd
Oct 27 16:43:46 locallaptop.local kernel: cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Oct 27 16:43:47 locallaptop.local kernel: usb 1-1: USB disconnect, device number 47
Oct 27 16:43:47 locallaptop.local kernel: cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Oct 27 16:43:47 locallaptop.local kernel: usb 1-1: new high-speed USB device number 48 using xhci_hcd
Oct 27 16:43:47 locallaptop.local kernel: cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Oct 27 16:43:49 locallaptop.local kernel: usb 1-1: USB disconnect, device number 48
Oct 27 16:43:49 locallaptop.local kernel: cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Oct 27 16:43:49 locallaptop.local kernel: usb 1-1: new high-speed USB device number 49 using xhci_hcd
Oct 27 16:43:49 locallaptop.local kernel: cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Oct 27 16:43:51 locallaptop.local kernel: cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Oct 27 16:43:51 locallaptop.local kernel: usb 1-1: USB disconnect, device number 49
Oct 27 16:43:51 locallaptop.local kernel: usb 1-1: new high-speed USB device number 50 using xhci_hcd
Oct 27 16:43:51 locallaptop.local kernel: cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Finally, trying to connect via libmtp works without issue for me:
Code:
$ mtp-detect
libmtp version: 1.1.14
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Found 1 device(s):
Samsung: Galaxy models (MTP) (04e8:6860) @ bus 1, dev 79
I tried clearing my "External Storage" and "Media Storage" which seems to fix the issue if you get:
Code:
LIBMTP_Get_Storage(): Resource temporarily unavailable
When trying to pull/push files via mtp but I'm not having that issue and can list/use mtp without issue:
Code:
$ timeout 1 mtp-filetree
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Attempting to connect device(s)
Device: MyAndroidPhone
Storage: Phone
2000000 Samsung
2 Music
891 Over_the_Horizon.mp3
2000001 Android
4 data
2000022 .nomedia
2000023 com.samsung.android.coreapps
2000173 cache
2000174 volley
2000024 com.android.providers.media
2000175 albumthumbs
2000025 com.google.android.youtube
2000177 cache
2000179 exo
Is this the same with your phone as well?
EDIT:: After downloading the latest ADB client/server it works without issue::
Code:
$ ./adb devices -l
List of devices attached
98891a303554423541 device usb:3-1.1 product:dream2qltesq model:SM_G955U device:dream2qltesq

Related

[Q] Linux: pass APX device to VirtualBox guest

Several guides explain how to install APX drivers "on Windows only", and that they are not required on Linux (e.g. this one). Unfortunately I think that I do require such a driver on Linux, because I want to pass the APX device to my VirtualBox guest (where Win7 is running). And I think I can only pass usb devices to the guest that appear in VirtualBox's usb device list - which is a list of devices that have a Linux driver. So here's the question:
How can I pass an APX device to a VirtualBox guest (Win7) on a Linux host?
My APX device is a LG P990. It's based on nvidia tegra, so dmesg says:
Code:
[ 7386.292082] usb 2-1: new high-speed USB device number 13 using ehci_hcd
[ 7386.424943] usb 2-1: New USB device found, idVendor=0955, idProduct=7f20
[ 7386.424954] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7386.424961] usb 2-1: Product: APX
[ 7386.424967] usb 2-1: Manufacturer: NVIDIA Corp.
And this APX device actually is already being passed to VirtualBox, because an error window pops up (not a Windows window, but a VirtualBox window):
Code:
Failed to attach the USB device NVIDIA Corp. APX [0103] to the virtual machine Win7.
Failed to create a proxy device for the USB device. (Error: VERR_READ_ERROR).
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Console
Interface:
IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
Might be a permission problem. However, I don't know how to solve it, because there's no device in /dev that appears when plugging in the LG P990. Google says that my user needs to be in the vboxusers group - but he already is. All the virtualbox devices in /dev are also accessible with my user. So in the end I think that my user should be able to access all devices that are available as a "file" in /dev. But I think there's something missing in /dev. It might be either...
a) /dev/ttyUSB0, which is the device of the usbserial module. It is not being loaded automatically, but I can force it with "sudo modprobe usbserial vendor=0x0955 product=0x7f20". But this doesn't seem to be the correct driver, because it says that the device has been disconnected as soon as the module is loaded. These dmesg entries appear all at once:
Code:
[ 4187.867971] usbcore: registered new interface driver usbserial
[ 4187.867997] usbcore: registered new interface driver usbserial_generic
[ 4187.869407] USB Serial support registered for generic
[ 4187.869436] usbserial_generic 2-1:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
[ 4187.869440] usbserial_generic 2-1:1.0: Tell [email protected] to add your device to a proper driver.
[ 4187.869443] usbserial_generic 2-1:1.0: generic converter detected
[ 4187.870237] usb 2-1: generic converter now attached to ttyUSB0
[ 4187.870251] usbserial: USB Serial Driver core
[ 4188.312867] usb 2-1: USB disconnect, device number 7
[ 4188.313295] generic ttyUSB0: generic converter now disconnected from ttyUSB0
[ 4188.313319] usbserial_generic 2-1:1.0: device disconnected
So with the usbserial drivers there's neither /dev/ttyUSB0 nor a USB device in VirtualBox (the APX device that was available without any driver has disappeared).
b) /dev/ttyACM0 is the device of the module cdc_acm, which I think might could also handle the APX device; this is what happens in dmesg when attaching the LG to the USB port while cdc_acm is loaded (and usbserial is not loaded):
Code:
[ 4323.356889] usbcore: registered new interface driver cdc_acm
[ 4323.356895] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
But nothing is happening at all. Again, there's no /dev/ttyACM0. And this time the APX device in VirtualBox is still there (with the VERR_READ_ERROR again). So cdc_acm seems to have no effect at all.
c) loading usbserial AND cdc_acm - the same as if usbserial is loaded without cdc_acm; cdc_acm has no effect, so the same happens as in a)
Now I'm stuck. I don't know how to fix the permission error without a proper device in /dev. My best guess was the usbserial device that should have created /dev/ttyUSB0, but doesn't, and even prevents the APX "raw device" (without driver) to appear in VirtualBox's usb device list.
fyi: I've updated this VirtualBox bug report with my problem.
silly question
thorstenhirsch said:
Several guides explain how to install APX drivers "on Windows only", and that they are not required on Linux (e.g. this one). Unfortunately I think that I do require such a driver on Linux, because I want to pass the APX device to my VirtualBox guest (where Win7 is running). And I think I can only pass usb devices to the guest that appear in VirtualBox's usb device list - which is a list of devices that have a Linux driver. So here's the question:
How can I pass an APX device to a VirtualBox guest (Win7) on a Linux host?
My APX device is a LG P990. It's based on nvidia tegra, so dmesg says:
Code:
[ 7386.292082] usb 2-1: new high-speed USB device number 13 using ehci_hcd
[ 7386.424943] usb 2-1: New USB device found, idVendor=0955, idProduct=7f20
[ 7386.424954] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7386.424961] usb 2-1: Product: APX
[ 7386.424967] usb 2-1: Manufacturer: NVIDIA Corp.
And this APX device actually is already being passed to VirtualBox, because an error window pops up (not a Windows window, but a VirtualBox window):
Code:
Failed to attach the USB device NVIDIA Corp. APX [0103] to the virtual machine Win7.
Failed to create a proxy device for the USB device. (Error: VERR_READ_ERROR).
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Console
Interface:
IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
Might be a permission problem. However, I don't know how to solve it, because there's no device in /dev that appears when plugging in the LG P990. Google says that my user needs to be in the vboxusers group - but he already is. All the virtualbox devices in /dev are also accessible with my user. So in the end I think that my user should be able to access all devices that are available as a "file" in /dev. But I think there's something missing in /dev. It might be either...
a) /dev/ttyUSB0, which is the device of the usbserial module. It is not being loaded automatically, but I can force it with "sudo modprobe usbserial vendor=0x0955 product=0x7f20". But this doesn't seem to be the correct driver, because it says that the device has been disconnected as soon as the module is loaded. These dmesg entries appear all at once:
Code:
[ 4187.867971] usbcore: registered new interface driver usbserial
[ 4187.867997] usbcore: registered new interface driver usbserial_generic
[ 4187.869407] USB Serial support registered for generic
[ 4187.869436] usbserial_generic 2-1:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
[ 4187.869440] usbserial_generic 2-1:1.0: Tell [email protected] to add your device to a proper driver.
[ 4187.869443] usbserial_generic 2-1:1.0: generic converter detected
[ 4187.870237] usb 2-1: generic converter now attached to ttyUSB0
[ 4187.870251] usbserial: USB Serial Driver core
[ 4188.312867] usb 2-1: USB disconnect, device number 7
[ 4188.313295] generic ttyUSB0: generic converter now disconnected from ttyUSB0
[ 4188.313319] usbserial_generic 2-1:1.0: device disconnected
So with the usbserial drivers there's neither /dev/ttyUSB0 nor a USB device in VirtualBox (the APX device that was available without any driver has disappeared).
b) /dev/ttyACM0 is the device of the module cdc_acm, which I think might could also handle the APX device; this is what happens in dmesg when attaching the LG to the USB port while cdc_acm is loaded (and usbserial is not loaded):
Code:
[ 4323.356889] usbcore: registered new interface driver cdc_acm
[ 4323.356895] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
But nothing is happening at all. Again, there's no /dev/ttyACM0. And this time the APX device in VirtualBox is still there (with the VERR_READ_ERROR again). So cdc_acm seems to have no effect at all.
c) loading usbserial AND cdc_acm - the same as if usbserial is loaded without cdc_acm; cdc_acm has no effect, so the same happens as in a)
Now I'm stuck. I don't know how to fix the permission error without a proper device in /dev. My best guess was the usbserial device that should have created /dev/ttyUSB0, but doesn't, and even prevents the APX "raw device" (without driver) to appear in VirtualBox's usb device list.
Click to expand...
Click to collapse
I use LG P990, someday i learn how to change GB partition to ICS partition,but it turn that i cant use my NVFlash, so i flash with kdz other country but nothing , what should i do to get my nvflash work?
a bug in vb
Seems that it's a known bug in VirtualBox: unfortunately, after a day of playing around - i took an old laptop and installed XP.
I didn't find workaround for VirtualBox: and I've tried them plenty (running VB as root is one of them).

[Q] Can someone help with ADB please?

ADB flatly refuses to recognise my Xoom MZ601.
I run ADB on my Debian Linux computer and it recognises my LG Optimus 2x (P990) which appears in the list provided by 'adb devices' the same command with my Xoom produces 'List of devices attached' with nothing underneath. The USB Debug setting on the Xoom is ticked and the computer recognises the device. The computer's log shows:
Jun 24 12:10:37 dataman1 kernel: [3605717.696244] usb 1-7.2: new high-speed USB device number 67 using ehci_hcd
Jun 24 12:10:37 dataman1 kernel: [3605717.800363] usb 1-7.2: unable to read config index 0 descriptor/start: -71
Jun 24 12:10:37 dataman1 kernel: [3605717.800368] usb 1-7.2: chopping to 0 config(s)
Jun 24 12:10:37 dataman1 kernel: [3605717.807734] usb 1-7.2: New USB device found, idVendor=22b8, idProduct=70a8
Jun 24 12:10:37 dataman1 kernel: [3605717.807739] usb 1-7.2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Jun 24 12:10:37 dataman1 kernel: [3605717.807742] usb 1-7.2: Product: MZ600
Jun 24 12:10:37 dataman1 kernel: [3605717.807745] usb 1-7.2: Manufacturer: Motorola
Jun 24 12:10:37 dataman1 kernel: [3605717.807748] usb 1-7.2: SerialNumber: xxxxxxxxxxxxxxxxx
Jun 24 12:10:37 dataman1 kernel: [3605717.807878] usb 1-7.2: no configuration chosen from 0 choices
{The serial number has been changed to protect the innocent }
The udev 51-android.rules shows:
# LG Optimus 2x
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="1004", ATTRS{idProduct}=="618e", SYMLINK+="libmtp-%k", MODE="0666"
# Xoom
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTRS{idProduct}=="70a9", SYMLINK+="libmtp-%k", MODE="0666"
# Bootloader
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
I have run out of ideas. I am hoping to root the Xoom soon so any suggestions would be greatly appreciated.
BarrySamuels said:
ADB flatly refuses to recognise my Xoom MZ601.
I run ADB on my Debian Linux computer and it recognises my LG Optimus 2x (P990) which appears in the list provided by 'adb devices' the same command with my Xoom produces 'List of devices attached' with nothing underneath. The USB Debug setting on the Xoom is ticked and the computer recognises the device. The computer's log shows:
Jun 24 12:10:37 dataman1 kernel: [3605717.696244] usb 1-7.2: new high-speed USB device number 67 using ehci_hcd
Jun 24 12:10:37 dataman1 kernel: [3605717.800363] usb 1-7.2: unable to read config index 0 descriptor/start: -71
Jun 24 12:10:37 dataman1 kernel: [3605717.800368] usb 1-7.2: chopping to 0 config(s)
Jun 24 12:10:37 dataman1 kernel: [3605717.807734] usb 1-7.2: New USB device found, idVendor=22b8, idProduct=70a8
Jun 24 12:10:37 dataman1 kernel: [3605717.807739] usb 1-7.2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Jun 24 12:10:37 dataman1 kernel: [3605717.807742] usb 1-7.2: Product: MZ600
Jun 24 12:10:37 dataman1 kernel: [3605717.807745] usb 1-7.2: Manufacturer: Motorola
Jun 24 12:10:37 dataman1 kernel: [3605717.807748] usb 1-7.2: SerialNumber: xxxxxxxxxxxxxxxxx
Jun 24 12:10:37 dataman1 kernel: [3605717.807878] usb 1-7.2: no configuration chosen from 0 choices
{The serial number has been changed to protect the innocent }
The udev 51-android.rules shows:
# LG Optimus 2x
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="1004", ATTRS{idProduct}=="618e", SYMLINK+="libmtp-%k", MODE="0666"
# Xoom
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTRS{idProduct}=="70a9", SYMLINK+="libmtp-%k", MODE="0666"
# Bootloader
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
I have run out of ideas. I am hoping to root the Xoom soon so any suggestions would be greatly appreciated.
Click to expand...
Click to collapse
download http://adbdriver.com/upload/AdbDriverInstaller.exe
and install adb drivers installer on pc,open it
and connect your phone to pc and install the
adb drivers.
Syed.Zeshan said:
download http://adbdriver.com/upload/AdbDriverInstaller.exe
and install adb drivers installer on pc,open it
and connect your phone to pc and install the
adb drivers.
Click to expand...
Click to collapse
It is nice of you to try and help but a Windows executable is not going to run on a Linux machine. There are drivers already on the Linux machine because, as I said in my post, I can use ADB to connect to my LG Optimus 2x.
Wasn't there some udev rule that needs adding?
Sent from my HTC One using xda app-developers app
Maybe use WiFi adb? That's another solution that will probably work. I'm sure you can find an app easily enough. Or does stock android has it by default? Don't really remember...
Chaosgod27 said:
Maybe use WiFi adb? That's another solution that will probably work. I'm sure you can find an app easily enough. Or does stock android has it by default? Don't really remember...
Click to expand...
Click to collapse
I'll give that a try and report back.
spychodelics: I have added udev rules as shown in my first post.
Thanks to you both for trying to help.
Update: I have now solved the problem. With some Linux kernels, mine included, if the ehci_hcd module (needed for USB 2.0) is loaded it prevents the Xoom from being recognised so a modprobe -r ehci_hcd will unload that module and, Voila!, my Xoom is now recognised by ADB. I imagine a fix for that bug will be issued sometime.

OTG Wifi problem

Hi,
First i'm french si sorry for grammar
I 'm on cyanogenmod 12 / nethunter /root /busybox
I recently bought an wifi adaptater and plug it on my phone but I doesn't show up on ifconfig or airmon-ng.I have tried an other card who work with no problem. The strange thing is that the card show up in lsusb and dmesg
Output of lsusb:
Code:
[email protected]:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Output of dmesg:
Code:
[53625.557927] init: untracked pid 1031 exited with status 0[53636.095878] msm-dwc3 msm_dwc3: DWC3 exited from low power mode
[53636.098024] qpnp_chg_ext_charger_reset: qpnp_chg_ext_charger_reset reset:1
[53636.100268] qpnp_chg_ext_charger_reset: qpnp_chg_ext_charger_reset reset:0
[53636.104646] qpnp_chg_ext_charger_wdt_set: qpnp_chg_ext_charger_wdt_set seconds:0
[53636.105999] bq24196_charge_en enable:0
[53636.108919] bq24196_vddmax_set voltage:4350
[53636.115950] bq24196_charge_en enable:2
[53636.125106] xhci-hcd xhci-hcd: xHCI Host Controller
[53636.125408] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
[53636.137471] xhci-hcd xhci-hcd: irq 163, io mem 0xf9200000[53636.155514] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[53636.156186] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[53636.156286] usb usb1: Product: xHCI Host Controller
[53636.156439] usb usb1: Manufacturer: Linux 3.4.67-cyanogenmod-g399b32b xhci-hcd
[53636.156536] usb usb1: SerialNumber: xhci-hcd
[53636.160953] xHCI xhci_add_endpoint called for root hub
[53636.160962] xHCI xhci_check_bandwidth called for root hub[53636.161638] hub 1-0:1.0: USB hub found
[53636.161736] hub 1-0:1.0: 1 port detected
[53636.162783] xhci-hcd xhci-hcd: xHCI Host Controller
[53636.162936] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
[53636.163183] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[53636.163330] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[53636.163473] usb usb2: Product: xHCI Host Controller
[53636.163554] usb usb2: Manufacturer: Linux 3.4.67-cyanogenmod-g399b32b xhci-hcd
[53636.163701] usb usb2: SerialNumber: xhci-hcd
[53636.165570] xHCI xhci_add_endpoint called for root hub
[53636.165579] xHCI xhci_check_bandwidth called for root hub[53636.166218] hub 2-0:1.0: USB hub found
[53636.166310] hub 2-0:1.0: 1 port detected
[53636.653437] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[53636.686391] usb 1-1: New USB device found, idVendor=148f, idProduct=7601
[53636.686847] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[53636.687281] usb 1-1: Product: 802.11 n WLAN
[53636.687521] usb 1-1: Manufacturer: MediaTek
[53636.687759] usb 1-1: SerialNumber: 1.0
[email protected]:~#
If anyone know how to fix or patch it let me know how.
TurtleForGaming said:
Hi,
First i'm french si sorry for grammar
I 'm on cyanogenmod 12 / nethunter /root /busybox
I recently bought an wifi adaptater and plug it on my phone but I doesn't show up on ifconfig or airmon-ng.I have tried an other card who work with no problem. The strange thing is that the card show up in lsusb and dmesg
Output of lsusb:
Code:
[email protected]:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Output of dmesg:
Code:
[53625.557927] init: untracked pid 1031 exited with status 0[53636.095878] msm-dwc3 msm_dwc3: DWC3 exited from low power mode
[53636.098024] qpnp_chg_ext_charger_reset: qpnp_chg_ext_charger_reset reset:1
[53636.100268] qpnp_chg_ext_charger_reset: qpnp_chg_ext_charger_reset reset:0
[53636.104646] qpnp_chg_ext_charger_wdt_set: qpnp_chg_ext_charger_wdt_set seconds:0
[53636.105999] bq24196_charge_en enable:0
[53636.108919] bq24196_vddmax_set voltage:4350
[53636.115950] bq24196_charge_en enable:2
[53636.125106] xhci-hcd xhci-hcd: xHCI Host Controller
[53636.125408] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
[53636.137471] xhci-hcd xhci-hcd: irq 163, io mem 0xf9200000[53636.155514] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[53636.156186] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[53636.156286] usb usb1: Product: xHCI Host Controller
[53636.156439] usb usb1: Manufacturer: Linux 3.4.67-cyanogenmod-g399b32b xhci-hcd
[53636.156536] usb usb1: SerialNumber: xhci-hcd
[53636.160953] xHCI xhci_add_endpoint called for root hub
[53636.160962] xHCI xhci_check_bandwidth called for root hub[53636.161638] hub 1-0:1.0: USB hub found
[53636.161736] hub 1-0:1.0: 1 port detected
[53636.162783] xhci-hcd xhci-hcd: xHCI Host Controller
[53636.162936] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
[53636.163183] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[53636.163330] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[53636.163473] usb usb2: Product: xHCI Host Controller
[53636.163554] usb usb2: Manufacturer: Linux 3.4.67-cyanogenmod-g399b32b xhci-hcd
[53636.163701] usb usb2: SerialNumber: xhci-hcd
[53636.165570] xHCI xhci_add_endpoint called for root hub
[53636.165579] xHCI xhci_check_bandwidth called for root hub[53636.166218] hub 2-0:1.0: USB hub found
[53636.166310] hub 2-0:1.0: 1 port detected
[53636.653437] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[53636.686391] usb 1-1: New USB device found, idVendor=148f, idProduct=7601
[53636.686847] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[53636.687281] usb 1-1: Product: 802.11 n WLAN
[53636.687521] usb 1-1: Manufacturer: MediaTek
[53636.687759] usb 1-1: SerialNumber: 1.0
[email protected]:~#
If anyone know how to fix or patch it let me know how.
Click to expand...
Click to collapse
I guess this thread can help you:
https://forum.xda-developers.com/oneplus-one/general/unleash-true-potential-oneplus-t3394310
Nope. In my case I think it's driver related because other card work but I can't install the linux driver for the MT7601U due software dependencies / 404 error
UP

[GUIDE] Build / Mod AVD Kernel Android [10][11][12][13] rootAVD [Magisk] [USB passthrough] [Linux][Windows][MacOS] [Google Play Store API]

Hello Fellows,
with this Guide I would like to show what is necessary to do,
to get the new USB passthrough Feature,
from the Android Studio since Emulator 30.0.26 (August 16, 2020),
to work with a USB-Serial Device. Unfortunately the announcement "USB passthrough is now available"
needs to be taken literally. It means, just the passing from the host system to the gates of Android are possible.
There is no "taking it from there" implemented in Android nor the Kernel. And this is what this Guide is all about.
Inspired by Alabate and his Guide Use custom USB device with Android emulator by using custom built kernel on Ubuntu 18.04
Three basic steps needed to be done.
[Update 04.05.2021]
Spoiler: Kernel Compilation
A much more easier and reliable way on how to build, mod and update your AVDs Kernel with its modules,
can be found in my [GUIDE] by using the official AOSP Build ENV.
Build the AVD Kernel with the right check at the right place
Convince Linux to actually let go of the USB-Serial Device
Grant Permissions in Android to acknowledge the new plugged in Device
The Development Environment:
Apple Macbook Pro 2011 Dualboot
USB-Serial Device Prolific PL2303 Serial Port
Linux Mint 20 Ulyana
Android Studio 4.1.1 (Software Manager)
KVM -> Cosmic (18.10) or later
Android emulator version 30.2.6.0 (build_id 6962233)
Google APIs Intel x86 Atom_64 System Image Android 10 API 29 (revision: 11)
miscellaneous
1. Build the AVD Kernel with the right check at the right place
### From the shell with the AVD running we can get some Kernel Infos:
uname -r && uname -v
4.14.175-g6f3fc9538452
#1 SMP PREEMPT Wed Apr 8 17:38:09 UTC 2020
### Install the following tools to work with and to build the kernel:
sudo apt-get install -y build-essential libssl-dev kernel-package libncurses5-dev bzip2 lib32z1 bison flex
sudo apt-get install -y libelf-dev libelf-devel or elfutils-libelf-dev
sudo apt-get install -y qt5-default qttools5-dev-tools qttools5-dev
sudo apt-get install -y geany git
### Create a working directory and download the kernel source and its prebuilt gcc:
I choose the latest android-10.0.0_r47 branch and its prebuilt gcc 4.9
Code:
cd ~/ && mkdir avdkernelcompile && cd avdkernelcompile
git clone \
-b android-10.0.0_r47 \
--single-branch https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
I also choose the mainline android-goldfish-4.14-dev branch from the goldfish kernel source
Code:
git clone -b android-goldfish-4.14-dev --single-branch https://android.googlesource.com/kernel/goldfish
### Pull the config.gz from the AVD to generate and merge the kernel defconfigs file:
These steps lower the risk of getting build errors. And before you mod the kernel, it could
make sense to start with a build kernel that actually boots your AVD first, and then apply changes to it.
Code:
adb pull /proc/config.gz
gunzip -k config.gz
cd goldfish
cp ../config .config
make savedefconfig
mv defconfig arch/x86/configs/avd_pulled_defconfig
rm .config
./scripts/kconfig/merge_config.sh -m \
./arch/x86/configs/avd_pulled_defconfig \
./arch/x86/configs/x86_64_ranchu_defconfig
make savedefconfig
mv defconfig arch/x86/configs/merged_avd_pulled_defconfig
rm .config
### prepare the kernel with the gcc to be build:
we are now in the goldfish directory
exports must be done every time you open a new terminal
export CROSS_COMPILE=x86_64-linux-android-
export ARCH=x86_64
export PATH=$PATH:$(pwd)/../x86_64-linux-android-4.9/bin
make the just created defconfig file
make merged_avd_pulled_defconfig
If you come back here later, this is the right place to mod your kernel.
I like the GUI Interface because you have a better overview and a search function.
make xconfig
In order to get the USB-Serial recognized by the kernel, make sure the UHCI HCD is checked.
You can find it under: Device Drivers -> USB support -> UHCI HCD (most Intel and VIA) support
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Close and save it.
### build the actually kernel, with the all CPU cores you have, and see afterwards how long it took:
time make -j$(nproc)
The new kernel is placed in:
~/avdkernelcompile/goldfish/arch/x86/boot/bzImage
We leave it there for now. If you are planing to make changes when all is working so far, just jump
to make xconfig . The build time now is much smaller now. If you have to start over,
you can run make mrproper
### Start the AVD with the new kernel from via terminal
To be able to start the emulator and adb from everywhere, add those path in your ~/.bashrc
echo export PATH=~/Android/Sdk/platform-tools:$PATH >> ~/.bashrc
echo export PATH=~/Android/Sdk/emulator:$PATH >> ~/.bashrc
source ~/.bashrc
run the new kernel with:
Code:
emulator \
-netdelay none -netspeed full -avd Pixel_4_XL_API_29 \
-writable-system -no-snapshot-load \
-show-kernel \
-verbose \
-ranchu \
-kernel ~/avdkernelcompile/goldfish/arch/x86/boot/bzImage
If the kernel works proper, you can run the AVD with this even after a Wipe Data from the AVD Manager
Later on, you can get rid of the show-kernel, verbose and ranchu option. If the kernel boots and you
can work with the AVD for your satisfaction, it is time for the mod and the next step.
2. Convince Linux to actually let go of the USB-Serial Device
According to the Emulator Release Notes, one would just need the vendorID and productID from the desired USB Device to pass it through. These are easily obtained by:
lsusb
Bus 002 Device 009: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
To start the AVD with it, and you leave out the verbose stuff, the command changes to:
Code:
emulator \
-netdelay none -netspeed full -avd Pixel_4_XL_API_29 \
-writable-system \
-no-snapshot-load \
-kernel ~/avdkernelcompile/goldfish/arch/x86/boot/bzImage \
-qemu -usb \
-device usb-host,vendorid=0x067b,productid=0x2303
If you keep watching the terminal, you can see the error message:
libusb: error [get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/043, errno=13
libusb: error [get_usbfs_fd] libusb requires write access to USB device nodes
Now to convince Linux to let go of the USB-Serial Device, one must create an UDEV Rule.
You can do this even while the AVD is running an the USB-Serial Device is connected:
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", OWNER="libvirt-qemu", GROUP="kvm"' | sudo tee /etc/udev/rules.d/99-usb-android.rules
After this echo command, watch while you unplug and plug it, you will only see the Info Message:
libusb_release_interface: -4 [NO_DEVICE]
And if you also watching the AVD with:
adb root
adb shell
dmesg | grep usb
You will see that the kernel is already recognizing it.
[ 619.670306] usb 1-1: new full-speed USB device number 6 using uhci_hcd
[ 620.071451] usb 1-1: New USB device found, idVendor=067b, idProduct=2303
[ 620.073050] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 620.074698] usb 1-1: Product: USB-Serial Controller
[ 620.075872] usb 1-1: Manufacturer: Prolific Technology Inc.
Btw: If you also want to use this USB-Serial Device without access issues in other tools, for example CoolTerm,
just copy the line from the udev rule and change the SUBSYSTEM to tty.
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", OWNER="libvirt-qemu", GROUP="kvm"
Side Note: Under Mac OS you will get a similar libusb: error, but unlike Linux, there is no UDEV System, so you
cannot change this situation at all. Also not by unloading a kext. I tried, even with EL Capitan where you actually
still could unload kexts very easily. So this just "prooves" that the Google Developers, never tried to pass an USB
through - even if they hinted it: (This should also have been workng on Linux and macOS already) And it is even
worst, there is actually a very convenient feature built in QEMU, with the -serial keyword, you can attach such devices
in no time. But for some reason, EXACTLY this feature is taken out from the Google Developers - what a bummer.
3. Grant Permissions in Android to acknowledge the new plugged in Device
With the kernel recognizing the USB-Serial Device and Linux let us acces it, the AVD just doesn't know what
to do with it. Or rather, it doesn't have permissions to proceed. To grant these permissions, one must simply
place a file, with this permissions, called android.hardware.usb.host.xml in /system/etc/permissions or
in /vendor/etc/permissions.
For both places we need not only root but also write access to it. Google Play AVD Images can be rooted, with my
rootAVD script, but these partitions can't remounted as writeable, no matter what. At least, not with my skills.
AVD Images with Google APIs on the other hand are capable of beeing rooted and writeable out of the box.
Actually, just the overlay paritions can be writeable. To achive this, one must start the AVD with the -writable-system
option. What we already doing all the time.
When the AVD is up, go with the ADB commands one by one:
adb root
adb shell avbctl disable-verification
adb disable-verity
adb reboot
adb root
adb remount
adb shell
Every command must show a positive result, if you stuck in a bootloop or so afterwards,
one of the two disable commands didn't work. Start over with a Wipe Data.
Once the remount command shows remount succeeded you are good to go.
In the adb shell:
echo '<permissions><feature name="android.hardware.usb.host"/></permissions>' > /system/etc/permissions/android.hardware.usb.host.xml
chmod 644 /system/etc/permissions/android.hardware.usb.host.xml
reboot
After the Reboot, plug in your USB-Serial Device, and If you have Serial USB Terminal installed.
it will finally pop up a message.
If you have USB Device Info installed, It will even show more informations.
If I disable USB Debugging, the 0000 Device will disappear.
That's it for now. The USB Passthrough for USB-Serial Devices can work.
I am currently working on a way to get a mass storage mounted in the AVD.
But I can't figure out the right fstab.ranchu entry for the AVD to auto mount my USB Storage.
I could get the kernel to recognize it:
[ 28.090063] usb 1-1: new full-speed USB device number 2 using uhci_hcd
[ 28.491686] usb 1-1: not running at top speed; connect to a high speed hub
[ 28.499738] usb 1-1: config 1 interface 0 altsetting 0 endpoint 0x2 has invalid maxpacket 512, setting to 64
[ 28.501413] usb 1-1: config 1 interface 0 altsetting 0 endpoint 0x81 has invalid maxpacket 512, setting to 64
[ 28.515287] usb 1-1: New USB device found, idVendor=1f75, idProduct=0917
[ 28.516925] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 28.518772] usb 1-1: Product: PenDrive
[ 28.519699] usb 1-1: Manufacturer: Innostor
[ 28.522417] usb 1-1: SerialNumber: 000000000000000071
[ 28.526804] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 28.528787] scsi host0: usb-storage 1-1:1.0
[ 29.962957] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
But it keeps getting repeated with the last line
It also does show up as block device in:
brw------- 1 root root 8, 0 2021-01-03 23:49 sda
But without sda1, just sda. And the USB Stick was formated via SDCARDFS in a real phone.
Update 06.01.2021:
Modding the Kernel with USB Mass Storage and SCSI support
In order to get an USB Stick announced by the kernel as block device node, one must
activate some additional Supports in the Kernel Config.
Device Drivers
SCSI device support
SCSI device support
SCSI disk support
USB support
USB Mass Storage support
USB Attached SCSI
With these additional features, the kernel is providing the pluged USB Stick under
/dev/block/sd which is needed to get the fstab.ranchu able to pick it up.
Once the kernel is complete, one must tell Qemu where it is supposed to plug in the USB Stick.
This is done with the -device and USB type options:
Code:
-device usb-ehci,id=ehci \
-device usb-host,bus=ehci.0,vendorid=0x8564,productid=0x1000
The EHCI (USB 2.0) driver support is already build in the stock kernel, so if you device can be
"downsqeezed" you can tell it Qemu with these words. Use the device usb.ehci, identify it for me as ehci, and attach my VendorID and ProductID to your usb-host bus ehci.0
(ehci in qemu provides 8 USB ports) With this way, you can also attach multiply USB Devices to the same AVD.
Code:
-device usb-ehci,id=ehci \
-device usb-host,bus=ehci.0,vendorid=0x8564,productid=0x1000 \
-device usb-host,bus=ehci.0,vendorid=0x1f75,productid=0x0917
If you have added USB 3.0 support in your kernel already, you can even use the XHCI driver.
Code:
emulator \
-netdelay none -netspeed full -avd Pixel_4_XL_API_29 \
-writable-system -no-snapshot-load \
-kernel ~/avdkernelcompile/goldfish/arch/x86/boot/bzImage \
-qemu -usb \
-device usb-ehci,id=ehci \
-device usb-host,bus=ehci.0,vendorid=0x8564,productid=0x1000 \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid=0x1f75,productid=0x0917
And with the fstab.ranchu correctly tuned, both USB Stick will pop up systemwide for every app to use.
Spoiler: Root and fstab.ranchu
Modding the fstab.ranchu
Without Magisk on the AVD installed, you can very easly edit the
/vendor/etc/fstab.ranchu just in the adb remounted overlay partitions.
Add this line to it:
/devices/*/block/sd* auto auto defaults voldmanaged=usb:auto
With Magisk on the AVD installed, it gets messy. Due to the fact, that Magisk is mounting a mirror of the orignal read-only partitions, some changes can't be done like before. The only way I could figure out was
to add the fstab.ranchu in my ramdisk.img and let Magisk overlay it during boot time.
Root Directory Overlay System
For this you can use my script rootAVD.sh
Code:
# Set PATCHFSTAB=true if you want the RAMDISK merge your modded fstab.ranchu before Magisk Mirror gets mounted
PATCHFSTAB=false
#PATCHFSTAB=true
# cp the read-only fstab.ranchu from vendor partition and add usb:auto for SD devices
# kernel musst have Mass-Storage + SCSI Support enabled to create /dev/block/sd* nodes
...
How to root the AVD and patch fstab.ranchu:
The script runs in Linux, Darwin MacOS and Windows. It needs the path to the ramdisk.img of the system-image as a parameter.
The AVD needs to be running and accessible via adb shell.
Then just run it and restart, NOT adb reboot, your AVD. It works with
Android 7, Android 10 and Android 11. But not with Android 8 and Android 9.
It also copys every .apk within the Apps Folder to the AVD.
./rootAVD.sh ~/Android/Sdk/system-images/android-30/google_apis_playstore/x86_64/ramdisk.img
To get the fstab.ranchu patched, set PATCHFSTAB=true, make some adjustments, and let the rootAVD script run.
Miscellaneous:
Special Cherrys for Googe Play Store AVD with Stock Kernel:
The EHCI USB Driver is already implemented in the Stock Kernel, even in the Google Play Version AVD.
By adding the android.hardware.usb.host.xml file to its rightful place, a well
written App, like X-plore File Manager, could use its own USB-Driver to access the USB Storage.
But how to get it there? Once Magisk is installed via the rootAVD script. Which are basicly the
original scripts from Magisk, just a bit tuned. You can install my Magisk Module: usbhostpermissons
Don't forget to start the AVD with usb-ehci command. The USB Stick won't pop up systemwide,
but you can still use them within X-plore and copy & paste files with it.
Replace the emulator with a script to pass arguments and run it from the GUI:
Code:
mv ~/Android/Sdk/emulator/emulator ~/Android/Sdk/emulator/emulator-original
cat <<EOF > ~/Android/Sdk/emulator/emulator
#!/bin/bash
~/Android/Sdk/emulator/emulator-original \[email protected] \
-writable-system -no-snapshot-load \
-kernel ~/avdkernelcompile/goldfish/arch/x86/boot/bzImage \
-qemu -usb \
-device usb-ehci,id=ehci \
-device usb-host,bus=ehci.0,vendorid=0x8564,productid=0x1000 \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid=0x1f75,productid=0x0917 \
-device usb-host,bus=usb-bus.0,vendorid=0x067b,productid=0x2303
EOF
chmod +x ~/Android/Sdk/emulator/emulator
If you have your original emulator file renamed, don't forget to change it when you are
calling it manual from the command line.
[Update 15.12.2021]
Spoiler: For Windows Only.
Since Emulator Version 31.1.4, Google re-implemented the USB pass through feature along with
some tools:
prebuilt Windows drivers for USB passthrough
Downloadable directly from the AOSP by clicking the [tgz]
and emulator parameters:
-list-usb
-usb-passthrough
The Windows drivers must be installed from an Adminstrator Command Shell
Code:
Install_Drivers.bat
Installing Android USB Assistant...
call Android_USB_Assistant_Install.bat
Microsoft PnP Utility
Processing inf : Android_USB_Assistant.inf
Successfully installed the driver.
Driver package added successfully.
Published name : oem89.inf
Total attempted: 1
Number successfully imported: 1
Installing Android Emulator USB Passthrough Assistance Driver
SERVICE_NAME: UsbAssist
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
[SC] DeleteService SUCCESS
SERVICE_NAME: UsbAssist
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 0
FLAGS :
Find your connected USB Devices
Code:
emulator -list-usb
VID:PID 058f:6387 (Bus 1, Port 5.1.1)
Manufacturer:
Product:
SerialNumber: 40A0FE0A
VID:PID 067b:2303 (Bus 1, Port 5.1.2)
Manufacturer: NA
Product: NA
SerialNumber: NA
VID:PID 0403:6001 (Bus 1, Port 5.1.2)
Manufacturer: FTDI
Product: USB-to-Serial
SerialNumber: FT9QIQ6Y
VID:PID 1bcf:284c (Bus 1, Port 5.1.2)
Manufacturer: SunplusIT Inc
Product: 5MP USB webcam
SerialNumber: N2020040701
Now you can use those VID : PID combination to pass it through your AVD
Code:
emulator -netdelay none -netspeed full -avd Pixel_4_API_3 -usb-passthrough vendorid=0x058f,productid=0x6387
Multible VID : PID combinations are also possible
Code:
emulator -netdelay none -netspeed full -avd Pixel_4_API_32 -usb-passthrough vendorid=0x058f,productid=0x6387 -usb-passthrough vendorid=0x067b,productid=0x2303
Unfortunately the emulator will show this Error:
Code:
qemu-system-x86_64.exe: libusb_kernel_driver_active: -12 [NOT_SUPPORTED]
But the Devices are still passed through.
They will not be shown in the AVD nor recognized as a Device in any way.
In order to accomplish this, you must:
root the AVD with Magisk (Canary for 64-Bit only AVDs)
patch the FSTAB to get USB Drives automaticly mounted as a drive
install my USB Host Permissions Magisk Module
This can be done by:
Code:
rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-32\google_apis_playstore\x86_64\ramdisk.img PATCHFSTAB GetUSBHPmodZ
The Magisk Module will be put into the local Download folder of the AVD.
AVDs with a Kernel Version lower then 5.4.65 need either a custom build kernel with the
USB features enabled or an updated prebuild Kernel directly from the AOSP.
Code:
rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-30\google_apis_playstore\x86_64\ramdisk.img InstallPrebuiltKernelModules PATCHFSTAB GetUSBHPmodZ
[Update 10.10.2022]
Spoiler: For MacOS Only.
Recently I've stumbled across this Question on stackoverflow:
How to use USB with QEMU on a Mac host?
In there is a discussion mentioned, on GitHub, that kind of resolved the issue
with USB Passthrough Feature and LibUSB.
macOS: implement kernel driver detach #911
followed by a very good explanation on what is actually going on with the real reasons behind it.
How to use the new macOS kernel detach feature for non-root user no solution as of now for libuvc users #1014
However, long story short, the USB Passthrough Feature for AVDs works now If you boot the AVD with
root privileges. Here is what I did to get it working.
Install libusb 1.0.26 via Homebrew:
brew install libusb
or check your libusb version first:
Code:
brew list --versions libusb
libusb 1.0.26
I am on MacOs Monterey now:
Code:
[email protected] % sw_vers
ProductName: macOS
ProductVersion: 12.6.1
BuildVersion: 21G217
[email protected] % emulator
INFO | Android emulator version 31.3.13.0 (build_id 9189900) (CL:N/A)
The following examples and devices I've tested so far:
USB Drive 2GB:
Code:
export PID="0x6387"
export VID="0x058f"
sudo emulator \
-netdelay none \
-netspeed full \
-no-snapstorage \
-avd Pixel_4_API_33 \
-qemu -usb \
-device usb-ehci,id=ehci \
-device usb-host,bus=ehci.0,vendorid="$VID",productid="$PID"
Code:
2022-11-10 16:32:14.088 qemu-system-x86_64[9002:323007] vendorID: 0x058f (1423), productID: 0x6387 (25479)
2022-11-10 16:32:14.088 qemu-system-x86_64[9002:323007] Command line USB devices: ("vendorID: 0x58f, productID: 0x6387")
2022-11-10 16:32:14.088 qemu-system-x86_64[9002:323007] Acquiring USB Exclusive access for device: <vendorID: 0x58f, productID: 0x6387>
2022-11-10 16:32:14.092 qemu-system-x86_64[9002:323007] Service authorization failed with error with return code: -536870202
What doesn't work is unplugging and re-plugging. The AVD needs to boot with it. Every time the AVD boots, the Disk Not Ejected Properly Message pops up. Even if it says Service authorization failed with error with return code: -536870202, the device pops up system wide.
USB 3.0 Hard Drive:
Code:
export PID="0x5106"
export VID="0x174c"
sudo emulator \
-netdelay none \
-netspeed full \
-no-snapstorage \
-avd Pixel_4_API_33 \
-qemu -usb \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid="$VID",productid="$PID"
I guess the AVD doesn't like the filesystem on that drive.
USB WebCam (uvc):
Code:
export PID="0x636d"
export VID="0x0c45"
sudo emulator \
-netdelay none \
-netspeed full \
-no-snapstorage \
-avd Pixel_4_API_33 \
-qemu -usb \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid="$VID",productid="$PID"
USB-to-Serial Device:
Code:
export PID="0x6001"
export VID="0x0403"
sudo emulator \
-netdelay none \
-netspeed full \
-no-snapstorage \
-avd Pixel_4_API_33 \
-qemu -usb \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid="$VID",productid="$PID"
Conclusion:
The AVDs/Qemu USB Passthrough Feature paired with libusb on MacOs is still a farce.
Makes me wonder how Parallels Desktop is capable since kajillian years of passing any kind
of USB device through, without any root. And they have literally patch there Tools every Kernel
version.
Thanks for reading
Cheers NewBit
Thanks and Credits to @topjohnwu , Alabate, Google, Qemu and Jitendra
QEMU/Devices/USB/Root
USB Quick Start
USB recommendations for qemu
qemu usb storage emulation
Have you mange to make it work on windows ?
Have you mange to make it work on windows ?
tomek_be said:
Have you mange to make it work on windows ?
Click to expand...
Click to collapse
Sorry for the late response, I didn't get any notice...
No I did not even try it. Did you?
I did but with no luck. Emulator correctly creates USB controller and /sys/kernel/debug/usb/devices contains entries corresponding with command line options but passthrough USB device is not discovered by the kernel. Sometimes emulator produces message on stdout that devices has been attached or detached but it is not repeatable. I tried different hardware accelerations ( HAXM and WHPX ) - nothing . BTW - on linux it worked like a charm - only thing I need to do was creating proper /system/etc/permissions/android.hardware.usb.host.xml. After that non modified kernel picked up usb device.
tomek_be said:
I did but with no luck. Emulator correctly creates USB controller and /sys/kernel/debug/usb/devices contains entries corresponding with command line options but passthrough USB device is not discovered by the kernel. Sometimes emulator produces message on stdout that devices has been attached or detached but it is not repeatable. I tried different hardware accelerations ( HAXM and WHPX ) - nothing . BTW - on linux it worked like a charm - only thing I need to do was creating proper /system/etc/permissions/android.hardware.usb.host.xml. After that non modified kernel picked up usb device.
Click to expand...
Click to collapse
Weird, I still don't get any notice.
So you did try it on Linux with Stock Kernel and permission xml file!? -> it worked
You also tried the same thing on Windows? -> it didn't worked
Is it the same/similar AVD version? Is the syntax on windows different? What commands did you use exactly?
Is your AVD rooted? Did you cross compare the Kernel Configs? Kernel Versions?
What USB Device exactly you are trying to pass through?
Hello fellows, Did you find the way to make it work in Windows ?, It's hard to create apps that need interaction with USB / Bluetooth devices under Windows environment !, I wonder why these guys at Google make it so hard ?
mariodantas said:
Hello fellows, Did you find the way to make it work in Windows ?, It's hard to create apps that need interaction with USB / Bluetooth devices under Windows environment !, I wonder why these guys at Google make it so hard ?
Click to expand...
Click to collapse
It was actually already solved, the same way like on linux. But Google
decided to take out the USB Pass Through Feature on Windows.
Android emulator USB passthrough fails: " 'usb-host' is not a valid device model name"
So the only chance would be to get back to Version 30.5.2 (build_id 7175973) (Feb 27, 2021) to try it out.
Hard to develop apks that need to cope with USB or BT in Windows machines, what's wrong with Google ?
Thanks for your information buddy !
mariodantas said:
what's wrong with Google ?
Click to expand...
Click to collapse
I've stopped wondering since they put this sneaky covid "feature" undetected on my phone.
mariodantas said:
Hard to develop apks that need to cope with USB or BT in Windows machines
Click to expand...
Click to collapse
Yes, totally. But Microsoft is to blame as well, according to Erwin Jansen.
I guess you need to remotely debug your apk directly on your phone/device.
mariodantas said:
Thanks for your information buddy !
Click to expand...
Click to collapse
No problem, If there is any USB update in the Windows Version, I am happily updating this Guide.
Hello newbit,
USB passthrough with (ASUS USB-BT400 USB Adapter USBBT400) on Linux is working fine, Emulator is able to connect to phone with BT dongle mentioned above - followed steps in android link - https://source.android.com/devices/automotive/start/passthrough
But when trying the same in MAC OS, I could see BT dongle is getting detected in Emulator as shown below (0b05:17cb) but BT in emulator not working. So, not able to connect to phone.
1|emulator:/ # lsusb
Bus 004 Device 001: ID 1d6b:0002
Bus 004 Device 002: ID 0b05:17cb
Bus 002 Device 001: ID 1d6b:0002
My question is that, In linux I have Update udev settings to allow the user process (e.g. QEMU) to have read/write permissions:
$ echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="17cb", MODE="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/99-mynew.rules >/dev/null
$ sudo udevadm control --reload
$ sudo udevadm trigger
But in MAC OS I am not sure how to do the same ie Update udev settings to allow user process to have read/write permissions ? I am not sure if this is the problem ? Are you successful with USB passthrough on MAC OS ?
I am currently blocked and any inputs on this regard would be great. Thanks
nrajeevlochan said:
Hello newbit,
USB passthrough with (ASUS USB-BT400 USB Adapter USBBT400) on Linux is working fine, Emulator is able to connect to phone with BT dongle mentioned above - followed steps in android link - https://source.android.com/devices/automotive/start/passthrough
But when trying the same in MAC OS, I could see BT dongle is getting detected in Emulator as shown below (0b05:17cb) but BT in emulator not working. So, not able to connect to phone.
1|emulator:/ # lsusb
Bus 004 Device 001: ID 1d6b:0002
Bus 004 Device 002: ID 0b05:17cb
Bus 002 Device 001: ID 1d6b:0002
My question is that, In linux I have Update udev settings to allow the user process (e.g. QEMU) to have read/write permissions:
$ echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="17cb", MODE="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/99-mynew.rules >/dev/null
$ sudo udevadm control --reload
$ sudo udevadm trigger
But in MAC OS I am not sure how to do the same ie Update udev settings to allow user process to have read/write permissions ? I am not sure if this is the problem ? Are you successful with USB passthrough on MAC OS ?
I am currently blocked and any inputs on this regard would be great. Thanks
Click to expand...
Click to collapse
Hi @nrajeevlochan,
as mentioned above, Mac doesn't have this UDEV feature like Linux has it. Depending on the Mac OS Version,
I had to extract and copy some dylib files from a newer Mac OS Version to my running Version. The Error
output was gone, but the USB Device wasn't passed through. So for now, I cannot provide something useful to get the USB Pass through feature running on Mac OS. The only, non-convenient work around is, to adb remote connect to your Linux AVD. But you need either 2 separate Machines or a virtual Machine running in your Mac. Which will cost you a lot of performance. Is there any error message on the terminal regarding your USB?
newbit said:
Hi @nrajeevlochan,
as mentioned above, Mac doesn't have this UDEV feature like Linux has it. Depending on the Mac OS Version,
I had to extract and copy some dylib files from a newer Mac OS Version to my running Version. The Error
output was gone, but the USB Device wasn't passed through. So for now, I cannot provide something useful to get the USB Pass through feature running on Mac OS. The only, non-convenient work around is, to adb remote connect to your Linux AVD. But you need either 2 separate Machines or a virtual Machine running in your Mac. Which will cost you a lot of performance. Is there any error message on the terminal regarding your USB?
Click to expand...
Click to collapse
Hi newbit,
Thanks for your quick response.
Please see the error I am getting with "dmesg | grep usb" below:
emulator:/ # dmesg | grep usb
[ 205.231407] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 205.383241] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
[ 205.384500] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
[ 205.385742] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x84 has invalid maxpacket 32
[ 205.387163] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 32
[ 205.392405] usb 1-1: New USB device found, idVendor=0b05, idProduct=17cb, bcdDevice= 1.12
[ 205.393828] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 205.395216] usb 1-1: Product: BCM20702A0
[ 205.395983] usb 1-1: Manufacturer: Broadcom Corp
[ 205.396874] usb 1-1: SerialNumber: 5CF370A4407D
[ 205.405316] usb 1-1: can't set config #1, error -32
[ 205.566482] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd UsbDeviceHandle rqt 192 rq 51 len 2 ret -110
[ 205.621767] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd UsbDeviceHandle rqt 192 rq 51 len 2 ret -110
nrajeevlochan said:
Hi newbit,
Thanks for your quick response.
Please see the error I am getting with "dmesg | grep usb" below:
emulator:/ # dmesg | grep usb
[ 205.231407] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 205.383241] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
[ 205.384500] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
[ 205.385742] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x84 has invalid maxpacket 32
[ 205.387163] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 32
[ 205.392405] usb 1-1: New USB device found, idVendor=0b05, idProduct=17cb, bcdDevice= 1.12
[ 205.393828] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 205.395216] usb 1-1: Product: BCM20702A0
[ 205.395983] usb 1-1: Manufacturer: Broadcom Corp
[ 205.396874] usb 1-1: SerialNumber: 5CF370A4407D
[ 205.405316] usb 1-1: can't set config #1, error -32
[ 205.566482] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd UsbDeviceHandle rqt 192 rq 51 len 2 ret -110
[ 205.621767] usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd UsbDeviceHandle rqt 192 rq 51 len 2 ret -110
Click to expand...
Click to collapse
My apologies @nrajeevlochan,
I didn't even notice that you've replied to my question.
[ 205.405316] usb 1-1: can't set config #1, error -32
indicates, that the AVD actually detects the device, and can even read some low level information from it.
Like Product, VID, PID etc. But the host system doesn't fully let it go, so this error can't set config #1, error -32 shows up, indicating that state.
I do have some positive updates tho, you might wanna check out the
[Update 10.10.2022]
For MacOS Only.
Cheers NewBit

understanding if fastboot is enabled on mi a3 with broken screen

Hi *,
I hava a xiaomi mi a3 with broken screen, i already rooted and enable debugging previous of the broken.
Now i would use scrcpy but adb listing my device as unhautorized.
I see in other post that i need to copy the key on /android/data/..., but i unable because adb shell does not work, so i read that entering in fastboot mode i able to copy the files without key.
So i powered off the phone and restart with volume up+power and i see this on my syslog
Oct 22 15:32:22 debian-z230 kernel: [ 5541.994136] usb 2-7: new high-speed USB device number 19 using xhci_hcd
Oct 22 15:32:23 debian-z230 kernel: [ 5542.144023] usb 2-7: New USB device found, idVendor=18d1, idProduct=d001, bcdDevice= 4.14
Oct 22 15:32:23 debian-z230 kernel: [ 5542.144038] usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 22 15:32:23 debian-z230 kernel: [ 5542.144044] usb 2-7: Product: Mi A3
Oct 22 15:32:23 debian-z230 kernel: [ 5542.144048] usb 2-7: Manufacturer: Xiaomi
Oct 22 15:32:23 debian-z230 kernel: [ 5542.144051] usb 2-7: SerialNumber: 7044fce4312c
Oct 22 15:32:23 debian-z230 gvfsd[14218]: LIBMTP PANIC: Unable to find interface & endpoints of device
Oct 22 15:32:23 debian-z230 gnome-shell[2659]: Unable to mount volume Mi A3: Gio.IOErrorEnum: Unable to open MTP device “002,019”
Oct 22 15:32:24 debian-z230 gvfsd[14218]: Device 0 (VID=18d1 and PID=d001) is a Meizu Pro 5 Ubuntu Phone.
I tryed to run adb but it seems always recognized it as unhautorized, fastboot devices command instead does not report any output:
[email protected]:~$ fastboot devices
[email protected]:~$ fastboot reboot
< waiting for any device >
[email protected]:~$ adb devices
List of devices attached
7044fce4312c unauthorized
if the phone starts in normal mode instead on the syslog i see this
Oct 22 15:44:24 debian-z230 kernel: [ 6263.802797] usb 2-7: new high-speed USB device number 24 using xhci_hcd
Oct 22 15:44:24 debian-z230 kernel: [ 6263.953115] usb 2-7: New USB device found, idVendor=2717, idProduct=ff08, bcdDevice= 4.14
Oct 22 15:44:24 debian-z230 kernel: [ 6263.953121] usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 22 15:44:24 debian-z230 kernel: [ 6263.953123] usb 2-7: Product: Mi A3
Oct 22 15:44:24 debian-z230 kernel: [ 6263.953125] usb 2-7: Manufacturer: Xiaomi
Oct 22 15:44:24 debian-z230 kernel: [ 6263.953126] usb 2-7: SerialNumber: 7044fce4312c
Oct 22 15:44:24 debian-z230 mtp-probe: checking bus 2, device 24: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7"
Oct 22 15:44:24 debian-z230 mtp-probe: bus: 2, device: 24 was not an MTP device
Oct 22 15:44:25 debian-z230 mtp-probe: checking bus 2, device 24: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7"
Oct 22 15:44:25 debian-z230 mtp-probe: bus: 2, device: 24 was not an MTP device
Oct 22 15:44:55 debian-z230 /usr/libexec/gdm-x-session[2473]: (EE) event2 - Primax HP USB Keyboard: client bug: event processing lagging behind by 13ms, your system is too slow
Oct 22 15:45:01 debian-z230 CRON[14796]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
so seems that product, vendor and device id is different.
Could someone confirm that the first id, of product vendor and device is fastboot device?
There is a method to solve this impasse?
Thanks a lot to all
so the vendor product and device is different
Fastboot gets enabled by default when an Android device boots up, unless manufacturer ( e.g. Samsung ) decided not to support Fastboot. But Xiamomi devices support Fastboot, AFAIK.
FYI: Fastboot isn't a device you can find in /dev/block, it's a software that allows to operate on Android device's bootloader.
jwoegerbauer said:
Fastboot gets enabled by default when an Android device boots up, unless manufacturer ( e.g. Samsung ) decided not to support Fastboot. But Xiamomi devices support Fastboot, AFAIK.
FYI: Fastboot isn't a device you can find in /dev/block, it's a software that allows to operate on Android device's bootloader.
Click to expand...
Click to collapse
Hi and thanks for the answers, but I think that Linux discover fastboot device with different product vendor and device id respect normal boot. I would know why fastboot command does not discover my device, I suspect, because my screen on device is broken, that device not start in fastboot mode and I ask to group what kind of product device and vendor I'd you seen for your xiaomi mi a3 device under syslog or lsusb in fastboot mode.
Yes
Code:
sudo ./fastboot devices
returns
Code:
<SERIAL_ID> fastboot
but that's NOT AN ANDROID DEVICE, IT'S THE DEVICE'S BOOTLOADER connected to, and nothing else.
If the output is shown as above listed, then Fastboot-mode is enabled/activated and working.

Categories

Resources