Wednesday, December 7, 2016

How to get working ADB drivers for unrecognized Android devices

How to get working ADB drivers for unrecognized Android devices


Christmas 2013 has come and gone and I think its safe to say that this year was the year of the tablet.  Just a few years ago I made my first foray into the world of inexpensive ultraportable devices when I purchased a Coby Kyros back in 2011.  Poor battery life, slow performance and the awful resistive touch screen gave that old tablet a less than stellar user experience.  It did what I needed it to do and that was allow me to carry around an entire backpack full of heavy textbooks in something the size of a small notepad.
Now fast forward to today.  Because of an insane deal on Black Friday, we were able to pick up a pair of these RCA 7" Android tablets for less than what I paid for the Kyros a few years back and the difference in performance and quality is astounding!  These tablets come with 8GB of internal storage,  a 1.5GHz dual core and 1GB of RAM.  The graphics performance is nice and fluid and the capacitive multitouch screen is responsive and easy to use.  These super inexpensive tablets are really quite capable and plenty useable.  They came with Android 4.1.2 out of the box and since received an OTA update to 4.2.2.  I remember not so long ago wishing that some of my devices would one day receive a Gingerbread update.  Things have come a long, long way in a short period of time.
That is not to say that I dont have my fair share of gripes about them.  Mainly, the fact that RCA couldnt even be bothered to provide drivers for their own device, which is actually the issue I am addressing in this article.  Under the normal run of things, most users probably wont find the need to ever do anything more than transfer a file or two onto their tablet.   If you happened to find a need for accessing this tablet via ADB (android debugging bridge) you would find yourself up a creek, because out of the box this tablet simply doesnt get recognized. 
heres how to get your computer to talk to the RCT6378W2 over ADB (or any other unrecognized Android device).

Part 1:  Preparing your Android device and PC

First thing is first, you will need to do is enable "Developer Options".   To enable the Developer Options menu, go to Settings>About Tablet>Build Number.  Repeatedly tap Build Number until you get a message stating You are now a developer.  
Then navigate to Settings>Developer Options and check USB Debugging. 





At this point on about 99% of all Android devices, youd be able to connect to your device using the ADB but this tablet requires a little bit more work.  The process is a little bit different for each platform I did it on but the premise is basically the same.  First off, you need to have a functional JDK (Java Development Kit) and you need to have the Android SDK installed.  You can get the JDK from java.com and the Android SDK from android.com.  Once you have installed both of them, add the directories containing Tools and Platform-Tools to your $PATH.
Once you have added these to $PATH, run the Android SDK Manager (execute the command android in terminal/cmd.exe).  Install the libraries for your devices current version of Android and if youre using Windows, make sure to grab the package Extras>Google USB Driver.

Part 2: Making the your PC recognize your Android device 

As I mentioned, the process is a little bit different on each operating system.  The hardest one being Windows.

Windows:
I have read several places online people are advising to install PDA Net in order to gain ADB access to this device.  Now, while it will in fact install a driver it will NOT allow you to access this tablet via ADB so I would recommend you dont install PDA Net.  Instead, I would recommend using the official Google drivers.  Unfortunately, they need to be modified in order to be used with this tablet.  Its not very hard to do, just takes a couple minutes and can be a bit of a hassle.

First thing you need will be your device IDs.  You can get them opening up the device manager and finding the "Unknown Device" with a yellow exclamation point.  Right click on it and select Properties, and then go to the Details tab.  Under the Property drop down menu, select hardware IDs.  There should be two strings:

USBVID_2207&PID_0011&REV_0222&MI_01
USBVID_2207&PID_0011&MI_01

Copy those strings somewhere and then navigate to where you downloaded the Google USB driver.  Then you need to open up the file android_winusb.inf in a text editor.  I would recommend using Notepad++.

There are two changes you need to make in the file, first under the [Google.NTx86] section (32 bit or i386 driver) and then under the [Google.NTamd64] section (the 64 bit driver).  

First, create a sub-section for your device.  I called mine ;RCA 6378W2 but it doesnt really matter what you call it.  Then, under the sub-section you created paste the Device ID strings you copied from the Device Manager, preceded by %SingleAdbInterface%.  If you need help, look at this screenshot.

Then once youve made the necessary changes to the anroid_winusb.inf file, save it.  Go back to the device manager and right click the unknown device and select Update Driver Software.  Then select Browse my computer for driver software.    Navigate to where you have the now modified Official Google USB Driver and then click Next.  It will probably take a few minutes to complete, but once its done your tablet should show up now as Android Device>Android ADB Interface under the device manager tree.


