Jump to content


Photo

[How To] What Is Adb And How Do I Use It? Find Out How To Manipulate Your System Files


  • Please log in to reply
48 replies to this topic

#1 Bignadad

Bignadad

    Dev/Design Extrordinare

  • Developer
  • 283 posts
  • Twitter:bignadad
  • Google+:bignadad
  • LocationBishopville, SC
  • Current Device(s):DroidX, Bionic, Dinc2, Razr Maxx, Razr HD Maxx, Gnex, Nex7, Xyboard

Posted 18 November 2011 - 06:19 AM

What is ADB and How do I use it?

ADB lets you control your Droid Razr with a command prompt to access & manipulate system files
You can modify files, pull, push, rename, etc...

How to setup Windows Android SDK (Software Dev Kit)

1. Download the latest SDK

Please Login or Register to see this Hidden Content



2. Extract contents to a new folder on PC (I have mine on desktop called "adroid-sdk-windows")

3. Goto control panel and open system properties (or right click my computer)

4. Go to Advanced settings
XP: Click the Advanced tab
Vista/Win7:
Click Advanced system settings on the left

5. Click Environment Variables near the bottom

6. Double-click on Path in the first scroll box named User Variables

7. Enter the full path to the tools/ directory at the end of Variable Value text box - make sure to separate from existing text with a semi colon ;

8. Here is what the entire contents of my Variable Value text box

Please Login or Register to see this Hidden Content


9. Press OK and close remaining boxes open

9. Run SDK Setup.exe from the android-sdk-windows folder

10. If you get an error about not having Java SDK installed but you do, add the path to 'bin' within your Java installation location to the Path environmental variable as described above before the sdk entry you just made. (eg add "C:\Program Files\Java\jdk1.6.0_20\bin;") This is likely to only be necessary where the 64 bit Java SDK is installed (obviously) on a 64 bit machine.

11. If it gives you an error about http go to settings and click on "Force http//....."

12. Unselect all options except for the USB driver

13. If you can't get the setup to work, download the USB-DRIVERS folder -

Please Login or Register to see this Hidden Content

(Windows XP/Vista/Windows 7)

14. On your phone, click Settings > Applications > Development and make sure USB Debugging is on.

15. Plug your phone into your computer via USB cable (it needs to be on). It should say installing drivers if using Windows.

16. 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.

