Jump to content

Check us out:

- - - - -

How To: adb for Windows the Easy Way


17 replies to this topic

#1 OFFLINE   olta777

    Android Master

  • VIP
  • 3,808 posts
  • Device:HTC Thunderbolt

Posted 25 January 2010 - 03:13 AM

**Thanks to MrZoSo at droid forums for this write up**

"ADB = Android Debug Bridge, In a nutshell for our(typical users) purposes, It allows us to access our Droid using the Command Prompt on our PC. If you want to know more, google it, or visit Androids Developer site here:

Please Login HERE or Register HERE to see this link!



Also for a little more in depth information, check out the thread here at the DroidForums written by alquimista:
How To Use ADB: All Commands and Options


>>PREPARATION

Download the SDK from Android - This is where the "elusive" adb resides.

Please Login HERE or Register HERE to see this link!


(The link takes you to the download site where you can get the SDK for Windows, Linux, and Mac.)

Windows users download android-sdk_r0x-windows.zip

Download the Motorola USB Drivers
Motorola drivers are needed for proper communication between adb and our Droid in Windows.

Your going to get one of these:
Motorola 4.x.x Driver with MotoConnect* (for 32-bit versions of Windows®)
Motorola 4.x.x Driver with MotoConnect* (for 64-bit versions of Windows®)

Depending on your version of Windows.

Download the drivers here:

Please Login HERE or Register HERE to see this link!


