i.MX6: Android connect to ADB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6: Android connect to ADB

20,010 Views
PeterChan
NXP Employee
NXP Employee

In the old Android release R10.3.x for i.MX5x, I had followed the user guide instructions to install the USB driver and am able to setup the ADB connection successfully. Unfortunately, for the same PC, the ADB fails to detect my i.MX6SL EVK which is using R13.5. Updating the Android SDK tools cannot help.

The reason is the new Android device is using a different USB VID from the old release. So, to solve this problem, we need to update the ADB configuration to scan for the new vendor ID. Below are the steps to update the ADB configuration for Windows PC. These steps (and the steps for Linux PC as well) can also be found in the R10,3.x user guide.

1. Run the SDK's tools to generate an ADB configure file:

C:\Program Files\Android\android-sdk\tools> android.bat update adb

2. Modify the adb usb configure file to add the new vendor id 0x18d1.

File: X:\Profile\<your account>\.android\adb_usb.ini

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.

# USE 'android update adb' TO GENERATE.

# 1 USB VENDOR ID PER LINE.

0x15a2

0x18d1

3. Unpack the Freescale Android USB win driver "android_usb_fsl.zip" in your Android BSP release package. If you can't find this file in your current package, please get the R10.3.x release for i.MX5x and unpack it.

4. File "tetherxp.inf" in the unpacked "android_usb_fsl" may not be the updated one if the "android_usb_fsl.zip" is extracted from an old release. So, please overwrite the file "tetherxp.inf" in unpacked "android_usb_fsl.zip" by the new "tetherxp.inf" in your current Android BSP release.

5. Enable the "USB debugging" option on the i.MX6 device

System settings -> Developer options -> USB debugging

6. Connect the Android Device into PC, uninstall your old driver named "Android Phone" in the device manager, then re-install driver by scanning and locating .inf file under the directory you unpack the android_usb_fsl.zip manually.

7. Restart the ADB server

C:\Program Files\Android\android-sdk\platform-tools> adb kill-server

C:\Program Files\Android\android-sdk\platform-tools> adb start-server


8. Finally, test your ADB connection

C:\Program Files\Android\android-sdk\platform-tools> adb devices

List of devices attached

0123456789ABCDEF     device

Congratulations! Your ADB is now working. If you have additional information about this topic, please feel free to comment.

Sometimes, following the above procedure still cannot get the ADB work. In such case, you have to uninstall the Android Composite ADB Interface device, remove the "Android Phone" driver package (oemxx.inf) from Windows and start all over again. More information about using command prompt utility "pnputil.exe" to remove the driver package can be found at Remove a Driver Package from the Driver Store.

Message was edited by: Peter Chan

Tags (3)
12 Replies

4,756 Views
dcio
Contributor I

Hi,

   I can't get ADB to list the device . I am using i.MX6 Series SABRE for smart devices evaluation board from Freescale.(Model no SABRESD-MX6DQ).

   Just running the Android demo image that is shipped in the SD card

   Android version 4.2.2

   Host PC runs windows 8.1 and has Android SDK and google USB driver (11.0) installed.

   Device Manager indicates device is functioning normally and device shows up as Andorid Device->Android ADB Interface with following details.

Device USB\VID_18D1&PID_0D02\0123456789ABCDEF was configured.

Driver Name: usb.inf

Class Guid: {36FC9E60-C465-11CF-8056-444553540000}

Driver Date: 06/21/2006

Driver Version: 6.3.9600.17238

Driver Provider: Microsoft

Driver Section: Composite.Dev.NT

Driver Rank: 0xFF2003

Matching Device Id: USB\COMPOSITE

Outranked Drivers:

Device Updated: false

   I tried to use the android_usb_fsl.zip from R10.3 as well as R10.4 but driver installation fails with errror "The folder you specified doesn't contain compatible software driver for your device. If the folder contains a driver, make sure it is designed to with Windows for x64-based systems".

  I have tried using other universal usb driver, rebooting PC , connect/disconnect USB , followed steps listed in this thread as well as Android FAQ document for SABRE platform. The Developer options Stay Awake and USB debugging are enabled on the tablet.

  Could you please help.

