TechBriefly
  • Tech
  • Business
  • Crypto
  • Science
  • Geek
  • How to
  • About
    • About TechBriefly
    • Terms and Conditions
    • Privacy Policy
    • Contact Us
    • Languages
      • 中文 (Chinese)
      • Dansk
      • Deutsch
      • Español
      • English
      • Français
      • Nederlands
      • Italiano
      • 日本语 (Japanese)
      • 한국인 (Korean)
      • Norsk
      • Polski
      • Português
      • Pусский (Russian)
      • Suomalainen
      • Svenska
  • FAQ
    • Articles
No Result
View All Result
 Hot Topics:
  • Funny notes on Instagram
  • What is Snapchat planets order?
  • Best free AI art generators
  • Instagram Notes ideas
  • Elon Musk & Twitter
TechBriefly
No Result
View All Result
Home How to

What is Android Debug Bridge (ADB)?

by Barış Selman
25 January 2022
in How to
Reading Time: 8 mins read
What is Android Debug Bridge (ADB)?
Share on FacebookShare on Twitter

Contents

  • 1 What is Android Debug Bridge (ADB)?
  • 2 How to download and run the Android SDK for Windows?
  • 3 Modifying the user’s PATH in Windows
  • 4 How to get ADB on Linux?
  • 5 “Bonus track for Linux users
  • 6 Enabling developer mode and USB debugging on an Android device
  • 7 How to use ADB?
  • 8 Conclusion

You can learn what is Android Debug Bridge (ADB) with this article. Our intention is not to go into much depth, but simply to show how to get it working on Windows and Linux and some things that can be done with it. In other words, it is more of an introductory material than an advanced technical tutorial, although it is true that it can be a bit difficult if you don’t have some previous knowledge on how to deal with a command console.

What is Android Debug Bridge (ADB)?

In a nutshell and for simplicity, ADB is a command-line tool that allows a Windows, Linux, or Mac computer to communicate with an Android device. It allows a variety of actions to be performed on the Android device, including sending files from the computer, copying files present on the Android device, debugging applications, installing and uninstalling packages, and providing access to a Unix shell.

What is Android Debug Bridge (ADB)?
What is Android Debug Bridge (ADB)?

It also allows you to reboot an Android device in a standard way, in recovery mode (recovery), the bootloader (bootloader), or by performing a previous sideloading process (transferring files between two local devices, which is usually done when you want to change the manufacturer’s Android for a custom ROM), as well as performing many other actions.

As we can see, ADB is quite versatile, although, at least with Google’s official tools, it requires minimum knowledge of command lines to use it.

How to download and run the Android SDK for Windows?

The logical thing to do is to access the Android developer website, but on its home page what is made available by default is not the bare SDK, but the entire stack for application development through the official Integrated Development Environment (IDE): Android Studio.

Android Studio is based on JetBrains technology and is a very capable IDE, but it deviates from the purpose of this introductory tutorial by serving far, far more than necessary. Alternatively, we will download the “bare” SDK, which can be obtained via the following path:

Then the terms and conditions of use will appear, which the user will have to accept if he wants to start downloading the Android SDK (it seems that at the moment the web has a bug).

Once the ZIP file has been downloaded, access the ‘platform-tools’ subdirectory that should have appeared (in case of performing the extraction process with Windows tools, you may have to go down one more sublevel) after unzipping it, press the key combination ‘ctrl+L’ and copy the path that appears as selected text.

After copying the path from Windows 10 File Explorer, proceed to open a PowerShell console and type the following, but without pressing enter:

  • cd “”

After typing the “skeleton” of the command, paste the path obtained from Windows File Explorer between the quotation marks. It is important to note that “Guillermo Puertas” is the user used for this tutorial, so this may change. The use of quotation marks is to avoid spaces cutting the command.

  • cd “C:\Users User User Download Platform Tools”.

To check if ADB is available, just run it with the help argument and see if it shows up or if you get some kind of error.

  • .\adb –help
What is Android Debug Bridge (ADB)?
What is Android Debug Bridge (ADB)?

Modifying the user’s PATH in Windows

As getting the path where the Android SDK is located over and over again ends up becoming tiresome, as an alternative you can add its location to the user’s PATH. To do this you have to open the advanced system settings of Windows 10.

In the window that appears, whose title is “System Properties”, proceed to click on the “Environment Variables” button located at the bottom of “Advanced Options”.

In “User variables for YOUR USER” (Guillermo Puertas in our case) you have to select the ‘Path’ variable and click on the “Edit” button.

Finally, the user must click on the “New” button, paste the path where the Android SDK is located in a new line, click on the enter key, click on the “OK” buttons of the “Edit environment variable” and “Environment variables” windows and close everything to perform a system restart.

