Android platform tool linux

Download Android SDK Platform-Tools (Windows/Mac/Linux)

ADB and Fastboot are essential command-line tools for Android that facilitate a range of tasks including flashing factory images or custom recovery or kernel images (.img), sideload APK, etc. Using ADB and Fastboot commands, we can perform countless tasks on Android devices and even debug them. Thanks to Android SDK Platform-tools that pack together all required files to execute ADB and Fastboot commands using a command prompt. Below, you can download the latest SDK platform-tools Zip for Windows, Linux, and Mac OS X directly from the Google servers.

What is SDK Platform-Tools?

Essentially, the ‘platform-tools” is a command-line tool meant for developers only. They are a part of the Android SDK Manager and Android Studio and are used to perform more complicated tasks like developing, analyzing, and debugging Android apps APK (Android Application Package file). Using them you can emulate apps, edit the visual layouts, and test them without a real Android device.

Not too long ago, we had to download a full Android SDK suite or Android Studio and get the Platform-tools. Google then decided to release the Android SDK Platform-tools separately. Now, we can download the latest version of Android SDK Platform-tools for Windows, Linux, and Mac in an easy-to-download Zip package.

Download ADB and Fastboot SDK Platform-Tools

Below you can download the Android SDK Tools for all three major operating systems for computers.

Android SDK Tools (Windows)

Having downloaded the latest version of Android SDK Platform-tools for Windows, you can follow the steps given below to set it up.

Android SDK Platform Tools (Mac OS X)

ADB Platform Tools (Linux & Ubuntu)

I wrote a detailed guide on installing ADB and Fastboot on Linux to help you with using ADB commands easily.

How to Use SDK Platform-Tools

Now that you have already downloaded the SDK Platform-tools, you need to install it or set it up on your computer. If you don’t know what to do with the zip file you just downloaded and how to execute the ADB and Fastboot commands, I am going to explain everything you need to know.

First of all, you need to unzip the “platform-tools-latest.zip“. You can extract it anywhere on your computer but I prefer saving the files to a folder created as “Android” on the C drive on my Windows PC. Having extracted the zip file, you need to launch a command prompt window before you can execute an ADB or Fastboot command.

How to Launch a Command Window?

It’s very easy to launch a command prompt window on a Windows PC. Click the Search icon next to the Windows menu icon on the taskbar and hit the Enter key. In case you need to launch the Command or CMD window from inside the Platform-tools folder, there are 2 ways to do that.

Method 1

  1. Open the folder in which you extracted the content of the Platform-tool.zip file.
  2. While pressing the Shift key on the keyboard, perform a right-click on your mouse at an empty place inside the folder window.
  3. From the context menu pop-up, select the “Open command prompt here” option.
  4. You can now execute any ADB or Fastboot command.

Method 2

Well, this method is far easier than the one I described above. You can simply launch a command window from inside the platform-tools folder by typing “cmd” in the Windows file explorer address bar as shown below and hitting the Enter key on your PC’s keyboard.

Читайте также:  Если вирус заблокировал андроид

Note: Make sure to enable the USB debugging option on your Android device. You can find it under Settings> Developer options. In case you don’t see Developer Options listed under device Settings, open About device> Software Information and tap the Build number 7 times to unlock the hidden Developer options on your Android device.

You need to allow the debugging option so that your devices and computer can communicate and interact with each other. When you execute a command in the cmd window, you’ll get a pop-up on your Android’s screen asking you to Allow USB debugging.

Verify ADB Connection

Note: Make sure you have already installed the proper Android USB Driver from your device’s manufacturer on your computer.

  1. Having enabled USB Debugging from Developer options, connect your phone or tablet to the computer using a compatible USB cable.
  2. Now launch a command window and type the following command and click the Enter key on the keyboard.
  3. You’ll see the list of the IDs of attached devices in the Command Prompt window represented by a string of alphanumeric values as shown below.

Please note that to sideload and APK on your Android phone via ADB or to flash a system image (.img) file using Fastboot commands, you need to place those files inside the “platform-tools” folder first. You can also enable system-wide ADB and fastboot so that you can execute commands without navigating to the “platform-tools” directory every time. If you encounter any problem while running commands, read my tutorial on fixing ADB or Fastboot is not recognized error.

