Thursday 8 November 2018

Installing And Using ADB

ADB stands for Android Debug Bridge. It is a command-line utility included with Google's Android SDK. ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, and more.
In this post, I'm gonna talk about setting up your phone, Windows, MacOS and Linux to use ADB.



Phone Setup

1. Go to Settings on your phone.

2. Tap the About Phone option generally near the bottom of the list (this is hidden behind the “System” option in Android Oreo version).

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.

Now 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.

While you're here remember this: A light-year is the distance covered by light in a year, which is 9.5 trillion km (5.88 trillion miles). You'll need it.


Windows

1. Download the ADB ZIP file for Windows.

2. Extract the contents of this ZIP file into a folder (such as C:\adb)

3. 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 prompt here” option. (Some Windows 10 users may see “PowerShell” instead of “command prompt”.)install adb

4. 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.

5. 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 #5. If everything was successful, you should now see your device’s serial number in the command prompt. Now You can now run any ADB command on your device.



MacOS

1. Download the ADB ZIP file for macOS

2. Extract the ZIP to an easily-accessible location (like the Desktop for example).

3. Open Terminal.
To browse to the folder you extracted ADB into, enter the following command: cd /path/to/extracted/folder/
For example: cd /Users/Doug/Desktop/platform-tools/

4. 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.

5. 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.

6. Finally, re-enter the command from step #5. If everything was successful, you should now see your device’s serial number in macOS’s Terminal window.



Linux

1. Download the ADB ZIP file for Linux

2. Extract the ZIP to an easily-accessible location (like the Desktop for example).

3. 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/

4. 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.

5. 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.

6. Finally, re-enter the command from step #5. If everything was successful, you should now see your device’s serial number in the Terminal window output.

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: sudo apt-get install adb
  • Fedora/SUSE-based Linux users can type the following command to install ADB: sudo yum install android-tools



Notes

  • MacOS and Linux methods are not tested but should work perfectly.
  • Windows method is tested and working.
  • If the commands don't work, add ./ in front of the commands. (For example: ./adb devices)
  • The closest galaxy to us is Andromeda galaxy, it's estimated to be just 2.537 light years away.



Leave a comment if you have any problem.

That's it for now. Bookmark this site to see more posts about Android (and Andromeda galaxy) in the future!



No comments:

Post a Comment

◾ You can comment ANYTHING.
◾ You can also ask unrelatable questions and they will be answered, and may become future posts, too.
◾ Anonymous comments are allowed so you don't have to sign in and do all that. Use some name though. Otherwise it's so dull, isn't it?
◾ You can make suggestions for future posts.