0 Kudos

4,756 Views
mbp
Contributor V

...sorry - just saw your msg.

I would double check everything.

Sometimes the driver install says that if you are one folder too high or too low...  retry in a couple of places.

On one system I've had to remove and reinstall the driver - if it gets the wrong one in there or the .ini file has not been updated then updating the driver has no effect.

Make sure the  adb_usb.ini file (in the .android folder) has this line in it:

0x15A2

...good luck.

mike

0 Kudos

4,756 Views
dcio
Contributor I

Mike

  Thanks for the response. The device shows VID as 0x18D1 . Hence I added 0x18D1 in adb_usb.ini.

  I have tried with 0x15A2 as well it doesn't help.

  For driver install, we need to give .inf file hence couldn't try in other folders.

  Is there any other way to source driver for this platform?

  I have already tried remove and reinstall of google usb driver as well as other generic usb drivers multiple times.

  Here is the link for platform I am using. SABRE for Smart Devices Reference Design|Freescale

  Could you please let me know if you could get adb to work for above platform on windows 8.1 and which driver was used for the same?

  Thanks

  dcio

0 Kudos

4,756 Views
mbp
Contributor V

Unfortunately I do not have any Win8/8.1 systems.  I have successfully got the installation completed on XP, Vista, and several Win7 platforms.

When you go back in and look at the .ini is your 0x15A2 there?

It helps to see installation/driver status in control panel.  What does it say?  If it see's Android but with a ! then your 0x15A2 is not being seen. 

I would recommend uninstalling - make sure the *.dll drivers are deleted (no in the WINDOWS directory) then update you're .ini and re-install.  I've seen once when the 'incorrect' version is installed - the .dll's are not replaced when uninstalling or subsequent installing the correct drivers.  So nothing ever changes.

0 Kudos

4,756 Views
mbp
Contributor V

PeterChan,

Thanks for the reply.

I actually solved this!  

I had done effectively what you delineate in the latter half of your response.

The android_winusb.inf is incorrect for R10.4.   I suspect this will effect all mx5 systems on all OS's.

The Android Composite ADB device is now ...&MI_03 not ...&MI_02.

Without this change the adb USB driver will NOT be able to identify and subsequently install the updated driver!

This seems to imply that absolutely no one has run adb on R10.4 (at least on any Mx5 platform).

Took me FIVE full days to identify and resolve this issue.   Very disappointing as one would expect that the R10.4 update would include a driver that supported it!

your reply would have me find and resolve it as well, So although it was too late, MANY THANKS!!!

4,756 Views
sandeshgowda
Contributor III

Hi Peter,

We are using our own VID/PID and our own serial number for imx6 based android device,  ADB is working with updated VID/PID value in myandroid and able to detect from linux O/S and fail to detect from windows 7 PC after updating VID/PID android_winusb.inf file  and using freescale android_usb_fsl driver folder.

I'm able to load the driver in windows but when use "adb devices", fails to list the devices.

If i use serial number "1234567890", then able to detect the device from "adb devices" command.

I even tried by generating adb.exe file from myandroid code using following commands and still not able to detect the device.

===============

1.apt-get install mingw32

2. build/envsetup.sh

3.choosecombo. config your settings

4.make USE_MINGW=y adb

make USE_MINGW=y fastboot

5.check out/host/windows-x86/bin for adb.exe/fastboot.exe

===============

Does Windows driver detect the device on basis of device serial number and how to generate the windows adb driver.?

thanks,

Sandesh D

0 Kudos

4,756 Views
mbp
Contributor V

Pardon my last response - I note you've done all these steps.

I just recovered from an issue similar to yours whereby I HAD adb devices report correctly then suddenly no longer - all the while "Android Phone" was correct and all mods had been completed to provide initial adb operation.

I discovered that the adb_usb.ini file had somehow been updated/changed/recovered back to the original, i.e. without the 0x15A2.  I re-updated this file AGAIN - and my device is located and reported as normal.  I'm not sure who/what/why this .ini file I had updated with 0x15A2 was changed back the original. But I never thought to double check until I was at wits end (wondering why it worked then stopped working).   Perhaps this is also your case.      I suggest you double-check all the mod you did to make sure they are all still in place!  you may need to uninstall and re-install the driver on any (re)change.