That’s all for now! I’ve also prepared a very exhaustive list of useful ADB, ADB Shell, and Fastboot commands in a dedicated tutorial. Don’t forget to check that.

Now that you have set up SDK Platform tools on your computer, here are a few things that you should start with.

Источник

How to Install ADB on Windows, macOS, and Linux

Several features of the Android platform can be accessed only through paths and methods that are hidden away from the average user. These have generally been done with the help of some command line Android Debug Bridge (ADB) commands, a tool that Google offers for developers to debug various parts of their applications or the system, but which we can use for all kinds of neat and hidden tricks. A prerequisite to these tricks is installing ADB on your computer. So, in this guide, we will show you how to install ADB on Windows, macOS, and Linux in quick and easy-to-follow steps.

Table of Contents:

What is Android Debug Bridge (ADB)?

The internal structure of the Android Debug Bridge (ADB) is based on the classic client-server architecture. There are three components that make up the entire process.

  1. The client, i.e. the PC or Mac you have connected to your Android device. We are sending commands to our device from this coomputer through the USB cable (and wirelessly as well in some cases).
  2. A daemon (adbd), which runs commands on a device. The daemon runs as a background process on each device.
  3. A server, which manages communication between the client and the daemon. The server runs as a background process on the PC/Mac.

How does ADB Work?

Because there are three pieces that makeup ADB (the Client, Daemon, and the Server), this requires certain pieces to be up and running in the first place. So if you have freshly booted the computer (and you don’t have it setup to start the daemon on boot), then you will need it to be running before any communication can be sent to the target Android device. You’ll see this the following message in the command prompt or terminal, as it will check to make sure the daemon is running.

If the daemon isn’t running, then it will start the process and tell you which local TCP port it has been started on. Once that ADB service has been started, it will continue to listen to that specific port for commands that have been sent by the ADB client. It will then set up connections to all running devices which are attached to the computer (including emulators). This is the moment where you’ll receive the authorization request on the Android device if the computer hasn’t been authorized in the past.

Читайте также:  Nokia с чистым андроидом

How to Setup ADB

Note: Setting up ADB on the computer is just half the equation since you’ll also need to do some things on the smartphone or tablet to accept the ADB commands.

Phone Setup

  1. Launch the Settings application on your phone.
  2. Tap the About Phone option generally near the bottom of the list.
  3. Then tap the Build Number option 7 times to enable Developer Mode. You will see a toast message when it is done.
  4. Now go back to the main Settings screen and you should see a new Developer Options menu you can access.
  5. Go in there and enable the USB Debugging mode option.
  6. You are partially done with the phone setup process. Next up, you will need to scroll below and follow the rest of the instructions for your particular operating system.

Follow along for the operating system on your computer.

How to setup ADB on Microsoft Windows

  1. Download the Android SDK Platform Tools ZIP file for Windows.
  2. Extract the contents of this ZIP file into an easily accessible folder (such as C:\platform-tools)
  3. Open Windows explorer and browse to where you extracted the contents of this ZIP file
  4. Then open up a Command Prompt from the same directory as this ADB binary. This can be done by holding Shift and Right-clicking within the folder then click the “Open command window here” option. (Some Windows 10 users may see “PowerShell” instead of “command window”.)
  5. Connect your smartphone or tablet to your computer with a USB cable. Change the USB mode to “file transfer (MTP)” mode. Some OEMs may or may not require this, but it’s best to just leave it in this mode for general compatibility.
  6. In the Command Prompt window, enter the following command to launch the ADB daemon:В adb devices
  7. On your phone’s screen, you should see a prompt to allow or deny USB Debugging access. Naturally, you will want to grant USB Debugging access when prompted (and tap the always allow check box if you never want to see that prompt again).
  8. Finally, re-enter the command from step #6. If everything was successful, you should now see your device’s serial number in the command prompt (or the PowerShell window).

Yay! You can now run any ADB command on your device! Now go forth and start modding your phone by following our extensive list of tutorials!

