• twitter
  • facebook
  • rules
  • news
 
Page 1 of 33 12311

[HOW-TO] ADB for Dummies(How-To Learner's Guide)

  • Retweet Thread
  • Vote for Thread to be Featured on the XDA Portal
Thumbs up [HOW-TO] ADB for Dummies(How-To Learner's Guide)

ADB for Dummies - Almost impossible to mess this one up

Make sure that debugging mode is checked in your G1 Settings, if not ADB will not work.

UPDATED GUIDE BY NEPHRON LOCATED HERE!!!

Supported Operating Systems:
* Windows XP (32-bit) or Vista (32- or 64-bit)
* Mac OS X 10.4.8 or later (x86 only)
* Linux (tested on Linux Ubuntu Dapper Drake)


Section 1: Pre-reqs

System Requirements

Android 32/64 bit Windows USB Driver
*NOTE*
The USB driver for Windows provides support for the following Android-powered devices:

•T-Mobile G1* / ADP1
•T-Mobile myTouch 3G* / Google Ion
•Verizon Droid*
* Or similar hardware on other carriers

Any additional devices will require Windows drivers provided by the hardware manufacturer.


Android SDK

Older Releases *Most likely don't want this one*
Android 1.5 Platform
Android 1.6 Platform
Android 2.0.1 Platform *Also Located below*

*Newest Builds*

Windows

Mac OS X

Linux i386(x86/32-bit)

*Please note that I am using Vista Ultimate x64 SP1*

Section 2: Where does it all go?

*UPDATE*

Linux users wanting to know how to install/run the Android SDK can check the 2 links below for more info. Thanks to xyrcncp for these links.

Downloading
http://developer.android.com/sdk/1.1_r1/index.html

Installing
http://developer.android.com/sdk/1.1_r1/installing.html

And thanks to tubaking182 for giving us some more commands to use for all the linux users.

You can download it and: (corrected thx to @austinkyle)
Code:
mv ~/Desktop/sdk/tools/adb /usr/bin/adb adb

You should be able to run the adb commands from any directory

Not too hard to cd to the correct directory but i personally don't like to type:

Code:
cd ~/Phone/tools/android-sdk/tools

And again, thanks to mark925 for his input:

"Just to add, if you take adb.exe and adbwinapi.dll and copy or move them to the \windows\system32 directory you can run adb from any dos directory prompt."


Now that you have all the essential files you need to run "adb", let's get started shall we?

First off you want the make note of where you downloaded the ADB Android Driver and the Android SDK. Both of these files are zipped and will need to be extracted before they can be used. Windows vista has ".zip" extracting built-in and does not require an external app.(I have listed some links below)

Use the links below to install a 3rd-party compression/extraction app:

7-zip 4.65 32-bit

7-zip 4.65 64-bit

(If you do not know how to install a windows executable file, please kill yourself now! )

OK, now it's time to move our extracted ADB Drivers and Android SDK to a better location(preferably the root of C:\).

- Right click on the extracted folders(android_adb_usb_driver or android-sdk-windows-1.1_r1) and select copy(or Ctrl+C)

- Now navigate to the root of your primary hard-drive(C:\) and right-click then select paste(or Ctrl+V)

After we copy both of our newly extracted folders to our (C:\) drive we now have to install the USB drivers.

- Connect your G1 to your PC using the provided USB Cable or just a plain ole 6-pin to 4-pin usb cable... (I prefer to use one with a ferite core)

DO NOT MOUNT YOUR G1 TO YOUR PC FROM THE G1 NOTIFICATION WINDOW!

- When the new hardware device notification pops-up on your pc point windows to the driver folder we moved to our C-drive(C:\android_adb_usb_driver) and install the adb driver.

- Now that windows knows what the G1 is let's get started learning how to run adb shall we?

Section 3: Running ADB from Command Prompt

Running Command Prompt:

Windows XP: Select Start or Tap the Windows Key on your Keyboard, select "Run" and type "CMD" then hit "Enter".

Windows Vista: Select Start or Tap the Windows Key on your Keyboard, select the search box on the left and type "cmd" then hit "Enter".


- Also, Mikey1022 has reminded me to add the "ADB" directory path as a system variable in windows...

To do this right-click on "My Computer" and select Properties. Next select the Advanced tab(Advanced Settings in Vista) then select Environment Variables.

Click "New" under System Variables and add the following:

Variable: adb
Value: C:\android-sdk-windows-1.1_r1\tools

Now your are in a command prompt! Everybody DANCE!!!

From the command prompt we must navigate to the adb executable within the android sdk. You can find the adb executable in the tools folder within the android sdk.

Let's point our command prompt to the tools folder now:

Code:
C:\Users\Your User Name> cd C:\android-sdk-windows-1.1_r1\tools <-- Tap Enter
 
C:\android-sdk-windows-1.1_r1\tools> <run your adb command here>

Ok, now that you know how to initiate an adb command let's try one shall we?

Remember, we are still in the command prompt and in the /tools folder within the android sdk....

Code:
C:\android-sdk-windows-1.1_r1> adb shell <--- Hit Enter
# <--- Now notice that if done correct you will be inside the android shell
# ls <--- Hit enter to show a current directory listing


THAT'S IT LADIES & GENTLEMEN!!!!

Any more questions just post them here or shoot me a reply on Twitter(link in my signature).


This Tutorial is brought to you by: AndroidSamurai aka. VanillaTbone

What am I going to teach you to do next?

For the "mature" people who have honest questions and problems: You can reach me 24/7 on gtalk under androidsamurai.

__________________
Motorola DROID
*More New Cr@p To Come*

My ADB for Dummies Guide
Follow Me On Twitter

Last edited by VanillaTbone; 15th March 2010 at 04:14 PM. Reason: Updated/Corrected

<golf clap>
Well done.
</golf clap>

What do i do if the new hardware device notification doesnt pop-up ? NM i got it. Thanks for the writeup


Last edited by King_tee; 8th April 2009 at 09:30 PM.

@King_tee: Assuming windows, you follow the following steps.
1. Start > Control Panel > System.
2. Hardware > Device Manager
3. Click on the last icon below the File menu. It should correspond to "Scan for Hardware Changes."

If that doesn't work, try unplugging / replugging USB cable, different USB cable, restarting phone, restarting computer, etc.

If you never see the notification, navigate to the Device Manager(inside "System" in the control panel in XP and inside Device Manager on Vista).

You will see ADB Android Device at the top of the list with a Yellow Icon beside it meaning the device is not working. Right-click on the device and select "Update Driver".

Follow the dialogs that pop-up and navigate to where the unzipped drivers are at...

You should be good to go from there...

__________________
Motorola DROID
*More New Cr@p To Come*

My ADB for Dummies Guide
Follow Me On Twitter

ok, i need some help please... I downloaded the SDK and followed the instruction in this thread, but when i try to update my driver for the phone, it says the driver is not compatible with my phone.. I am using Haykuro's ROM 4.5 with FW 1.5.. would that be the reason for this issue?

Originally Posted by devildogg2001  View Post

ok, i need some help please... I downloaded the SDK and followed the instruction in this thread, but when i try to update my driver for the phone, it says the driver is not compatible with my phone.. I am using Haykuro's ROM 4.5 with FW 1.5.. would that be the reason for this issue?

you may need to uninstall the current driver for your phone if you have mounted it before downloading the SDK. if you don't have the SDK setup the first time you plug the phone in then your computer will auto-update the driver to a regular UMS driver and it won't help you when you try adb. i forget how to uninstall your current driver since i don't use windows, but i'm sure you can find a nice crash course online

__________________
the G1 has died, moved on now to mt3gs
Color: Red
A2SD: no
SdCard: 8GB class 4
ROM: TKMod test3
Radio: latest

@tubaking182

android help


how to partition your sdcard

SWYPE
Slide Questions Answered

Before you click HERE you should probably click HERE

Originally Posted by tubaking182  View Post

you may need to uninstall the current driver for your phone if you have mounted it before downloading the SDK. if you don't have the SDK setup the first time you plug the phone in then your computer will auto-update the driver to a regular UMS driver and it won't help you when you try adb. i forget how to uninstall your current driver since i don't use windows, but i'm sure you can find a nice crash course online

I dont know if thats the problem because when i plug it in, it doesnt show up as a notification, and when i go to the device manager it shows the little yellow triangle.. I'll look again. Thanks for the quick reply though. I am no expert in linux, but i have it installed, let me see if i can figure it out there..

Originally Posted by tubaking182  View Post

you may need to uninstall the current driver for your phone if you have mounted it before downloading the SDK. if you don't have the SDK setup the first time you plug the phone in then your computer will auto-update the driver to a regular UMS driver and it won't help you when you try adb. i forget how to uninstall your current driver since i don't use windows, but i'm sure you can find a nice crash course online

ok, so i am in linux now, and i just noticed this guide was for windows.. lol can you or someone tell me how to install the SDK on linux?

Originally Posted by devildogg2001  View Post

ok, so i am in linux now, and i just noticed this guide was for windows.. lol can you or someone tell me how to install the SDK on linux?

Downloading
http://developer.android.com/sdk/1.1_r1/index.html

Installing
http://developer.android.com/sdk/1.1_r1/installing.html

Found through Google...imagine that.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Rules
Forum Jump
 
All times are GMT +1. The time now is 11:43 AM.