blog.up-link.ro android bsd linux unix & open-source world

8Apr/100

Android: How To Set Up ADB/USB Drivers for Android Devices

WP Greet Box icon
Hello there! If you are new here, you might want to subscribe to the RSS feed or subscribe via E-mail for updates on this topic.

Before you begin make sure you entirely read the tutorial.

1. Download Android SDK and USB drivers

Download the latest AndroidSDK from Google and extract the AndroidSDK.zip file to C:\AndroidSDK.
Download and install HTC Sync from HTC (HTC Sync is not required for ADB but it's the easiest way to install usb drivers).
If you are using HTC Hero and Microsoft Windows 7 (and you experience problems with driver installation) you have to follow this procedure to install usb drivers and HTC Sync.

2. Set up your phone to work with ADB

Enable USB Debugging on your phone from Settings->Applications->Developers then plug the phone into your computer via USB cable (make sure the phone is turned on).

3. Check if ADB is working

Goto the Start menu and type cmd into the search bar or click Run then type in cmd to open the command prompt.

Type the following into the command prompt window ( hit enter at the end of every line):

cd\
cd AndroidSDK\tools\
adb devices

Now, you should see a serial number pop up.

Android ADB

ADB is working as it should

This means you are all set.

If you do not see a serial number, then you need to reinstall the drivers.

4. Common ADB and Fastboot Commands

ADB Commands
adb devices – lists which devices are currently attached to your pc
adb install <package.apk> – lets you install an Android application on your phone
adb remount – remounts your system in read-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 phone
adb pull <location on your phone> <localfile> – lets you download files off your phone
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 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

Print This Post Print This Post
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


*

No trackbacks yet.