How to setup ADB on macOS

  1. Download the Android SDK Platform Tools ZIP file for macOS.
  2. Extract the ZIP to an easily-accessible location (like the Desktop for example).
  3. Open Terminal.
  4. To browse to the folder you extracted ADB into, enter the following command:В cd /path/to/extracted/folder/
  5. For example, on my Mac it was this: cd /Users/Doug/Desktop/platform-tools/
  6. Connect your device to your Mac with a compatible USB cable. Change the USB connection mode to “file transfer (MTP)” mode. This is not always required for every device, but it’s best to just leave it in this mode so you don’t run into any issues.
  7. Once the Terminal is in the same folder your ADB tools are in, you can execute theВ following command to launch the ADB daemon:В ./adb devices
  8. On your device, you’ll see an “Allow USB debugging” prompt. Allow the connection.
  9. Finally, re-enter the command from step #7. If everything was successful, you should now see your device’s serial number in macOS’s Terminal window.

Congratulations! You can now run any ADB command on your device!В Now go forth and start modding your phone by following our extensive list of tutorials!

While the guide above will certainly work, some seasoned macOS users should be aware that there can be an easier way to install ADB on their Macs using an unofficial package manager such as Homebrew or MacPorts.

How to setup ADB on Linux

  1. Download the Android SDK Platform Tools ZIP file for Linux.
  2. Extract the ZIP to an easily-accessible location (like the Desktop for example).
  3. Open a Terminal window.
  4. Enter the following command:В cd /path/to/extracted/folder/
  5. This will change the directory to where you extracted the ADB files.
  6. So for example: cd /Users/Doug/Desktop/platform-tools/
  7. Connect your device to your Linux machine with your USB cable. Change the connection mode to “file transfer (MTP)” mode. This is not always necessary for every device, but it’s recommended so you don’t run into any issues.
  8. Once the Terminal is in the same folder your ADB tools are in, you can execute theВ following command to launch the ADB daemon:В ./adb devices
  9. Back on your smartphone or tablet device, you’ll see a prompt asking you to allow USB debugging. Go ahead and grant it.
  10. Finally, re-enter the command from step #8. If everything was successful, you should now see your device’s serial number in the Terminal window output.
Читайте также:  Найти андроид по емайл

Congrats! You can now run any ADB command on your device!В Now go forth and start modding your phone by following our extensive list of tutorials!

Some Linux users should be aware that there can be an easier way to install ADB on their computer. The guide above will certainly work for you, but those own a Debian or Fedora/SUSE-based distro of Linux can skip steps 1 and 2 of the guide above and use one of the following commands:

  • Debian-based Linux users can type the following command to install ADB:
  • Fedora/SUSE-based Linux users can type the following command to install ADB:

However, it is always better to opt for the latest binary from the Android SDK Platform Tools release, since the distro-specific packages often contain outdated builds.

Just to cover all of our bases here, users may need to put a ./ in front of the ADB commands we list in future tutorials, especially when they are using the extracted binaries directly from the Platform Tools ZIP. This is something that is likely known by any *nix user (or Windows user running PowerShell) already, but again, we want as many people as possible to understand how to do these tweaks for Android no matter how much of your operating system you know.

Examples of ADB Commands

To check if you have successfully installed ADB, connect your device to your PC/Mac with your USB cable, and run the adb devices command as described above. It should display your device listed in the Command Prompt/PowerShell/Terminal window. If you get a different output, we recommend starting over with the steps.

As mentioned above, you can use ADB to do all sorts of things on an Android device. Some of these commands are built directly into the ADB binary and should work on all devices. You can also open up what is referred to as an ADB Shell and this will let you run commands directly on the device. The commands which are run directly on the device can vary from device to device (since OEMs can remove access to certain ones, and also modify adb behavior) and can vary from one version of Android to the next as well.

Below, you’ll find a list of example commands which you can do on your device:

  • Print a list of connected devices: adb devices
  • Kill the ADB server: adb kill-server
  • Install an application: adb install
  • Set up port forwarding: adb forward tcp:6100 tcp:7100
  • Copy a file/directory from the device: adb pull

    Copy a file/directory to the device: adb push

  • Initiate an ADB shell: adb shell
  • Bonus

    For those who want to take this a step further, you can follow this new tutorial we put together that will walk you through how to set up ADB so that you can use the command from any directory on a Windows or Linux desktop.

    What else can I do with ADB?

    Below is a list of XDA tutorials for various devices that detail many applications of ADB commands in order to modify hidden settings, customize OEM features or user interfaces, and much more!

    Источник

    Оцените статью