!!!NOTE!!!


If you are using Windows 8 or 8.1, you will need to disable device driver signature checks before youll be able to install the modified driver. Heres a quick video on how to disable device driver checks http://www.youtube.com/watch?v=NM1MN8QZhnk.  Ignore the part at the beginning about 64 bit, your computer architecture doesnt matter.

Once youve installed a working ADB driver for your device, you would think youd finally be able to connect to your device via ADB right?  Well... you would be wrong.  There is still one more thing you need to do to make ADB work for your device.

Assuming you have in fact added the Android SDK tools and platform tools to your path, open up cmd.exe and enter the commands

android update adb
adb kill-server

This will generate the folder .android in your home directory, and the file adb_usb.ini which is what we need to edit in order to finally get the ADB working.  Once again, using Notepad++, edit the adb_usb.ini file and add your tablets manufacturer device ID number in hexadecimal format, eg;

0x2207

If you need help, look at the screenshot.



Save the changes to the adb_usb.ini file and then plug your tablet in to a USB port.  Fire up a cmd.exe window and execute the commands

adb kill-server
adb devices

If the command returns a device, you are golden!  If not, then you have done something wrong along the way and you need to recheck your steps.
To recap, here are the steps:
1) Install the Java Development Kit2) Install the Android Software Development Kit3) Add tools and platform-tools to your $PATH4) Run the Android SDK Manager for the first time5) Install the necessary libraries and download the official Google USB driver6) Add your device IDs to the Google driver7A) If youre on Windows 8.x disable device driver signature enforcement7B) Install the ADB driver for your tablet8) generate the file adb_usb.ini9) add your tablet device IDs to adb_usb.ini10) restart the adb server and connect to your tablet

If hacking away at your own drivers is too complicated, you can download the one I modified here.

Mac OS X:

The process is FAR simpler on Mac OS X.  I have only tested this on Mac OS X 10.9.1 "Mavericks" so far, but these instructions should work for any version of OSX.  Assuming you have installed a working JDK and Android SDK, and then added the tools and platform-tools to your $PATH, all you need to do is find your device IDs, generate the adb_usb.ini file and then add the device ID to it.


!!!NOTE!!!


I have not had very good luck with running Oracle Java 7 on OSX 10.9.  I would recommend using the official Apple distribution of Java 6, which Mavericks does not come installed with.  You can download it here http://support.apple.com/kb/DL1572

to find your device ID, execute the command 

system_profiler SPUSBDataType

Now, it may be a little bit more confusing because your tablet is probably not going to identify itself as an RCA device.  On my Mac it identifies itself as Fuzhou Rockchip Electronics, which is the type of CPU and mainboard it has (many cheap Android devices have Rockchip CPUs).  Look for your model number (RCT6378W2 in this ) 

Once you have found your device ID, execute the command

android update adb

which will generate the adb_usb.ini file.  Edit the file with a text editor of your choice, adding your device ID to the bottom of the file in hexadecimal format, eg;

0x2207

Once youve done that, unplug and replug in your tablet and then execute the commands

adb kill-server
adb devices

if the command returns your devices serial number you are done.  If you get no response from the command, go back and recheck all of your steps.

Linux:

The process on Linux is almost identical Mac OS X.  I have only tested this on Xubuntu 13.10 64 bit, but the process should be pretty much the same on any modern Linux system, whether 32 or 64 bit.  Assuming you have installed a working JDK and Android SDK, and then added the tools and platform-tools to your $PATH, all you need to do is find your device IDs, generate the adb_usb.ini file and then add the device ID to it.

to find your device ID, execute the command 

lsusb -vv

Now, it may be a little bit more confusing because your tablet is probably not going to identify itself as an RCA device.  Just like on Mac OS X, youll need to look for model number, in this case RCT6378W2.  For some reason, some information was only available when I ran lsusb -vv as root.  The command creates a LOT of output so I found it helpful to batch the output to a text file and read through it in a text editor.

sudo lsusb -vv | cat >> lsusb.txt 

Heres a screenshot of the output and what it is youre looking for



Once you have found your device ID, execute the command

android update adb

which will generate the adb_usb.ini file.  Edit the file with a text editor of your choice, adding your device ID to the bottom of the file in hexadecimal format, eg;

0x2207

Once youve done that, unplug and replug in your tablet and then execute the commands

adb kill-server
adb devices

if the command returns your devices serial number you are done.  If you get no response from the command, go back and recheck all of your steps.



Available link for download