One thing I usually do when I'm preparing a device to work with adb for 
debugging is to switch it to appear on the USB bus as a Camera, instead of 
a Media device. I do this with my Nexus 5 and Nexus 7 devices (which are 
running my AOSP builds with root access). This often solves the "device not 
found" problem. I am guessing that the Camera mode supplies the two-way 
host-client communication protocol that adb needs, while the Media mode 
operates in a Master-Slave paradigm, meant only for transferring files.

Another of my solutions is to make sure the device is being registered 
within the OS as the right type of device. For Windows I use USBDeview, and 
on Linux I use lsusb. (There is a Mac version of lsusb 
here: https://github.com/jlhonora/lsusb .) These tools will show the 
presence of the device on the USB bus, and the Vendor and Product ID 
numbers for it. Those numbers determine the identity of the device within 
the operating system, which leads to the choice of which device driver is 
used to communicate with it. If the device is in Media mode, then the OS 
will probably connect it to the Media device driver. When the device is in 
Camera mode, a different driver is selected. The goal is to get the OS to 
identify the device in such a way as to get the right driver attached to 
it. Then it will appear where adb can see it, and "adb devices" will list 
it.

Setting up Linux to use "udev" to recognize an Android debug device and 
assign the right permissions and driver to it is covered here: 
http://source.android.com/source/initializing.html#setting-up-a-mac-os-x-build-environment
 
. There is a page of udev configuration in the Linux section (above where 
that Mac OSX link points you). The device identifiers in that list are what 
I'm talking about. They configure udev to detect and properly represent the 
device within the system so adb can see it.

Windows uses the same Vendor/Product ID system as udev. Each device driver 
install package has a .inf file that specifies which devices the device 
driver is meant to work with. Not having a device driver with the 
Vendor/Product ID of a device being plugged into USB causes Windows to 
display the "Search the Internet or select a device driver package" dialog. 
Getting Android device drivers working on Windows is not easy, but I find 
that USBDeview helps a lot, since it displays the Vendor/Product IDs, and 
you can easily determine if a particular driver is going to respond to 
those IDs.

NOTE:Switching the device from Media to Camera mode with cause it to 
display a different Vendor/Product ID within the USB system. (This also 
happens when rebooting to Recovery or Bootloader.)

BTW, I wouldn't blame Google for the adb problems. They wrote what they 
could, and it now has to run in a chaotic third party OS environment. USB 
needs to be configured on the host OS, which is not under Google's control. 
Also, Vendors often like to turn off adb access like some Internet sites 
like to turn off ping responses. They think it helps, but it gets in the 
way of development. For example, I have yet to find a way to logcat my 
Kindle Fire. It seems that Amazon doesn't want me to do that. If I wanted 
to develop for the Kindle, I'd approach Amazon with a willingness to sign 
an NDA, and become a member of their development community (if there is 
one). Otherwise, I'm locked out, and I would probably use some other device 
to do development. Device manufacturers are not obligated to support 
development. This sentiment is best expressed in Google's explanation of 
why they use the Apache Source License for the AOSP 
project: 
http://source.android.com/source/licenses.html#why-apache-software-license


On Thursday, December 4, 2014 11:15:43 PM UTC-6, Spooky wrote:
>
> On Thu, Dec 04, 2014 at 10:44:46PM -0600, TreKing wrote: 
> > On Thu, Dec 4, 2014 at 9:23 PM, Jim Graham <[email protected] 
> <javascript:>> wrote: 
> > 
> > You did not clarify, so, to be sure, you followed the directions on that 
> > page, right? 
>
> Well, given that this post just now showed up here, no, I didn't even 
> know about that.  But...it worked!  At least, for showing Developer 
> Options.  Now for the next question:  what option(s) do I need to select 
> in Developer Options to enable logcat on 4.2+ (on my devices) WITHOUT 
> root? 
>
> Ok, we're on the way to overriding Google's infinte stupidity ... maybe 
> this will actually work right (like it used to) after all. 
>
> Thanks, 
>    --jim 
>
> -- 
> THE SCORE:  ME:  2  CANCER:  0 
> 73 DE N5IAL (/4)          | 
> [email protected] <javascript:>      | BOFH Excuse for the day: 
> < Running Mac OS X Lion > | 
> ICBM / Hurricane:         | Paradigm shift without 
>    30.44406N 86.59909W    | a clutch. 
>                             
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to