Saturday, July 23, 2011

Android Debug Bridge (ABD) Beginner's Guide


ADB (Android Debug Bridge) is a fancy tool that Google has made available to Android users and developers. It is part of the Android SDK (Software Development Kit).  Basically it creates a connection (Bridge) between the Android and the computer. It was originally used as a tool to achieve root on the phone, and to be able to do some additional functions, similar to a linux command line.  A lot of the same commands can be done on the phone through a terminal emulator program (right on the phone), it is so much easier to be able to type it all on a full sized keyboard (plus it makes you feel more like a computer nerd).

Although all of this may seem a little complicated at first it is very simple to setup and use.  At the bare minimum you just have to download the software, install it (I usually install it to c:\android), change a setting on your phone (See "Phone Settings" below) and plug the phone and computer into the USB cable. A very simple installer has been put together entitled ADB for Dummies by AndroidSamurai that provides an installer that puts all the files in the right places.  There is a simple command you can do to verify that everything is installed properly.  Open up a command prompt (Start -> Run -> CMD) and switch to the "Tools" folder (wherever you installed the above mentioned software) and type the following command:

adb devices


You should see a long string that will be the ID number of your phone.  You don't need to memorize it, you just need to see it there to know that the computer properly sees the phone. If you don't see it, it is most likely an issue with a driver.  Go to the manufacturers site, or simply search google for the manufacturer and the word driver.


Phone Settings - Another troubleshooting step is to make sure the phone is setup for the USB connection. To do this all you have to do (on the phone) is:
Settings -> Applications -> Development -> USB Debugging (Make sure it is checked)  That's it!



Once you have it installed there are a few cool things you can do with it. Let's say you want to make a backup of all the apps on your phone.  All you have to do is key in this command:

adb pull /data/app ./


This will backup all the .APK files so you can reinstall them at a later time.  So now lets show you how to do the restore.  Put your APK files all into a single folder (c:\apps), navigate to that folder and type in this command:


adb install *.apk



How about changing your boot logo?  Easy as can be...  Find a boot animation on the web that you want to use, and make sure it is a .ZIP file (that you have no need to open or modify, because it probably won't work if you do) and rename it bootanimation.zip.  Copy the bootanimation.zip file to your "Tools" folder inside your Android SDK installation.  Finally type the following 2 commands to copy it to the phone:

adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push pirate_bootanimation.zip /system/media/bootanimation.zipck/mtdblock3 /system
adb reboot

 Watch the phone screen and you should see the new boot logo!

So this is a brief look at what ADB does, and how to get it.  For more information check out the official Android ADB site and learn all you can on it.  Also remember to backup before messing around too much.  We are not responsible for data loss!






Some "Best of the Best" accessories for your Android phone:

No comments:

Post a Comment