Installing and using ADB and fastboot. Commands for working with ADB

There are many tools for working with a smartphone connected via a USB cable or Wi-Fi. Particularly advanced tools allow you to move files, install and uninstall software, view contacts, take screenshots and even send SMS, but no graphical tool can compare with the power that the Android console can provide. In this article we will talk about ADB (Android Debug Bridge) - a standard tool for debugging and working with the Android console from a computer.

The commands described in the article can be executed directly on the device by downloading a terminal emulator from the market, but it is more convenient to do this, of course, from a computer via adb.

ADB Basics

To start working with ADB, you need to activate it on your device and install the adb utility and drivers on your computer. The first task is performed by enabling “USB Debugging” in the “For Developers” settings item (if this item is hidden, click seven times on the build number in the “About Phone” menu).

To install ADB on your computer, download Adb Kit and unpack it into any folder (I recommend using folder names without Russian characters). We also download and install ADB drivers.

You need to work with adb from the command line. Press Win + R and enter cmd, then go to the folder in which adb is located. For my folder the command would be:

Cd\android

In order not to do all these manipulations every time, you can add the desired folder to the Path variable. To do this, go to “Control Panel -> System -> Advanced system settings -> Environment variables”, find the Path variable and add the path to the adb folder to the end of the line, separated by a semicolon. Now, after starting the console, you can immediately enter the necessary commands.

Let's check our connection to the phone using the following command (it should display a list of connected devices):

adb devices

You can work with ADB via Wi-Fi. To do this, you need root rights and the WiFi ADB application. We launch the application, press the switch and connect to the smartphone using the connect command and the IP address shown by the application:

INFO

You can copy the console output after selecting it with the mouse, as well as paste the copied command or file name into the console with the right mouse button. Enabled in the console properties.

Installing programs

ADB can be used to install applications without having to copy them to your smartphone. All you need to do is run the following command:

Adb install d:/downloads/filename.apk

You can also add additional keys to the command. Will be useful -e- reinstall the application while saving the data and -d- install a version less than the current one.

Programs can be removed, but to do this you need to know the name of the package (I’ll tell you how to find out a little later). Using the game Angry Birds Seasons as an example, the command would look like this:

Adb uninstall com.rovio.angrybirdsseasons

Application backup

Android has built-in backup functions that can also be launched using the command line. To do this, use the adb backup command and a set of options:

Adb backup [options]<приложения>

  • -f indicates the name of the file being created and its location on the computer. If the key is missing, the backup.ab file will be created in the current directory;
  • -apk|-noapk indicates whether to include only the application data or the apk itself in the backup (does not include it by default);
  • -obb|-noobb specifies whether to include .obb extensions for applications in the backup (not included by default);
  • -shared|-noshared specifies whether to include the contents of the application on the SD card in the backup (not included by default);
  • -all indicates the need to backup all installed applications;
  • -system|-nosystem specifies whether to include system applications in the backup (includes by default);
  • - list of packages for backup.

If we want to create a backup of all non-system programs, including .apk, to a specific location, then the command will look like this:

Adb backup -f c:\android\backup.ab -apk -all -nosystem

After entering, you must confirm the start of the backup on the device itself. To restore the resulting backup, you need to run the appropriate command:

Adb restore c:\android\backup.ab

Console within a console

Along with the mentioned console, which is a DOS console for Windows, Android also has its own. It is called via adb shell and is essentially a standard Linux console, but with an incomplete set of commands, which can be expanded by installing BusyBox from the market. There are two ways to use this console. In interactive mode it is launched with the command

adb shell

The $ sign appears in the console (hereinafter in the text this sign will mean the need to enter the preliminary adb shell command), and after that you can enter a series of commands, receiving a response after each. The second method is if you need to enter only one command, you can write it in a row using the adb shell.

