Categories

News (37) Tutorial (16) Applications (10) Knowledge (10) Review (6) Games (4) Rumours (4) Health (1)

Wednesday, September 8, 2010

How To Set Up ADB for Android Devices





Most folks won’t have to use ADB (Android Debug Bridge) ever, but if you want to learn how or want to get a little more technical with your Android phone, here’s how to get it set up.


I. Setting Up The SDK
1. Download the Latest Android SDK from here
2. Extract the Android SDK .Zip file to C:\AndroidSDK (this should name the new folder created AndroidSDK in the C directory).
3. On your phone, click Settings > Applications > Development and make sure USB Debugging is on.
4. Plug your phone into your computer via USB cable (it needs to be on). It should say installing drivers if using Windows(Won't show If already installed before)
5. After it installs the drivers, goto the Start menu and type cmd into the search bar (Vista or higher) or click Run then type in cmd (XP) to open the command prompt.
6. Type the following into the command prompt window (hitting enter at the end of every line):


cd\
cd AndroidSDK\tools\
adb devices




You should see a serial number pop up, it’s the serial number of your phone. This means you are all set.If you do NOT see a serial number, then we need to reinstall the drivers.


II. Some Common ADB/Fastboot Commands


ADB Commands
adb devices – lists which devices are currently attached to your computer
adb install <packagename.apk> – lets you install an Android application on your phone
adb remount – Remounts your system in write mode – this lets you alter system files on your phone using ADB
adb push <localfile> <location on your phone> – lets you upload files to your phones filesystem
adb pull <location on your phone> <localfile> – lets you download files off your phones filesystem
adb logcat – starts dumping debugging information from your handset to the console – useful for debugging your apps
adb shell <command> – drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly


Fastboot Commands
fastboot devices – lists which devices in fastboot mode are currently attached to your computer
fastboot boot <filename> – boots a rom stored on your pc specified by the filename
fastboot flash <partition> <filename> – flashes a rom stored on your pc, partition can be one of {boot, recovery, system, userdata}




Example on how to Install NFS Shift on Xperia X10 using the above method
Place NFSShift.apk into the tools folder in AndroidSDK
Make sure USB Debugging is on and plug in phone
Go into command prompt-
cd\
cd AndroidSDK\tools\
adb install NFSShift.apk





.

No comments:

Post a Comment