Если у вас есть телефон или планшет, работающий на базе ОС Android, то наверняка вы захотите подключить его к своему Windows 10 устройству, например, для передачи файлов. В этом случае, рекомендуем скачать ADB драйвера для Windows 10 – специальные библиотеки файлов, упрощающие работу двух устройств на разных ОС.

Особенности

Как правило, скачивать ADB драйвера для Windows 10 нет необходимости, если все, что вам нужно – передать файлы. Данные драйвера имеют куда более обширное назначение:
  • Осуществить передачу файлов с устройства на устройство;
  • Получить ROOT права к ОС Android;
Именно ради последнего и скачивают данные драйвера. Полное название аббревиатуры ADB – Android Debug Bridge, все другие расшифровки, это ошибочные версии. На этой странице мы предлагаем универсальный пакет драйверов, в его самой актуальной версии. Он универсален сразу по всем пунктам, он подойдет для любых Android устройств, для любой версии этой ОС, а также позволит подключить ваш телефон или планшет к Windows 10 x64, а также к 32-ух битной версии.

Если данная версия драйверов вам вдруг не подойдет, то не переживайте, всегда можно скачать – , это универсальна программа для автоматического поиска и установки любых драйверов, в том числе и АДБ.

Не смотря на то, что программа полностью бесплатная, она очень функциональная. Доступна версия на русском и на английском языке. Для тех, кто хочет одновременно загрузить еще и антивирусную программу, чтобы не заразить свой смартфон, рекомендуем использовать

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device. It is a client-server program that includes three components:

  • A client , which sends commands. The client runs on your development machine. You can invoke a client from a command-line terminal by issuing an adb command.
  • A daemon (adbd) , which runs commands on a device. The daemon runs as a background process on each device.
  • A server , which manages communication between the client and the daemon. The server runs as a background process on your development machine.

adb is included in the Android SDK Platform-Tools package. You can download this package with the SDK Manager , which installs it at android_sdk /platform-tools/ . Or if you want the standalone Android SDK Platform-Tools package, you can .

For information on connecting a device for use over ADB, including how to use the Connection Assistant to troubleshoot common problems, see Run apps on a hardware device .

How adb works

When you start an adb client, the client first checks whether there is an adb server process already running. If there isn"t, it starts the server process. When the server starts, it binds to local TCP port 5037 and listens for commands sent from adb clients—all adb clients use port 5037 to communicate with the adb server.

The server then sets up connections to all running devices. It locates emulators by scanning odd-numbered ports in the range 5555 to 5585, the range used by the first 16 emulators. Where the server finds an adb daemon (adbd), it sets up a connection to that port. Note that each emulator uses a pair of sequential ports — an even-numbered port for console connections and an odd-numbered port for adb connections. For example:

Emulator 1, console: 5554
Emulator 1, adb: 5555
Emulator 2, console: 5556
Emulator 2, adb: 5557
and so on...

As shown, the emulator connected to adb on port 5555 is the same as the emulator whose console listens on port 5554.

Once the server has set up connections to all devices, you can use adb commands to access those devices. Because the server manages connections to devices and handles commands from multiple adb clients, you can control any device from any client (or from a script).

Enable adb debugging on your device

To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options .

On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom.

On some devices, the Developer options screen might be located or named differently.

You can now connect your device with USB. You can verify that your device is connected by executing adb devices from the android_sdk /platform-tools/ directory. If connected, you"ll see the device name listed as a "device."

Note: When you connect a device running Android 4.2.2 or higher, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer. This security mechanism protects user devices because it ensures that USB debugging and other adb commands cannot be executed unless you"re able to unlock the device and acknowledge the dialog.

For more information about connecting to a device over USB, read Run Apps on a Hardware Device .

Connect to a device over Wi-Fi

adb usually communicates with the device over USB, but you can also use adb over Wi-Fi after some initial setup over USB, as described below. If you"re developing for Wear OS, however, you should instead see the guide to debugging a Wear OS app , which has special instructions for using adb with Wi-Fi and Bluetooth.

  1. Connect your Android device and adb host computer to a common Wi-Fi network accessible to both. Beware that not all access points are suitable; you might need to use an access point whose firewall is configured properly to support adb.
  2. If you are connecting to a Wear OS device, turn off Bluetooth on the phone that"s paired with the device.
  3. Connect the device to the host computer with a USB cable.
  4. Set the target device to listen for a TCP/IP connection on port 5555. adb tcpip 5555
  5. Disconnect the USB cable from the target device.
  6. Find the IP address of the Android device. For example, on a Nexus device, you can find the IP address at Settings > About tablet (or About phone ) > Status > IP address . Or, on a Wear OS device, you can find the IP address at Settings > Wi-Fi Settings > Advanced > IP address .
  7. Connect to the device by its IP address. adb connect device_ip_address
  8. Confirm that your host computer is connected to the target device: $ adb devices List of devices attached device_ip_address:5555 device

You"re now good to go!

If the adb connection is ever lost:

  1. Make sure that your host is still connected to the same Wi-Fi network your Android device is.
  2. Reconnect by executing the adb connect step again.
  3. Or if that doesn"t work, reset your adb host: adb kill-server

    Then start over from the beginning.

Query for devices

Before issuing adb commands, it is helpful to know what device instances are connected to the adb server. You can generate a list of attached devices using the devices command.

Adb devices -l

In response, adb prints this status information for each device:

  • Serial number: A string created by adb to uniquely identify the device by its port number. Here"s an example serial number: emulator-5554
  • State: The connection state of the device can be one of the following:
    • offline: The device is not connected to adb or is not responding.
    • device: The device is now connected to the adb server. Note that this state does not imply that the Android system is fully booted and operational because the device connects to adb while the system is still booting. However, after boot-up, this is the normal operational state of an device.
    • no device: There is no device connected.
  • Description: If you include the -l option, the devices command tells you what the device is. This information is helpful when you have multiple devices connected so that you can tell them apart.

The following example shows the devices command and its output. There are three devices running. The first two lines in the list are emulators, and the third line is a hardware device that is attached to the computer.

$ adb devices List of devices attached emulator-5556 device product:sdk_google_phone_x86_64 model:Android_SDK_built_for_x86_64 device:generic_x86_64 emulator-5554 device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 0a388e93 device usb:1-1 product:razor model:Nexus_7 device:flo

Emulator not listed