The shell uses standard commands for copying, moving and deleting files: cp, mv And rm. You can change directories ( CD) and view their contents ( ls). In addition to standard Linux commands, which you can learn about from any reference book, Android has several of its own specialized tools, but to use some of them, you will have to gain root rights on your smartphone, and after launching the console, run the su command:

adb shell su

This needs to be done if, in response to any command, you see a line similar to “access denied” or “are you root?”. If successful, the $ sign will change to #.



Taking a screenshot

Done in one line:

Adb shell screencap /sdcard/screen.png

After this, the picture needs to be pulled out of the device with the command adb pull:

Adb pull /sdcard/screen.png

In recovery, you can take a screenshot with the following command:

Adb pull /dev/graphics/fb0

Then you need to convert the fb0 file into a normal image using FFmpeg, which you need to download and put in the adb folder. The extension must be installed on your device:

Ffmpeg -f rawvideo -pix_fmt rgb32 -s 1080x1920 -i fb0 fb0.png

Record video happening on the device screen

adb shell screenrecord --size 1280x720 --bit-rate 6000000 --time-limit 20 --verbose /sdcard/video.mp4

This command will start recording video with a resolution of 1280 x 720 (if not specified, the native screen resolution of the device will be used), with a bitrate of 6 Mbit/s, length 20 s (if not specified, the maximum value will be set to 180 s), with display logs in the console. The recorded video will be located in /sdcard (video.mp4 file).

INFO

All launched from the console and in adb shell processes that take some time to complete can be interrupted using the combination Ctrl + C. Exit the shell and return to executing regular adb commands - Ctrl + D.

Application management

Two commands are used to manage applications: pm(package manager) - package manager and am(activity manager) - activity manager. These teams have many keys, which can be viewed on the developers portal. Let's look at a few.

To begin with, we will get a list of applications installed on the device in the form of package names that will be useful later:

Continuation is available only to subscribers

Option 1. Subscribe to Hacker to read all materials on the site

Subscription will allow you to read ALL paid materials on the site within the specified period. We accept payments by bank cards, electronic money and transfers from mobile operator accounts.

ADB Run– an application designed to make it easier for the average user to carry out the process of flashing Android devices. Includes and Fastboot from the Android SDK.

Almost all users who are faced with the need for such a procedure as Android firmware have heard about ADB and Fastboot. These modes allow you to perform a wide range of manipulations with the device, but the tools for working with them offered by Android developers have one drawback - they are console applications. Those. the user is forced to manually enter commands into the console, and this is not always convenient; moreover, writing commands correctly can cause difficulties for an untrained person. To make it easier to work with the device in ADB and Fastboot modes, a special, quite functional solution has been created - the ADB Run program.

How the application works

At its core, the program is a shell over ADB and Fastboot, providing its users with only the ability to more conveniently and quickly call the most frequently used commands. In other words, using ADB Run in many cases results in no need to enter commands manually; just select the required item in the shell, enter its number in a special field and press the " Enter».

The program will automatically open a list of available sub-actions.

Or it will call the command line and enter the required command or script, and then display the system response in its own window.

Possibilities

The list of actions that can be implemented using Adb Run is quite wide. The current version of the application has 16 items that provide access to an extensive list of functions. Moreover, these points allow you to perform not only standard firmware operations, such as cleaning certain partitions in Fastboot mode or writing them (item 5), but also installing applications (item 3), creating a system backup (item 12), getting root rights (clause 15), as well as perform many other actions.

The only thing worth noting is that with all the advantages in terms of convenience, ADB Run has a rather significant drawback. This program cannot be considered a universal solution for all Android devices. Many device manufacturers bring some specificity to their creations, so the ability to work with a specific device via ADB Run should be considered individually, taking into account the specific hardware and software of the smartphone or tablet.

Important warning! Incorrect and thoughtless actions in the program, especially when manipulating memory sections, can lead to damage to the device!

Advantages

  • The application allows you to almost completely automate the entry of ADB and Fastboot commands;
  • One tool contains functions that allow you to flash many Android devices from “0”, from installing drivers to writing memory partitions.