(Don't worry about the PC Charging Drivers, they are not needed)


>>Installing and Setting Up

SDK Installation/Setup

Extract the android-sdk_r0x-windows.zip to your local drive, this for most will be C:
Afterwards you should see a folder on your C: drive called android-sdk-windows.
The path should be:
C:\android-sdk-windows

To make things a little easier for later, we're going to rename it. So right click on it and select "rename", type in android, hit enter on your keybaord and make sure the name change takes effect.
Now the path should be:
C:\android

Guess what?! You just installed SDK and ADB! Simple enough, right

Motorola Driver Installation

Why do I need these when I can already see the Droids sdcard in Windows?

The sdcard can be seen due to the native drivers in Windows, which is just like plugging in a flash drive and nothing more. But for adb we need a specific driver for proper communication.
It's called Android Composite ADB Interface, without it, adb will not see your Droid.
What we downloaded from Motorola provides this.
The file downloaded is a zip file, double click it and drag out the file to the desktop. Double click on it to install the drivers.
Done.

At this point adb is ready for you to use!


>>Making it a little easier

As we stand at this point, adb can be used.
ADB is used through Windows Command Prompt, it's like the old days of DOS but in Linux flavor.
As it is now to get adb going, you would open the Command Prompt window and cd(change directory) to the directory(folder) where adb is and type the adb shell command.

To avoid all this typing, and get to the shell quicker, we're going to add it to our path in Windows, so all we have to type when in the Command Prompt window is adb shell.

To do this, we need to get to the System Properties in Windows.
It's basically the same in XP, Vista, and Windows 7.

There's two simple ways to get there:
1 way = click Start > Control Panel > System icon.
2nd way = click the Start button, right-click “My Computer”(Computer for Vista/7) and select “Properties”.
If your using XP, your there. If your using Vista/7, click on Advanced system settings on the left side.

You should now be in the System Properties window.
Click on the Advanced tab.
Click on the Evironment Variables... button
In the System variables(lower box), scroll through the list until you see Path under the Variable column.
Click on it to highlite it, click on the Edit... button.

We are going to add our path to adb, where we installed the SDK, in the Variable value: box.
Make sure your cursor is at the end of the last entry, and type this:

;C:\android\tools\

Be sure not to have any spaces and there is a semi-colon in front!
(If your local drive isn't C: then just use the letter of your drive instead of C: )
Click OK on everything, and close Control Panel if it's open.

Now to use adb, at the prompt we only need to type in adb shell


That's it, you now have adb and it's ready to use!


>>Using adb with our phone

We need to set it up our phone so it will communicate with adb.
Don't worry, it's easy
On the phone hit the Menu button, go to Settings, go to Applications, go to Development, check the USB debugging check box.
Done.

Plug phone in to PC,
in XP - Click Start > Run > type CMD > click run.
in Vista/7 - Click Start > type in the Search program and files bar CMD > click on cmd.exe

You should now see a Command Prompt window (DOS box)
type adb shell
You are now using adb on your phone and start typing those commands!
If you get a message on the lines of ",,not an internal command,,," Then go over the steps above in the "Let's make it a tad easier to use though" section.

A couple little side notes:
First, When using adb, it's not a good idea to have your sdcard mounted on phone.
e.g. Check the USB debugging box, plug phone in, now at this point if you where going to transfer pictures or whatever, you would bring down the notification shade and press USB connected and then mount, Don't do this if your going to use adb.
If you plan on using su, your phone must be rooted.
Second, For the most part when we see the commands to mod/hack our Droids, they usually start out:

su
mount -o rw,remount,,,blah, blah, blah


just remember, you need to start the shell first:

adb shell
su
mount -o rw,remount,,,blah, blah, blah


Push and Pull
When pushing and pulling files with adb, we DON'T use adb shell. We have to cd(change directory) to the sdk tools folder.
The tools are at C:\android\tools, so at the command prompt type:

cd \android\tools


Too push files, copy the files to the tools folder on the PC.
We'll use two files as an example, at the command prompt type:

adb push recovery-0.99.2b.img /sdcard < this copies recovery-0.99.2b.img to the sdcard in phone

adb push bootanimation.zip /data/local/ < this copies bootanimation.zip to /data/local/ on the phone

Pulling files is the same concept.
Example to pull an image file from sdcard:

adb pull /sdcard/image.jpg image.jpg < pulls image.jpg to c:\android\tools folder

Say you have a modified image, of the same one your going to pull, in the tools folder and you don't want to overwrite it.

adb pull /sdcard/image.jpg image.bak
< pulls image to c:\android\tools folder and renames it

Oh, one more thing, when your finished using adb, and ready to use your Droid normally, type exit at both the # and $ to completely clear the pc from the phone and remember to un-check the USB debugging box on your phone.

I'm done
I hope this will help others out there and hopefully bring a little more understanding to the modding/hacking of our Droids."


Please Login HERE or Register HERE to see this link!


Edited by mrZoSo, 13 June 2010 - 01:32 PM.
fixed typo


> Register at MDW | MDW Rules and Guidelines <
Click the Posted Image in a member's post to thank them for their post!
"BB Pearl > LG Dare > BB Storm 1 > BB Storm 2 > HTC Eris > Motorola Droid > HTC Incredible > Droid X > HTC Incredible > Samsung Fascinate - Rooted/CWM Recovery/Blackhole FROYO - WINNER" :angel


Remove Advertisements Sponsored Links

    MyDroidWorld.com



#2 OFFLINE   jtelander

    Droid

  • Members
  • 155 posts
  • Device:RAZR

Posted 09 June 2010 - 08:55 AM

This explanation is really good and is the right level of detail for those of us who are just getting started. I hope you will continue to strive to provide the same quality and detail in all of your explanations as it makes a big difference. The step by step description of what the user will see and what choices they need to make makes it virtually foolproof, and that should be the goal IMO.



Thanks again.

#3 OFFLINE   jjb2814

    MDW Noob

  • Members
  • Pip
  • 2 posts
  • Device:moto droid

Posted 03 August 2010 - 09:09 AM

Thank you.. I=nub. I just used adb to implement my map fix for the P3droid froyo rom. your guide made it easy for me to learn.

#4 OFFLINE   RastaGt1

    MDW Noob

  • Members
  • Pip
  • 2 posts
  • Twitter:RastaGt1
  • Device:Motorola Droid

Posted 05 August 2010 - 05:13 PM

Why am I getting a Permission Denied when I type su to test from my laptop? How do I obtain admin rights to my DROID?

#5 OFFLINE   irishmyles003

    Junior Droid

  • Members
  • PipPipPip
  • 35 posts
  • Twitter:twitter.com/myleslynch
  • Device:Motorola Droid X

Posted 21 August 2010 - 07:03 AM

This looks like a great read. Hopefully it will help me understand what ADB is and how to finally get it working on my damn win 7 computer lol

#6 OFFLINE   buckeyefreak

    Junior Droid

  • Members
  • PipPipPip
  • 46 posts
  • Device:The Droid X

Posted 21 August 2010 - 06:58 PM

I am getting device not found...what step did I goof on I wonder?

#7 OFFLINE   olta777

    Android Master

  • VIP
  • 3,808 posts
  • Device:HTC Thunderbolt

Posted 21 August 2010 - 09:35 PM

buckeyefreak said:

I am getting device not found...what step did I goof on I wonder?

Do you have the correct motorola drivers installed and latest SDK? Also make sure your mass storage is off. :)


> Register at MDW | MDW Rules and Guidelines <
Click the Posted Image in a member's post to thank them for their post!
"BB Pearl > LG Dare > BB Storm 1 > BB Storm 2 > HTC Eris > Motorola Droid > HTC Incredible > Droid X > HTC Incredible > Samsung Fascinate - Rooted/CWM Recovery/Blackhole FROYO - WINNER" :angel


#8 OFFLINE   rwilliams268

    Junior Droid

  • Members
  • PipPip
  • 17 posts
  • Twitter:www.twitter.com/rwilliams268
  • Device:OG Droid, Dinc, Droid Charge

Posted 22 August 2010 - 10:37 AM

I can not get my Moto Droid to connect to ADB and the Block Editor for App Inventor. I am running FRG22 and I am rooted don't know if that is the issue or not. I have installed the Win7 64bit drivers straight from Moto and yes I do have a 64bit system. I uninstalled both MOTODEV and Droid Explorer and I do have the whole Android SDK installed along with all the recent updates to that, Python 2.7 is also installed.
In Device Manager it shows the Droid is connected (Android Phone-Android ADB Interface) Yet when I open a cmd prompt window and run ADB I get this

C:\Program Files (x86)\Android\android-sdk-windows\tools>adb reboot
* daemon not running. starting it now *
* daemon started successfully *
error: device not found

C:\Program Files (x86)\Android\android-sdk-windows\tools>

I do have USB Debug Mode on along with USB Mass Storage turned off from the Droid.

So what do I need to get this bad boy connected?
Thanks in advance and if you need any more info let me know I'll gladly provide what I can

#9 OFFLINE   rwilliams268

    Junior Droid

  • Members
  • PipPip
  • 17 posts
  • Twitter:www.twitter.com/rwilliams268
  • Device:OG Droid, Dinc, Droid Charge

Posted 22 August 2010 - 09:09 PM

Ok guys I got it thanks to a friend of mine. Here's what you need to do if you encounter this issue


1. Make sure you have the Android SDK and Moto drivers installed and up-to-date

2. In Device Manager you will see Android Phone - Android ADB Interface

3. You need to click on Android ADB Interface then right click Properties

4. Open the Driver Tab

5. Click on the Uninstall (Advanced)

6. When you do the uninstall option you need to choose delete drivers and then don't connect to the internet.

7. It will now say ADB Interface - Moto Composite ADB Interface

Now you can use ADB with your Droid ::):

