Re: [android-building] Anybody has same adb usb issue?

349 views
Skip to first unread message

Jean-Baptiste Queru

unread,
Mar 22, 2013, 11:16:50 AM3/22/13
to android-...@googlegroups.com
I'm not an expert in virtualization or USB, but it might be that you
need to configure USB access. along the lines of "Configuring USB
Access" on https://source.android.com/source/initializing.html

You'll need to figure out the VID/PID for your device, which will be
listed by running "lsusb"

JBQ

On Fri, Mar 22, 2013 at 7:07 AM, June Ree <stepbyste...@gmail.com> wrote:
> Hello,
>
> Here is my env.
>
> I successfully built 2.3.7 in Ubuntu 10.04 (Guest OS) in the Virtual Box.
> emulator seems working fine.
>
> However, I am having a trouble to use adb command...
> I have LG Android phone...so in the terminal window...
> I issued a command like this to connect my LG android phone..
>
> adb kill-server
> adb start-server
> adb devices
>
> However, List of devices attached information does not show anything even
> though my LG android phone connected via USB.
> According to build instruction, I set up USB rule file...Actually, in right
> below status bar in Guest OS, I see a icon telling me that it currently
> attached my LG Android USB device...
> The Ubuntu guest os is currently communicating with my USB device for
> sure...however, for whatever reason, adb is not able to capture it...hum..
>
> Obviously, when I tested the adb command in my host OS(which is Windows), I
> don't have any problem to connect the phone via ADB.
>
> Is there anybody who had same issue like this?
>
> Thanks,
>
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-buildi...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

John Kemp

unread,
Mar 22, 2013, 11:35:51 AM3/22/13
to android-...@googlegroups.com
Virtualized USB has some issues.

You will need to first *ensure* that Windows isn't capturing the device before your Ubuntu guest sees it, even if Ubuntu claims otherwise. http://forum.xda-developers.com/showthread.php?t=570452g gives you some idea of what you should check for, but your exact problem may not be described there so you will probably need to play around a bit.

Once you know Windows isn't the problem then run 'lsusb' as JBQ mentioned and you should see the device listed there. Only then can you try ADB.

Although I sometimes managed to get virtualized USB working (OS X host, Ubuntu guest), I eventually moved to running a real Linux machine to talk to USB directly - it was far more reliable.

Cheers,

JohnK

https://twitter.com/frumioj

John Kemp

unread,
Mar 22, 2013, 5:47:38 PM3/22/13
to android-...@googlegroups.com
Just to be clear, 'lsusb' in the GUEST sees the device?

If so, then yes, you need rules in UDEV that specify the vendor/device ID. You need also to chmod the rules file.

This is all described quite well in http://developer.android.com/tools/device.html

'lsusb' should give you the vendor and device IDs you need to put in the rules file, if they are not in the list on that page.

I also had to create a ~/adb_usb.ini file with the vendor/device IDs in it for some devices.

JohnK

On Mar 22, 2013, at 2:06 PM, June Ree wrote:

> Thanks for your answer.
> Unfortunately, nope, it still is not working.
>
> Couple of question.
>
> 1. Did you create a rule file like a thing that mentioned here "Configuring USB
> Access" on https://source.android.com/source/initializing.html ?
>
> 2. Again, my Guest OS sees the USB, but the problem is that adb doesn't see it. Are you sure that you can actually connect your Android phone via adb from your guest OS?
>
>
> On Friday, March 22, 2013 3:17:38 PM UTC-4, Stephen D'Amico wrote:
> I use Mint in a VirtualBox VM to do my daily Android dev (Mint is basically Ubuntu, so this should be the same), so here's a pointer I picked up along the way that solved a problem very similar to the one you're having.
>
> 1) Close out of the VM entirely and eject the phone from your Windows (you may need to reboot your machine to clear the broken capture state).
> 2) Start your VM.
> 3) Connect the Android phone to your machine.
> 4) In the VirtualBox Manager Window, click on your "Running" VM and click on the Settings gear at the top.
> 5) Select "USB" in the left hand side and then click the USB cable with the green "+" on it on the right of the USB screen.
> 6) Select your Android device in the list that appears.
> 7) Highlight the newly added device in the main view and select the USB cable with the orange circle on it on the right to open the edit device settings screen.
> 8) In the "Remote" dropdown at the bottom, select "Any" and then click the "OK" button to accept.
> 9) In the VM's menu, select "Devices" -> "USB Devices" -> Your Android Device
> 10) It should work!
>
> If you need clarifications with this process or this didn't work, feel free to ask for further help.
>
> Best of luck,
>
> -Steve

John Kemp

unread,
Apr 5, 2013, 2:53:49 PM4/5/13
to android-...@googlegroups.com
> is there any other suggestion???

