Asian development bank

      731

Several features of the apk 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 app android Debug Bridge (ADB) commands, a tool that Google offers for developers lớn debug various parts of their applications or the system, but which we can use for all kinds of neat và hidden tricks. A prerequisite to lớn these tricks is installing ADB on your computer. So, in this guide, we will show you how to lớn install ADB on Windows, macOS, and Linux in quick & easy-to-follow steps.

Bạn đang xem: Asian development bank

Table of Contents:

How to thiết đặt ADB

What is app android Debug Bridge (ADB)?

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

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 và the daemon. The hệ thống 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 & running in the first place. So if you have freshly booted the computer (and you don’t have it thiết đặt to start the daemon on boot), then you will need it to be running before any communication can be sent to the target game android device. You’ll see this the following message in the command prompt or terminal, as it will kiểm tra to make sure the daemon is running.

*

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

How to setup ADB


Note: Setting up ADB on the computer is just half the equation since you’ll also need to bởi vì some things on the điện thoại cảm ứng thông minh or tablet to lớn accept the ADB commands.


Phone Setup

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

Follow along for the operating system on your computer.

How to thiết đặt ADB on Microsoft Windows

Extract the contents of this ZIP tệp tin into an easily accessible folder (such as C:platform-tools)Open Windows explorer and browse to lớn where you extracted the contents of this ZIP fileThen open up a Command Prompt from the same directory as this ADB binary. This can be done by holding Shift và Right-clicking within the folder then click the “Open command window here” option. (Some Windows 10 users may see “PowerShell” instead of “command window”.)
*
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.In the Command Prompt window, enter the following command khổng lồ launch the ADB daemon: adb devicesOn your phone’s screen, you should see a prompt khổng lồ allow or deny USB Debugging access. Naturally, you will want khổng lồ grant USB Debugging access when prompted (and tap the always allow check box if you never want khổng lồ see that prompt again).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).

Xem thêm: Phim Cậu Bé Mất Tích Phần 1 ) Tập 2, Cậu Bé Mất Tích (Phần 1)

*

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

How to thiết đặt ADB on macOS

Extract the ZIP lớn an easily-accessible location (like the Desktop for example).Open Terminal.To browse to lớn the folder you extracted ADB into, enter the following command: cd /path/to/extracted/folder/For example, on my Mac it was this: cd /Users/Doug/Desktop/platform-tools/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 khổng lồ just leave it in this mode so you don’t run into any issues.Once the Terminal is in the same folder your ADB tools are in, you can execute the following command lớn launch the ADB daemon: ./adb devicesOn your device, you’ll see an “Allow USB debugging” prompt. Allow the connection.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 và start modding your phone by following our extensive danh mục of tutorials!

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

How to cài đặt ADB on Linux

Extract the ZIP to an easily-accessible location (like the Desktop for example).Open a Terminal window.Enter the following command: cd /path/to/extracted/folder/This will change the directory to where you extracted the ADB files.So for example: cd /Users/Doug/Desktop/platform-tools/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.Once the Terminal is in the same thư mục your ADB tools are in, you can execute the following command khổng lồ launch the ADB daemon: ./adb devicesBack on your điện thoại or tablet device, you’ll see a prompt asking you to allow USB debugging. Go ahead và grant it.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 danh mục of tutorials!

Some Linux users should be aware that there can be an easier way to lớn 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 và 2 of the guide above and use one of the following commands:

Debian-based Linux users can type the following command lớn install ADB:

sudo apt-get install android-tools-adbFedora/SUSE-based Linux users can type the following command to lớn install ADB:sudo yum install android-toolsHowever, it is always better khổng lồ opt for the latest binary from the game android SDK Platform Tools release, since the distro-specific packages often contain outdated builds.

Just to lớn cover all of our bases here, users may need to lớn put a ./ in front of the ADB commands we menu 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 lớn understand how to vì chưng these tweaks for app 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 lớn your PC/Mac with your USB cable, và 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 bởi vì all sorts of things on an game android device. Some of these commands are built directly into the ADB binary and should work on all devices. You can also xuất hiện up what is referred khổng lồ as an ADB Shell & 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 khổng lồ certain ones, và also modify adb behavior) và can vary from one version of apk to the next as well.

Below, you’ll find a danh sách of example commands which you can vày on your device:

Print a các mục of connected devices: adb devicesKill the ADB server: adb kill-serverInstall an application: adb install

Set up port forwarding: adb forward tcp:6100 tcp:7100Copy 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 lớn set up ADB so that you can use the command from any directory on a Windows or Linux desktop.

What else can I vì with ADB?

Below is a menu of XDA tutorials for various devices that detail many applications of ADB commands in order to lớn modify hidden settings, customize OEM features or user interfaces, và much more!