Flaws

  • Absent on the Russian interface;
  • The application requires certain knowledge in working with Android via ADB and Fastboot modes;
  • Incorrect and thoughtless user actions in the program can damage the Android device.

In general, ADB Run can significantly facilitate the process of user interaction with an Android device during low-level manipulations using ADB and Fastboot modes. Many previously unused operations due to their complexity become available to the untrained user, but they must be carried out with caution.

What is ADB? Adb commands for Android. In this article you will learn what ADB is, why users need it, and how to manage it using commands in the Android terminal. Well, let's start learning adb commands for android...

Getting to know ADB

ADB (android debug bridge) is a debugging tool, identifying errors in applications, unlocking devices on Android OS and much more. You can read the official documentation in English on this website.

Download ADB

You can download ADB with the official supplied Android SDK development environment or download small ADB installer, Installation occurs in the root of the disk WITH:\

Make sure that drivers are installed on your PC and USB debugging is enabled on Android.

Adb commands android and linux

Adb commands can be divided into 3 types, directly for Adb command, FastBoot() and Android command.

Adb commands

1. Check if Android is connected, checks whether the PC “sees” your smartphone or tablet.

To make sure that everything works fine and the computer recognizes Android, you need to enter the adb command:

adb devices

This screenshot shows that Android is connected

If you have didn't show up If there is a similar message, then you may need to check the availability of drivers on the PC, the integrity of the cable, and the functionality of the USB port.

2. Android connection via WI-FI

In order to connect Android via WI-FI network, you need to get the IP address and port of the device, the ADB Wireless application will help you with this (Root required)

after that enter the command:

adb connect ip:port

For example like this:

adb connect 192.168.0.14:5555

Learn more about how to connect Android via WI-FI - USB Debugging.

3. Installing applications on Android

In order to install any application from a computer to Android, you need to enter the command:

adb install

How to use and example:

In order to use the Adb command, you need to install the application. Write:

adb intsall C:papka_gde_y_vas_hranitsya_prilogenieimja_priloginija.apk

That is, write the command adb install path to the application and the name of this application.

4. Send any file to Android

adb push

How to use and example

In order to send a file from PC to Android using the Adb command. Write:

adb push C:papka_gde_hranitsya_fileimja_file /sdcard

That is, write the adb command path to the file, the name of the file and the location where to save the file.

5. Receive a file from Android to PC

In order to receive absolutely any file from an Android device to a computer, there is a command:

adb pull

How to use and example:

In order to receive a file from Android to PC using the Adb command, you need to. Write:

adb pull /sdcard/xxx/Sex_s_Pameloy_Anderson C:papka_gde_budet_hranitsya_file

That is, write the adb command: the path to the file located on Android, the name of the file and the place where to save this file on the PC.

In order to reboot Android after any operations performed, or reboot into a special mode, there is a command:

adb reboot

Usage example:

The commands will reboot Android

adb reboot adb reboot normal

Bootloader

adb reboot bootloader

The command will reboot Android into Recovery mode

adb reboot recovery

7. Go to Android management, after which you can use Android OS commands

The full potential of Android is revealed when you go into Android management where many Linux commands are available. There is a command for this:

adb shell

Commands in the Android terminal

Superuser or Root. Allows you to perform absolutely all actions, from creating, modifying, changing, to deleting specific system files: To do this, enter the command:

su

Before entering the command

su

the user is a Guest in the system (many actions are blocked) and is indicated at the beginning of the terminal with a dollar sign

$

after entering the command

su

becomes an Administrator and is designated in the terminal as an American number

#

and a live example:

2. Command to go to a folder (in the future it will be more correct to call a directory instead of a folder)

In order to navigate between partitions and directories in Android, there is a special command:

CD

Example to move from the /sdcard section to the /sdcard/xxx/porno/hot_girl section

cd /sdcard xxx/porno/hot_girl

