- Как скачать и установить в MacOS ADB и Fastboot
- Скачать ADB и Fastboot для macOS
- Подготовка ADB и Fastboot к работе в MacOS
- P.S Если не охота каждый раз писать ./
- Install and Use ADB and Fastboot on Mac
- ADB and Fastboot Platform-Tools for Mac
- ADB or Fastboot Not Found on Mac Error
- Installing ADB and Fastboot on Mac
- Method 1: Drag ‘Platform-tools’ Folder to Terminal
- Method 2: Type or Paste Folder Path in Terminal
- Using ADB and Fastboot Commands in Mac Terminal
- Как настроить Android ADB/Fastboot на Mac OS X простым способом
- Как настроить Android ADB/Fastboot на Mac OS X
- Важно для пользователей OS X El Capitan
- How to Install ADB on Windows, macOS, and Linux
- What is Android Debug Bridge (ADB)?
- How does ADB Work?
- How to Setup ADB
- Phone Setup
- How to setup ADB on Microsoft Windows
- How to setup ADB on macOS
- How to setup ADB on Linux
- Examples of ADB Commands
- Bonus
- What else can I do with ADB?
Как скачать и установить в MacOS ADB и Fastboot
вкл. 08 Февраль 2019 . Опубликовано в Android — Общее
Как скачать и установить в MacOS ADB и Fastboot. В данной статье рассмотрим как на ваш MacBook или iMac (MacOS), установить утилиты ADB и Fastboot для работы с Android.
Не смотря на то, что операционная система macOS является №2 по распространенности, но вот доступных инструкций как в ней работать с Android очень мало, если быть точнее управление устройством с помощью ADB и прошивка смартфонов и планшетов с помощью Fastboot .
Скачать ADB и Fastboot для macOS
Для того чтобы скачать и установить самую свежую версию утилит ADB и Fastboot для Android, вам необходимо перейти на официальный сайт разработки Android developer.android.com и скачать архив для MACOS.
Подготовка ADB и Fastboot к работе в MacOS
После того как архив будет загружен переходим в Finder и извлекаем содержимое, после чего, можете переместить папку platform-tools например в Документы.
Далее переходим в Launchpad и находим и запускаем программу Terminal.
В Terminal-e вам необходимо перейти в папку platform-tools, в которой находятся ADB и Fastboot, выполнить это возможно с помощью команды для перемещения cd , но для того чтобы узнать в какой именно сейчас вы папке находитесь можно с помощью команды ls .
После того как вы окажитесь в папке platform-tools проверяем работу утилит ADB и Fastboot, для это пишем команды следующим образом ./adb или ./fastboot
Если ниже появился вывод информации по использованию утилит, значит все работает правильно.
Теперь вам необходимо включить « отладку по USB » на Android и подключить к маку, чтобы проверить окончательно, все ли работает нормально, а также видит adb или fastboot ваше устройство.
Если ваше смартфон или планшет Android включен в обычном режиме пишем ADB команду:
Если после List of devices attached появился набор букв и цифр и рядом написано device, значит вы сделали все правильно.
Если устройство в режиме Fastboot , то вводим команду:
Все готово, теперь вы можете использовать ADB и Fastboot также как делали это в Windows.
Более подробно о командах ADB вы можете узнать в статье:
Подробно как прошивать Android устройства с помощью Fastboot:
P.S Если не охота каждый раз писать ./
Если вам не охота писать каждый раз ./ перед командами adb или fastboot, тогда нужно выполнить еще пару небольших манипуляций:
- Откройте Terminal и введите команду
- После чего введите вставьте в окно
- После внесения, нажать комбинацию клавиш для того чтобы сохранить, жмем CTRL+X, после чего нажимаем Y, а после Enter.
Проверяем работу adb или fastboot, вводим данный команды без ./
Либо же скопируйте файл adb и fastboot в папку bin!
Источник
Install and Use ADB and Fastboot on Mac
ADB and Fastboot are multi-purpose command-line tools for Android that can be used via Windows, Mac, and Linux. If you try to use ADB commands in the Mac terminal without setting up ADB and Fastboot platform tools, you’ll get errors like “adb command not found”, and “fastboot command not found” on Mac. In this tutorial, I’ll be showing you how you can install and use Android SDK Platform-tools on Mac.
Whether you want to backup your Android device, debug it, sideload an APK, unlock the bootloader, install an OTA update zip, uninstall system apps, root, and flash TWRP recovery, tweak device settings, or gather key information about your device, ADB and Fastboot are essential tools. If you own an Android smartphone or tablet and don’t have any clue as to how you can install and use ADB and Fastboot on your Mac, this tutorial is just for you.
ADB and Fastboot Platform-Tools for Mac
In order to install ADB and Fastboot for Mac, there first thing you need to do it to download the latest Android SDK Platform-tools for Mac.
Having downloaded the SDK Platform-tools for Mac, you’ll need to extract the zip file.
Please be informed that ADB or Fastboot tools can’t be installed as a program or app on macOS. If you double-click the ‘adb‘ executable file, you’ll get the following error in the Mac Terminal.
“adb” cannot be opened because the identity of the developer cannot be verified or confirmed.
You’ll get the same error if you or try to run ‘fastboot‘ on Mac. Therefore, it’s important that you set up ADB and Fastboot correctly.
ADB or Fastboot Not Found on Mac Error
There is another scenario where you may get one of the following errors in the Mac Terminal.
adb: command not found
fastboot: command not found
adb devices not found
Whether you get the “adb command not found mac” or “fastboot command not found mac” error, it’s because you aren’t executing the ADB commands in the Mac Terminal the way you’re supposed to. I have already written a guide to fix ADB or Fastboot is not recognized error on Windows, and in this guide, we’ll see how to solve this issue on Mac.
Installing ADB and Fastboot on Mac
Being a lifelong Windows user, I didn’t know how to use ADB commands in Mac Terminal. I had to google about it after getting my Macbook Pro. At first, one may think that doing certain things are more complicated on Mac than Windows but once you get familiar with it, things become easy.
If you having a hard time using ADB or Fastboot commands on your Mac, follow the steps below to learn the correct way to set up and use them.
Method 1: Drag ‘Platform-tools’ Folder to Terminal
- Download the latest SDK Platform-tools.zip file for Mac from above.
- Extract the Zip file using Mac’s default Archive Utility app. you’ll have a new folder called ‘platform-tools‘ on your desktop.
- Now, click on the Go option on the Mac Finder and select Utilities.
- You’ll find Terminal among the list of Mac Utilities. Double-click it to launch the Mac terminal window.
- When the Terminal is launched, click on the ‘platform-tools‘ folder icon, hold the Command button and drag it to the terminal window.
- Doing so will CD (change directory) or set the Terminal’s path to the ADB and Fastboot files on your Mac.
You can now execute any ADB or Fastboot command without any error.
Method 2: Type or Paste Folder Path in Terminal
As you saw above. you must add the ‘platform-tools’ folder path to the Mac Terminal to run ADB and Fastboot commands. You can also do that by either manually typing the path to the folder containing ADB and Fastboot files or just by copying and pasting the folder path in the terminal. You can read my tutorial describing 5 ways to copy file and folder path on Mac OS X.
- Launch the Terminal by navigating to Go > Utilities on your Mac.
- Now type the path of the ‘platform-tools‘ folder and press the Enter key.
- Alternatively, you can press the Option key and right-click on the folder icon and select Copy “platform-tools” as Pathname in the context menu and then paste the path in the Terminal.
You are all set to issue ADB commands in the Mac Terminal and you won’t get the ‘adb command not found‘ error. To verify that you have done everything properly, type the following command, and press the Enter key.
If you want an easier way to install and use ADB and Fastboot, read my detailed tutorial on adding ADB to a path on Mac to enjoy global ADB access.
Using ADB and Fastboot Commands in Mac Terminal
Now that you have properly set up ADB and Fastboot on your Mac, let’s see how we can run commands.
- Go to the Developer Options on your Android device and enable USB debugging.
- Now, connect your Android device to your Mac. You should also extend the screen lock time out from display settings on your phone or tablet.
- Open the Mac Terminal using any of the 3 methods I described above and issue the following command.
- Keep an eye on your Android phone’s display as you run the above command and authorize ADB or USB debugging on your device by selecting Allow when prompted.
- You’ll see your devices listed in the Mac terminal window. It means that ADB daemon is ready to communicate with your device.
Are you aware of the powerful features of ADB and Fastboot and the tasks you can perform using commands? Don’t forget to check out my huge list of commands with an explanation.
Источник
Как настроить Android ADB/Fastboot на Mac OS X простым способом
Вот как вы можете быстро и легко настроить Android ADB и Fastboot на Mac OS X.
Настройка ADB (Android Debug Bridge) или Fastboot на любой платформе может оказаться очень сложной задачей, поскольку пользователю требуется выполнить несколько шагов, прежде чем он/она сможет отметить все это в своем контрольном списке. На Mac, однако, вы можете легко настроить ADB и Fastboot за несколько простых шагов, и самое приятное: любой может сделать это практически без знаний о настройке инструментов для разработчиков.
Все готово? Давай начнем!
Как настроить Android ADB/Fastboot на Mac OS X
Прежде чем двигаться дальше, убедитесь, что у вас стабильное интернет-соединение, поскольку это является строгим требованием для установки ADB и Fastboot.
Важно для пользователей OS X El Capitan
Приведенный ниже метод не работает на El Capitan, если у вас включен Rootless. Перезагрузите Mac, удерживая нажатой комбинацию клавиш Command + R, пока не загрузитесь в Recovery. Сверху вы должны увидеть запись с надписью «Утилиты». Нажмите на него, затем нажмите «Терминал». Введите следующую команду:
Перезагрузите Mac, и вы сможете загрузить и установить ADB и Fastboot, используя метод, описанный ниже.
1. Запустите приложение «Терминал» на вашем Mac. Нажмите комбинацию клавиш Command + пробел, чтобы вызвать поиск Spotlight. Введите в терминале и нажмите, чтобы запустить его.
2. Запустив и запустив приложение «Терминал», скопируйте и вставьте следующую команду без каких-либо изменений самостоятельно:
Источник
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.
- 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).
- 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 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.
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
- 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 enable Developer Mode. You will see a toast message when it is done.
- Now go back to the main Settings screen and 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 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
- Download the Android SDK Platform Tools ZIP file for Windows.
- Extract the contents of this ZIP file into an easily accessible folder (such as C:\platform-tools)
- Open Windows explorer and browse to where you extracted the contents of this ZIP file
- 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”.)
- 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 to launch the ADB daemon:В adb devices
- 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).
- 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
- Download the Android SDK Platform Tools ZIP file for macOS.
- Extract the ZIP to an easily-accessible location (like the Desktop for example).
- Open Terminal.
- To browse to 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 to 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 to launch the ADB daemon:В ./adb devices
- On 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 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
- Download the Android SDK Platform Tools ZIP file for 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 folder your ADB tools are in, you can execute theВ following command to launch the ADB daemon:В ./adb devices
- Back on your smartphone or tablet device, you’ll see a prompt asking you to allow USB debugging. Go ahead and 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 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
Copy a file/directory to the device: adb push
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!
Источник