As I explained in another thread, I was having trouble debugging on a 
particular device - a Lenovo Tab 2 A8 tablet.  After much searching, I 
found a way that worked in my case to make the Lenovo tablet use the google 
USB driver.  Here is how I did it.

If you find the google ADB USB driver in <android sdk> \ extras \ google \ 
usb_driver (in Windows) you will see a file called android_winusb.inf.  If 
you edit this file with a text processor, like Notepad, you will find it 
has "sections" headed by things like [Google.NTx86] and [Google.NTamd64].  
The items in that section are of the form:

%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E12&MI_01

(The above items describe a Google Nexus One).  The VID and PID are codes 
that uniquely describe a particular USB device.  Apparently, a USB device 
will only use the Google USB driver if the VID and PID appear in one of 
these lines.  So I edited the android_winusb.inf file and added lines at 
the end of both the [Google.NTx86] and [Google.NTamd64] section that looked 
like this:

;Lenovo PTP (ADB Interface)
%CompositeAdbInterface%     = USB_Install, USB\VID_17EF&PID_78DF&MI_01

Keep in mind that if the Android SDK is in Program Files (x86) (which it 
usually is) you will need to run Notepad or whatever editor you use in 
administrator mode.  Now this has a certain risk in that adding this to the 
INF file "forces" the system to accept this driver as the driver for the 
device.  If the device is really not compatible with this driver, probably 
bad things will happen.  But for me it worked out.  The Lenovo tablet is 
compatible and I was able to debug in Android Studio using ADB.

I still need to explain how I found out the VID and PID of the Lenovo 
tablet.  You can find that out in the Windows device manager.  Turn on USB 
debugging in the target Android device, and in the case of the Lenovo 
tablet, I also had to enable the PTP connection (as opposed to the MTP 
connection).  The VID and PID change depending on these settings.  Anyway, 
once you do these things, in the device manager, right click on the device 
(probably in "Other devices") and select properties, then details.  Then in 
the drop-down box select Hardware IDs.  That is where you can find the VID 
and PID for the device.

After the INF file has been properly modified, you can go to the device 
manager again, and find the device and select "Update driver".  Select the 
option to browse manually and browse to the Google USB driver folder 
containing that INF file you just modified.  Then do the driver update.  If 
all goes well, the driver will now be associated with the device, and ADB 
will work with it.

I would much rather have downloaded an official driver for the Lenovo 
tablet, and indeed I did find many websites offering such a thing.  But 
none of them were official, and all of them offered the driver in the form 
of an unsigned EXE file (i.e. virus city).  I saw nothing on the Lenovo 
webite for this particular device, nor the Google website.

I don't recommend the method I used, but if you want to take responsibility 
for these actions, this information will help you do it.

-Robert Scott
 Hopkins, MN

-- 
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].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/465b0b80-2dc9-42bc-875f-f52049d3a78a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to