The adb devices command has a corner-case command sequence that causes running emulator(s) to not show up in the adb devices output even though the emulator(s) are visible on your desktop. This happens when all of the following conditions are true:

  1. The adb server is not running, and
  2. You use the emulator command with the -port or -ports option with an odd-numbered port value between 5554 and 5584, and
  3. The odd-numbered port you chose is not busy so the port connection can be made at the specified port number, or if it is busy, the emulator switches to another port that meets the requirements in 2, and
  4. You start the adb server after you start the emulator.

One way to avoid this situation is to let the emulator choose its own ports, and don"t run more than 16 emulators at once. Another way is to always start the adb server before you use the emulator command, as explained in the following examples.

Example 1: In the following command sequence, the adb devices command starts the adb server, but the list of devices does not appear.

Stop the adb server and enter the following commands in the order shown. For the avd name, provide a valid avd name from your system. To get a list of avd names, type emulator -list-avds . The emulator command is in the android_sdk /tools directory.

$ adb kill-server $ emulator -avd Nexus_6_API_25 -port 5555 $ adb devices List of devices attached * daemon not running. starting it now on port 5037 * * daemon started successfully *

Example 2: In the following command sequence, adb devices displays the list of devices because the adb server was started first.

To see the emulator in the adb devices output, stop the adb server, and then start it again after using the emulator command and before using the adb devices command, as follows:

$ adb kill-server $ emulator -avd Nexus_6_API_25 -port 5557 $ adb start-server $ adb devices List of devices attached emulator-5557 device

For more information about emulator command-line options, see Using Command Line Parameters .

Send commands to a specific device

If multiple devices are running, you must specify the target device when you issue the adb command. To specify the target, use the devices command to get the serial number of the target. Once you have the serial number, use the -s option with the adb commands to specify the serial number. If you"re going to issue a lot of adb commands, you can set the $ANDROID_SERIAL environment variable to contain the serial number instead. If you use both -s and $ANDROID_SERIAL , -s overrides $ANDROID_SERIAL .

In the following example, the list of attached devices is obtained, and then the serial number of one of the devices is used to install the helloWorld.apk on that device.

$ adb devices List of devices attached emulator-5554 device emulator-5555 device $ adb -s emulator-5555 install helloWorld.apk

Note: If you issue a command without specifying a target device when multiple devices are available, adb generates an error.

If you have multiple devices available, but only one is an emulator, use the -e option to send commands to the emulator. Likewise, if there are multiple devices but only one hardware device attached, use the -d option to send commands to the hardware device.

Install an app

You can use adb to install an APK on an emulator or connected device with the install command:

Adb install path_to_apk

You must use the -t option with the install command when you install a test APK. For more information, see .

For more information about how to create an APK file that you can install on an emulator/device instance, see Build and Run Your App .

Note that, if you are using Android Studio, you do not need to use adb directly to install your app on the emulator/device. Instead, Android Studio handles the packaging and installation of the app for you.

Set up port forwarding

You can use the forward command to set up arbitrary port forwarding, which forwards requests on a specific host port to a different port on a device. The following example sets up forwarding of host port 6100 to device port 7100:

Adb forward tcp:6100 tcp:7100

The following example sets up forwarding of host port 6100 to local:logd:

Adb forward tcp:6100 local:logd

Copy files to/from a device

Use the pull and push commands to copy files to and from an device. Unlike the install command, which only copies an APK file to a specific location, the pull and push commands let you copy arbitrary directories and files to any location in a device.

from the device, do the following:

Adb pull remote local

To copy a file or directory and its sub-directories to the device, do the following:

Adb push local remote

Replace local and remote with the paths to the target files/directory on your development machine (local) and on the device (remote). For example:

Adb push foo.txt /sdcard/foo.txt

Stop the adb server

In some cases, you might need to terminate the adb server process and then restart it to resolve the problem (e.g., if adb does not respond to a command).

To stop the adb server, use the adb kill-server command. You can then restart the server by issuing any other adb command.

Issuing adb commands

You can issue adb commands from a command line on your development machine or from a script. The usage is:

Adb [-d | -e | -s serial_number ] command

If there"s only one emulator running or only one device connected, the adb command is sent to that device by default. If multiple emulators are running and/or multiple devices are attached, you need to use the -d , -e , or -s option to specify the target device to which the command should be directed.

You can see a detailed list of all supported adb commands using the following command:

Adb --help

Issue shell commands

You can use the shell command to issue device commands through adb, or to start an interactive shell. To issue a single command use the shell command like this:

Adb [-d |-e | -s serial_number ] shell shell_command

To start an interactive shell on a device use the shell command like this:

Adb [-d | -e | -s serial_number ] shell

To exit an interactive shell, press Control + D or type exit .

Note: With Android Platform-Tools 23 and higher, adb handles arguments the same way that the ssh(1) command does. This change has fixed a lot of problems with command injection and makes it possible to now safely execute commands that contain shell metacharacters , such as adb install Let\"sGo.apk . But, this change means that the interpretation of any command that contains shell metacharacters has also changed. For example, the adb shell setprop foo "a b" command is now an error because the single quotes (") are swallowed by the local shell, and the device sees adb shell setprop foo a b . To make the command work, quote twice, once for the local shell and once for the remote shell, the same as you do with ssh(1) . For example, adb shell setprop foo ""a b"" .

Android provides most of the usual Unix command-line tools. For a list of available tools, use the following command:

Adb shell ls /system/bin

Help is available for most of the commands via the --help argument. Many of the shell commands are provided by toybox . General help applicable to all toybox commands is available via toybox --help .

  • -D: Enable debugging.
  • -W: Wait for launch to complete.
  • --start-profiler file: Start profiler and send results to file .
  • -P file: Like --start-profiler , but profiling stops when the app goes idle.
  • -R count: Repeat the activity launch count times. Prior to each repeat, the top activity will be finished.
  • -S: Force stop the target app before starting the activity.
  • --opengl-trace: Enable tracing of OpenGL functions.
startservice [ options ] intent Start the Service specified by intent .
  • --user user_id | current: Specify which user to run as; if not specified, then run as the current user.
force-stop package Force stop everything associated with package (the app"s package name). kill [ options ] package Kill all processes associated with package (the app"s package name). This command kills only processes that are safe to kill and that will not impact the user experience.
  • --user user_id | all | current: Specify user whose processes to kill; all users if not specified.