After following all these steps, the user should be able to use ADB right after opening the PowerShell console, so instead of having to type this:

  • \Ò.adb.

You can directly enter the following:

  • adb
SEE ALSO
Best 15 shortcuts you should add to your Android home screen

How to get ADB on Linux?

Obtaining ADB on Linux, if you resort to the repositories of the distributions, is simpler than on Windows. All you have to do is install the package containing the Android SDK tools. The fact that you are using the command line also simplifies the process.

Package to install on Ubuntu 20.04 LTS (and possibly later versions) and Debian 11 Bullseye:

  • sudo apt install android-sdk

In case the installation gives problems, it is likely to be solved with the following command:

  • sudo apt –fix-broken install

Package to install on Fedora Workstation:

  • sudo dnf install android-tools

Package to install on Fedora Silverblue and Kinoite (in this case it is necessary to reboot):

  • rpm-ostree install android-tools

Package to install on Manjaro (where it may be pre-installed) and Arch Linux:

  • sudo pacman -S android-tools

After installing the corresponding package, ADB should already work in an integrated way in the PATH of the system, without any further configuration. To check this, just show the help.

  • adb –help
What is Android Debug Bridge (ADB)?
What is Android Debug Bridge (ADB)?

“Bonus track for Linux users

In the case of trying to reboot the mobile in ‘bootloader’ or ‘recovery’ mode with ADB from Linux, the user may find that it does not have sufficient permissions to act. This is fixed by adding a udev rule for the Android device in use.

First, connect the Android device via USB and run the following command:

  • lsusb

In our case, the connected smartphone has been recognized as if it were a Google Nexus or Pixel device, despite actually being a POCO X3 PRO. From the line corresponding to the smartphone we copy the first part of the identifier, the one to the left of the colon in the sixth column.

What is Android Debug Bridge (ADB)?
What is Android Debug Bridge (ADB)?

Then you have to open or create the following file with a plain text editor and administrator permissions. In our case, we mention Gedit because it is graphical and preinstalled in Ubuntu, but the user can use Nano, Vim, or whatever he wants:

  • sudo gedit /etc/udev/rules.d/51-android.rules

Enter the following line in the file, but change the identifier to that of the Android device connected to the user’s computer.

  • SUBSYSTEM==”usb”, ATTR{idVendor}==”IDDISPOSITIVE”, MODE=”0666″, GROUP=”plugdev”

After entering the rule, proceed to save the changes, close the file reboot the system to take effect, and reboot an Android device in bootloader or recovery mode.

Enabling developer mode and USB debugging on an Android device

To make use of ADB you need to start developer mode and enable Android USB debugging. The steps are essentially the same on all mobiles and tablets that make use of Google’s operating system, but their order may vary because its Open Source nature allows for major modifications. In our case, we have used a POCO X3 PRO, which follows the lines marked by Xiaomi.

The first step is to open the System Settings and click on “About phone”.

The second step is to press seven times (or as many as it takes) on the version of the operating system to activate the developer mode, which in our case is the version of MIUI for POCO.

With the developer mode already activated, it’s time to enable USB debugging. To do this you have to go back to the main Settings screen and go to Additional settings > Developer options > USB debugging.

After flipping the switch to enable USB debugging, a confirmation screen will appear that the user must fill incorrectly.

Upon connecting the Android device via USB the fingerprint should appear to enable USB debugging. The answer to the question must be yes.

After following all these steps you should be able to proceed to use Android Debug Bridge.

SEE ALSO
How to check the health status of battery on Android?

How to use ADB?

Making basic use of ADB (remember that this is an introductory tutorial) is easy if you have some notions of how to use a command line. From here we will assume that the Windows user has added the Android SDK to his PATH. In case he has not done so, at the beginning of the commands, instead of ‘and’ you have to put ‘.adb’, in addition to having to access first via the command line to the location where the Android SDK is located.

To display the connected Android devices, the command to execute is as follows:

  • adb devices
What is Android Debug Bridge (ADB)?
What is Android Debug Bridge (ADB)?

Although there are easier ways to do this thanks to the fact that the user’s directory subtree in Android can be mounted as a storage unit, it is possible to send a file from the computer with the ‘push’ argument. ‘screen1.png’ is the file located on the computer that you want to send to the POCO mobile, while ‘/storage/self/primary’ is the root of the user’s internal storage. It is important to note that, at least initially, you cannot send a file to just any Android subdirectory due to permissions issues.

  • adb push screen1.png ‘/storage/self/primary’
What is Android Debug Bridge (ADB)?
What is Android Debug Bridge (ADB)?

The ‘pull’ argument allows getting a file stored on the Android device. In this case, we have downloaded a document about the AMD IBS features located in the ‘Download’ folder, which is located just below the root of the user’s internal storage.

  • adb pull ‘/storage/self/primary/Download/AMD_IBS_paper_EN.pdf’.
