Permanently changing PATH in terminal/new bash profile?

Discussion in 'Droid Rooted Help' started by jed607, May 5, 2010.

  1. jed607
    Offline

    jed607 New Member

    Joined:
    Apr 2, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    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: May 5, 2010
  2. kevdog
    Offline

    kevdog New Member

    Joined:
    Nov 14, 2009
    Messages:
    722
    Likes Received:
    0
    Trophy Points:
    0
    What ROM are you using?
  3. jed607
    Offline

    jed607 New Member

    Joined:
    Apr 2, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    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
  4. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    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).
  5. jed607
    Offline

    jed607 New Member

    Joined:
    Apr 2, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    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: May 12, 2010
  6. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    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.

    Don't worry about those.
Search tags for this page

android .profile

,

android change path

,
android profile terminal
,
android terminal emulator edit path
,
android terminal emulator path
,
android terminal how to permanently set path
,
android terminal profile path
,
bash config android
,
change default path installation on android from terminal
,
hiw to.change profile path android
,
how to change path in andriod terminal
,
how to edit path on android
,
how to permanently change the path in terminal
,
how to permenantly remove a directory path from bash profile mac
,
modprobe can't change directory