Basic ADB and fastboot commands. "Filename" is not an internal or external command, executable program, or batch file

Almost every owner Android device, which decided to improve its pet by replacing the firmware or operating system kernel, encounters a program adb.

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 Android or even restore your phone or tablet to its original state after unsuccessful system intervention.

So what is it A.D.B. loved by all modders and hackers, where can we get it, and why do we need it?

What is ADB.

Abbreviation A.D.B. stands for Android Debug Bridge(Android debug bridge). ADB is a component that can be downloaded from here .

Since the operating system Android is a variety Linux, to configure it you often need to work 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 simply irreplaceable. Program adb establishes a connection between the device and the computer and allows you to perform various manipulations with the system directly on the computer Android.

How to install ADB.

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

1. Download it, it can be found at the link provided earlier. There are several varieties SDK, For Microsoft Windows, Mac OS And Linux.

We need a variety for Microsoft Windows. And here there are two options - download the installer or zip archive from the Android SDK. We don’t need an installer, especially since it won’t allow us to install SDK V Windows 7, and therefore download the zip archive.

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

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

However, if you go to this folder, you will not find the program inside it adb, 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 folder located android-sdk-windows, program SDK Manager. 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» Check 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\, we can now find the program there adb.

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 installed Windows 7, right-click on the shortcut “ Computer", select " properties" and in the window that opens select " Advanced System Settings».

If you have Windows XP, right-click on “ My computer" and then by " Properties»

In the next window on the tab " Additionally"click on the button " Environment Variables" In the list " System Variables"select a variable" path" and press the button " Change…»

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

;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 in another folder, write at the end of the line your path to the tools and platform-tools.

Installing device drivers.

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

But for devices like Nexus One, which are supplied without any additional programs and drivers, to work with Android SDK, drivers need to be installed.

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