kill-all Kill all background processes. broadcast [ options ] intent Issue a broadcast intent.
  • [--user user_id | all | current] : Specify which user to send to; if not specified then send to all users.
instrument [ options ] component Start monitoring with an Instrumentation instance. Typically the target component is the form test_package / runner_class .
  • -r: Print raw results (otherwise decode report_key_streamresult). Use with [-e perf true] to generate raw output for performance measurements.
  • -e name value: Set argument name to value . For test runners a common form is -e testrunner_flag value [, value ...] .
  • -p file: Write profiling data to file .
  • -w: Wait for instrumentation to finish before returning. Required for test runners.
  • --no-window-animation: Turn off window animations while running.
  • --user user_id | current: Specify which user instrumentation runs in; current user if not specified.
profile start process file Start profiler on process , write results to file . profile stop process Stop profiler on process . dumpheap [ options ] process file Dump the heap of process , write to file .
  • --user [ user_id | current] : When supplying a process name, specify user of process to dump; uses current user if not specified.
  • -n: Dump native heap instead of managed heap.
set-debug-app [ options ] package Set app package to debug.
  • -w: Wait for debugger when app starts.
  • --persistent: Retain this value.
clear-debug-app Clear the package previous set for debugging with set-debug-app . monitor [ options ] Start monitoring for crashes or ANRs.
  • --gdb: Start gdbserv on the given port at crash/ANR.
screen-compat {on | off} package Control screen compatibility mode of package . display-size Override device display size. This command is helpful for testing your app across different screen sizes by mimicking a small screen resolution using a device with a large screen, and vice versa.

Example:
am display-size 1280x800

display-density dpi Override device display density. This command is helpful for testing your app across different screen densities on high-density screen environment using a low density screen, and vice versa.

Example:
am display-density 480

to-uri intent Print the given intent specification as a URI. to-intent-uri intent Print the given intent specification as an intent: URI.

Specification for intent arguments

For activity manager commands that take an intent argument, you can specify the intent with the following options:

A action Specify the intent action, such as android.intent.action.VIEW . You can declare this only once. -d data_uri Specify the intent data URI, such as content://contacts/people/1 . You can declare this only once. -t mime_type Specify the intent MIME type, such as image/png . You can declare this only once. -c category Specify an intent category, such as android.intent.category.APP_CONTACTS . -n component Specify the component name with package name prefix to create an explicit intent, such as com.example.app/.ExampleActivity . -f flags Add flags to the intent, as supported by setFlags() . --esn extra_key Add a null extra. This option is not supported for URI intents. -e | --es extra_key extra_string_value Add string data as a key-value pair. --ez extra_key extra_boolean_value Add boolean data as a key-value pair. --ei extra_key extra_int_value Add integer data as a key-value pair. --el extra_key extra_long_value Add long data as a key-value pair. --ef extra_key extra_float_value Add float data as a key-value pair. --eu extra_key extra_uri_value Add URI data as a key-value pair. --ecn extra_key extra_component_name_value Add a component name, which is converted and passed as a ComponentName object. --eia extra_key extra_int_value [, extra_int_value ...] Add an array of integers. --ela extra_key extra_long_value [, extra_long_value ...] Add an array of longs. --efa extra_key extra_float_value [, extra_float_value ...] Add an array of floats. --grant-read-uri-permission Include the flag FLAG_GRANT_READ_URI_PERMISSION . --grant-write-uri-permission Include the flag FLAG_GRANT_WRITE_URI_PERMISSION . --debug-log-resolution Include the flag FLAG_DEBUG_LOG_RESOLUTION . --exclude-stopped-packages Include the flag FLAG_EXCLUDE_STOPPED_PACKAGES . --include-stopped-packages Include the flag FLAG_INCLUDE_STOPPED_PACKAGES . --activity-brought-to-front Include the flag FLAG_ACTIVITY_BROUGHT_TO_FRONT . --activity-clear-top Include the flag FLAG_ACTIVITY_CLEAR_TOP . --activity-clear-when-task-reset Include the flag FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET . --activity-exclude-from-recents Include the flag FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS . --activity-launched-from-history Include the flag FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY . --activity-multiple-task Include the flag FLAG_ACTIVITY_MULTIPLE_TASK . --activity-no-animation Include the flag FLAG_ACTIVITY_NO_ANIMATION . --activity-no-history Include the flag FLAG_ACTIVITY_NO_HISTORY . --activity-no-user-action Include the flag FLAG_ACTIVITY_NO_USER_ACTION . --activity-previous-is-top Include the flag FLAG_ACTIVITY_PREVIOUS_IS_TOP . --activity-reorder-to-front Include the flag FLAG_ACTIVITY_REORDER_TO_FRONT . --activity-reset-task-if-needed Include the flag FLAG_ACTIVITY_RESET_TASK_IF_NEEDED . --activity-single-top Include the flag FLAG_ACTIVITY_SINGLE_TOP . --activity-clear-task Include the flag FLAG_ACTIVITY_CLEAR_TASK . --activity-task-on-home Include the flag FLAG_ACTIVITY_TASK_ON_HOME . --receiver-registered-only Include the flag FLAG_RECEIVER_REGISTERED_ONLY . --receiver-replace-pending Include the flag FLAG_RECEIVER_REPLACE_PENDING . --selector Requires the use of -d and -t options to set the intent data and type. URI component package You can directly specify a URI, package name, and component name when not qualified by one of the above options. When an argument is unqualified, the tool assumes the argument is a URI if it contains a ":" (colon); it assumes the argument is a component name if it contains a "/" (forward-slash); otherwise it assumes the argument is a package name.

Call package manager (pm)

Within an adb shell, you can issue commands with the package manager (pm) tool to perform actions and queries on app packages installed on the device. While in a shell, the syntax is:

Pm command

You can also issue a package manager command directly from adb without entering a remote shell. For example:

Adb shell pm uninstall com.example.MyApp

Table 3. Available package manager commands.

Command Description
list packages [ options ] filter Prints all packages, optionally only those whose package name contains the text in filter .
  • -f: See their associated file.
  • -d: Filter to only show disabled packages.
  • -e: Filter to only show enabled packages.
  • -s: Filter to only show system packages.
  • -3: Filter to only show third party packages.
  • -i: See the installer for the packages.
  • -u: Also include uninstalled packages.
  • --user user_id: The user space to query.
