Android Debugging via USB

From iRidium Mobile Wiki
Jump to: navigation, search

Debugging via USB enables you to use the service for debugging apps and devices on Android OS: to check how the app and the system work when there are some failures.


Activate debugging via USB

In all Android devices the option of debugging via USB is located in Menu > Settings, but the exact location can vary, for example:

Menu > Settings > Development > Debugging via USB (on)
Menu > Settings > Applications > Development > Debugging via USB (on)
Menu > Settings > More > Parameters of developer > Debugging via USB
Menu > Settings > General > About smart phone/About tablet > Build number (click 7 — 10 times on it), then you will return to Settings > For developers > Debugging via USB (on)


After activation of debugging via USB

Unblock your smart phone or tablet. Do not use port USB 3.0 when connecting to the PC, use USB 2.0 only.

When the device connects to the PC for the first time, there will be a request for access from this PC. Approve it and click OK. The debugging via USB is on.


Installation of the app for debugging via USB

The ADB (Android Debug Bridge) program is used for debugging . ADB is a component of Android SDK which can be downloaded here.

Download the zip archive with Android SDK. It has the folder adt-bundle-windows-x86_64-20140702 which contains the SDK. Unpack it on your PC. For example we placed it in the root of the C disk, i.e the path to the SDK will be as follows: C:\adt-bundle-windows-x86_64-20140702\


Make sure the PC is connected to the Internet and start the SDK Manager program from the folder adt-bundle-windows-x86_64-20140702.

If there are problems with the start of SDK Manager, then install Java SE.

After the start of the SDK Manager program you will see the installation window. You need to download and install

✓ Android SDK Platform-tools
✓ Android SDK Tools
✓ Google Usb Driver package

Mark them in the list and unmark the rest. Then click «Install» and wait when until the program downloads the components.

USB drivers for 32 and 64 bit Windows will be downloaded in the folder C:\adt-bundle-windows-x86_64-20140702\extras\google\usb_driver (install them later, if you don’t find official drivers for your smart phone or tablet).

Connect your device to the PC – the PC will find the new equipment. Install the drivers from the manufacturer’s web site or from the folder where they were downloaded before (installation is made via Task manager > *Unknown device* > the right mouse button > Update Driver Software.. > to look for the driver on the PC > downloaded driver).

After the installation of drivers, the new device «ADB Interface» will appear in the dispatcher of devices.

If the device is not found in the dispatcher as the ADB Interface, check the drivers of your tablet or smart phone, turn off and turn on the mode of debugging via USB, reconnect the device to the PC.


Start of the ADB program

It is better to work with the ADB program via the Windows command string. To activate the command string click «Start», in the field «Find programs and files» input cmd and click «Enter».

To see what devices are connected to the PC, write the command:

C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe devices

The ADB program will display the list of devices connected to the PC at that moment. If the device is displayed on the command string, you can start the debugging.

Debugging of i2 Control V2.2 via USB

Input (1):

C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe logcat

- in the command string you will see the displayed log of your smart phone or tablet.

Stop the log by clicking Ctrl+C

Input (2):

C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe logcat >log.txt

- now the log activated with the help of (1) will be saved as a text file located in C:\Users\*Username*\log.txt

Start i2 Control V2.2 on your tablet or smart phone, start the log (1), execute the action which you want to save in the log, stop the logging by clicking Ctrl+C.


You will be able to send the saved log to the iRidium support team accompanied with your project, description of the problem, information about the tablet (smart phone) model and firmware version.