What is Android Debug Bridge (ADB)?
What is Android Debug Bridge (ADB)?

To reboot an Android device in the standard way with ADB you run the following:

  • adb reboot

To reboot in ‘recovery’ mode the command is this:

  • adb reboot recovery

And the following to reboot in ‘bootloader’ mode:

  • adb reboot bootloader

To access the ADB Unix shell you have to enter the following:

  • adb shell
Learn about Android Debug Bridge (ADB)
Learn about Android Debug Bridge (ADB)

If the user sees that ADB is not working properly, a possible solution is to kill the server and restart it:

  • adb kill-server
  • adb start-server
SEE ALSO
Top 10 free Sega Games for Android (2022)

Conclusion

So much for the basics of ADB. In the inkwell, we have left ‘fastboot’, another very interesting tool whose use is essential if you want to change the Android preinstalled by the manufacturer for a third-party ROM as LineageOS.

Despite everything, we hope that this tutorial will serve to start to get an idea of the possibilities offered by Android (or rather its ecosystem of tools) through the command line because you know, knowledge is power, and the more knowledge the user has, the freer he will be when deciding on the devices he uses. And as the movement is demonstrated by walking you can check our guide: How to install a custom Android ROM and take advantage of its benefits.

Tags: downloadhow tolearnlinuxmacsoftwaretechnologywhat isWindows

Related Posts

Character AI not working

Character AI not working: How to fix it?

Instagram 5xx server error

Instagram 5xx server error: How to fix it?

What is the beauty filter on TikTok

What is the beauty filter on TikTok and how to get it?

Bane of Dragons ESO

Bane of Dragons ESO: How to complete the quest?

POPULAR

Soldier poet king quiz TikTok
Social Media

Soldier poet king quiz: TikTok trend explained

ai music generator open ai jukebox
AI

AI music generators take on a whole new dimension with Open AI Jukebox

Fortnite Rarity Check Augment
How to

Fortnite Rarity Check Augment explained

What is Snapchat planets order?
How to

What is Snapchat planets order?

Witcher 3 manual save not working
How to

Witcher 3 manual save not working: How to fix it?

Bane of Dragons ESO
How to

Bane of Dragons ESO: How to complete the quest?

Division 2 crashing: How to fix it (2023)?
How to

How to fix Division 2 if it keeps crashing in 2023?

ChatGPT is at capacity right now: Too many requests in 1 hour try again later (Fixed)
How to

Too many requests in 1 hour try again later (Fixed): ChatGPT is at capacity right now

How to hide retakes on BeReal?
How to

How to hide retakes on BeReal?

RCM Loader for Nintendo Switch What is it, how can you install
How to

RCM Loader for Nintendo Switch: What is it, how can you install?

RSS Digital Report

  • Tips and tools for DIY digital marketing
  • Rundown of Uber’s marketing strategy
  • Tips and tricks for chatbot marketing
  • The Forex movement in 2023 vs crypto
  • How big companies are using AI in marketing?
  • Get the best features of public and private platforms with hybrid blockchains
  • Best SEO practices for financial services to improve Google rankings
  • How much do SEO specialists make?
  • A comprehensive guide on ethical SEO to boost rankings
  • SEO: How does page speed affect your rankings?

RSS Latest from LeaderGamer

  • Stardew Valley developer reveals new information about Witchbrook
  • Wordle TR 30 Ocak 2023 günün cevabı
  • Horizon Forbidden West Multiplayer Alpha gameplay footage released
  • Hogwarts Legacy won’t leave much freedom in wand choice
  • En iyi bilim kurgu filmleri – En iyi 20 bilim kurgu filmleri
  • Former Valve employees talk about internal issues
  • Problem with Diablo 4 release date
  • What is Google AdSense?
  • Dead Space Impossible mode rewards
  • Hint for Dead Space 2 Remake is in Dead Space
TechBriefly

© 2021 TechBriefly is a Linkmedya brand.

  • Tech
  • Business
  • Science
  • Geek
  • How to
  • About
  • Privacy
  • Terms
  • Contact
  • LeaderGamer
  • FAQ

Follow Us

No Result
View All Result
  • Tech
  • Business
  • Crypto
  • Science
  • Geek
  • How to
  • About
    • About TechBriefly
    • Terms and Conditions
    • Privacy Policy
    • Contact Us
    • Languages
      • 中文 (Chinese)
      • Dansk
      • Deutsch
      • Español
      • English
      • Français
      • Nederlands
      • Italiano
      • 日本语 (Japanese)
      • 한국인 (Korean)
      • Norsk
      • Polski
      • Português
      • Pусский (Russian)
      • Suomalainen
      • Svenska
  • FAQ
    • Articles