Get adb on linux

How to Install ADB and Fastboot on Linux

Android, being an open-source OS, is very customizable. You can customize it by adjusting device settings to your preference, using themes and apps, and so on. While some customizations can be achieved only after rooting your device, there are many others that can be done using ADB commands. ADB works like a bridge between Android devices and computers. However, before you can control your phone or tablet using ADB commands, you must set up ADB on your Windows, macOS, or Linux computer. In this guide, we’ll check out how we can install ADB and Fastboot on Linux.

ADB and Fastboot are multi-purpose command-line tools. By using ADB and Fastboot commands on your computer, you can get detailed information about your Android device, uninstall system apps without root, install apps, push or pull files, backup data, debug your device, enable and disable features and customize it in many ways. If you are interested in exploring the geeky aspect of owning an Android device, let’s start with installing ADB and Fastboot on Linux first.

Installing ADB and Fastboot on Linux

  1. Open the Settings app on your Android device and enable USB debugging via Developer settings.
  2. Download the latest Android SDK Platform-Tools for Linux.
  3. Extract the downloaded zip file to your computer’s desktop.
  4. Now, open a Terminal window. You can launch the Terminal either by pressing Ctrl + Alt + T keyboard shortcut or using an app launcher.
  5. When the Terminal window is opened, type the path to the extracted platform-tools folder in the following format: cd / path to the extracted platform-tools folder /
  6. For instance, if you extracted the zip file on your desktop, the command line would look like this. Here, cd means “change directory”.