#10 OFFLINE   Breezer23

    Junior Droid

  • Members
  • PipPipPip
  • 47 posts
  • Device:Motorola Droid

Posted 12 September 2010 - 10:13 PM

Does anyone remember, off the top of their heads what the tool is that removes the drivers from the registry? I have failed a few times after upgrading to the newest Froyo and think my comp is just confused at this point. There was a file - linked to download.com that allowed me to remove all the Motorola drivers from the registry. Any ideas?

#11 OFFLINE   DataHawg

    MDW Noob

  • Members
  • Pip
  • 1 posts
  • Device:Sprint HTC Hero running Cyanogen Mod 6 Froyo

Posted 17 September 2010 - 12:17 AM

It's called USBDeview. You can find the free download at many reliable sights. It's pretty handy to have on a Windows PC. Shows all of your connected USB devices and drivers and allows you to uninstall and install new ones in the interface.

#12 OFFLINE   f0rkyou

    MDW Noob

  • Members
  • Pip
  • 6 posts
  • Device:Motorola Droid

Posted 29 October 2010 - 02:40 PM

thank you!!!

#13 OFFLINE   matjmonk

    Android Pro

  • VIP
  • 359 posts
  • Device:DroidX

Posted 11 March 2011 - 08:26 AM

A question for the group, I've tried to install the SDK (so I could use ADB) and the installation keeps failing because it says I need a Java Development Kit (which I have downloaded and installed numerous times). I've tried version 9 and 10 of the Andriod SDK and I've tried downloading the zip and extracting as well as downloading the installation executable but nothing seems to work. Any ideas?

Thanks
If at first you don't succeed ...
SBF it!

:computer

#14 OFFLINE   nutpn

    Junior Droid

  • Members
  • PipPip
  • 24 posts
  • LocationAlabama
  • Twitter:@nutpn
  • Device:droid pro

Posted 29 June 2011 - 10:35 PM

Great explanation,now I think even I can use ADB.and tomorrow i shall,thanks olta777 great job
[email=""]Nutpn@aol.com[/email]

#15 OFFLINE   Gor22don33

    Junior Droid

  • Members
  • PipPip
  • 11 posts

Posted 25 October 2011 - 07:13 PM

Does anyone remember, off the top of their heads what the tool is that removes the drivers from the registry? I have failed a few times after upgrading to the newest Froyo and think my comp is just confused at this point. There was a file - linked to download.com that allowed me to remove all the Motorola drivers from the registry. Any ideas?
Posted Image
Posted Image
Posted Image

#16 OFFLINE   OldBaldy

    Droid

  • VIP
  • 280 posts
  • Twitter:@OldBaldy62
  • Device:DroidX

Posted 25 October 2011 - 08:35 PM

Gor22don33 said:

Does anyone remember, off the top of their heads what the tool is that removes the drivers from the registry? I have failed a few times after upgrading to the newest Froyo and think my comp is just confused at this point. There was a file - linked to download.com that allowed me to remove all the Motorola drivers from the registry. Any ideas?
Posted Image
Posted Image
Posted Image

I use a program called USBDeview to remove usb drivers.

Sent from my DROIDX using Tapatalk

#17 OFFLINE   ericMe

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 February 2012 - 07:12 PM

Help!!!
My screen is cracked and I can't check the USB Debugging check-box. Is there anyway around this? We really want to get the pictures of the phone.
Please help
Eic

#18 OFFLINE   ericMe

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 February 2012 - 07:35 PM

???Does USB mount to disk have to be check for this to work???
I keep geting a response of " 'abd' is not a recognized internal or external drive!!!!
I was able to solve this by going in to camera then pictures then turning the phone sideways. This then allowed me to check the Debugging USB.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users