In order to return from a partition to the directory above or back to /sdcard
if we are in the directory /sdcard/xxx/porno/hot_girl - hot_girl

cd..

we'll be in the catalog

/sdcard/xxx/porno/

if you need to go to /sdcard then

cd ../ ../ (as many times as necessary) Attention: in Android and other Unix systems, the Primer and primer or PrimER files are completely different files

3. Move/Rename file or directory.

Moving and renaming a file or directory is carried out with only one command:

mv

Example Rename file

mv /sdcard/xxx/hot_porno/Alenka.avi /sdcard/xxx/hot_porno/kruto.avi

Example Rename a folder:

mv -r /sdcard/xxx/hot_porno /sdcard/xxx/super

Example how to Move a file:

mv /sdcard/xxx/hot_porno/Alenka.avi /sdcard/xxx/Alenka.avi

Example of how to Move a folder:

mv -r /sdcard/xxx/hot_porno /sdcard/hot_porno

4. View what is inside the catalog

In order to find out what directories and files are contained from the location where you are, use the following Linux command:

ls

Usage example:

ls /sdcard/xxx/hot_porno/

will display a message

Alenka.avi Pamela.avi Anderson.avi ls -a ls -a /sdcard/xxx/hot_porno/

will display the following message:

Alenka.avi Pamela Anderson.avi .Skrutiy_File.avi

5. Copy a file or folder (directory).

In order to copy a file or folder and move it somewhere:

cp

Example Copy file:

cp /sdcard/xxx/hot_porno/Alenka.avi /sdcard/xxx/Alenka.avi

Example Copy folder:

cp -r /sdcard/xxx/hot_porno /sdcard/hot_porno

6. Connect the section (prime) and disconnect.

In order to find out what partitions exist in Android, connect or disconnect:

mount(connect section) and umont(detach partition)

To find out which partitions are currently primed, enter

mount

To attach a section:

mount /dev/block/mmcc121 mount /systcode

To detach a partition:

umount /dev/block/mmcc121 umount /systcode

7. Create a directory (folder)

To create a folder somewhere, use the command:

mkdir

Usage example:

mkdir /sdcrad/android_file

8. Delete a directory (folder) or file

If you need to delete any file or folder linux command:

rm

Example of how to delete a file:

rm /sdcard/xxx/hot_porno/Alenka.avi

Example of how to delete a folder:

rm - r /sdcard/xxx/hot_porno

9. Display the contents of the file on the screen (read)

If you are faced with the task of displaying the contents of a text file:

cat cat /sdcard/books/Tolstoy_book_war_and_peace.txt

and we get