cd /Users/Technastic/Desktop/platform-tools_r33.0.3-linux/platform-tools/
  • As soon as you press the Enter key after typing the above command, the directory path in the Terminal will change to the “platform-tools” folder that contains the ADB and Fastboot files.
  • In case you are having any issues with the above steps, open the platform-tools folder using the Nautilus file manager. Then right-click on any empty area inside the folder window and select the Open in Terminal option.Open in terminal option in Linux
  • It’s time to connect your Android phone or Tablet to your Linux system via a USB cable.
  • Make sure that you have selected the connection mode to MTP on your phone. To do so, connect your Android device to your PC, slide down the notification panel, tap on the connection mode notification and select Transferring files / Android auto as the connection mode.usb file transfer mode on android
  • Also, make sure your phone’s screen is unlocked while it’s connected to the computer and you execute the ADB command. It’ll be a good idea to extend the screen timeout duration from the Display settings.
  • To launch the ADB daemon and verify that your Android device is detected by your Linux computer, execute the following command.

    adb devices or ./adb devices
  • At this point, you’ll see a prompt asking you to authorize the ADB device on your Android device. Tap on Allow when you see the Allow USB debugging prompt.authorize adb on samsung galaxy s22
  • After you authorize ADB on your Android device, execute the adb devices command again. adb devices command in linux terminal
  • This time, ADB will detect your connected Android device and show an alphanumeric serial number in the Terminal window.
  • Читайте также:  Umount linux device is busy

    Installing ADB on Debian or Fedora

    As a Linux user, you must be aware that there are a number of Linux distros like Ubuntu, Fedora, CentOS, Elementary OS, Deepin OS, etc. While the steps to install ADB and Fastboot on Linux described above should work on most distros, there are some in which you need to take a little different course. For instance, on Fedora/SUSE and Debian/Ubuntu, you don’t need to download the Android SDK Platform-Tools. Instead, you can use a command in the Terminal to install ADB drivers directly.

    In case you are a Fedora/SUSE-based Linux user, you can use the following command to install ADB and Fastboot on your PC.

    sudo yum install android-tools

    Those who use a Debian/Ubuntu-based Linux distribution, execute the command line given below to set up ADB.

    sudo apt-get install android-tools-adb

    In these Linux distributions, you are supposed to add “./” before ADB commands. Thus, you have to use ./adb devices in place of adb devices .

    Adding System-wide ADB and Fastboot on Linux

    In a normal installation, you’ll be able to access ADB and Fastboot only by launching the Terminal from the platform-tools directory. However, if you give system-wide access to ADB, you’ll be able to use ADB commands by launching the Terminal anywhere. Please note that if you have a 64-bit system, you’ll have to install libstdc++ and glibc.i686 on your computer first.

    In order to enable system-wide ADB on Linux, launch the Terminal and execute the following command.

    sudo gedit .bashrc

    The command will open the file in the Gedit text editor. Add the path of the platform-tools folder at the end of the file and save the changes.

    export PATH=$:/home/Technastic/Desktop/platform-tools_r33.0.3-linux/platform-tools/

    That’s it! You can now use ADB and Fastboot commands from any location on your Linux PC.

    Источник

    Как установить ADB и Fastboot на Ubuntu 20.04 LTS

    hosting.energy недорогой хостинг сайтов

    hosting.energy недорогой хостинг сайтов

    В этом руководстве мы покажем вам, как установить ADB и Fastboot в Ubuntu 20.04 LTS. Для тех из вас, кто не знал, ADB или Android Debug Bridge — это утилита командной строки, которая позволяет нам управлять устройством Android с самого компьютера. Он является частью Google Android SDK и может использоваться для запуска команд оболочки или для копирования файлов на устройство и с устройства, а также для установки или удаления приложений с устройства. Fastboot — это в основном режим диагностики, который используется для изменения файловой системы Android с компьютера, когда устройство Android находится в режиме загрузчика. Это альтернатива режиму восстановления и обычно используется для обновления или установки.

    Читайте также:  Линукс роса не загружается

    В этой статье предполагается, что у вас есть хотя бы базовые знания Linux, вы знаете, как использовать оболочку, и, что наиболее важно, вы размещаете свой сайт на собственном VPS. Установка довольно проста и предполагает, что вы работаете с учетной записью root, в противном случае вам может потребоваться добавить ‘ sudo ‘ к командам для получения привилегий root. Я покажу вам пошаговую установку ADB и Fastboot на Ubuntu 20.04 (Focal Fossa). Вы можете следовать тем же инструкциям для Ubuntu 18.04, 16.04 и любого другого дистрибутива на основе Debian, например Linux Mint.

    Установите ADB и Fastboot на Ubuntu 20.04 LTS Focal Fossa

    Шаг 1. Во-первых, убедитесь, что все ваши системные пакеты обновлены, выполнив следующие apt команды в терминале.

    sudo apt update sudo apt upgrade

    Шаг 2. Установка ADB и Fastboot на Ubuntu 20.04.

    Выполните следующую команду, чтобы установить двоичные файлы ADB Fastboot в системе Ubuntu:

    sudo apt install android-tools-adb sudo apt install android-tools-fastboot

    Вы можете проверить версию ADB с помощью следующей команды:

    $ adb version Android Debug Bridge version 1.0.46 Revision 1:7.0.0+r35-2

    После установки сервер ADB запустится на нем, но если это не так, вы можете запустить сервер ADB, используя:

    Шаг 3. Проверка подключения ADB.

    Мы подключим к нашей системе устройство Android. Но прежде чем мы подключим устройство Android, нам нужно убедиться, что на устройстве включена «Отладка по USB». Его можно включить, зайдя в настройки устройства, а затем в Параметры разработчика (для некоторых устройств требуется, чтобы вы несколько раз коснулись версии Android в разделе «О телефоне», чтобы включить параметры разработчика). Теперь, когда это включено, все, что нам нужно сделать, это подключить наше Android-устройство к системе Ubuntu с помощью USB-кабеля. После подключения устройства откройте терминал в своей системе и выполните следующую команду:

    Примечание. Если вы получили какие-либо разрешения относительно ошибки после подключения устройства, перезапустите сервер ADB и повторите попытку.

    Поздравляю! Вы успешно установили ADB и Fastboot. Благодарим за использование этого руководства для установки ADB и Fastboot в системе Ubuntu 20.04 LTS Focal Fossa. Для получения дополнительной помощи или полезной информации мы рекомендуем вам посетить официальный сайт Android .

    Источник

    How to Install Android Debug Bridge on Linux to Manage your Android Phone

    The Android Debug Bridge (ADB, for short) is a versatile command-line tool to communicate with an Android device. Using the ADB, you can perform a variety of actions on the target device, for example, installing and debugging apps, running commands, and more.

    In this guide, we will learn how to install ADB on Linux and manage your device with it.

    ADB on Linux

    There are actually two parts of ADB: one comes with Android and the other one is the desktop client. When the Android device is connected and USB debugging is enabled, we can use the desktop ADB client to send various commands to the Android device. ADB comes as a part of the Android SDK which is available for Windows, Linux, macOS, and others.

    However, the ADB tool is also available separately for all the major platforms, including Linux. In most cases, it should be available from the official package repo of the Linux distro.

    This guide will feature installation steps on some of the most popular Linux distros.

    Installing ADB on Linux

    Depending on the Linux distro you are running, follow the proper installation procedure.

    Читайте также:  Caja в linux mint

    Debian/Ubuntu-based distros

    RHEL/CentOS/Fedora

    OpenSUSE and SUSE Linux Enterprise

    Verifying ADB Installation

    Run the following command to verify if the installation was successful:

    Using ADB to Manage Android Devices

    To use ADB on a device, you have to make sure that it has USB debugging enabled. Check out this guide that demonstrates how to enable USB debugging mode on your Android device.

    Once connected to the computer, we can use the ADB command-line tool to perform various tasks.

    Starting/killing the ADB Server

    To use ADB, first, we need to launch the ADB server. Run the following command:

    On many occasions, the ADB server instance may become problematic. You can kill the currently running server using the following command:

    Listing Connected Devices

    Before trying to push any command to the device, we have to make sure that the ADB server is recognizing the connected device(s) properly. The following command will print a list of all the connected devices:

    Rebooting the Android Device

    To reboot the Android device, use the following ADB command:

    We can also instruct the device to boot into other modes like recovery, fastboot, etc. To reboot into recovery, use the following command:

    To reboot into fastboot, use the following command:

    Note that the fastboot mode is used to flash various system images. To work with your device in fastboot mode, you have to have the fastboot client installed on your desktop.

    File Transfer

    We can use ADB to perform various common tasks, for example: file transfer.

    To copy a file from the desktop to the Android device, use the following command structure:

    To copy a file from the Android device to the desktop, use the following command structure instead:

    App Management

    ADB can install an app on your Android device. However, you need to have the APK package of the app at hand.

    The command to install an APK file is as follows:

    We can also check the list of installed apps using the following command:

    To uninstall a package, use the following command:

    Viewing Logs

    Using ADB, we can also access the system log of the Android device. To view the log, run the following command:

    To get full access to the phone, we can access the ADB shell. It is a direct shell into the Android device, giving us full control over it.

    To access the shell, run the following command:

    Android is built on top of the Linux kernel. Practically, you can use most of the Linux tools and commands in the shell to perform various tasks.

    Conclusion

    ADB is a powerful tool that comes as a part of the Android SDK. In this guide, we demonstrated installing the ADB desktop client on Linux. We also highlighted some common ways of using ADB to perform various tasks on any Android device.

    Interested in having Android experience on desktop? Check out some of the best Android emulators for PC. You can also manage most of these emulators through the ADB interface.

    About the author

    Sidratul Muntaha

    Student of CSE. I love Linux and playing with tech and gadgets. I use both Ubuntu and Linux Mint.

    Источник

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