If you are having trouble getting the Debug tab, Profile tab or “Run My App” tool on the Develop tab to start with your USB-connected Android* device, try starting App Preview (on your device) before you initiate the Debug, Profile or Run My App tasks. This sometimes resolves USB connection issues when using low performance Android devices. If starting App Preview on your device before you start these tasks does not solve the issue, you may have an Android USB debug driver problem. In that case, please follow the instructions provided below.
The first part of this document (Enabling your Android Device for Remote Debug over USB) applies to Microsoft* Windows*, Linux* and Apple* OS X* machines and can be used to diagnose Android USB debug connection issues on any of those systems.
Issues regarding missing Android USB debug drivers, described in the second half of this article (Installing the Android Debug Bridge (ADB) USB Driver on a Windows Computer), are most commonly encountered on Windows machines. Linux and OS X machines have the appropriate Android USB debug drivers built-in and should not normally see this problem, so the instructions in the second half of this article apply exclusively to Windows machines.
Enabling your Android Device for Remote Debug over USB
If you see either of the following two messages in the Intel® XDK, when trying to use the Debug tab, Profile tab or the Run My App feature on the Develop tab, it means that your Android device is not being recognized over the USB connection by your workstation.
Confirm that your Android device is running Android 4.0 or higher:
Remote debug can only be used with Android 4.0 and higher version devices. Sorry, but Android 2.x and 3.x devices cannot be used with this feature.
- Find the Settings > About device screen on your device.
- Under Android version you will find the version of Android OS running on your device.
- Confirm that your device is running Android 4.0 or higher.
Make sure you have installed the latest version of Intel App Preview on your Android test device:
- Scan this QR code with your Android device or search for Intel App Preview in the Google Play Store.
The Intel App Preview Legacy app is not guaranteed to work properly with remote debugging; it is provided to preview apps that will be built using the legacy build tiles on the Build tab.
Verify that USB debugging is enabled on your test device:
- Find the Settings > Developer options configuration screen on your Android device.
- If Developer options is not visible, select Settings > About device and tap the Build number item seven times. Return to the Settings screen and Developer options should now be visible.
- Enable the USB Debugging option from within Settings > Developer options. Enabling this function automatically launches remote debug mode on your Android device when a USB connection is made with your development system.
For reference, detailed instructions regarding setting up USB debugging can be found under the section titled Setting up your device on the Remote Debugging Chrome on Android page.
Disconnect and reconnect the USB connection to your test device:
- Disconnect the USB cable from your Android test device and your workstation.
- Unlock your Android device’s home screen.
- Reconnect the USB cable to your device and your workstation.
- If you see an alert on your Android device requesting permission to “Allow USB debugging,” click OK. On some slower Android devices there may be a delay of five or more seconds before you see an “Allow USB debugging?” alert.
Check the “Always allow from this computer” box to avoid having to watch for this alert the next time you attach your Android device for remote USB debugging.
If you see the following message in the Intel XDK on the Debug or Profile tab it is an indication that you may have missed the “Allow USB debugging?” message on your Android device when you attached your Android device to your workstation’s USB port (select the blue pull-down triangle to see the entire message):
If you do see the message above repeat the instructions in this section.
Confirm that you can see your Android device using Chrome desktop browser:
You can confirm that your workstation recognizes and can communicate with the Android debug bridge (adb) over USB by performing the following test:
- Confirm that USB debugging is enabled on your Android device (see the prior instructions).
- Close the Intel XDK and kill any adb processes that are running on your workstation (search for "kill a process" if you need help).
- Attach your Android device to a USB port on your workstation and answer “OK” to any USB debug alert message that appears when you attach your device (see the prior instructions).
- Open the Chrome browser on your workstation and type “chrome://inspect” into your Chrome browser’s URL bar.
If your device is recognized by Chrome it will show you the name of your device and it may also show you a list of debuggable browser tabs that are open on your connected Android device (as shown in the image above, debuggable tabs will only be listed if you have an instance of Chrome mobile browser running on your Android device). You may also see a list of apps containing debuggable WebViews in this list (none are shown in this example screenshot).
Something similar to the following screen will be seen if this test fails:
IMPORTANT: If the above test failed, try changing the USB connection mode of your device from a Media Device (MTP) connection to a Camera Device (PTP) connection and try it again. This is especially important to try if you are running on Windows; the Windows USB debug driver does not always work properly when your device is configured in MTP mode. See this How-To Geek article for more information regarding Android MTP and PTP connection modes. Some devices do not explicitly give you an "MTP" or "PTP" option, instead they will give you the option to enable access to files on your Android device; in that case, enabling access to files on your Android device is equivalent to MTP mode.
Installing the Android Debug Bridge (ADB) USB Driver on a Windows Computer
If you are using Windows and the instructions above did not fix your Android USB connection issue you probably need to install an Android Debug Bridge USB driver for your Android device. If your workstation is running Linux* or Apple* OS X* you already have the necessary USB driver installed to communicate with your Android device.
Official instructions regarding how to install the Android USB debug driver are available on the OEM USB Drivers page of the Android Developers site. However, you may find that these official instructions still leave you with an unusable Android debug connection! Please read on…
NOTE: if you saw a message similar to the following (after you attached your Android device to your Windows workstation) indicating that USB drivers have been installed, do not assume these are the ADB drivers you need for debug! This message was letting you know that the appropriate MTP and/or PTP drivers were installed. If you are unsure, perform the Chrome desktop browser test in the prior section to determine if you have the Android USB debug driver installed.
The driver installation that generated the message above was a Media (MTP) or Camera (PTP) device driver that provides access to your Android device’s files and photos. It does not provide debug services. See this How-To Geek article for more information regarding MTP and PTP connection modes.
To install the Android USB debug driver on Windows 7 or Windows 8:
- Disconnect your Android device from your Windows workstation (remove the USB cable).
- Download and install the Koush Universal ADB driver on your Windows workstation.
NOTE: there is, in fact, only one Android USB debug driver (provided by Google). The only thing that changes between Android device manufacturers are the device IDs in the driver INF file that indicate to Windows that “this driver belongs to that device.”
- Connect your Android device to a USB port on your Windows workstation.
- Right-click Computer on your desktop or in Windows Explorer, and select Properties.
- Select Device Manager on the left side of the Properties pane. (Alternatively, you can start the Device Manager by typing
mmc devmgmt.msc
at a Windows command prompt.) - Locate and expand Other devices in the Device Manager.
If you don’t see Other devices in the Device Manager one of the preconfigured Koush universal driver IDs may have matched that of your Android device; in which case you can go back to the Chrome desktop browser test in the previous section to see if your device is now recognized.
- Right-click the device name (such as Nexus 5 or Android Tablet or ADB Interface, etc.) and select Update Driver Software… This will launch the Update Driver Software wizard.
- Select Browse my computer for driver software on the bottom of the dialog box.
- Click Let me pick from a list of device drivers on my computer on the bottom of the dialog box (remember, we installed the Koush universal ADB driver that we can use):
- Select Android Device (or ADB Interface or Android Phone) from the list of device types from the list of available drivers. If you have only installed the Koush universal driver you will probably only see Android Device, if you have previously installed another manufacturer’s ADB driver you will probably also see ADB Interface. Either driver will work, they contain the same binary files.
NOTE: if you see none of the above you may have to select Show All Devices and then click the Next button to get a complete list of devices.
- Select a Model from the list of available drivers. If you selected the Koush universal driver the list will be quite long and may take ~15 seconds to appear. If you selected a standard manufacturer’s driver the list will be shorter (e.g., the Samsung* driver is shown below). In the case of the Koush universal driver, selecting any device will work, the generic Android Composite ADB Interface option is recommended, as shown below.
- When you select one of these “non-matching” ADB drivers you will get a warning message, because the ID of the driver does not match that of your connected Android device. You can ignore the warning and click Yes to confirm that you intend to use this driver with your Android device.
- Click Next to install the driver.
Now, go back and try the Chrome desktop browser test to confirm that your Windows workstation can communicate with your Android device. You may have to confirm an “Allow USB debugging?” message on your Android device after the device is recognized by your workstation.
If none of this worked, see the first two instructions of this article titled Android Won’t Connect To Windows Over ADB? Fix It In Three Easy Steps for instructions on how to remove any problem Android USB drivers from your system. Do not follow the third step in that article, use the process outlined above to finish the process.
Remember, there is only one Windows USB driver for ADB connections, it is the same driver for all Android devices; only the device IDs vary. By using this procedure you are overriding the Windows device driver ID rules and just using the driver meant for another Android device with a different device ID. In the end, there is only one USB driver binary that is used with all of your Android devices for debugging.
You may need to do this again when you connect another Android device (from a different manufacturer), especially if it has IDs that were not part of the Koush driver’s INF file that you installed as a result of the above procedure. Likewise, if you had previously installed the Google or Samsung or another Android USB debug driver, you can select that driver from the available list of drivers and it would have worked.