list permission-groups Prints all known permission groups.
list permissions [ options ] group Prints all known permissions, optionally only those in group .
  • -g: Organize by group.
  • -f: Print all information.
  • -s: Short summary.
  • -d: Only list dangerous permissions.
  • -u: List only the permissions users will see.
list instrumentation [ options ] List all test packages.
  • -f: List the APK file for the test package.
  • target_package: List test packages for only this app.
list features Prints all features of the system.
list libraries Prints all the libraries supported by the current device.
list users Prints all users on the system.
path package Print the path to the APK of the given package .
install [ options ] path Installs a package (specified by path) to the system.
  • -r: Reinstall an existing app, keeping its data.
  • -t: Allow test APKs to be installed. Gradle generates a test APK when you have only run or debugged your app or have used the Android Studio Build > Build APK command. If the APK is built using a developer preview SDK (if the targetSdkVersion is a letter instead of a number), you must include the -t option with the install command if you are installing a test APK.
  • -i installer_package_name: Specify the installer package name.
  • --install-location location: Sets the install location using one of the following values:
    • 0: Use the default install location
    • 1: Install on internal device storage
    • 2: Install on external media
  • -f: Install package on the internal system memory.
  • -d: Allow version code downgrade.
  • -g: Grant all permissions listed in the app manifest.
  • --fastdeploy: Quickly update an installed package by only updating the parts of the APK that changed.
uninstall [ options ] package Removes a package from the system.
  • -k: Keep the data and cache directories around after package removal.
clear package Deletes all data associated with a package.
enable package_or_component Enable the given package or component (written as "package/class").
disable package_or_component Disable the given package or component (written as "package/class").
disable-user [ options ] package_or_component
  • --user user_id: The user to disable.
grant package_name permission Grant a permission to an app. On devices running Android 6.0 (API level 23) and higher, the permission can be any permission declared in the app manifest. On devices running Android 5.1 (API level 22) and lower, must be an optional permission defined by the app.
revoke package_name permission Revoke a permission from an app. On devices running Android 6.0 (API level 23) and higher, the permission can be any permission declared in the app manifest. On devices running Android 5.1 (API level 22) and lower, must be an optional permission defined by the app.
set-install-location location Changes the default install location. Location values:
  • 0: Auto: Let system decide the best location.
  • 1: Internal: install on internal device storage.
  • 2: External: on external media.

Note: This is only intended for debugging; using this can cause apps to break and other undesireable behavior.

get-install-location Returns the current install location. Return values:
  • 0 : Lets system decide the best location
  • 1 : Installs on internal device storage
  • 2 : Installs on external media
set-permission-enforced permission Specifies whether the given permission should be enforced.
trim-caches desired_free_space Trim cache files to reach the given free space.
create-user user_name Create a new user with the given user_name , printing the new user identifier of the user.
remove-user user_id Remove the user with the given user_id , deleting all data associated with that user
get-max-users Prints the maximum number of users supported by the device.

Call device policy manager (dpm)

To help you develop and test your device management (or other enterprise) apps, you can issue commands to the device policy manager (dpm) tool. Use the tool to control the active admin app or change a policy"s status data on the device. While in a shell, the syntax is:

Dpm command

You can also issue a device policy manager command directly from adb without entering a remote shell:

Adb shell dpm command

Table 4. Available device policy manager commands

Command Description
set-active-admin [ options ] component Sets component as active admin.
set-profile-owner [ options ] component Sets component as active admin and its package as profile owner for an existing user.
  • --user user_id: Specify the target user. You can also pass --user current to select the current user.
set-device-owner [ options ] component Sets component as active admin and its package as device owner.
  • --user user_id: Specify the target user. You can also pass --user current to select the current user.
  • --name name: Specify the human-readable organization name.
remove-active-admin [ options ] component Disables an active admin. The app must declare android:testOnly in the manifest. This command also removes device and profile owners.
  • --user user_id: Specify the target user. You can also pass --user current to select the current user.
clear-freeze-period-record Clears the device"s record of previously-set freeze periods for system OTA updates. This is useful to avoid the device"s scheduling restrictions when developing apps that manage freeze-periods. See Manage system updates .

Supported on devices running Android 9.0 (API level 28) and higher.

force-network-logs Forces the system to make any existing network logs ready for retrieval by a DPC. If there are connection or DNS logs available, the DPC receives the onNetworkLogsAvailable() callback. See Network activity logging .
force-security-logs Forces the system to make any existing security logs available to the DPC. If there are logs available, the DPC receives the onSecurityLogsAvailable() callback. See Log enterprise device activity .

This command is rate-limited. Supported on devices running Android 9.0 (API level 28) and higher.

Take a screenshot

The screencap command is a shell utility for taking a screenshot of a device display. While in a shell, the syntax is:

Screencap filename

To use the screencap from the command line, type the following:

Adb shell screencap /sdcard/screen.png

Here"s an example screenshot session, using the adb shell to capture the screenshot and the pull command to download the file from the device:

$ adb shell shell@ $ screencap /sdcard/screen.png shell@ $ exit $ adb pull /sdcard/screen.png

Record a video

The screenrecord command is a shell utility for recording the display of devices running Android 4.4 (API level 19) and higher. The utility records screen activity to an MPEG-4 file. You can use this file to create promotional or training videos or for debugging and testing.

In a shell, use the following syntax:

Screenrecord [ options ] filename

To use screenrecord from the command line, type the following:

Adb shell screenrecord /sdcard/demo.mp4

Stop the screen recording by pressing Control + C (Command + C on Mac); otherwise, the recording stops automatically at three minutes or the time limit set by --time-limit .

To begin recording your device screen, run the screenrecord command to record the video. Then, run the pull command to download the video from the device to the host computer. Here"s an example recording session:

$ adb shell shell@ $ screenrecord --verbose /sdcard/demo.mp4 (press Control + C to stop) shell@ $ exit $ adb pull /sdcard/demo.mp4

The screenrecord utility can record at any supported resolution and bit rate you request, while retaining the aspect ratio of the device display. The utility records at the native display resolution and orientation by default, with a maximum length of three minutes.

Limitations of the screenrecord utility:

  • Audio is not recorded with the video file.
  • Video recording is not available for devices running Wear OS.
  • Some devices might not be able to record at their native display resolution. If you encounter problems with screen recording, try using a lower screen resolution.
  • Rotation of the screen during recording is not supported. If the screen does rotate during recording, some of the screen is cut off in the recording.

