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

Discussion in 'Droid X FAQ' started by tjrocks91, Aug 24, 2010.

  1. tjrocks91

    tjrocks91 Member

    Joined:
    May 16, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +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. [​IMG]

    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. [​IMG]

    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.
    [​IMG]

    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.
     
  2. debaucher

    debaucher Member

    Joined:
    Jul 26, 2010
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +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.
     
  3. Mojo

    Mojo Active Member

    Joined:
    Nov 25, 2009
    Messages:
    1,357
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    S.W Missouri
    Ratings:
    +0
    I am going to sticky this. Nice write up.
     
  4. tjrocks91

    tjrocks91 Member

    Joined:
    May 16, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    haha thanks!
     
  5. oo3

    oo3 Member

    Joined:
    Jul 25, 2010
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Portland
    Ratings:
    +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?
     
  6. debaucher

    debaucher Member

    Joined:
    Jul 26, 2010
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    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.
     
  7. danual

    danual New Member

    Joined:
    Sep 11, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +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: Sep 11, 2010
  8. awacker89

    awacker89 New Member

    Joined:
    Jan 24, 2010
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    I'm getting the same error, and when i type adb devices it says adb command cannot be found...

    ???
     
  9. awacker89

    awacker89 New Member

    Joined:
    Jan 24, 2010
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Can anybody help me with this???
     
  10. mactechnm

    mactechnm New Member

    Joined:
    Nov 8, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +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?
     
  11. physeetcosmo

    physeetcosmo New Member

    Joined:
    Nov 2, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orion Arm, Milky Way
    Ratings:
    +0
    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:
     
  12. scbeck2

    scbeck2 New Member

    Joined:
    Nov 2, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +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!
     
  13. physeetcosmo

    physeetcosmo New Member

    Joined:
    Nov 2, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orion Arm, Milky Way
    Ratings:
    +0
    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:
     
  14. pjo1966

    pjo1966 Member

    Joined:
    Jan 3, 2010
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles
    Ratings:
    +0
    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.
     
  15. pjo1966

    pjo1966 Member

    Joined:
    Jan 3, 2010
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles
    Ratings:
    +0
    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.
     
Search tags for this page
adb for mac os x
,

adb mac os x

,
adb macos
,
adb path mac
,
mac adb
,
mac os adb
,
mac os x adb
,
mac osx adb
,
osx adb
,
set adb path mac