How To: Setting Up ADB on Mac OSX for your Droid X

tjrocks91

Member
Joined
May 16, 2010
Messages
43
Reaction score
0
Here's a simple little tutorial that I threw together of how to get ADB up and running on on Mac OSX.

Setting up ADB on Mac OSX

1. Download the Android SDK for Mac OSX. Android SDK | Android Developers

2. Extract the zip file to any destination on your Mac. *Remember its path!*
In the AndroidSDK folder, there will be a folder named “tools”. We will be adding this folder to the path on Mac OSX.

3. To do this click on Finder > Go > Utilities > Terminal.
46810385.png


4. Type in without quotations “cd ~/” Hit enter after every command for the n00bs.

5. Next, type "touch .bash_profile" to create your new bash or otherwise known path file.

6. Next, type "open -e .bash_profile" to open it in TextEdit. A TextEdit window will open, copy and past this into that window. Screenshot of TextEdit and Terminal with all commands

My example:
export PATH=${PATH}:/Users/Tanuj/Desktop/androidsdk/tools

What yours should look like:
export PATH=${PATH}:insert your path to the tools folder in your android sdk here

7. Next, go to file and save your changes to the text file and close the TextEdit window.
40091754.png


8. In the terminal window that is still open, type “. .bashrc” This command will save the changes once again you made to your .bash_profile file

10. ADB should be set up! On your Droid X navigate to Settings > Applications > Development > and make sure USB debugging is checked. To test if ADB works, connect your Droid X to your Mac via micro-USB cable and set it to charging only mode in the notification bar.

11. Open up terminal on your Mac and type in “adb devices” once again do not type the quotations. Your phone should be listed as a number below.
74841371.png


If this method worked for you please say thanks! I couldn't find any tutorials on how to do this for Mac and had to figure it out myself. A simple thanks would be nice!

Also if this method does not work for you, feel free to post your problems here or PM me.
 

debaucher

Member
Joined
Jul 26, 2010
Messages
78
Reaction score
0
Thanks for the write-up.
Had a few issues I had to work out but your tut gave me the direction I needed to figure it out.

For me, when I typed ". .bashrc" I get the error "No such File or directory"
Next, I found out that I needed to add "Macintosh HD" to my paths ie.... Macintosh HD/Users/.......

But, now it is up and going on this computer too so I am happy.

I have this set up to run on my Win7, OSX and now need to do the same with my Ubuntu setup.

D.
 

oo3

Member
Joined
Jul 25, 2010
Messages
87
Reaction score
0
Location
Portland
Thanks for the write up but when I type . .bashrc, I get "-bash: .bashrc: No such file or directory"

Any idea what I can do?
 

debaucher

Member
Joined
Jul 26, 2010
Messages
78
Reaction score
0
Thanks for the write up but when I type . .bashrc, I get "-bash: .bashrc: No such file or directory"

Any idea what I can do?

I had the exact same error, but it did not affect anything as far as I can tell.
Phone still connects and the few things I tried worked fine.

Good luck

D.
 

danual

New Member
Joined
Sep 11, 2010
Messages
1
Reaction score
0
Wow, stumped at the beginning :(

When I type touch .bash_profile I get "-bash: touch: command not found"

The same if I use 'pico' instead of 'touch', any thoughts?

EDIT:
I think running "PATH=/usr/bin:/bin:/usr/sbin:/sbin" in terminal was able to solve the issue. I am new to running anything in terminal, but if I understand my terminology correctly then I think I had accidentally changed my "PATH" path, and that was making it so have of the standard functions I use were no longer available without typing out the full path for the function.
 
Last edited:

awacker89

New Member
Joined
Jan 24, 2010
Messages
28
Reaction score
0
I'm getting the same error, and when i type adb devices it says adb command cannot be found...

???
 

mactechnm

New Member
Joined
Nov 8, 2009
Messages
10
Reaction score
0
Thanks!

Re: Setting up ADB on Mac OSX

>>> 11. Open up terminal on your Mac and type in “adb devices” once again...

I needed to actually type ./adb devices but then my macbook did recognize my Droid X, AND after I realized I had to put the Droid X in Charge Only, and NOT in PC Mode, as other posts had advised...

I'm almost there, I typed ./dorootv3.sh, the script ran itself, and then I received the following message...

<<<< *] adb connection will be reset. restart adb server on desktop and re-login.

Reconnecting in 20 sec...

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
ls

Checking for devices... >>>>

and now Superuser is on my Droid X, but will not properly open. Hmm...

I'm going to shutdown my phone now and restart.... what to do now?
 

physeetcosmo

New Member
Joined
Nov 2, 2010
Messages
4
Reaction score
0
Location
Orion Arm, Milky Way
You Rock!

Awesome, thanks. I know the Nix side but what the tool flow was to get my phone to "hook up" to the SDK was killing me as well.

Oh, as a side note, just typing "$ cd" will return the user to their default folder, and it might be easier to just add the folder to the path. So just enter "$ export PATH=${PATH}:/path/to/android/sdk/tools/folder".

Great write up!!! :motdroidvert:
 

scbeck2

New Member
Joined
Nov 2, 2010
Messages
16
Reaction score
0
Can anyone help? I must be doing something wrong. The path for the tools folder is /Users/scbeck2/Desktop/androidsdk/tools (when you hit more info) and this is what I have in my text editor

export PATH=${PATH}:/Users/scbeck2/Desktop/androidsdk/tools

Yet I still get No such file or directory when I type . .bashrc


I appreciate any help!
 

physeetcosmo

New Member
Joined
Nov 2, 2010
Messages
4
Reaction score
0
Location
Orion Arm, Milky Way
Back up....

After you type that in your text editor, you have to save that new file as bashrc. However, i would just type that command at the terminal:

$ export PATH=${PATH}:/pathtothetoolsfolder

and hit enter. This only changes the PATH variable for that terminal session. Meaning, after you close that terminal window the PATH variable will loose that location you specified.

Now just skip to running:

$ adb shell

Enjoy your root! :motdroidvert:
 

pjo1966

Member
Joined
Jan 3, 2010
Messages
313
Reaction score
1
Location
Los Angeles
I have ADB running on my Mac, but it's not seeing the Thunderbolt. I have it set for Charge Only. When I enter adb devices I get:

Code:
-bash: adb: command not found

When I enter ./adb devices I get:

Code:
-bash: ./adb: No such file or directory

I am a novice when it comes to Terminal. I've rooted various phones in the past, but still do not feel comfortable. Can anyone see any glaring mistakes I'm making? Any assistance would be appreciated.
 

pjo1966

Member
Joined
Jan 3, 2010
Messages
313
Reaction score
1
Location
Los Angeles
I'm still struggling to get this to work. I've been Googling various sites for tips on how to install adb on a Mac, but still am not having any luck.
 
Top