What is ADB and how do I use it

Posted On Sep 21 2019 by

first_imgLook at any tutorial for rooting an Android device, and one set of initials is sure to come up: ADB. Veterans to Google’s mobile platform will let it roll off their tongues as if it’s everyday language, but those new to Android hacking can get a little tripped up. What the $%#@ is ADB? Let’s take a look.Android Debug BridgeThis is the literal meaning of ADB. Though at first glance it doesn’t appear to tell you anything, it actually does. It’s a “bridge” for developers to work out bugs in their Android applications. This is done by connecting a device that runs the software through a PC, and feeding it terminal commands. ADB lets you modify your device (or device’s software) via a PC command line.If command line syntax confuses or intimidates you, have no fear. For most average users, the only time you’ll need to use ADB is when you have step-by-step instructions in front of you.For example, in our guide to rooting the Kindle Fire, we present the following ADB commands:adb push BurritoRoot2.bin /data/local/adb shell chmod 777 /data/local/BurritoRoot2.binadb shell /data/local/BurritoRoot2.binadb rootadb shell idadb remountadb push su /system/xbin/suadb shell chown 0.0 /system/xbin/suadb shell chmod 06755 /system/xbin/suadb remountadb install Superuser.apk Not only do you not need to know what they do, but you don’t even need to type them. Simply copy and paste each individual line into a command prompt or terminal instance. Hardcore Android hackers and developers will insist that it’s good for you to learn what it means. That may be, but not everyone wants to (or has the time to) learn Italian just so he can order from the best restaurant in Venice. A simple set of instructions will do.Installing ADBAside from ADB, the other set of initials that you see with Android hacking is SDK. This stands for Software Development Kit. So yes, in order to root most devices, you’ll need to download the entire platform that developers use to create apps.To get started, pick up the version of Android SDK for your platform:WindowsMac OS XLinux Once downloading, extract the file to an easy-to-remember place on your PC. On Windows, we’d recommend installing it in your root (c:) drive, in order to make it easier to navigate there via command line.Now you’ll want to open the folder that you extracted the SDK into, and launch the SDK Manager (on OS X, you do this by executing the program ‘Android,’ which is located in the ‘Tools’ folder in the SDK).After launching SDK Manager, you’ll see a list of optional packages to download and install. Find the one that says “Android SDK Platform Tools” (you may need to expand the “Tools” entry to find it). Once you locate it, check its box to indicate that you want to install it (choose “accept”). Unless you want to develop apps, it’s safe to uncheck everything else (choose “reject”).After choosing “Install,” Platform Tools will be automatically downloaded, and you’ll be (almost) ready to use ADB.DriversAside from the specific instructions to root your particular device, the next thing you’ll need will be the drivers for your phone or tablet.The easiest way to do this is usually to simply search for your specific device plus ‘drivers.’ So if you have a Droid Razr, you’d search ‘Droid Razr Windows Drivers.’ This will almost always direct you to the best link.Another option, which will only work for stock Android devices, is to download the USB drivers from the SDK. To do this, launch SDK Manager again. Go to the “Available packages” tab on the left, expand the “Third party add-ons” entry, then expand the “Google Inc add-ons” entry. Finally, check the entry for “Google USB Driver” package.Note that the USB Driver package isn’t compatible with OS X.Using ADBThough we aren’t hear to teach you Linux programming, it will help you to know a few basic methods to using ADB.One of the first things to remember is to put your device in USB debugging mode. This can be found by navigating to Menu>Settings>Applications>Development and checking the box for USB debugging. Without doing this, your PC won’t recognize your device.The most important thing to know is simply how to get to your ADB folder via the command line. This is done with the cd (change directory) command. So if (on Windows) your SDK folder is called “android-SDK” and it’s in your root (c:) directory, you would type the following to get there:cd c:/android-SDK Then, to get into the ADB folder, you would add the following:cd platform-tools at that point, you should see a prompt that says:C:\android-SDK\platform-tools> At this point you can connect your device and test your ADB connection. After you’ve located and installed the drivers for your particular device, type the following:adb devices If everything is set up properly, you should see a list of devices attached. Your phone or tablet will have a number assigned to it, so don’t be surprised if it doesn’t say “Droid Razr” or “Galaxy Nexus.”For average users, ADB is more of a tool for basic hacking tasks than it is a task in itself. Unless you know what you’re doing, you probably don’t want to go poking around too much without clear instructions. When you do get tutorials for rooting your favorite device, though, knowing these basics can help you to save some time and be prepared in advance.last_img

Last Updated on: September 21st, 2019 at 3:36 pm, by

Written by admin

Leave a Reply

Your email address will not be published. Required fields are marked *