fastboot cd commands. ADB commands for Android. Literal permissions attributes

ADB (Android Debug Bridge) is a driver for smartphones and tablets that connects the device to a computer and makes it possible to control its operation using command line.

How to install ADB driver?

On most devices with MediaTek processor ADB drivers installed in automatic mode. For this download the archive , unpack it to your computer and run the Install.bat file.

If after installing the drivers and connecting the switched off smartphone to the PC in Device Manager The yellow light next to the name is lit, do the following:

  1. We log into the computer from an account that has administrator rights.
  2. Press the key combination - Windows+R(the Windows button is located between the left Ctrl and Alt).
  3. In the window that opens we write mmc devmgmt.msc(or devmgmt.msc) to bring up the device manager.
  4. On the smartphone in the menu “ Settings/For Developers"turn on" USB Debugging«.
  5. We remove the battery from the smartphone and then return it back (without turning on the device). If the battery cannot be removed, simply turn off the smartphone.
  6. We connect the smartphone to the computer using a USB cable.
  7. Device Manager. If a device with a yellow triangle appears in the ““ section, then install it on the computer without disconnecting the smartphone.

If the device appears in the section com ports or in unknown devices with the title " MT65xx Preloader" or " MTK usb port" or " DA USB VCOM“, you need to do a manual installation.

Manual installation of ADB drivers

To install adb drivers for a smartphone manually, you will need a computer, a USB cable and a few minutes of time.

  1. Download and unpack the folder with ADB drivers .
  2. We follow steps 1-5, which are described above.
  3. Right-click on the new device that appears in Device Manager. In the menu that appears, select Update drivers.
  4. Go to the previously unpacked folder. In it we go to the subdirectory Win7 and let's start installation. For 32 -bit operating systems select a file usb2ser_Win7.inf, For 64 -bit usb2ser_Win764.inf.
  5. We follow the instructions.
  6. Drivers are installed!

On Windows 8, 8.1 and 10, drivers are installed with signature verification disabled.

Disabling Driver Signature Verification in Windows

Disabling signature verification on Windows 8:

  1. Win+I -> Change computer settings -> General -> Special boot options -> Restart now.
  2. When shutting down, click Diagnostics -> Extra options-> Boot options -> Restart.
  3. After a menu appears, select “Disable mandatory driver signature verification.”

Disabling signature verification on Windows 8.1:

  1. Win+I -> Settings -> Change computer settings -> Update and recovery -> Recovery -> Restart now.
  2. When shutting down, click Diagnostics -> Advanced options -> Boot options -> Restart.
  3. After a menu appears, press F7 and wait for the computer to restart.
  4. Next, install the drivers according to the instructions.

Disabling signature verification on Windows 10:

  1. Press and hold the Windows and shift keys.
  2. Next Start -> Shut down -> Reboot
  3. Release the Windows and shift keys, and select “Diagnostics”
  4. On the next page, select “Advanced options”
  5. Next, go to “Download Options”
  6. Just click “Reboot” and wait for the system to boot before the next step.
  7. After the restart, we will be on the system boot option selection page. Press the F7 key.
  8. The computer will restart and disable driver signature verification.
  9. Next, install the drivers according to the instructions.

If you specify the path to the driver file for the device, but the device manager insists that everything is fine with the drivers and does not want to update them, and the device appears in the " Android Composite ABD Interface"with a yellow triangle icon, then you need to make an edit in the file android_winusb.inf, which is in the folder MTK_Android_USB_Driver from downloaded in " Point 1» archive. We need to write in it PID\VID, which we first recognize from our computer. Right-click on the device with the yellow triangle/ Properties/Device ID. There will be 2 lines. These are the lines we need to copy to the file with drivers. Then we re-specify the path to this driver.

android_winusb.inf— make changes in this file.

%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01&REV_0255
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01&REV_0255

VID\PID can change, set your own values.

Need to flash Android using FastBoot, but don't know how? This article gives detailed instructions on using the FastBoot utility and how to use it to flash an Android device.

This manual will fully explain how to use FastBoot! If you don’t know how to install archived updates, then you need the article - Clockwordmod - what is it. Instructions for CWM recovery with pictures