Table 5. screenrecord options

Options Description
--help Displays command syntax and options
--size width x height Sets the video size: 1280x720 . The default value is the device"s native display resolution (if supported), 1280x720 if not. For best results, use a size supported by your device"s Advanced Video Coding (AVC) encoder.
--bit-rate rate Sets the video bit rate for the video, in megabits per second. The default value is 4Mbps. You can increase the bit rate to improve video quality, but doing so results in larger movie files. The following example sets the recording bit rate to 6Mbps: screenrecord --bit-rate 6000000 /sdcard/demo.mp4
--time-limit time Sets the maximum recording time, in seconds. The default and maximum value is 180 (3 minutes).
--rotate Rotates the output 90 degrees. This feature is experimental.
--verbose Displays log information on the command-line screen. If you do not set this option, the utility does not display any information while running.

Read ART profiles for apps

Starting in Android 7.0 (API level 24) the Android Runtime (ART) collects execution profiles for installed apps, which are used to optimize app performance. You might want to examine the collected profiles to understand which methods are determined to be frequently executed and which classes are used during app startup.

To produce a text form of the profile information, use the command:

Adb shell cmd package dump-profiles package

To retrieve the file produced, use:

Adb pull /data/misc/profman/ package .txt

Reset test devices

If you test your app across multiple test devices, it may be useful to reset your device between tests, for example, to remove user data and reset the test environment. You can perform a factory reset of a test device running Android 10 (API level 29) or higher using the testharness adb shell command, as shown below.

Adb shell cmd testharness enable

When restoring the device using testharness , the device automatically backs up the RSA key that allows debugging through the current workstation in a persistent location. That is, after the device is reset, the workstation can continue to debug and issue adb commands to the device without manually registering a new key.

Additionally, to help make it easier and more secure to keep testing your app, using the testharness to restore a device also changes the following device settings:

  • The device sets up certain system settings so that initial device setup wizards do not appear. That is, the device enters a state from which you can quickly install, debug, and test your app.
  • Settings:
    • Disables lock screen
    • Disables emergency alerts
    • Disables auto-sync for accounts
    • Disables automatic system updates
  • Other:
    • Disables preinstalled security apps

If you app needs to detect and adapt to the default settings of the testharness command, you can use the ActivityManager.isRunningInUserTestHarness() .

sqlite

sqlite3 starts the sqlite command-line program for examining sqlite databases. It includes commands such as .dump to print the contents of a table, and .schema to print the SQL CREATE statement for an existing table. You can also execute SQLite commands from the command line, as shown below.

ADB (Android Debug Bridge Utility) это командная строка включенная в Android SDK. ADB позволяет управлять Вашим устройством через USB, копировать файлы, устанавливать и удалять приложения и многое другое. ADB позволяет использовать некоторые хитрости Android.

Шаг 1: установка Android SDK

Перейдите на страницу загрузки Android SDK и прокрутите страницу вниз до “SDK Tools Only”. Загрузите ZIP файл для вашей ОС и распакуйте архив.

Запустите exe файл SDK Manager и снимите галочки со всех пунктов, кроме “Android SDK Platform-tools”. Если вы используете смартфон Nexus, то вы также можете установить галочку на пункте “Google USB Driver”, чтобы загрузить драйвера. Нажмите на кнопку установки. Произойдет загрузка и установка компонентов, в том числе ADB и другие утилиты.

Когда установка будет завершено можете закрыть SDK manager.

Внимание! В данный момент установка происходит следующим образом:
Перейдите на страницу загрузки Android Studio , пролистайте вниз до раздела «Get just the command line tools» и скачайте архив для соответствующей версии ОС (в нашем случае это Windows).

Разархивируйте скачанный архив, например, в корень диска C.

Взаимодействие с SDK Manager осуществляется через командную строку. Вы можете узнать все команды, но мы остановимся на главных. Чтобы запустить SDK Manager зайдите в папку, куда Вы распаковали содержимое архива > tools > bin и удерживая клавишу Shift нажмите правую кнопку мыши на свободном участке и выберите «Открыть окно команд», если Вы используете версию, отличную от Windows 10. Или запустите командную строку и укажите рабочую директорию. В моем случае это:

Cd C:\sdk-tools-windows-3859397\tools\bin

Введите команду sdkmanager и нажмите Enter, чтобы увидеть все доступные параметры. Но нас интересует следующая команда:

Sdkmanager "platform-tools" "platforms;android-26"

Это команда установит platform tools (включая adb и fastboot) и инструменты SDK для API 26, что соответствует Android версии 8.x. Полный список версий Android и соответствующих ему API описан ниже:

  • Android 1.0 — API 1
  • Android 1.1 — API 2
  • Android 1.5 — API 3
  • Android 1.6 — API 4
  • Android 2.0 / 2.1 — API 5, 6, 7
  • Android 2.2 — API 8
  • Android 2.3 — API 9, 10
  • Android 3.0 / 3.1 / 3.2 — API 11, 12, 13
  • Android 4.0 — API 14, 15
  • Android 4.1 / 4.2 / 4.3 — API 16, 17, 18
  • Android 4.4 — API 19,20
  • Android 5.0 / 5.1 — API 21, 22
  • Android 6.0 — API 23
  • Android 7.0 / 7.1 — API 24, 25
  • Android 8.0 / 8.1 — API 26

Т.к. у меня устройство с Android 7.0, то моя команда будет выглядеть так:

Sdkmanager "platform-tools" "platforms;android-24"

Также Вы можете проделать этот шаг через графический интерфейс Android Studio. Для этого перейдите на страницу загрузки , скачайте, установите и запустите Android Studio.

Нажмите «Configure» и «SDK Manager».

Проверьте, чтобы стояла галочка напротив пункта «Android SDK Platform-tools» и «Google USB Drive», если Вы используете устройство Nexus. Нажмите «OK», чтобы закрыть SDK Manager, также закройте Android Studio.

Шаг 2: Включение USB Debugging

Зайдите в настройки телефона и выберите «О телефоне». Пролистайте вниз до пункта «Номер сборки» и 7 раз нажмите на этот пункт. Должно появится сообщение, что Вы вошли в режиме разработчика.