The most reliable solution is to use an actual computer running Linux as the machine to talk adb to your device.

There are many hard-to-diagnose-over-email things that can go wrong with virtual USB drivers. In order to diagnose them, you might look for specific advice (Internet search) regarding your virtualization software and USB support. You might also (if your device is a Pandaboard say, or something other than the standard list of devices) have to do additional things to get it working - like compiling adb and fastboot and flashing the device with the new software. Are you able to put your device into fastboot mode, and speak fastboot to it from the guest OS?

Cheers,

JohnK

On Apr 5, 2013, at 12:15 PM, June Ree wrote:

> Unfortunately, nothing works at all.
>
> I've tried setup rules, adb_usb.ini, rules and group everything I can think of possible in order to make work..however,
> whenever I issued lsusb from my guest ubuntu 10.04 os, it listed my usb correctly, However, when I issued adb devices, nothing shows up at all.
> The guest ubuntu 10.04 os obviously sees my usb because it lists the usb when I opened "Computer" window..
> Also it indicates that it is communicating with the USB via icon.
> However, adb is not capturing at all the device....this is darn really strange..
>
> I even tried disabling the usb from windows HOST just in case..so make sure windows host is not communicating at all with the usb. However, no luck at all...
>
> is there any other suggestion???
>
>
>
> On Saturday, March 23, 2013 5:13:07 PM UTC-4, Abhay Ghatpande wrote:
> I second John's suggestion for the adb_usb.ini file. Though in my case, the file was located at ~/.android/adb_usb.ini
>
> I have UDEV rules for *all* possible devices in /etc/udev/rules.d/51-android.rules and still my adb would not detect the new Le Pan II tablet I bought. Finally, I put the VendorID 0x16d5 in the ~/.android/adb_usb.ini file and voila! there it was, magically detected!
>
> Just to be on the safe side, also ensure that your user is part of the "plugdev" group on Ubuntu/Xubuntu.

Howie Solomon

unread,
Jun 22, 2014, 3:03:27 AM6/22/14
to android-...@googlegroups.com, jo...@jkemp.net
I am having the same exact problem.
And my setup is nearly identical to OP.
Ubuntu guest on Windows 7 host.
Android phone is seen in Ubuntu.
lsusb lists it just fine.
Even shows in Dolphin file manager.
I have a udev device created as per instructions.
But "adb devices" shows nothing.

I don't know what else to try.
Wondering if anyone found any more info on this?

Thanks, Howie

Howie Solomon

unread,
Jun 22, 2014, 5:24:13 PM6/22/14
to android-...@googlegroups.com, jo...@jkemp.net
Got it to work.

On windows host, ensured that usb device drivers were from OEM, in my case LG.
Startup Linux VM before connecting usb device.
Have a udev device setup under Linux according to instructions elsewhere.
On LG G2, make sure you have developer options enabled.
On LG G2, upon connecting the usb cable, of the four choices Android gives you
choose connect from internet (Ethernet). Selecting MTP, PTP, or charge will not work.
Finally got prompted on the LG for RSA keys.
And then "adb devices" finally listed it.

In my case what tripped me up was that it was not clear I should be
connecting as a network over USB (this is my first dev setup for android).

Nicholas M

unread,
Jun 28, 2014, 11:27:45 PM6/28/14
to android-...@googlegroups.com
It has nothing to do with "connecting as a network". What threw you off was the fact that, initially, you never accepted that key prompt on your LG device, which is what gives it permission to connect over adb. This has been a mandatory security setting since like 4.1 or 4.2--something like that. For every new PC the device gets connected to in developer more, it requires permission to proceed with adb permission. Just remember to do that every time.
I hope that clears the whole thing up for anyone that looks at the previous post for guidance. He figured out how to move on, and that's great, but the explanation given about the cause of the problem was just analyzed and explained improperly.

Bryce Walter

unread,
Jun 29, 2014, 9:54:22 PM6/29/14
to android-...@googlegroups.com

Make sure you have debugging enabled on the device; put the adb binary in your $HOME/bin directory which should already be in your $PATH. Then run "adb kill-server" then "sudo adb start-server". You might need to update libusb.so

Bryce Walter

On Jun 29, 2014 7:29 PM, "Nicholas M" <thefasc...@gmail.com> wrote:
It has nothing to do with "connecting as a network". What threw you off was the fact that, initially, you never accepted that key prompt on your LG device, which is what gives it permission to connect over adb. This has been a mandatory security setting since like 4.1 or 4.2--something like that. For every new PC the device gets connected to in developer more, it requires permission to proceed with adb permission. Just remember to do that every time.
I hope that clears the whole thing up for anyone that looks at the previous post for guidance. He figured out how to move on, and that's great, but the explanation given about the cause of the problem was just analyzed and explained improperly.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages