Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
shawnbuck
Old
#1  
shawnbuck's Avatar
Recognized Developer - OP
Thanks Meter 88
Posts: 188
Join Date: Feb 2011
Location: NY
Default TIP: /osh console utilities are accessible on the phone

I noticed earlier today, that it is possible to use all of the webtop's console utilities on the phone's command line by simply changing the PATH.

The PATH you need:
Code:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/system/sbin:/system/bin:/system/xbin
To make life really easy, make a symlink in /system/xbin to bash, and put the PATH into /osh/root/.bashrc.

Also, there is a full libc on the phone, so that could open up more possibilities on the phone as well.
Motorola Atrix
The Following User Says Thank You to shawnbuck For This Useful Post: [ Click to Expand ]
 
natboy
Old
(Last edited by natboy; 15th March 2011 at 02:52 AM.)
#2  
Senior Member
Thanks Meter 18
Posts: 157
Join Date: Mar 2011
Location: Anchorage, AK
This is very nice thanks! One thing though, not sure if it's because I'm using a windows command prompt or not, but using bash through adb I get a bunch of funny characters on the screen for example:

# ls /bin/bash
ls /bin/bash
←[1;32m/bin/bash←[0m
# ls -h /bin/bash
ls -h /bin/bash
←[1;32m/bin/bash←[0m

Do you know how to remove those?

Thanks for the tip!
 
Da_G
Old
#3  
Da_G's Avatar
Senior Mod/ Elite Recognized Developer
Thanks Meter 1291
Posts: 3,234
Join Date: Aug 2007
Location: Riverside, CA

 
DONATE TO ME
Those are color codes, the console you are using is reporting itself as capable of displaying colors and really isn't!

Check around for a switch to turn off the color codes (or perhaps use another version of ls like busybox ls)
Support my work! The more phones I can get my hands on the more ROM goodness I can churn out. Like BUTTAH

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...