Вернитесь на главную страницу настроек, у Вас должен появится новый пункт “Для разработчиков”. Включите “Отладка по USB”. Введите пароль или PIN-код, если необходимо.

Как только это сделаете, соедините свой телефон с компьютером. У вас появится окно на телефоне с вопросом «Включить отладку по USB?». Поставьте галочку в поле «Всегда разрешать для этого компьютера» и нажмите OK.

Шаг3: Тестирование ADB и установка драйверов для Вашего смартфона

Откройте папку, где установлен SDK и там откройте папку platform-tools. Здесь хранится ADB программа. Удерживайте клавишу Shift и щелкните правой кнопкой мыши внутри папки. Выберите пункт «Открыть окно команд».

Чтобы проверить, правильно ли работает ADB, подключите устройство Android к компьютеру с помощью кабеля USB и выполните следующую команду:

Adb devices

Вы должны увидеть устройство в списке. Если устройство подключено к компьютеру, но оно не отображается в списке, то необходимо установить ADB driver для Вашего устройства. На сайте производителя Вашего устройства должны быть соответствующие файлы. Например для устройств Motorola их можно скачать , для Samsung , для HTC драйвера входят в программу HTC Sync Manager . Вы также можете найти необходимые файлы на сайте XDA Developers без дополнительных программ.

Вы также можете установить Google USB Driver из папки Extras в окне SDK Manager, как мы упоминали в первом шаге.

Если вы используете Google USB driver, то придется заставить Windows использовать установленные драйверы для вашего устройства. Откройте Диспетчер устройств (правой кнопкой мыши на ярлыке Мой компьютер и выбрать Свойства — Диспетчер устройств), найдите в списке свое устройство. Нажмите правой кнопкой на нем и выберите Свойства. Перейдите на вкладку Драйвер и нажмите кнопку Обновить. Выберите «Выполнить поиск драйверов на этом компьютере».

Найдите Google USB Driver в папке Extras с установленным SDK, и выберите папку google\usb_driver и нажмите Далее. Как только драйвера установятся, пробуйте еще раз выполнить команду adb devices . Если все сделано правильно и драйверы подходят, то Вы увидите свое устройство в списке. Поздравляем, Вы смогли установить ADB driver.

Полезные ADB команды

ADB предлагает некоторые полезные команды:

Adb install C:\package.apk

— Установить приложение на телефон, находящееся по пути C:\package.apk на компьютере;

Adb uninstall package.name

— Удалить приложение с именем package.name с устройства. Например, команда com.rovio.angrybirds удалит игру Angry Birds;

Adb push C:\file /sdcard/file

— Помещает файл с компьютера на устройство. Данная команда отправит файл C:\file на компьютере на устройство по пути /sdcard/file<.

Adb pull /sdcard/file C:\file

— Работает как предыдущая команда, но в обратном направлении.

Android SDK Platform-Tools is a component for the Android SDK. It includes tools that interface with the Android platform, such as adb , and systrace . These tools are required for Android app development. They"re also needed if you want to unlock your device bootloader and flash it with a new system image.

Although some new features in these tools are available only for recent versions of Android, the tools are backward compatible, so you need only one version of the SDK Platform-Tools.

Downloads

If you"re an Android developer, you should get the latest SDK Platform-Tools from Android Studio"s SDK Manager or from the sdkmanager command-line tool. This ensures the tools are saved to the right place with the rest of your Android SDK tools and easily updated.

But if you want just these command-line tools, use the following links:

  • Download SDK Platform-Tools for Windows
  • Download SDK Platform-Tools for Mac
  • Download SDK Platform-Tools for Linux

Although these links do not change, they always point to the most recent version of the tools.

Revisions

29.0.5 (October 2019)

  • adb
    • Slight performance improvement on Linux when using many simultaneous connections.
    • Add --fastdeploy option to adb install , for incremental updates to APKs while developing.