- Eh bien, mon prince. Genes et Lucques ne sont plus que des apanages, des estates, de la famille Buonaparte. Non, je vous previens, que si vous ne me dites pas, que nous avons la guerre, si vous vous permettez encore de pallier toutes les infamies, toutes les atrocodes de cet Antichrist (ma parole, j`y crois) - je ne vous connais plus, vous n`etes plus mon ami, vous n`etes plus my faithful slave, comme vous dites.

10. Display the contents of the file on the screen (read in reverse order)

If you are faced with the task of displaying the contents of a text file, but from the end to the beginning:

tac

11. Show full path

In order to understand which section and directory you are in:

pwd

Example: if we are in any directory and need to find out the full path (for example, we are in the system partition, app directory)

pwd

will display a message

/system/app/

12. Create an empty file

To create a text file:

touch

For example, create a file 666.txt in the /sdcrad directory

touch /sdcard/666.txt

13. Creating a backup copy from a partition and restoring

dd if

Example of creating a Backup on an SD card

dd if=dev/block/mmcblk0p1 of=sdcard/efs.img

Example of Restoring a partition from a backup from an SD card

dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1

14. View the space occupied by a file

To understand how long something takes:

du du systcode

Setting permissions for files and directories

To find out what rights files and directories have, you need to write the following command

ls -n

Access rights (permission)

They are written down in this form - RWX (letter) or 777 (digital)

Access rights are shared

1.Access to files
2.Directory access

Literal permissions attributes

r- reading data from files and directories (read)
w- changing the contents of files and directories or writing to them, but not deleting (write)
x- execution of a file or permission to enter a directory

There are three groups of users

« user" - the owner of the file or directory
« group» -member of the group to which the owner belongs
« world» - the rest, not belonging to the 2nd groups

The order of recording access rights looks like this
First, access rights are set for the owner - “ u»
after the group - " g»
and at the end for the rest - “ o»

For example

The owner of the file has the right to read (r), write (w) to it and execute (x), the rest only have the right to read.

Digital permissions attributes

r - read 4
w - entry 2
x - execution 1
"-" no rights 0

The sum of their values ​​means the final rights for the user and groups

7 (rwx) = 4 + 2 +1 full rights
5 (r-x)= 4 + 0 + 1 read and execute
6 (rw-) = 4 + 2 + 0 read and write
4 (r-) =4 + 0 + 0 read only

For beginners, an online calculator may be useful - link.

You need to set permissions with the command

chmod

For example

chmod 777* - will set read, write and execute permissions to all files and folders

chmod 755 file.avi

Hard and symbolic links

In Linux, including Android, there is such a thing as links - which in normal, familiar language sounds like a “shortcut”. There are two types of links:

  • Hard links
  • Symbolic links or symlinks

What are the differences between hard and symbolic links?

Symbolic links - create a shortcut that indicates the exact location of the file or folder where the shortcut links. If you move a file or folder, the symbolic link will be broken. To clearly understand what a symbolic link is, in Windows XP or Windows 7 there are program shortcuts on the desktop that link to the folder with the program, or more precisely, the exe file.

How to create hard and symbolic links

ln ln -s

November 7, 2012 at 02:56 pm

Manual ADB driver installation

  • Android development
  • Tutorial

And here an unpleasant surprise awaited me - either the native driver turned out to be crooked, or Windows, or the wire... in general, the driver stopped working, the Windows Device Manager reported that the device was fully operational, but upon request adb devices I received an empty list in the console and, naturally, I was unable to test the application on the tablet.

I wrote a request to TeXeT support, they even answered me with a link to the driver itself, which, as I was already convinced, did not work. I started looking for an answer on the Internet and found a bunch of different assemblies of this driver and manuals, but still none of them started up properly, and even the native driver from the SDK did not work at all, which made me despondent... but not despair.

Here I decided to try my hand at writing drivers using the good old method of scientific poking and opened the driver inf file. What gave me hope was the understanding that the software part of the adb interface on the tablet side should be identical for all devices, and USB worked anyway. And so, after several unsuccessful attempts at manually editing the inf file, I found a recipe for treating the inf file seasoning so that it would install and, most importantly, work.

So let's get started.

Step 1. Download the driver. If you haven't already done so, open Android SDK Manager, find the Extras section, check the Google USB Driver box, and click Install Packages. It's simple. Wait for it to load.

Step 2. Find the driver and make a copy of it in a separate folder. Go to the %android-sdk%\extras\google\ folder and see the treasured usb_driver folder there. Copy it somewhere, and we will carry out further manipulations there. In principle, you can edit the “original”, but I preferred to keep the original intact just in case.

Step 3. Edit the inf file. In the folder, open the file android_winusb.inf and look for lines like this:
;Google Nexus One %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02 %CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01 %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11 %CompositeAdbInterface% = USB_In stall, USB\VID_18D1&PID_4E12&MI_01
Make a copy of these lines and replace Google Nexus One on %your_device_name% for identification in the future and... open the Windows Device Manager. We are looking for our device there ( Android, Android Composite ADB Interface or something like that). Open the device properties, the “Details” tab, select the “Equipment ID” item in the list and see this picture.

We copy the line that is most similar to the one shown in the figure (It is, in theory, just a little shorter), and paste it into our inf file.
;TEXET TM-7025 %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0003 %CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0003&MI_01 %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0003 %CompositeAdbInterface % = USB_Install, USB\VID_18D1&PID_0003&MI_01
In %SingleAdbInterface% we delete the end of the line; as you can see, in %CompositeAdbInterface% we insert the whole line. There’s probably no need to repeat everything twice, but I already have everything and I’m too lazy to experiment :)
We save (be careful - in some cases you need to run notepad with administrator rights, because in user mode you will not be allowed to overwrite the inf file).
Step 4. Driver installation. Now that everything is prepared, go back to the device manager and remove all previously installed adb drivers (if any). We update the list of devices and see our device without drivers. We open its properties and select “update drivers”, select the installation from the folder, specify the folder with the corrected inf and start the installation - our driver is instantly found, but during installation it may swear about incompatibility with the question “should I continue, nasalneka?” Let's continue. That's it, the driver is installed.
Step 5. Final. To be precise, take out the USB port, wait until everything is detected, open the console (Win+R, enter cmd) and write adb devices. If everything went well, we see the treasured list item, indicating that adb now sees our device.


From now on, you can safely launch eclipse and build programs, enjoying convenient automatic assembly, installation and the ability to debug directly on your device.

If the adb command does not work for you at all. Computer -> Properties -> Environment Variables. We are looking for the Path variable and at the end we add(in no case do we overwrite it) at the end there is a semicolon, and after that the address of the folder where adb lives (usually %android-sdk%\platform-tools\). After a reboot it should work.
Sometimes adb does not start automatically when the system starts. Start manually.

What was that?
It's actually simple. For some reason (Winda is a must-have / progers have crooked hands / the Google inf-file was written only for native Google devices / the Higgs bosons have ruined everything on your computer), Windows does not want to use the Google driver for non-Google devices that are not recorded in the inf-file. Apparently, everything there is tied to these ID equipment. But the software on the vast majority of Android devices is identical in terms of the debugger connector to the PC, so the driver should communicate normally with any Android device. Our task is to deceive Windows and force it to accept the device as “driver-compatible,” which we did by adding its ID to the driver inf file.

I hope this manual will help someone get their own Chinese or other device for which they forgot to make a normal adb driver when assembling the system, or for those who are bothered to download the official driver from the device manufacturer (this can be so annoying that it’s faster to do everything described above - This happened to me with the driver for the LG E510 phone).

P.S. I have not conducted mass testing of this method, so I cannot guarantee that it will work 100% in all cases. But it worked for me on Windows 7, and then on Windows 8. I had to edit the file separately for each time, but I don’t think that’s such a problem.

Almost every owner of an Android device who has decided to improve their favorite by replacing the firmware or operating system kernel comes across the adb program.

For most beginners, it is this program that becomes an insurmountable obstacle, and today we will tell you how to install and start working with this wonderful application, which will help you, for example, get root rights on your device, flash a new version of Android, or even restore your phone or tablet to its original state after unsuccessful intervention in the system.

So what is ADB, loved by all modders and hackers, where can we get it, and why do we need it?

What is ADB.

The abbreviation ADB stands for Android Debug Bridge. ADB is part of the Android SDK, which can be downloaded from here.

Since the Android operating system is a variant of Linux, setting it up often requires working through the command line. Of course, there are programs - terminal emulators that allow you to execute commands directly on the device, but, firstly, it is inconvenient to do this on a small phone screen, and secondly, sometimes you need access to the device via a computer, and in these and many other cases the program adb is simply irreplaceable. The adb program establishes a connection between the device and the computer and allows you to perform various manipulations with the Android system directly on the computer.

How to install ADB.

First of all, we recommend that you download the latest version of the Android SDK; at the time of writing this guide, version r11 is available, all further descriptions are based on its example, and in earlier versions, the location of the necessary programs after installing the SDK may differ from what is described here.

1. Download the Android SDK, it can be found at the link provided earlier. There are several types of SDK, for Microsoft Windows, Mac OS and Linux.

We will need a version for Microsoft Windows. And here there are two options - download the installer or zip archive from the Android SDK. We don’t need the installer, especially since it won’t allow you to install the SDK on Windows 7, so we download the zip archive.

The archive contains a folder android-sdk-windows, which contains the SDK itself. Unpack it onto your computer. In our example, we placed the folder in the root of drive C. If you do the same, the path to the SDK will be like this: C:\android-sdk-windows

In earlier versions of the SDK, the adb program we needed was located inside this folder in the tools folder, but later it was moved by the developers to the platform-tools folder.

However, if you go to this folder, you will not find the adb program inside it, so let's move on to the next installation step.

2. Install SDK Platform Tools.
We make sure that our computer is connected to the Internet and launch the SDK Manager program located in the android-sdk-windows folder. After starting the program, the following window will appear:

We need to download and install Android SDK Platform-tools and Android SDK Tools.

By double clicking on an item or by clicking on “Accept” and “Reject”, we mark these two items in the list and uncheck all other items, as shown in the above screenshot. Then click “Install” and wait until the components we need are downloaded and installed.

Now we have adb installed on our computer, but to work with our phone or tablet we will need to install their driver and for further convenience with the program, it would be nice to write the path to it and other components in the Windows system.

3. If we go to the folder C:\android-sdk-windows\platform-tools\, then now we can detect the adb program there.

After this, we need to edit the PATH system variable so that every time we start the program and enter commands we do not have to type the path to the program, which looks like this:

C:\android-sdk-windows\platform-tools\adb

If you have never edited system variables, create a system restore point so that you can later return it to its original state.

If you have Windows 7 installed, right-click on the “Computer” shortcut, select “properties” and in the window that opens, select “Advanced system settings”.

If you have Windows XP, right-click on “My Computer” and then on “Properties”

In the next window, on the “Advanced” tab, click on the “Environment Variables” button. In the “System Variables” list, select the “path” variable and click the “Change...” button.

The variable editing window will open, and in the “variable value” item, at the very end of the line, after the semicolon, add the path to the tools folder and the platform-tools folder:

;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools;

(if there was no semicolon at the end of the line, add one - each path in this line must be separated from the other by a semicolon)

If you installed the Android SDK in a different folder, write your path to the tools and platform-tools folders at the end of the line.

Installing device drivers.

Some devices, such as Samsung phones and tablets, have their own software for synchronizing with a computer, and if you have it installed on your computer, then the device driver is already installed on your system.

But for devices like the Nexus One, which come without any additional software or drivers, drivers must be installed to work with the Android SDK.

To do this, go to the folder where we installed the SDK and launch SDK Manager.

In the same way as we installed Android SDK Platform-tools and Android SDK Tools, find and select “Google Usb Driver package” from the list. Click “Install” and wait for the program to download the drivers. Drivers for 32 and 64 bit Windows will be downloaded to the following folder:

C:\1\android-sdk-windows\extras\google\usb_driver

You can now install drivers for your device. To do this, in the settings menu of your phone or tablet, select the “Applications” item, and in it enable “USB debugging”.

We connect our device to the computer. The computer will detect new hardware and prompt you to install drivers. We install the drivers from the folder where they were downloaded earlier.

After installing the drivers, a new device “ADB Interface” will appear in the device manager and we can verify this by opening it by right-clicking on the “Computer” icon -> “Properties” -> “Device Manager”

How to launch ADB

The best way to work with the adb program is through the Windows command line. To open the command line on a computer with Windows XP, click “Start” and in the “Run” input field type cmd and press “Enter”.

On a computer with Windows 7, click “Start” and in the “Search programs and files” input field, type cmd and press “Enter”.

A command line window will open, and in order, for example, to see what devices we have connected to the computer, we type the command in it:

adb devices

The adb program will display a list of devices currently connected to the computer.