Материал из for iRidium developers
Перейти к: навигация, поиск
Эта страница является переводом страницы Android USB Debugging. Перевод выполнен на 100%.

Other languages:
English • ‎русский

Android: debugging via UDB

USB debugging enables use of the service for debugging applications and devices on Android OS: to test work of the application or system and see what failures occured

Activate debugging via USB

On all Android devices the option of debugging via USB can be found in Menu > Settings. But the location can differ, for example:

Menu > Settings > Development > Debugging via USB (on)
Menu > Settings > Applications > Development > Debugging via USB (on)
Menu > Settings > Other > Developer parameters > Debugging via USB
Menu > Settings > General > About smart phone/tablet > Build number (click on it 7 — 10 times), after that return to Settings > For developers > Debugging via USB (on)

After activation of debugging via USB

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

When the device is connected to the computer for the first time, you will see the trust request to the computer: tick the check-box and click OK. The debugging via USB is on.

Installation of the application for debugging via USB

ADB (Android Debug Bridge) is used for debugging. ADB is a component of Android SDK which you can download here.

Download the zip archive with Android SDK. There there is a folder adt-bundle-windows-x86_64-20140702 containing , которая и содержит the SDK. Unpack it on your computer. For example, we located the folder in the root of the disk С, i.e. the path to the SDK will be as follows: C:\adt-bundle-windows-x86_64-20140702\

Make sure the computer is connected to the Internet and launch SDK Manager located in the folder adt-bundle-windows-x86_64-20140702.

If SDK Manager cannot be launched install Java SE.

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

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

Mark these items in the list and unmark the rest. Click «Install»and wait until the components are downloaded.

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 cannot find native drivers for your tablet or smart phone).

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

After installing drivers, a new device will appear in the device manager - «ADB Interface».

If the device is not found in the manager as ADB Interface, check the drivers of your smart phone or tablet, deactivate the mode of USB debugging, then activate it again and reconnect to the PC.

ADB launch

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

To see what devices are connected to the computer, input the command:

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

ADB will output the list of devices connected to the computer at the moment. If the device is seen in the command string you can start the debugging.

i3 pro debugging via USB

Input (1):

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

- in the command string the output of log information of your smart phone or tablet will start.

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 in the text file located in C:\Users\*Username*\log.txt

Start the i3 pro application on your tablet or smart phone, start the log (1), execute the action you want to save in the log, stop the logging by clicking Ctrl+C.

The saved log can be sent to the technical support team together with your project, description of the problem, indication of the tablet/smart phone model and firmware version.