Please Login or Register to see this Hidden Content


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 you need to reinstall the drivers.
  • Please Login or Register to see this Hidden Content

  • While the phone is still plugged in, open USBDeview and sort by manufacturer. Find all the HTC/Android drivers and uninstall them all. (Windows Vista requires program to be run as an administrator, otherwise files won't uninstall.)
  • Once all have been uninstalled, unplug the phone from the USB cable and plug it back in.
  • The correct drivers should reinstall automatically (check the drivers as they are installing, one should say ADB Device driver).
  • To check, go to Devices in your Start menu then click on the “Android Phone”. Click on the Hardware tab, and check the list of drivers for ADB Interface under Type.
  • Done! Now you can use ADB to alter your phone from your computer.
How to Use ADB Commands

1. Use windows Explorer to navigate to Tools folder within android-sdk-windows

2. Right Click and choose new shortcut

3. Enter this Location
C:\Windows\System32\cmd.exe

4. Click next and name whatever you like (Now you will have quick access to command prompt & it will open up to the right directory)

5. Open the command prompt shortcut just added

6. You should see this prompt
C:\Desktop\android-sdk-windows\tools\>

7. Simply type adb shell and press enter and you will be brought to a $ prompt
*If you are rooted you will see # prompt

8. Now you can type many different commands to manipulate your DroidX.... (Deodex, Root, Pull/Push Files, etc)


  • sweetmeroy likes this

Posted Image

Posted Image


#2 Bignadad

Bignadad

    Dev/Design Extrordinare

  • Developer
  • 283 posts
  • Twitter:bignadad
  • Google+:bignadad
  • LocationBishopville, SC
  • Current Device(s):DroidX, Bionic, Dinc2, Razr Maxx, Razr HD Maxx, Gnex, Nex7, Xyboard

Posted 18 November 2011 - 06:20 AM

Look at what other's are saying about this guide

Thank you very much for this useful guide! I am a complete noob when it comes to ADB - I've never had it set up before. By following this guide, in one attempt I successfully set up ADB & then ran the echo hack from this thread. Some of the menus/options/phrasing is a bit different in Vista, but I got through it. Again, many thanks, this was easy!


  • PillClinton likes this

Posted Image

Posted Image


#3 Bmplekan

Bmplekan

    Member

  • Members
  • PipPip
  • 27 posts
  • Twitter:@plekanb
  • LocationNY

Posted 18 November 2011 - 03:09 PM

Thanks A $#!tload for this!!!
  • Bignadad likes this

#4 Guest_DirtyDroidX_*

Guest_DirtyDroidX_*
  • Guests

Posted 20 November 2011 - 05:34 PM

Nice write up big. I'm sure many ppl will get some use out of this.

To add to this here is a tip. I put a shortcut to "run" on my desktop this opens a box. Type "cmd" this will open a command window.

Now you can run adb from any folder that had a adb file in it. Primarily it will be the C/user name/android-sdk-platform tools, for using adb all the time.

Now like in the root method on this forum, when you open a cmd window all you do to get to a folder directory to run the root method or flash a system.img or whatever, you type cd Desktop/Razor. Now this will put you in that folder or you can type cd Desktop then cd razr also. Once in the desired folder to run a file to your phone type the file name you need *example* run.bat . This will run that file.

Hope this helps a few.

Sent from my DROID RAZR using Tapatalk
  • jntdroid likes this

#5 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 13 December 2011 - 11:11 AM

I am embarrassed to ask this but I am in need of some help. I have followed these instructions but evidently am missing something. When I go to the cmd.exe I am getting a error saying "'adb" is not recognized as an internal or external command, operable program or batch file. What am I doing wrong here? If this is any indication of how well I am learning how to root this phone then I think its time for me to stop here because the last thing I want to do is screw up the phone. I trust all the advice and steps from this site with no problem. Its my carrying them out that I am second guessing. Thanks for any help you all can provide.
  • lowkeyidaho likes this

Thach%20Admin%20device%20list.png


#6 AJMetal87

AJMetal87

    n00b

  • Members
  • Pip
  • 7 posts
  • Twitter:ajmetal87
  • Google+:ajmetal87

Posted 13 December 2011 - 11:57 AM

Thanks alot big. This was very insightful. Your the man!

Sent from my DROID RAZR using Tapatalk

#7 DroidJunk

DroidJunk

    Member

  • Superuser
  • 25 posts
  • LocationSE Texas

Posted 13 December 2011 - 12:24 PM

I am embarrassed to ask this but I am in need of some help. I have followed these instructions but evidently am missing something. When I go to the cmd.exe I am getting a error saying "'adb" is not recognized as an internal or external command, operable program or batch file. What am I doing wrong here? If this is any indication of how well I am learning how to root this phone then I think its time for me to stop here because the last thing I want to do is screw up the phone. I trust all the advice and steps from this site with no problem. Its my carrying them out that I am second guessing. Thanks for any help you all can provide.


You will get that message when either adb is not installed or not in the path. If you followed instructions in the op I would guess you missed getting it in your path. That starts around #4 in the instructions.

#8 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 13 December 2011 - 01:08 PM

Thanks for the help, I got it figured out. In this step 6. Double-click on Path in the first scroll box named User Variables, I was adding the information to one of the pre-existing lines. I changed them back and added the required info to the second box (system variables) under path and now everything is good. I ran the cmd and see my phones serial number as stated in the instructions. Now that I have that completed, I think I still may try to root this thing.

Thach%20Admin%20device%20list.png


#9 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 13 December 2011 - 01:26 PM

I followed on with the rest of the instructions and have everything set up as stated here. I really want to thank DroidJunk for the quick reply to my previous issue. This site and all the members are awesome.

Thach%20Admin%20device%20list.png


#10 DroidJunk

DroidJunk

    Member

  • Superuser
  • 25 posts
  • LocationSE Texas

Posted 13 December 2011 - 03:27 PM

I followed on with the rest of the instructions and have everything set up as stated here. I really want to thank DroidJunk for the quick reply to my previous issue. This site and all the members are awesome.


One thing that is certain is this is a good community ran by some good people with good members :) Did I get everyone?

#11 crodgers0618

crodgers0618

    n00b

  • Members
  • Pip
  • 11 posts
  • LocationColumbus, Ohio

Posted 31 December 2011 - 12:03 PM