Downloading and installing FastBoot

Before flashing Android using FastBoot, you need to download it and install it on the desired computer.

1. You can download the FastBoot utility from official program Android SDK (heavy weight)

why ADB RUN is better

Launch

If you downloaded Separately Fastboot

After you have downloaded and installed FastBoot, open the " Command line »

and vve Enter the commands to go to the folder with the Fastboot utility (if you installed separately FastBoot)

cd/
cd adb

If you downloaded ADB RUN

If your choice fell on the ADB RUN program, then launch it and select Manual -> ADB from the menu

The files that need to be flashed must be located in the same folder as the Fastboot utility

Instructions for commands on how to flash Android using FastBoot

It is very important to write commands and firmware files as they are specified!

If your command is specified

fastboot flash cache NazvaniAFiLe.img

then you need to write exactly like that, but not any other way. In other words, the case of letters is important, otherwise you will get an error cannot load 'image' - there is no such file.

Reboot commands into firmware mode (bootloader)

fastboot reboot-bootloader

The command "sees" your Android PC

Get into the habit of checking before doing anything in Fastboot if the connection between your computer and Android is:

Checking whether your PC can see your Android

fastboot devices

Execute this command when the device is already in firmware mode (bootloader)

Nexus Bootloader Unlock and Lock Commands

Unlock bootloader for Nexus

fastboot oem unlock

Lock bootloader for Nexus

fastboot oem lock

Command to find out bootloader version

Shows the bootloader version number installed on Android

fastboot getvar version-bootloader

Partition formatting commands

Before flashing any partition in Android, you must first format it so that there are no problems with operation

fastboot erase Imya_razdela - erase partition: boot, radio, recovery, system, userdata and others

Erases the Cache partition

fastboot erase cache

Erases the Data section

fastboot erase userdata

Erases the System partition

fastboot erase system

Erases Recovery section

fastboot erase recovery

Commands for flashing a partition

After you have formatted the partition or partitions, you can start flashing the firmware

fastboot flash Imya_razdela imya_file.img - firmware of the selected partition: boot, radio, recovery, system, userdata and others

Flash the system partition (System)

fastboot flash system imya.img

Flash the cache partition

fastboot flash cache imya.img

Flash the data section

fastboot flash userdata imya.img

Flash the Recovery partition

fastboot flash recovery imya.img

Setting the power-on animation (firmware partition with animation)

fastboot flash splash1 splash.img

Flash all partitions (boot, recovery and system)

fastboot flashall

Instead of imya.img- you need to enter the name of the file you are going to flash

Command to install update.zip

Flashes an update archive on Android in the update.zip format or a ZIP archive with IMG images various sections

fastboot update filename.zip

For Sony devices

Checking the connection Sony devices, if the answer is 0.3 device, then connected

fastboot.exe -i 0x0fce getvar version

Unlock bootloader

fastboot.exe -i 0x0fce oem unlock 0xReceived_Key

More detailed information on unlocking bootloader Sony - How to unlock Bootloader Sony

Waiting for Device error

If you have the following message on in the command window for a long time: waiting for device- Means:

  • The driver is not installed or installed incorrectly - reinstall or install
  • Android device is not in Bootloader mode - translate
  • Incorrect connection to USB port- use the rear ones USB ports 2.0 computers, do not use USB hubs

Majority Android users don't know anything about A.D.B.. Full title - Android Debug Bridge, stands for Android Debug Bridge. ADB is part of the Android SDK . With ADB you can perform various actions on your Android tablet or a smartphone, such as: flashing, copying files from a computer to Android and vice versa, system recovery and others.

ADB for Android - what is it?

You probably know that the operating room Android system based on a modified Linux kernel. Therefore, there is a need to use the command line with it. It is the program adb helps establish communication between computer and Android. She is part of the environment Android development SDK, so to install Android Debug Bridge, you need to download Android SDK from the official website. There are versions for all popular operating systems: Windows, Mac OS and Linux. That is, to put it simply, adb allows control your phone or tablet using a computer.

I also recommend the following instructions:

Basic adb commands Android

Connect your device to your PC via USB. Make sure all drivers are installed and USB debugging is enabled.