29.0.4 (September 2019)

  • adb
    • Hotfix for native debugging timeout with LLDB (see issue #134613180). This also fixes a related bug in the Android Studio Profilers that causes an AdbCommandRejectedException , which you can see in the idea.log file.

29.0.3 (September 2019)

  • adb
    • adb forward --list works with multiple devices connected.
    • Fix devices going offline on Windows.
    • Improve adb install output and help text.
    • Restore previous behavior of adb connect without specifying port.

29.0.2 (July 2019)

  • adb
    • Fixes a Windows heap integrity crash.
  • fastboot
    • Adds support for partition layout of upcoming devices.

29.0.1 (June 2019)

  • adb
    • Hotfix for Windows crashes (https://issuetracker.google.com/134613180)

29.0.0 (June 2019)

  • adb
    • adb reconnect performs a USB reset on Linux.
    • On Linux, when connecting to a newer adb server, instead of killing the server and starting an older one, adb attempts to launch the newer version transparently.
    • adb root waits for the device to reconnect after disconnecting. Previously, adb root; adb wait-for-device could mistakenly return immediately if adb wait-for-device started before adb noticed that the device had disconnected.
  • fastboot
    • Disables an error message that occurred when fastboot attempted to open the touch bar or keyboard on macOS.

28.0.2 (March 2019)

  • adb
    • Fixes flakiness of adb shell port forwarding that leads to "Connection reset by peer" error message.
    • Fixes authentication via ADB_VENDOR_KEYS when reconnecting devices.
    • Fixes authentication-when the private key used for authentication does not match the public key-by calculating the public key from the private key, instead of assuming that they match.
  • fastboot
    • Adds support for dynamic partitions.
  • Updated Windows requirements
    • The platform tools now depend on the Windows Universal C Runtime, which is usually installed by default via Windows Update. If you see errors mentioning missing DLLs, you may need to manually fetch and install the runtime package .

28.0.1 (September 2018)

  • adb
    • Add support for reconnection of TCP connections. Upon disconnection, adb will attempt to reconnect for up to 60 seconds before abandoning a connection.
    • Fix Unicode console output on Windows. (Thanks to external contributor Spencer Low!)
    • Fix a file descriptor double-close that can occur, resulting in connections being closed when an adb connect happens simultaneously.
    • Fix adb forward --list when used with more than one device connected.
  • fastboot
    • Increase command timeout to 30 seconds, to better support some slow bootloader commands.

28.0.0 (June 2018)

  • adb :
    • Add support for checksum-less operation with devices running Android P, which improves throughput by up to 40%.
    • Sort output of adb devices by connection type and device serial.
    • Increase the socket listen backlog to allow for more simulataneous adb commands.
    • Improve error output for adb connect .
  • fastboot :
    • Improve output format, add a verbose output mode (-v).
    • Clean up help output.
    • Add product.img and odm.img to the list of partitions flashed by fastboot flashall .
    • Avoid bricking new devices when using a too-old version of fastboot by allowing factory image packages to require support for specific partitions.

27.0.1 (December 2017)

  • adb: fixes an assertion failure on MacOS that occurred when connecting devices using USB 3.0.
  • Fastboot: On Windows, adds support for wiping devices that use F2FS (Flash-Friendly File System).

27.0.0 (December 2017)

  • Re-fixes the macOS 10.13 fastboot bug first fixed in 26.0.1, but re-introduced in 26.0.2.

26.0.2 (October 2017)

  • Add fastboot support for Pixel 2 devices.

26.0.1 (September 2017)

  • Fixed fastboot problems on macOS 10.13 High Sierra (bug 64292422).

26.0.0 (June 2017)

  • Updated with the release of Android O final SDK (API level 26).

25.0.5 (April 24, 2017)

    Fixed adb sideload of large updates on Windows, manifesting as "std::bad_alloc" (bug 37139736).

    Fixed adb problems with some Windows firewalls, manifesting as "cannot open transport registration socketpair" (bug 37139725).

    Both adb --version and fastboot --version now include the install path.

    Changed adb to not resolve localhost to work around misconfigured VPN.

    Changed adb to no longer reset USB devices on Linux, which could affect other attached USB devices.

25.0.4 (March 16, 2017)

  • Added experimental libusb support to Linux and Mac adb

To use the libusb backend, set the environment variable ADB_LIBUSB=true before launching a new adb server. The new adb host-features command will tell you whether or not you"re using libusb.

To restart adb with libusb and check that it worked, use adb kill-server; ADB_LIBUSB=1 adb start-server; adb host-features . The output should include "libusb".

In this release, the old non-libusb implementation remains the default.

    Fixed Systrace command line capture on Mac

25.0.3 (December 16, 2016)

  • Fixed fastboot bug causing Android Things devices to fail to flash

25.0.2 (December 12, 2016)

  • Updated with the Android N MR1 Stable release (API 25)

25.0.1 (November 22, 2016)

  • Updated with the release of Android N MR1 Developer Preview 2 release (API 25)

25.0.0 (October 19, 2016)

  • Updated with the release of Android N MR1 Developer Preview 1 release (API 25)

24.0.4 (October 14, 2016)

  • Updated to address issues in ADB and Mac OS Sierra

Terms and Conditions

1. Introduction

3. SDK License from Google

4. Use of the SDK by You

5. Your Developer Credentials

6. Privacy and Information

7. Third Party Applications

8. Using Android APIs

https://privacy.google.com/businesses/gdprprocessorterms/

10. DISCLAIMER OF WARRANTIES

11. LIMITATION OF LIABILITY

12. Indemnification

14. General Legal Terms

January 16, 2019

Download Android SDK Platform-Tools

Before downloading, you must agree to the following terms and conditions.

Terms and Conditions

This is the Android Software Development Kit License Agreement

1. Introduction

1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK. 1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time. 1.3 A "compatible implementation" means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS). 1.4 "Google" means Google LLC, a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.

2. Accepting this License Agreement

2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement. 2.2 By clicking to accept, you hereby agree to the terms of the License Agreement. 2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK. 2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.

3. SDK License from Google

3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android. 3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose. 3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. 3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK. 3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. 3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google"s sole discretion, without prior notice to you. 3.7 Nothing in the License Agreement gives you a right to use any of Google"s trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. 3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.

4. Use of the SDK by You

4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications. 4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). 4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user"s Google Account when, and for the limited purposes for which, the user has given you permission to do so. 4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier. 4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. 4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.

5. Your Developer Credentials

5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.

6. Privacy and Information

6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected. 6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google"s Privacy Policy.

7. Third Party Applications

7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources. 7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners. 7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties.

8. Using Android APIs

8.1 Google Data APIs 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service. 8.1.2 If you use any API to retrieve a user"s data from Google, you acknowledge and agree that you shall retrieve data only with the user"s explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. If you use the Android Recognition Service API, documented at the following URL: , as updated from time to time, you acknowledge that the use of the API is subject to the Data Processing Addendum for Products where Google is a Data Processor, which is located at the following URL: https://privacy.google.com/businesses/gdprprocessorterms/ , as updated from time to time. By clicking to accept, you hereby agree to the terms of the Data Processing Addendum for Products where Google is a Data Processor.

9. Terminating this License Agreement

9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below. 9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials. 9.3 Google may at any time, terminate the License Agreement with you if: (A) you have breached any provision of the License Agreement; or (B) Google is required to do so by law; or (C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or (D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google"s sole discretion, no longer commercially viable. 9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.

10. DISCLAIMER OF WARRANTIES

10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. 10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.

11. LIMITATION OF LIABILITY

11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.

12. Indemnification

12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.

13. Changes to the License Agreement

13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.

14. General Legal Terms

14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK. 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google"s rights and that those rights or remedies will still be available to Google. 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable. 14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement. 14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. 14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party. 14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. January 16, 2019

Download Android SDK Platform-Tools

Before downloading, you must agree to the following terms and conditions.

Terms and Conditions

This is the Android Software Development Kit License Agreement

1. Introduction

1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK. 1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time. 1.3 A "compatible implementation" means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS). 1.4 "Google" means Google LLC, a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.

2. Accepting this License Agreement

2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement. 2.2 By clicking to accept, you hereby agree to the terms of the License Agreement. 2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK. 2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.

3. SDK License from Google

3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android. 3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose. 3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. 3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK. 3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. 3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google"s sole discretion, without prior notice to you. 3.7 Nothing in the License Agreement gives you a right to use any of Google"s trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. 3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.

4. Use of the SDK by You

4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications. 4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). 4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user"s Google Account when, and for the limited purposes for which, the user has given you permission to do so. 4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier. 4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. 4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.

5. Your Developer Credentials

5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.

6. Privacy and Information

6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected. 6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google"s Privacy Policy.

7. Third Party Applications

