Permanently changing PATH in terminal/new bash profile?

jed607

Member
Joined
Apr 2, 2010
Messages
30
Reaction score
0
I am a bit of a newcomer to adb, theming and the like, but have been getting into it quite fervently as of late. I can theme and successfully use adb for what I want it to do on a PC (for the most part), but am having some issues with my mac, which is the computer I have the most access to. I was following a tutorial online about creating a new .bash_profile using the pico command (I believe) and set the path incorrectly. Now every time I open terminal I get the error message that the directory doesn't exist, and I have to re-enter PATH=${PATH}:/folder/pathname/tools/ to get adb to work. I was wondering if anyone knew how to delete/edit a bash profile to PERMANENTLY change the PATH so I don't have to add it each time? That would be amazing! Thanks in advance!!

Also, let me reiterate that I am new to theming/adb/terminal. Most of the guides online say to edit some hidden folder or directory but they don't give specific directions. Please be as specific as you can for my benefit, it will be greatly appreciated :D
 
Last edited:
OP
J

jed607

Member
Joined
Apr 2, 2010
Messages
30
Reaction score
0
Well right now I'm using ultimate droid new era, but I use bugless beast v1 as well, I change roms quite frequently actually. But I just want to know how to change the path on my mac
 

Se7enLC

Active Member
Joined
Nov 16, 2009
Messages
1,262
Reaction score
0
I was following a tutorial online about creating a new .bash_profile using the pico command (I believe) and set the path incorrectly. Now every time I open terminal I get the error message that the directory doesn't exist, and I have to re-enter PATH=${PATH}:/folder/pathname/tools/ to get adb to work. I was wondering if anyone knew how to delete/edit a bash profile to PERMANENTLY change the PATH so I don't have to add it each time? That would be amazing! Thanks in advance!!

pico is just a text editor, so you can use whatever text editor you are comfortable with to make the change.

What does your .bash_profile file currently contain? Also, what does your .profile file contain (if you have one)? What directory did you install the ADB tools into (assuming it's not literally /folder/pathname/tools).
 
OP
J

jed607

Member
Joined
Apr 2, 2010
Messages
30
Reaction score
0
My bash profile contains:

export PATH=$
{PATH}:/Users/Jeff/Droid/Android/Android SDK/SDK/tools
export PATH=/Users/Jeff/Droid/Android/ADB/SDK/tools

I can't locate my .profile, so I assume it doesn't exit. I've looked in the home directory and even did a full search with easyfind and no luck.

I installed my tools to the following directory:

/Users/Jeff/Droid/Android/ADB/SDK/tools

Apparently I fixed my first problem somehow.. I typed in a bunch of PATH commands I found online, but now the only thing that works is adb commands; every other command I type in the bash shell comes back as command not found. I guess this might have something to do with me not having the .. what is it.. /usr/bin/something path in my bash_profile? How do I amend this and remove the annoying "-bash:{PATH}:/Users/Jeff/Droid/Android/Android/ADB/SDK/tools: No such file or directory ? Can I just delete that line from my .bash_profile? Thanks!

Oh, and also, I have the files: .bash_history, .bash_profile.save, .bash_profile.swp in my home directory as well. Do I need these?
 
Last edited:

Se7enLC

Active Member
Joined
Nov 16, 2009
Messages
1,262
Reaction score
0
My bash profile contains:
Code:
export PATH=$
{PATH}:/Users/Jeff/Droid/Android/Android SDK/SDK/tools
export PATH=/Users/Jeff/Droid/Android/ADB/SDK/tools

I installed my tools to the following directory:

/Users/Jeff/Droid/Android/ADB/SDK/tools

The path is a list of directories, separated by : that the system will look in to find executable programs.
${PATH} is the current path
export PATH= is how you set the path

So you want to have it appending the new ADB directory to the end of the path without destroying the original path.

It should be one single line (no hitting enter) in your .bash_profile file:
Code:
export PATH=${PATH}:/Users/Jeff/Droid/Android/ADB/SDK/tools

Once you set that in there, log out and back in again. Type this in:
Code:
echo $PATH

And let me know what it says.

Oh, and also, I have the files: .bash_history, .bash_profile.save, .bash_profile.swp in my home directory as well. Do I need these?

Don't worry about those.
 
Top