To Work with Android Debug Bridge best through command Windows string. To do this, in Windows XP, click “Start” and in the “Search programs and files” input field, enter “cmd”, then press “Enter”. If you have Windows 7 or higher, click "Start" and in the "Run" field type "cmd" and press "Enter" again.

adb devices

The most common adb command. Using it, you can determine whether your PC sees the connected device. If you did everything correctly, the following line will appear: “List of devices attached.” After it you will see serial number your smartphone or tablet and its status: “online” or “offline”.

If it says “offline”, this means that the device is in sleep mode, if “online”, then the device is ready to execute your commands.

Thanks to this command you can install applications on your smartphone or tablet. To do this, you need to specify the path where the APK file is located:

adb intsall D:\papka_s_faylom\nazvanie_prilogeniya.apk

To avoid writing long paths, copy the file to the android-tools directory. Then the path will be like this:

adb intsall nazvanie_prilogeniya.apk

adb uninstall

You need to enter it in the same way as the previous command. This will remove the application.

This team has an interesting feature. If you add the key -k, then when you delete a game or program, its data and cache will not be deleted, but will remain on the Android device.

Thanks to this command, you can transfer files from your computer to Android. To do this, you need to know the full path where the file is stored and where to move it.

adb push D:\papka_s_faylom\nazvanie_fayla/sdcard/Android

To avoid writing long paths, copy the file to the android-tools directory. Then you need to enter:

adb push nazvanie_fayla/sdcard/Android

This command copies files from Android to computer. You need to know the path where the file is located on your smartphone or tablet and indicate the location where you want to save the file. If you do not specify the latter, the file will be saved in the android-tools directory.

adb pull /sdcard/nazvanie_fayla\D:\papka_gde_sohranity

This command will reboot your Android phone or tablet.

With this command you can directly boot into bootloader mode.

adb reboot recovery

Not all devices support this command. Using it you can get into recovery mode.

adb connect

Using this command you can connect the device to Wi-Fi networks. To do this, you need to know the IP address and port of the device.

adb connect ip:port

With this command you get full access to all files on your device.

The second way to use adb shell is to execute a single Android shell command using this construct:

adb shell<команда>

If you put your Android phone or tablet into bootloader mode, then the commands adb will not work anymore. Here you need to use fastboot commands.

To check whether PC and Android can see each other, use the command:

After entering it, the serial number of your device should appear.

By entering this command, you can unlock the bootloader of your phones and Asus tablets and HTC. When your device is in bootloader mode, enter:

Also all yours installed programs and personal data will be lost.

Using this command you can display the contents of a log file: changes, errors, etc. The data will scroll too quickly, so the right solution would be to save it in one TXT file. To do this, enter:

adb logcat > filename.txt

adb sideload

The command will be useful for owners of Google Nexus devices. Using it you can update the firmware of the device. Download it to your computer, connect your Nexus to it, go to Recovery mode, select “Apply update from ADB” and then enter the command.

Need to flash Android using FastBoot, but don't know how? This article provides detailed instructions on using the FastBoot utility, how to use it, where to download it from and how to flash an Android device.

This manual will fully explain how to use FastBoot! Like with using Fastboot clear partitions, flash IMG files, reboot and many others.

Downloading and installing FastBoot

Before flashing Android using FastBoot, you need to download this utility and install it on the desired computer:

    1. You can download FastBoot from the Android developers page included platform-tools .
    2. Or use the program Adb Run, more precisely better , in which everything is included, and also knows how to unlock the Android pattern.

Why is ADB RUN better?

Launching the Fastboot utility

Depending on what you chose, downloaded the fastboot utility separately or selected adb run, launch may vary!

If you downloaded Separately Fastboot

Extract the files:

  1. adb.exe
  2. AdbWinApi.dll
  3. AdbWinUsbApi.dll
  4. fastboot.exe
  5. libwinpthread-1.dll

Move them to the C:\ drive. Windows folder. You have successfully installed ADB and Fastboot on your computer!

After you have downloaded and installed FastBoot, open the " Command line".

Windows command line example

Example of installing ADB and Fastboot.

If you downloaded ADB RUN

If your choice fell on a proprietary program ADB RUN, then run it, type A and press Enter.

