Wednesday, August 24, 2016
How To Install and Use ADB the Android Debug Bridge Utility
How To Install and Use ADB the Android Debug Bridge Utility
ADB, Android Debug Bridge, is a command-line utility included with Googles 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.
Weve covered some other tricks that require ADB in the past, including backing up and restoring your smartphone or tablet and installing Android apps to your SD card by default. ADB is used for a variety of geeky Android tricks.
Install Java JDK & Android SDK
Before installing the Android SDK, youll have to install Oracles Java development kit. You can download it from here ensure you download the x86 (32-bit) version, even if your computer uses a 64-bit operating
system.
Even if you already have the Java runtime (JRE) installed, youll need to install the JDK as well.
With the Java JDK installed, you can now download the Android SDK from Google and install it on your computer. If you see a Java-related error during installation, ensure you downloaded and installed the x86 version of the JDK, not the x64 one.
Android SDK Setup
Once the Android SDK is downloaded and installed, launch the SDK Manager application from your Start menu.Enable the Android SDK Platform-tools checkbox and click the Install button. This downloads and installs
the platform-tools package, which contains ADB and other utilities.
Enable USB Debugging
To use ADB with your Android device, you must enable USB debugging on it. Youll find this option under Developer Options on your devices Settings screen.Test ADB and Install Device Drivers
Locate the android-sdks folder. Note the SDK path displayed at the top of the SDK Manager window.If you used the default install location, youll find ADB in the following directory:
C:UsersNAMEAppDataLocalAndroidandroid-sdkplatform-toolsIf you used a different install location, youll find ADB in the platform-tools directory inside your android-sdk directory.
Browse to this directory, hold Shift and right-click inside it, and select Open command window here.
To test whether ADB is working properly, connect your Android device to your computer using a USB cable and run the following command:
adb devices
You should see a device in the list. If your device is connected but nothing appears in the list, youll need to install the appropriate drivers.
Your manufacturer may provide a downloadable driver package for your device. You can also try installing the Google USB Driver from the Extras folder in the SDK Manager window.
You may have to force Windows to use the installed drivers for your device. Open the Device Manager (click Start, type Device Manager, and press Enter), locate your device, right-click it and select Properties. You may see a yellow exclamation mark next to the device if its driver isnt installed properly.
On the Driver tab, click Update Driver.
Use the Browse my computer for driver software option.
Navigate to the following folder if you installd the Google USB driver:
C:UsersNAMEAppDataLocalAndroidandroid-sdkextrasgoogleusb_driver(Check the extrasgoogleusb_driver folder under the android-sdk folder if you installed the Android SDK to a non-default location.)
ADB Commands
Once youve got your drivers correctly installed and the adb devices command indicates it can communicate with your Android smartphone or tablet, you can start using ADB.In addition to the variety of tricks that require ADB, ADB offers some useful commands:
adb install C:package.apk Installs the package located at C:package.apk on your computer on your device.
adb uninstall package.name Uninstalls the package with package.name from your device. For example, youd use the name com.rovio.angrybirds to uninstall the Angry Birds app.
adb push C:file /sdcard/file Pushes a file from your computer to your device. For example, the command here pushes the file located at C:file on your computer to /sdcard/file on your device
adb pull /sdcard/file C:file Pulls a file from your device to your computer works like adb push, but in reverse.
adb logcat View your Android devices log. Can be useful for debugging apps.
adb shell Gives you an interactive Linux command-line shell on your device.
adb shell command Runs the specified shell command on your device.
Go to link download