Fingers crossed for you!

0 Kudos

4,756 Views
mbp
Contributor V

adb devices will list all devices with their associated SN#'s.  You do not need to enter or use a specific serial number (this is something I've never done).

As you can see from my previous post (just before yours) - you will need to modify "android_winusb.inf" (in android_sub_fsl, the windows usb driver) to match the Composite ADB device to what your Device Manager is indicating (what it's trying to connect to)...    Mine was ...&MI_03 not ...&MI_02.

It was a bit of farting around but once I got the android_winusb.inf file to match what the device manager was looking for it worked like a charm.

good luck

mike

0 Kudos

4,756 Views
mbp
Contributor V

Been trying for two days to connect adb via USB from my Mx51 BBG (updated to R10.4) to my WinXP.  My older rev R9.3 connects fine.  I have executed through every step (5 times) to no avail.  In Device Manager I continue to get a ?-Other devices: ?-!-MX51 BBG Android  ...wizard cannot find the necessary software.

There is never an "Android Phone" found.  I have checked and rechecked that the setprop debug.adb.usb is 1 and is enabled.

????  I am at my wits end!   :smileyconfused:  :smileycry:   :smileysad: 

any suggestions?   THX

mike

0 Kudos

4,756 Views
PeterChan
NXP Employee
NXP Employee

Hello Mike,

For R10.4, please check the File: X:\Profile\<your account>\.android\adb_usb.ini if the vendor ID 0x15a2 is present. In Device Manager, please update the Driver Software by choosing Browse for driver software on your computer and search into folder where the android_usb_fsl.zip is extracted.

If the above does not work, please choose Let me pick from a list of device drivers on my computer and choose Android ADB Interface.

0 Kudos

4,756 Views
mbp
Contributor V

Peter - thanks for the reply!


I have done these steps  (0x15a2 in adb_usb.ini) And pointed to the adroid_usb_fsl folder.  No GO! 

I have then picked dfrom the device drivers list and only find "Android Phone" - which fails, indicating; "Unable to find any drivers for this device".

I have built Android as -user - but have modified ro.secure=0 ro.allow.mock.location=1 ro.debuggable=1 persist.service.adb.enable=1

in default.prop to make sure debugging is enabled (Also ensuring that debugging is enabled in the device).

My previous R9.2 and R9.3 (SDcards) can connect and is found immediately (with no changes to PC or MX51EVK).  However R10.4 continues to identify itself as "MX51 BBG Android" and no suitable device drivers can be found!

I assume I don not need to build as -eng (especially when enabling dbg explicitly).  I also assume that adbkey, androidtool, etc in ".android" do not need to be modified/updated?

I am STUMPED!   :smileysad:      Something is amiss or seems to be missing/corrupt.    Any ideas?   

HELP!!!!!

0 Kudos

4,756 Views
PeterChan
NXP Employee
NXP Employee

In the device's serial log, do you see the message "enabling adb" (somewhere after the file system has mounted)?

Have you tried the prebuilt image?

Does other PC show the same behavior?

I am sorry I don't have the MX51 and MX53 board now so I can't check this myself. Based on my experience with R10.3 on MX50, the ADB connection should be setup correctly by following the instructions in the user guide.

If the R10.4 ADB connection is still not found, please try

1. After setup the R9.3 ADB connection, goto Device Manager and show the driver details of this Android ADB device. You should see the DLLl files related to this driver.

2. Disconnect USB. (Backup &) Remove the DLL files in step 1 from your PC.

3. Connection the R10.4 device to PC and install the driver from the path where the "android_usb_fsl" driver in R10.4 is extracted. The user guide has the detail instruction about this.

4. Double check the USB VID and PID of this R10.4 device if it is not 0x15A2 and 0x0C02 respectively, please add a new entry using this PID and VID to the android_winusb,inf in "android_usb_fsl" and retry.

Finally, please note that the option "Settings->Applications->Development -> Stay awake" should be checked or else the device will enter suspend mode due to lack of user activity and ADB will automatically disable.

0 Kudos