Exactly the same as we installed Android SDK Platform-tools And Android SDK Tools, find and select from the list “ Google USB Driver package" Click " Install"and wait while the program downloads 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 “ Applications"(Applications), and in it we include " USB Debugging"(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 will appear in Device Manager " ADB Interface" and we can verify this by opening it by right-clicking on the icon " Computer» -> « Properties» -> « device Manager»

Additionally, you can try installing a universal ADB driver on your computer.

How to launch ADB

Work with the program adb best way is through the command line Windows. To open the command line on a computer with Windows XP, click " Start" and in the input field " Execute» dialing cmd and press “Enter”.

On a computer with Windows 7, click " Start" and in the input field "Find programs and files" we 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.

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

Almost every owner Android device, which decided to improve its pet by replacing the firmware or operating system kernel, encounters a program adb.

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 Android or even restore your phone or tablet to its original state after unsuccessful system intervention.

So what is it A.D.B. loved by all modders and hackers, where can we get it, and why do we need it?

What is ADB.

Abbreviation A.D.B. stands for Android Debug Bridge(Android debug bridge). ADB is a component that can be downloaded from here .

Since the operating system Android is a variety Linux, to configure it you often need to work 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 simply irreplaceable. Program adb establishes a connection between the device and the computer and allows you to perform various manipulations with the system directly on the computer Android.

How to install ADB.

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

1. Download it, it can be found at the link provided earlier. There are several varieties SDK, For Microsoft Windows, Mac OS And Linux.

We need a variety for Microsoft Windows. And here there are two options - download the installer or zip archive from the Android SDK. We don’t need an installer, especially since it won’t allow us to install SDK V Windows 7, and therefore download the zip archive.

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

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

However, if you go to this folder, you will not find the program inside it adb, 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 folder located android-sdk-windows, program SDK Manager. 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» Check 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\, we can now find the program there adb.

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 installed Windows 7, right-click on the shortcut “ Computer", select " properties" and in the window that opens select " Advanced System Settings».

If you have Windows XP, right-click on “ My computer" and then by " Properties»

In the next window on the tab " Additionally"click on the button " Environment Variables" In the list " System Variables"select a variable" path" and press the button " Change…»

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

;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 in another folder, write at the end of the line your path to the tools and platform-tools.

Installing device drivers.

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

But for devices like Nexus One, which are supplied without any additional programs and drivers, to work with Android SDK, drivers need to be installed.

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

Exactly the same as we installed Android SDK Platform-tools And Android SDK Tools, find and select from the list “ Google USB Driver package" Click " Install"and wait while the program downloads 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 “ Applications"(Applications), and in it we include " USB Debugging"(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 will appear in Device Manager " ADB Interface" and we can verify this by opening it by right-clicking on the icon " Computer» -> « Properties» -> « device Manager»

Additionally, you can try installing a universal ADB driver on your computer.

How to launch ADB

Work with the program adb best way is through the command line Windows. To open the command line on a computer with Windows XP, click " Start" and in the input field " Execute» dialing cmd and press “Enter”.

On a computer with Windows 7, click " Start" and in the input field "Find programs and files" we 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.

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

When you try to open any command through a utility window or console, you encounter an error - “File name” is not an internal or external command, executable program or batch file. The system stubbornly does not open the file for some reason and this fact is very annoying. The reason for this may be one of several options: the path to the file is incorrectly specified and the absence of a component in the system at all, i.e. it does not exist at the specified address.

The main reasons why the error “is not an internal or external command” appears

As already mentioned, one of the reasons is that the path to the file to be opened is incorrect. Usually the path to the file is specified in the “Path” variable in the system; the strict path to the directory in which the necessary files are located must be specified. If there are any errors in the settings when specifying a path in a variable, or when specifying a file name, then the system will generate exactly this error - “file name” is not an internal or external command executed by the program.

The first step is to specify the exact path of the “Path” variable to the operating system so that errors do not occur when opening the file. To do this, you need to know the location of the folder for sure. For example, let's turn to a program that will subsequently work with an executable file in a specific folder.

The Path variable is an operating system variable that is used to locate specified executable objects via the command line or terminal. You can find it in the Windows Control Panel. In new versions of Windows and other operating systems, manual instructions are usually not required.

Specify the correct path in the path variable on Windows 7

To correctly specify the path, you need to know the exact location of the file. If the program file that needs to be opened is located on the disk in C:\Program Files\Java\jdk 1.8.0.45\bin, then this path must be copied and specified in the system variable for subsequent opening.


If the error appears again, try moving the program to the working directories of the disk with the operating system installed, for example /System32. Windows works with this directory more often.

Errors also occur due to missing program components. You can eliminate them by adding the necessary ones. Let's take the Telnet component as an example. To enable it, go to:


Set the “Path” variable in Windows 8/8.1/10

  1. Go to the “Control Panel”.
  2. Click the “Advanced system settings” link.
  3. Find "Environment Variables". In this section you need to select “Path”. Next, “Change”, if there is no ready one, create it again.
  4. In the “Change system variable” item, specify the value you need and confirm with the “Ok” button. Close all other windows by clicking “Ok”.
  5. Reopen the command line or terminal and try your query again. Everything should work fine now.

Many of us are already familiar with ADB (Android Debug Bridge), since, as the owner of an Android device, quite often we have to perform such simple actions as adb push And pull, or adb reboot etc. But for many novice users, just the sight of the command line is already scary, and it seems prohibitively possible. Although in fact everything is quite simple, experienced users will not let me lie, and the biggest difficulty is to remember all these commands, although this is not necessary to do either, since the Internet is always at hand and finding the right command is not difficult.

Android Debug Bridge, which is part of the Android SDK emulator, allows you to communicate between your computer and an Android device connected to it. By the way, if you need some software, you can download the programs for your laptop for free here. What can I do with ADB? Its capabilities are quite wide, for example, the most popular actions: copy files from an Android device to a computer, upload files from a computer to Android, execute many Linux commands, receive error reports, etc.

So if you're new to this and want to learn a little more about ADB than just what it is, then I suggest you check out my little basic guide to learning ADB.

What you will need

1. Android Debug Bridge (ADB) for Windows 32bit - download

2. Android Debug Bridge (ADB) for Windows 64bit - download

3. Computer with Windows OS installed.

Now let's move on to the active phase:

1. Download the required zip archive and extract it wherever you want, for example, drive C.

2. Now go to the directory C:/adb/sdk/platform-tools. Here you will find a set of files as shown in the image below.

3. Hold down the Shift button + right-click and launch the Windows command line from the current directory.

4. Enter the command adb start-server.

5. To make sure that your device is connected correctly and has been recognized by the computer, enter the command: adb devices. If all is well, you will see something similar to this:

Now that your device is connected and everything is working, let's play with it a little.

Reading LOGCAT via ADB

The easiest way is to run the command: adb logcat. As a result, the entire contents of the device log file will appear on the screen. To get logcat in a separate file run: adb logcat > logcat.txt.

BUGREPORT

You can run the command: adb bugreport, but you will receive a notification that the generated report will not be readable, so it is better to use: adb bugreport >result.txt.

ADB together with ROOT access rights

To work from ADB with full access rights, you need to root the device. If the device is already manual, then run the command: adb root and we see what is shown in the picture below (reboot ADB with root rights).

Installing applications via ADB

To install the application, make sure that there are no spaces in the apk file name and you need to know exactly the correct path to it. Well, then we run the command: adb install+ name of the installation file. In my example, I installed the papertoss game, so if everything goes well, you will get this picture on the screen:

ADB stands for Android Debug Bridge, that is, a debug bridge for Android. The program is developed for the Android operating system and works in conjunction with a computer. It makes it possible to change files, use root rights, and restore the system.

ADB run, in turn, is an application that allows the user flash a device running on Android. It includes ADB and Fastboot. These applications are familiar to everyone who has encountered flashing their gadget.

ADB, ADB run and Fastboot

Android Debug Bridge allows you to manage Android using a PC. This application is installed directly on a laptop or computer, which is connected to a mobile device via a USB cable in debugging mode. Then after launch It is possible to execute special commands that allow you to initiate any actions with the gadget.

The utility allows perform such actions, How:

  • transferring folders and files to/or from the device;
  • working with firmware: installation, updates;
  • removing a lock made using a pattern key;
  • execution of various scripts.
  • Most often, the application is installed together with the Fastboot utility. This mode allows you to reset all settings to factory settings, which is why it is sometimes called Recovery - a recovery function. In addition, you can install firmware using Fastboot, but in this case only work via a PC is possible.

    These two programs are better install together, allowing you to access more options.

    In turn ADB run simplifies work and automates common commands and actions most often used by users. Although it has a console, it has a visualized appearance and consists of 14 points.

    This program is much simpler, it is suitable for those who find it difficult to understand the command line, who do not know how to work with it. It already provides a menu and items that you can select. She's different simple interface, great functionality, without requiring additional software installations.

    All utilities can be downloaded, installed to operate and update your mobile device.

    How to use ADB run

    To understand how to use the utility, you need to become familiar with the installation and basic commands. Connection to the gadget is carried out using a computer and a USB cable or via a wireless network.

    You can understand that the connection has taken place by entering adb devices. The message should then appear: " List of devices attached“, indicating that the connection has occurred. Connection via Wi-Fi occurs using adb wireless. The mobile device must be rooted.

    To work, you need to enable USB debugging on your gadget. Usually this item is located in the settings. If it is not there, you can look for it in the developer options. This menu is hidden; to enable it, you should find the line with the build number in the Android settings and click on it several times (5 to 10 times). After about half of the clicks, a notification will appear that you are doing everything correctly, and then you will be provided developer rights. Then you can return to the settings, where the “developer options” item will appear. This is where debugging is enabled.

    The utility has a number of positive qualities:

    1. Easy to install.
    2. Simple controls.
    3. Easy check for updates.

    Installation

    Before installing ADB, you need to download it, this can be done for free. You can download ADB on the website 4pda. The official resource does not allow you to download the utility separately, but only with the entire Android SDK package. The program is installed using the standard installation wizard.

    The whole process is simple and intuitive. The installer himself offers hints, directing all actions.

    After this, you need to install drivers for your mobile device, otherwise the application will not see the device. The easiest way is to use the automatic installation utility Adbdrivers. But you can also download drivers for Windows 7, 8 or 10 from the manufacturer’s official website.

    If there is no installer or driver, you can install manually, for this:


    Overview of the ADB run interface and command

    Let's look at all the menu items offered by the program and how they work:

    1. Device attached? - responsible for connections between PC and smartphone, but you must enable USB debugging.
    2. Move – is responsible for moving files from a laptop to a smartphone. There is both automatic and manual movement available here.
    3. Install Android App to Device – allows you to install applications, with options for saving and moving to a memory card.
    4. Reboot Device – various reboot modes Android:
    5. Fastboot – firmware, system flashing. All settings are set automatically.
    6. Unlock Gesture Key – unlocker graphic key, also copes with PIN codes and face codes.
    7. Manual – allows you to enter commands manually.
    8. Check Update – checking a new version of the program.
    9. Intsall Bootanimation – installs and changes animation when turning on the device.
    10. Memory and Partitio – introduces blocks and sections Android.
    11. Run Script - working with scripts.
    12. Backup – create a backup copy.
    13. Odex – odex-ing of the firmware, taking into account various parameters.
    14. Screenshot/Record screenshots, video recording capability.
    15. Exit – accordingly exit from the program.

    Flashing your phone using ADB run

    The program allows you to change the gadget's firmware. To do this, just install it, connect to your PC and use the Fastboot utility. The files that need to be flashed must be in the same folder as the utility.

    First you need translate device into bootloader mode using the menu.

    Then you need to unzip the previously downloaded files with the firmware. After this, select the item Run SCRIPT and place the firmware files in the window that opens and close it. Click on Enter. The firmware has started. While the process is in progress, you cannot remove the cable from your phone or computer.

    The program makes it possible to reflash all partitions step by step or only some:

    • system;
    • cache;
    • data;
    • recovery.

    Using ADB

    Using the utility allows you to:

    • reboot gadget using various modes;
    • carry files, folders from phone to PC or vice versa;
    • work with applications by installing or removing them;
    • work with firmware;
    • perform various scripts;
    • remove the lock graphic key.

    The utility is usually installed and used together with the Fastboot application.

    Installation

    You can install the application by visiting the official website. Necessary download archive SDK tools for Windows, having previously agreed to the terms of use.

    After this it is required unpack the archive, go to the tools directory, select the bin folder there and access the sdkmanager. It just allows you to install the program.

    The next step is to work on the Windows command line. Let's run it as administrator. After that, open the sdkmanager folder, prescribing the path to it C:\sdk-tools-windows-3859397\tools\bin.

    During installation, read license agreement, press the Y key.

    If the entire process went correctly, then the platform-tools directory with the files adb.exe and fastboot.exe will appear in the root folder.

    How does ADB work?

    Once you install the program, you can work with it. To make sure that everything is functioning correctly and normally, you should use the command line to open the folder with the adb and fastboot files and run the adb.help program. What you get should look like the screenshot below:

    Now you need to connect the device to the PC and check whether the application can see it. The connection is made using a USB cable. Should select mode MTP – file manager, and then the “for developers” option. If such an item does not appear, then you should go to the “ about the phone", click 7-10 times on the build number. After that, in the “for developers” item that appears, you need to select “usb debugging”.

    Then enter adb devices in the system command line. This will allow you to see information about the device. It looks like the screenshot.

    Afterwards, the fastboot program is checked, the fastboot reboot task is written in the console, and press enter.

    After checking the functioning of the task, you can safely work with the program.

    ADB Commands

    The utility involves working with a smartphone and performing various actions. There are only 10 basic ADB commands:


    It is enough to specify the path to the folder from which the information is copied and into which it is copied.

    It is also possible to access the “recovery” menu.

    But it is worth remembering that after running this program, all data on the phone is deleted.

    1. Shell – it can be used in two ways. The first is to enter it into the command line, followed by typing. This will allow you to enter terminal mode, where it is possible to execute any Android shell commands. But you should use it carefully, as the device can be seriously damaged.

    Second option - single input actions. Thus, you can, for example, change the access rights to some folders.

    Bonus utility – Sideload. It is suitable for Nexus device owners, allowing you to update official firmware on all company devices.

    FAQ

    What to do if ADB does not see the device

    If suddenly ADB does not see the smartphone, then you need to check first USB debugging or check for ADB drivers on your PC.

    It is also worth paying attention to other reasons:

    • check the usb cable, it performance;
    • check installation Android SDK, availability of its latest version;
    • costs try switching mode from MTP to camera and back;
    • Can try reconnecting device or restart the computer.

    After all these steps, the program should work and the device should be detected. This problem often happens with unknown Chinese brands that are not familiar to the program.

    ADB or fastboot is not an internal or external command

    Sometimes when you enter a number of commands into the console, you may encounter a system refusal to perform the entered action. A message appears that the command is not internal or external. This is often due to the fact that the path to the file is not specified, who serves the team.

    The reason for this message may be that the system does not have information about the location of the files. It is possible that the required component is not in the system, then it needs to be installed.

    In order to get rid of this error, you need to give the program the path to the required files. You should copy it to the clipboard.

    • On the desktop you need to select " My computer", click on the right mouse button, select the column " properties»;
    • now select " additional system parameters" and then "environment variables";
    • there you need to find " system variables"and the Path parameter, to which you need to add the copied path and confirm the changes;
    • then we open the console and enter the required action, after which the error disappears.

    Alternatively, after all the manipulations it’s worth to restart a computer.