It is advisable to place the files that need to be flashed in the same folder as the Fastboot utility.

Instructions on how to flash Android using FastBoot

It is very important to write commands and firmware files as they are specified!

If you have the command:

fastboot flash cache NazvaniAFiLe.img

then you need to write exactly this way, and not any other way. In other words case is important otherwise you will get - there is no such file.

Reboot Commands
Fastboot to firmware mode (bootloader)

  • To start working with Android device Using Fastboot, first you need to put your smartphone or tablet into bootloader mode using adb:

adb reboot bootloader

  • Reboot Android from firmware mode (bootloader) to the same mode:

fastboot reboot-bootloader

  • Reboot Android from bootloader firmware mode to bootloader mode:

fastboot reboot-bootloader

  • Reboot Android to normal mode from bootloader firmware mode:

fastboot reboot

The command "sees" your Android PC

Make it a habit before doing anything in Fastboot to check if there is a connection between your computer and Android:

  • Checking whether the PC “sees” your Android:

fastboot devices

This command must be executed when the device is already in firmware mode (bootloader)

Commands for unlocking and locking Google Pixel, Nexus bootloader in Fastboot

  • Unlock bootloader for Pixel, Nexus:

fastboot oem unlock

fastboot flashing unlock

  • Lock bootloader for Pixel, Nexus:

fastboot oem lock

Command to find out bootloader version

Shows the bootloader version number installed on Android:

fastboot getvar version-bootloader

Commands for formatting a partition in Fastboot

Before flashing any partition in Android, you must first format it so that there are no problems with operation

fastboot erase Imya_razdela— erase partition: boot, radio, recovery, system, userdata and others.

  • Erases the Cache partition in Fastboot:

fastboot erase cache

  • Erases the Date section (Data/UserData) in Fastboot:

fastboot erase userdata

  • Erases the System partition in Fastboot:

fastboot erase system

  • Erases the Recovery partition in Fastboot:

fastboot erase recovery

Commands for flashing Android partitions in Fastboot

After you have formatted the Android partition or partitions, you can proceed to the next step, flashing the firmware:

fastboot flash Imya_razdela imya_file.img— firmware of the selected partition: boot, radio, recovery, system, userdata and others.

  • Flash the system partition:

fastboot flash system imya.img

  • Flash the cache partition:

fastboot flash cache imya.img

  • Flash the Data section:

fastboot flash userdata imya.img

  • Flash the Recovery partition:

fastboot flash recovery imya.img

  • Flash all partitions (boot, recovery and system):

fastboot flashall

Command to install update.zip

Flashes an update archive on Android in the update.zip format - a ZIP archive with IMG images of various sections:

fastboot update filename.zip

For Sony devices

Checking the connection of the Sony device, if the answer is 0.3 device, then it is connected:

fastboot.exe -i 0x0fce getvar version

Unlock bootloader

fastboot.exe -i 0x0fce oem unlock 0xReceived_Key

More detailed information on unlocking Bootloader Sony - How to unlock Bootloader Sony

Waiting for Device error

If you have the following message on in the command window for a long time: waiting for device- Means:

  • The driver is not installed or installed incorrectly - reinstall or install
  • Android device is not in Bootloader mode - translate
  • Incorrect connection to the USB port - use the rear USB 2.0 ports of the computer, do not use USB hubs

Video example of working with the Fastboot utility

For those who don't understand anything!

For those who don’t understand anything, then use the proprietary application ADB RUN, this program contains almost all the commands that are needed for FASTBOOT!

Below is an example of how ADB RUN works - how to quickly flash a Recovery file with using ADB RUN in less than 5 seconds (just remember to switch to bootloader mode first)!

That's all! Read more articles and instructions in the section Articles and Android Hacks. Stay with the site, it will be even more interesting!

There are many tools available to work with a USB cable or Wi-Fi smartphone. 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 should 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 variable Path. To do this, go to “Control Panel -> System -> Additional system settings -> Environment Variables", find the Path variable and add to the end of the line, separated by a semicolon, the path to the folder with adb. 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. For this we need root rights and WiFi ADB app. 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 indicates whether to include in backup system applications(enables 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 payment bank cards




Scroll to Top