i understand that both these apps allow you to access the underlying linux distros shell. however is that shell a complete bash shell or somthing smaller. if it were a complete bash shell would you not be able to run text based apps like vi and mplayer.
It isn't a full bash shell, you're limited to:
a) commands the phone has (even cp is missing ffs).
b) commands the application has access to.
Wow that sucks. But thanks for the bad news.
No, some commands are completely missing (eg, cp really *isn't* there).
If you have root access on your phone, with an "su" command, these apps can get access to everything. But it's really kinda useless, using adb shell is much better.
terminal emulator
how to open apps through terminal emulator?
and how to control whole android phone by terminal emulator?
Related
ok... so, I've loaded my custom ROM and it contains busybox... I do like the extra functions that busybox offers over the stock Android "toolbox", so I don't really want to disable the commands like ls... I'd just like to turn the colors off.
Here's what I've found in my researches...
1) I can always
Code:
ls --color=never
but that is a lot of extra typing that I'm just not willing to do.
2) I can now SSH into my phone with putty and the colors are nice... but if I'm doing this over the cell modem (even EVDO), it's not too responsive (probably has some to do with currently running applications, syncs, and so forth)
3) I can use Droid Explorer and open a command shell from there, and the colors are nice... but Droid Explorer takes a lot longer to load than adb shell and the nice thing about being at my command prompt is if I need to push, pull, or remount (I understand I can always manually remount,rw and remount,ro from any shell, but adb makes it really easy to do with less typing) quickly... I can exit out of the shell, do the command, and go right back into the shell.
4) I can use Better Terminal Emulator on the phone... again... colors nice (I think you're seeing a theme here) but the typing is excruciating for long commands, and God forbid you make 1 typo... for quick things it's cool and to do a command while not at my computer, it's great.
5) If I were running Windows 95 (or maybe even XP), I could just use ansi.sys and do it. However, I've found that the only way ansi.sys works in a command prompt is to use COMMAND.COM and not CMD... plus you have to set CONFIG.NT to "dosonly" mode and include the driver in there... the biggest problem with all that is that adb will NOT run in DOS only mode. I even tried to adb shell from within a Cygwin command prompt (that already has colors enabled) but all the ansi color codes were lost.
So.... Here's my dilemma... I want colors when I'm not coming in through the Windows command prompt and adb shell. However, I want to disable the colors when I'm coming in through adb shell. I would probably settle for a different way to shell in from Windows 7 than the ones listed above.
I think I remember from my freshman year of college when they tried to teach me Unix, that you can set "default" command line switches for applications. For example, if you always wanted ls to do -l, then someplace you could set that as a default. I read on another post (possibly another forum) that somebody suggested editing .profile to do an alias of a command... something like
Code:
alias dir='ls --color=never'
but the problem with that is there's no .profile and there's no home directory for root or shell.
I even read that the standard ls uses an environment variable LS_OPTIONS, but I don't think that the stock Android ls uses it, and I can't get busybox to use it - plus, it'd be a pain to type that in every time I do an adb shell.
Does anybody have any suggestions or tips or any way to do this? If the alias will work, I'd be happy with that. I could then set dir to no color and keep ls with color. I could maybe even remap a command to do a ls -l all the time.
Thanks in advance.
This was what I ended up doing under Windows 7: http://softkube.com/blog/ansi-command-line-colors-under-windows/
This works for me:
Code:
export LS_COLORS=none
ls
Hey Boys and Girls,
where i can find an manual to root the tattoo with a mac?
sorry, i have search for this, but i cant find information for this
I don't thing that there is a difference.
As soon as you have SDK installed and adb works, the commands are the same.
hi,
i'm also doing all the rooting process from mac, just put the directory contain 'adb' shell into your home/user places and executing it with 'terminal'..
Same here, using a Mac ever since and also using it for Android development. Due to the underlying Unix core of OS X you just have to follow the steps as described for Linux. If it's just adb commands it's the same on every platform anyway.
You might want to add a
Code:
export PATH=${PATH}:/Users/yourusername/android.sdk/tools
to your .bash_profile file in your home folder so you don't have to cd to the SDK tools folder everytime. Happy rooting!
Mod. edit: not dev related, moved to general
Okay thanks for yours answers but i'm a newbie.
the background story is, I want to edit the boot.mp3. Because the startsound is really annoying
So i have download SDK, open the terminal and switch to usb-debbugging mode on my tattoo.
And now? sorry, I'm still missing a few knowledge
thanks for your help
well just use the various adb commands in Terminal Just type in "adb", press enter and you'll get a list of all possible commands. Assuming you've added the path to your sdk tools folder to your bash profile. Otherwise just drag & drop the adb binary from the tools folder onto your Terminal window, et voila.
The most used commands are probably push and pull where you can, well, push stuff to your phone or pull it to your computer.
So if you want to modify the boot.mp3 you would pull the original from the phone to your computer, modify it and push it back, overwriting the original file. In Terminal speak: ;-)
adb pull /system/media/bootscreen/boot.mp3
adb push /path/to/boot.mp3 /system/media/bootscreen/boot.mp3
Please note depending on the ROM you're using the paths may be different. To browse the device via Terminal type in "adb shell" and make a simple "ls" to list the directories, "cd" to change directories etc.
Or if you just want to use another mp3:
adb push /path/to/whatever.mp3 /system/media/bootscreen/boot.mp3
Again, on the Mac you can just drag & drop files onto the Terminal to get their full Unix paths like to your custom mp3
Thanks a lot. i love it its really simple
and now i have load and edit the the boot.mp3. But i can't push it to my tattoo, because i can only read but not write
I have tried to root my phone with "adb root" but it is the message "adbd cannot run as root in production builds"
Terminal: "adb remount", then push again
damn the next bad message "remount failed: Operation not permitted"
You need to root your phone first.
http://forum.xda-developers.com/showthread.php?t=637927
Okay i have executed the instructions. But I've stop at this part:
You should get something like this:
Code:
# id
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
uid=0(root) is important.
Click to expand...
Click to collapse
Yes i've root but i'cant download the "su binary" because its doesnt exist.
But its absolute essential to need the "su binary" to only copy the boot.mp3 to my phone? Or there is an other way? What are the commands to push the boot.mp3 back to may tattoo then i'm in the root mode like >> "#".
okay hope you understand me
You need "su" to do root stuff... no other way.
Download the package from 1 click root thread and find "su" there...
http://forum.xda-developers.com/showthread.php?t=644279
now, i have install the su binary. Then i does this command
user:~ user$ /Users/user/android-sdk-mac_86/tools/adb shell
$ /data/local/bin/su
#
Click to expand...
Click to collapse
And now? Is there a comand to push the boot.mp3 back to the phone in this mode >> "#" ?
I have try to open an new terminal window and type
adb push /path/to/boot.mp3 /system/media/bootscreen/boot.mp3
Click to expand...
Click to collapse
but the answer is
failed to copy '/Users/android-sdk-mac_86/boot.mp3' to '/system/media/bootscreen/boot.mp3': Permission denied
Click to expand...
Click to collapse
and adb remount doesnt work to
You also need tattoo-hack.ko file and do insmod tattoo-hack.ko to make /system writable.
Or even better... flash custom amon_ra recovery image and then a custom rom with all this already included.
Mine for example http://forum.xda-developers.com/showthread.php?t=702401
It doesnt have boot sound enabled
Okay thank you very much.
now it was successful
Hey all,
I'm trying to create a linux script that executes some adb commands. For example, I would like it to be able to automatically exchange nv_data.bin (which need 'su' rights as you certainly know). The problem begins here:
if I execute command: 'adb shell cp x.x y.y' is fine,
but 'adb shell su cp x.x y.y' is just now working.
So I would need help with this. How can I make it work? I tried adb shell & su and stuff like this, but just did not work... THanks in advance!
94kram01 said:
Hey all,
I'm trying to create a linux script that executes some adb commands. For example, I would like it to be able to automatically exchange nv_data.bin (which need 'su' rights as you certainly know). The problem begins here:
if I execute command: 'adb shell cp x.x y.y' is fine,
but 'adb shell su cp x.x y.y' is just now working.
So I would need help with this. How can I make it work? I tried adb shell & su and stuff like this, but just did not work... THanks in advance!
Click to expand...
Click to collapse
adb shell su -c ls
Thanks! It seems to work, but somehow it just did not ask for permission on the phone, so returns 'Permission denied.' I checked phone, but it didn't ask me if I want to enable or not.
Try
Code:
adb shell su -c "ls" -root
Hm, now it asks for it. Thanks! Is it possible, to ask for permission only once, at the beginning, and then be able to do everything?
94kram01 said:
Hm, now it asks for it. Thanks! Is it possible, to ask for permission only once, at the beginning, and then be able to do everything?
Click to expand...
Click to collapse
I'd think if u call it with -root it should only ask once.
Not sure though.
If it asks more than once, could you push a script to the device (somewhere that normally has full r/w access), run it with a single command, then delete it?
Greetings to all!
Can You tell me how can i use shell in WF, what can i do in/with shell, is shell useful for working with, where can i find commands for android shell...?!
I'v installed it but when i type "Su" there is no action only "command not found" also when i type some other commands...
You must be rooted and have Superuser installed to allow terminal emulator to access SU.
Im rooted!
Have you got the Superuser App? Because, at the very least, atleast the "su" command should work on the terminal emulator, irrespective of others.
Anyway, some read through threads for shell and it's commands:
http://forum.xda-developers.com/showthread.php?t=718264
http://forum.xda-developers.com/showthread.php?t=826769
Yes, i have...Thats why is strange for me...
I rooted WF on my Linux Ubuntu 10.10...
You'll need the android development kit from google. Extra the tools to your personal user bin folder. (~/bin) add into your path statement. Open interval in you should not have adb working. In the terminal using adb issue adb shell. You will now be in a shell on your phone through your computer
Sent from my Incredible using Tapatalk
I know about Adb using phone shell with my Pc but i dont want that, i thought that shell can use only with phone without Pc...To bad...
Or i didnt understand you...!?
Many of the root tools/apps such as screencast, Helium... allow an option to start a background service through adb shell, and then connect to this service to execute commands with elevated permissions.
My idea is around generalizing this experience. There is only one app that starts a background service and acts as a proxy for all other apps (like the SuperSu app).
To make this interaction compatible with all root apps, I was thinking to writing a shell script "su" which redirects all the arguments to the above service.
This will give users with non-rooted devices access to many of the root apps.
But this will require the "su" script to be in the $PATH directory.
[Q] Is there a way to change the $PATH variable from adb shell (without root) so that it is retained system-wide? Any alternatives?