editor in adb shell

32,089 views
Skip to first unread message

Eduardo Acker

unread,
Nov 7, 2009, 7:38:01 PM11/7/09
to android...@googlegroups.com
Hello,
I am looking for a editor inside the adb shell. Is there any, or i
have to pull/push files to modify then?

thanks

melynx

unread,
Nov 7, 2009, 9:22:10 PM11/7/09
to Android Linux Kernel Development
if i'm not wrong there should be vi in the shell ^_^
at least thats what i used....

cheers

Håkan Berg

unread,
Nov 8, 2009, 1:19:02 AM11/8/09
to android...@googlegroups.com
As far as I have understood, adb shell opens a shell against the embedded kernel, and that one does not have edotors, nor GNU compiler etc. I was thinking about toying with adding something like that, but I'm pretty certain that there is also no X-windows in the embedded kernel, so it must be something without graphical interface.
 
If you want to create a simple file on your device, you might use cat for that, but that can hardly be called an editor. ;-)
 
If you have no specific reason for editing files via adb (or on the device itself, if you have a shell application installed) I suggest you stick to editing on your computer and then move the files via adb push, or even via drag and drop, which also works fine.
 
(Also, even if it is rather obvious, the sdcard is the only write-enabled part unless you remount the internal memory.)
 
Hakan Berg

2009/11/8 Eduardo Acker <izayahi...@gmail.com>

Håkan Berg

unread,
Nov 8, 2009, 1:51:23 PM11/8/09
to android...@googlegroups.com
I'm a bit embarrased for not thinking of one really obvious solution to your problem. Depending on your system, you could most likely just open the sdcard and use your favotite editor on your host, e.g. emacs, UltraEdit or kate. That works from Linux,  Windows and probably most other systems. The device shows up as a disk in your file browser.
 
/Hakan 

2009/11/8 Eduardo Acker <izayahi...@gmail.com>

Eduardo Acker

unread,
Nov 9, 2009, 1:55:58 PM11/9/09
to android...@googlegroups.com
Thanks for the answers. They are good suggestions, but since I have to
modify just some files, I will push and pull then... hehehe
melynx, vi is not compile in the goldfish_defconfig (i am using the
emulator). You you used it, or it was another config, or you
recompiled the kernel.

thx again,
izaya


2009/11/8 Håkan Berg <hakan....@gmail.com>:

Amit Dang

unread,
Nov 9, 2009, 9:45:30 PM11/9/09
to android...@googlegroups.com
You can download busybox toolbox from http://benno.id.au/blog/2007/11/14/android-busybox.
Push this to some directory on the emulator or phone and use 'busybox vi <filename>' to edit files.

Hope this helps.

Dang

Reply all
Reply to author
Forward
0 new messages