• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Startup for the Mac

ruffy

Lurker
As one of the 1st setup tasks, documentation.html states:
"On a Mac, look in your home directory for .bash_profile and proceed as for Linux. "

Well, my Tiger version - has no such directory.
So what now? (...thanks.)
 
As one of the 1st setup tasks, documentation.html states:
"On a Mac, look in your home directory for .bash_profile and proceed as for Linux. "

Well, my Tiger version - has no such directory.
So what now? (...thanks.)

You haven't told anyone what you are trying to setup ... so it is a bit hard to help ???
 
I don't have a Mac but I can help with bash, the file .bash_profile is a hidden file that resides in the users home directory. If you can get to the command line type the following

ls .bash* -l

-l is lowercase -L in case the font is confusing.

if .bash_profile is missing *and* and you have a file called .bashrc then in the command line type

cp .bashrc .bash_profile


Hope this helps, once again I don't have a Mac but I can navigate around bash pretty well.
 
justjimjpc - What do you mean; All I want to do
is INSTALL the Android SDK?! Nothing more than
that.

ageless stranger - That command came up empty.
Do I have to be in a particular directory for it to
work?
 
justjimjpc - What do you mean; All I want to do
is INSTALL the Android SDK?! Nothing more than that.

No problem ... but that was not obvious to me in your post ... as there was no mention of "INSTALL SDK" in your original post
 
ageless stranger - That command came up empty.
Do I have to be in a particular directory for it to
work?

Like I said I havent got a Mac so I was just going by my Linux experience. The .bash* files live in the home directory. Try typing cd ~/ first before typing what I said earlier. If that doesn't work then you will have to find a Mac expert.
 
You should use ~/.bash_profile. The file does not exist by default. You have to create it. You can create it with the command "touch ~/.bash_profile". "~/" is the command line shortcut for Macintosh HD -> Users -> your_user_name (commonly referred to as your "Home" folder, and the icon for which looks like a house.

In the .bash_profile, you want to add android's tools folder to the system PATH. To do that you need to add a line exporting the PATH environment variable, or append to it if it already exists.

For a brand new entry, you need to create a line that looks like this:
export PATH=$PATH:/usr/local/android/tools

For an existing line, you just add :/usr/local/android/tools to the end of the line. This is assuming of course you have the sdk installed as /usr/local/android. I did this using a symlink, which makes it easy to switch between sdk releases should I ever need to, without having to touch the .bash_profile or my eclipse configuration. I just change the symlink.

Here's 6 commands to sdk bliss (how I did it on my mac).
# download the sdk
curl -C - -O http://dl.google.com/android/android-sdk-mac_x86-1.1_r1.zip

# unzip to /usr/local
sudo unzip -d /usr/local android-sdk-mac_x86-1.1_r1.zip

# symlink for easy to change out versions
sudo ln -s /usr/local/android-sdk-mac_x86-1.1_r1 /usr/local/android

# create the .bash_profile if it doesn't exist
touch ~/.bash_profile

# edit your .bash_profile, creating or adding to the export PATH= line
/Applications/TextEdit.app/Contents/MacOS/TextEdit ~/.bash_profile

# load for the existing terminal session
source ~/.bash_profile
 
FYI, these instructions should basically work for Linux too, you just have to change the editor to emacs or vi or whaterver, rather than TextEdit (which I figured would be easier for a mac user who's not too familiar with unix).
 
Thanks Hallow, now we're getting somewhere.
Bear with me a bit, though, because those command line
instructions still read Chinese to me.

I did get the .bash_profile created with the
"touch" command.
I know that because the search for the file
with ~/.bash_profile no longer reports a missing
file. But, because the filename starts with a period,
the file's hidden.

How do I get to unhide it, for one,
and how do I get to edit it with TextEdit?
 
How do I get to unhide it, for one,
and how do I get to edit it with TextEdit?

dot files like .bashrc are effectively "hidden" files, putting a dot in front of any file will "hide" it from file browsers (unless they are told to show hidden files) and from command line commands like ls (unless you use ls -a)
 
Hallow - I can now invoke TextEdit directly after unhiding the bash
file, or using the terminal command as you showed me.

Does this line look right to you?
export PATH=${PATH}:~/desktop/android-sdk-mac_x86-1.1_r1/tools

Thanks again (for taking me by the hand). Much obliged!
 
Back
Top Bottom