DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 6 of 6

Thread: Permanently changing PATH in terminal/new bash profile?

  1. Droid
    jed607's Avatar
    Member #
    54239
    Join Date
    Apr 2010
    Posts
    30
    Phone
    Motorola Droid
    #1

    Permanently changing PATH in terminal/new bash profile?

    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
    Last edited by jed607; 05-05-2010 at 02:37 AM.
  2.  
     
     
     
  3. Master Droid
    kevdog's Avatar
    Member #
    4295
    Join Date
    Nov 2009
    Posts
    722
    Phone
    moto droid
    #2
    What ROM are you using?
  4. Droid
    jed607's Avatar
    Member #
    54239
    Join Date
    Apr 2010
    Posts
    30
    Phone
    Motorola Droid
    #3
    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
  5. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #4
    Quote Originally Posted by jed607 View Post
    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).
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  6. Droid
    jed607's Avatar
    Member #
    54239
    Join Date
    Apr 2010
    Posts
    30
    Phone
    Motorola Droid
    #5
    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 by jed607; 05-12-2010 at 04:09 PM.
  7. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #6
    Quote Originally Posted by jed607 View Post
    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.
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. How to set audio recording path?
    By beelzeebob in forum Android General Discussions
    Replies: 0
    Last Post: 02-27-2010, 03:46 AM
  2. flight path app
    By mikecolorama in forum Android Applications
    Replies: 5
    Last Post: 01-10-2010, 03:02 AM
  3. Better Bash (or other shell) for 2.0.1
    By hughesjr in forum Android Hacks and Help
    Replies: 6
    Last Post: 01-01-2010, 09:45 AM
  4. Whither bash?
    By jbreher in forum Android Hacks and Help
    Replies: 2
    Last Post: 11-19-2009, 02:16 PM

Search tags for this page

android .profile

,
android add to path
,

android change path

,
android profile terminal
,

android set path

,
android terminal emulator edit path
,

bash change path permanently

,
how to edit path on android
,

permanently edit path bash

,
the operation can?t be completed because you don?t have
Click on a term to search our site for related topics.

Tags for this Thread

Find us on Google+