7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources. 7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners. 7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties.

8. Using Android APIs

8.1 Google Data APIs 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service. 8.1.2 If you use any API to retrieve a user"s data from Google, you acknowledge and agree that you shall retrieve data only with the user"s explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. If you use the Android Recognition Service API, documented at the following URL: , as updated from time to time, you acknowledge that the use of the API is subject to the Data Processing Addendum for Products where Google is a Data Processor, which is located at the following URL: https://privacy.google.com/businesses/gdprprocessorterms/ , as updated from time to time. By clicking to accept, you hereby agree to the terms of the Data Processing Addendum for Products where Google is a Data Processor.

9. Terminating this License Agreement

9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below. 9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials. 9.3 Google may at any time, terminate the License Agreement with you if: (A) you have breached any provision of the License Agreement; or (B) Google is required to do so by law; or (C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or (D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google"s sole discretion, no longer commercially viable. 9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.

10. DISCLAIMER OF WARRANTIES

10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. 10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.

11. LIMITATION OF LIABILITY

11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.

12. Indemnification

12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.

13. Changes to the License Agreement

13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.

14. General Legal Terms

14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK. 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google"s rights and that those rights or remedies will still be available to Google. 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable. 14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement. 14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. 14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party. 14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. January 16, 2019

ADB, или Android Debug Bridge – это консольное приложение для ПК, с помощью которого можно управлять устройством на базе Android прямо с компьютера. Выглядит это так: сначала на компьютер устанавливаются инструментарий ADB и драйвера для Android, потом мобильное устройство подключается к ПК через USB-кабель в режиме отладки, и, наконец, после запуска ADB в консоли (командной строке) выполняются специальные команды, инициирующие те или действия с гаджетом. Подробная информация о принципе работы самого средства отладки представлена на официальном сайте разработчика, поэтому мы останавливаться на этом не будем, а сразу перейдем к возможностям ADB и способам его установки на компьютер.

Что позволяет делать ADB?

Для начала укажем зачем вообще нужен ADB. С его помощью можно:

  • Перезагружать устройство в различных режимах;
  • Обмениваться файлами/папками с телефоном;
  • Устанавливать/удалять приложения;
  • Устанавливать кастомные прошивки (в том числе, TWRP Recovery);
  • Производить ;
  • Выполнять разного рода скрипты.

Инструмент ADB обычно устанавливается в связке с консольным приложением Fastboot.

Установка ADB и Fastboot из пакета Android SDK

Этот способ предусматривает использование официального средства разработки и тестирования приложений Android Studio. Переходим на страницу https://developer.android.com/studio/index.html и находим заголовок «Get just the command line tools». Ниже скачиваем архив SDK tools для Windows (перед загрузкой соглашаемся с условиями использования).

Распаковываем архив на диск С. В нашем случае файлы были извлечены в папку sdk-tools-windows-3859397 .

Заходим в директорию, а потом переходим в каталог tools/bin . Здесь нас интересует файл sdkmanager , который и поможет установить ADB и Fastboot на компьютер.

Теперь необходимо открыть папку с sdkmanager, для чего в консоли следует выполнить команду cd C:\sdk-tools-windows-3859397\tools\bin , где C:\sdk-tools-windows-3859397\tools\bin – путь к файлу sdkmanager.

Если вы распаковали Android SDK не на диск С, а в какое-то иное место, то полный адрес можно будет узнать с помощью верхней строки Проводника (кликаем по конечной папке правой кнопкой мыши и жмем «Копировать адрес»).

Итак, мы перешли в tools\bin и теперь нам нужно выполнить команду sdkmanager «platform-tools» , которая установит пакет Platform-tools, содержащий файлы ADB и Fastboot.

В ходе установки ознакомьтесь с лицензионным соглашением и нажмите Y для завершения операции.

Если все прошло как надо, в корневой папке Android SDK появится каталог platform-tools с необходимыми файлами adb.exe и fastboot.exe .

Minimal ADB and Fastboot

Второй способ еще более простой. На форуме разработчиков Xda Developers можно скачать пакет Minimal ADB and Fastboot со всеми необходимыми файлами. Для этого заходим на страницу https://forum.xda-developers.com/showthread.php?t=2317790 и, кликнув по ссылке, загружаем установочный exe-файл.

Запускаем его и следуем инструкциям.

Мы установили Minimal ADB and Fastboot в корень того же диска С.

В принципе, на этом все. Осталось проверить наличие файлов.

Проверка работы ADB и Fastboot

После установки приложений любым из приведенных способов необходимо удостовериться в корректности работы утилит. Для этого через командную строку заходим в папку с файлами adb и fastboot (команда cd C:\sdk-tools-windows-3859397\platform-tools или cd C:\Minimal ADB and Fastboot ), а затем выполняем команду adb help . Она должна вывести версию установленного Android Debug Bridge и список команд ADB. Если вы видите примерно то же, что изображено на приведенном ниже скриншоте, значит все работает правильно.

Теперь следует подключить к ПК мобильное устройство и проверить, увидит ли его приложение ADB. Подсоединяем телефон (или планшет) к компьютеру с помощью USB-кабеля, выставляем в настройках режим подключения MTP (обмен файлами) и заходим в раздел Настройки – Для разработчиков .

Если такого пункта в настройках нет, то переходим на страницу «О телефоне» и семь раз кликаем по строке с номером сборки.

Режим разработчика будет активирован, и раздел «Для разработчиков» станет доступным. Заходим в него и включаем опцию «Отладка по USB».

После всех этих манипуляций с гаджетом в командной строке Windows вводим команду adb devices . Она выведет информацию о подключенном устройстве примерно в таком формате, как на скриншоте.

Таким образом, мы протестировали ADB и Fastboot и убедились, что Android Debug Bridge нормально функционирует, а, значит, теперь можно управлять телефоном через компьютер.

Если связь с устройством наладить не получается, то необходимо проверить наличие и корректность установки драйверов Андроид. Для этого при включенном режиме отладки заходим в «Диспетчер устройств» и смотрим, нет ли восклицательных знаков в ветке «Устройства USB» пункт «ADB Interface» (может называться немного по-другому).

При обнаружении неполадок пробуем переустановить драйвера. Скачать их можно на сайте производителя телефона или по адресу https://adb.clockworkmod.com/ .

Надеемся, что статья была для вас полезна.


Close