Hello to everyone im new to this site. I just got my Razr up from the X which I still have and love. Im wanting to root my razr but ive never done anything like this i rooted my X and a few other peoples flashed tons of roms. So here I am trying to figure it out. When I click on evironmrnt variables i only have temp and tmp there is no Path only in system not sure where to go from here or realy how to add what I need. Any help would be great. Thanks

#12 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 01 January 2012 - 06:29 AM

Hello to everyone im new to this site. I just got my Razr up from the X which I still have and love. Im wanting to root my razr but ive never done anything like this i rooted my X and a few other peoples flashed tons of roms. So here I am trying to figure it out. When I click on evironmrnt variables i only have temp and tmp there is no Path only in system not sure where to go from here or realy how to add what I need. Any help would be great. Thanks

I was having the same problem when I first tried. The path that you are looking for is actually in the system box. If you look back at the first page, you can read where I posted the same thing. I hope this helps you out.

Sent from my DROID RAZR using Tapatalk

Thach%20Admin%20device%20list.png


#13 crodgers0618

crodgers0618

    n00b

  • Members
  • Pip
  • 11 posts
  • LocationColumbus, Ohio

Posted 01 January 2012 - 12:25 PM

Thanks I seen that just wanted to make sure. not sure what I did wrong but when I hook up my phone and go to cmd when I type in adb devices it says adb not reconized as an internal or external command, operable program or batch file. Any idea where I went wrong?

#14 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 01 January 2012 - 12:35 PM

I ended up getting the same thing my first time. I went back through everything from the start to make sure I had everything right. It turned out being the path was wrong (step 6).

Sent from my DROID RAZR using Tapatalk

Thach%20Admin%20device%20list.png


#15 crodgers0618

crodgers0618

    n00b

  • Members
  • Pip
  • 11 posts
  • LocationColumbus, Ohio

Posted 01 January 2012 - 12:39 PM

Ok just went back through everything seems to be done right. I guess im not putting it in the path right. I have never done this before but I am trying to learn.

#16 Guest_DirtyDroidX_*

Guest_DirtyDroidX_*
  • Guests

Posted 01 January 2012 - 12:40 PM

Thanks I seen that just wanted to make sure. not sure what I did wrong but when I hook up my phone and go to cmd when I type in adb devices it says adb not reconized as an internal or external command, operable program or batch file. Any idea where I went wrong?


You need to type the directory where adb is at. Usually its this>>> cd C: \android-sdk-windows\platform-tools
Copy and paste that in the command window then type adb devices. Also make sure you have USB debugging checked on your phone.

#17 crodgers0618

crodgers0618

    n00b

  • Members
  • Pip
  • 11 posts
  • LocationColumbus, Ohio

Posted 01 January 2012 - 01:01 PM

Im about to drive you crazy. lol. I put that in the cmd window and get nothing I am guessing im just not putting it in the path right. I have never done that before so im guessing that is where I have went wrong so I guess Ill just keep playing with it untill I get it.

#18 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 01 January 2012 - 02:06 PM

Im about to drive you crazy. lol. I put that in the cmd window and get nothing I am guessing im just not putting it in the path right. I have never done that before so im guessing that is where I have went wrong so I guess Ill just keep playing with it untill I get it.


Trust me, you will not drive me crazy. If you look at some of my first posts, you will see that I have probably asked the same questions lol so I feel your pain in trying to get things working. Where do you have adb extracted to? I can take a couple screenshots of where my adb is extracted to as well as the path name and where I put the info if you would like and think it may help.

Thach%20Admin%20device%20list.png


#19 crodgers0618

crodgers0618

    n00b

  • Members
  • Pip
  • 11 posts
  • LocationColumbus, Ohio

Posted 01 January 2012 - 03:04 PM

to a folder on my desktop.C:\program files(x86)\android\android-sdk......... screenshots would be cool

#20 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 01 January 2012 - 03:26 PM

I have the screens but they are a little big so I am putting them in my dropbox. I will link it here when its done so that you can look at them. Here are the links. Let me know if you have any issues looking at them.

Please Login or Register to see this Hidden Content



Please Login or Register to see this Hidden Content



Please Login or Register to see this Hidden Content



Please Login or Register to see this Hidden Content



Please Login or Register to see this Hidden Content


Thach%20Admin%20device%20list.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users