Question on Terminal apps PC etc

Discussion in 'Android Hacks and Help' started by Bear in NM, Dec 16, 2009.

  1. Bear in NM
    Offline

    Bear in NM Active Member

    Joined:
    Nov 12, 2009
    Messages:
    1,389
    Likes Received:
    1
    Trophy Points:
    38
    Now that I seem to be getting a handle on all of this rooting, terminal, and Linux stuff, I have a question.

    I have been using sdk/adb to help with the PC side. If I decide to go farther down the dark side to custom roms and/or non-VZW rooted updates, will SDK become non-functional? Perhaps this is where busybox comes in?

    Right now it appears that many are using busybox, and while sdk/adb has been great as a learning tool as it has forced me to understand commands better, I am wondering if I should be investing my educational time right now in a direction that may not become obsolete.

    Thanks,

    Craig
  2. vwpanda
    Offline

    vwpanda New Member

    Joined:
    Dec 13, 2009
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    adb pretty much just gets you into the phone from the computer. the commands you run are run on the phone. you can install busybox and run all the busybox stuff(which are just standard *nix commands) through adb. adb should always continue to work - its a great way to save your phone if you cause the entire user interface to stop functioning. and with the recovery image replacement, adb now works really early in boot process so you can save the phone from pretty much anything
  3. lvlln
    Offline

    lvlln New Member

    Joined:
    Nov 10, 2009
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    Does anyone know if there's a way to make adb behave more like a regular shell? For example, displaying the current directory at the beginning of each line, and being able to use tab for auto-complete.
  4. Bear in NM
    Offline

    Bear in NM Active Member

    Joined:
    Nov 12, 2009
    Messages:
    1,389
    Likes Received:
    1
    Trophy Points:
    38
    Vw,

    Thanks for the clarification. Upon further reflection, it does make sense that as long as the PC can see the android device then adb should continue to work. Adb is fairly well documented in the adk tool kit, and I have created an xls spread sheet with all of the on phone linux commands with a corresponding decription of said command and switches. Shouldn't be too hard to do the same with busybox. As they say, if you need to skin the proverbial cat, it is not a bad idea to have several ways.....

    Why oh why did the linux folks have to develop so many flavors? Wait, then we would all be running windows mobile........

    Craig
    Last edited: Dec 17, 2009
  5. mammlouk
    Offline

    mammlouk New Member

    Joined:
    Dec 13, 2009
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    0
    Here's the thread I was thinking of when I made mine about setting the current directory to the prompt. I know you were in that thread but it's good to make sure it's linked for anyone searching in the future.

    http://www.droidforums.net/forum/droid-hacks/9583-present-directory-prompt.html

    I also wanted to mention that the features you are hoping for are features of the Bourne Again Shell (bash) which ships as default in most modern linux dostros vs the original Bourne Shell (sh) which is included for Android. It should be possible to compile bash for the Droid, it will take someone with a bit more knowledge than myself though. I know that there are versions out there for g1, so it should come to Droid eventually.
  6. mammlouk
    Offline

    mammlouk New Member

    Joined:
    Dec 13, 2009
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    0
    Just an update, I went ahead and installed bash compiled for android 1.5 from xda and it seems to be working fine. Here is the thread I grabbed it from: shell bash for android - xda-developers

    I put the following in /sdcard/bash_profile to give me the path with a space followed by the dollar sign.
    Code:
    export PS1="\w \$ "
    Following the directions for loading bash will give you bash as the default shell. You will have all of the tab completion and double tab suggestions you are used to in ubuntu or other mainstream linux. I cannot guarantee that it won't cause problems with any of the builtin Droid apps.
  7. kevdog
    Offline

    kevdog New Member

    Joined:
    Nov 14, 2009
    Messages:
    722
    Likes Received:
    0
    Trophy Points:
    0
    Perhaps a formal writeup is in order for this one!! Nice job
  8. p0rk burn
    Offline

    p0rk burn New Member

    Joined:
    Dec 6, 2009
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    0
    Sweet mammlouk. I agree a formal write up and independent post is in order, even if its a recap of the post you followed. I think plenty of us would appreciate bashing our droids . . .
  9. mammlouk
    Offline

    mammlouk New Member

    Joined:
    Dec 13, 2009
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    0
    I will try to put something together when I have some time.