Remove All Ads from XDA

getting vi grep find and less working on android

33 posts
Thanks Meter: 17
By cpuchip, Member on 21st February 2012, 06:27 PM
Post Reply Email Thread
I've ran a few searches but haven't really seen someone posting this out there, so I thought I'd post it here.


first you need to be rooted (follow the guides, I used the preinstall method for 2.3.6, and that works)

You'll need busybox (I just used the copy from webtop2sd installed /system/etc/webtop2sd/busybox
You can see all busybox can do from here:

then you need a terminal, I use connectbot. connect to local (type)

if you've followed the preinstall method then /system/bin will be in your path, so I just put the sym links there.

shell commands:

/bin/mount /system -o remount,rw
ln -s /system/etc/webtop2sd/busybox /system/bin/vi
ln -s /system/etc/webtop2sd/busybox /system/bin/less
ln -s /system/etc/webtop2sd/busybox /system/bin/grep
ln -s /system/etc/webtop2sd/busybox /system/bin/find
/bin/mount /system -o remount,ro

after you execute those lines, grep find vi and less will all work as normal in android like they would on a full linux machine. test it out by executing


cd /
find -name busybox

that should list all your busyboxes on the system

Happy scripting.
The Following 2 Users Say Thank You to cpuchip For This Useful Post: [ View ] Gift cpuchip Ad-Free
21st February 2012, 07:40 PM |#2  
OP Member
Thanks Meter: 17
busybox supports more then just those for commands, here's the output from busybox itself:

# ./busybox
BusyBox v1.14.3 (2009-08-18 21:48:57 CDT) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!

Currently defined functions:
[, [[, acpid, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk, basename, blkid, brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat,
chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw, cttyhack,
cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dos2unix, du, dumpkmap, dumpleases,
echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk,
fgrep, find, findfs, fold, free, freeramdisk, fsck, fsck.minix, ftpd, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd,
hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifup, inetd, init, insmod, install, ionice,
ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last, length, less, linux32,
linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lzmacat, makedevs,
makemime, man, md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mkfifo, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modprobe, more,
mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice, nmeter, nohup, nslookup, od, openvt, passwd, patch, pgrep, pidof, ping, ping6,
pipe_progress, pivot_root, pkill, popmaildir, poweroff, printenv, printf, ps, pscan, pwd, raidautorun, rdate, rdev, readahead, readlink,
readprofile, realpath, reboot, reformime, renice, reset, resize, rm, rmdir, rmmod, route, rtcwake, run-parts, runlevel, runsv, runsvdir,
rx, script, sed, sendmail, seq, setarch, setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum, sha256sum, sha512sum,
showkey, slattach, sleep, softlimit, sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon,
switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute,
true, tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, uncompress, unexpand, uniq, unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, zcip

I've tested wget sha1sum and strings, those work too, I'm sure all those commands should work as advertised.
The Following User Says Thank You to cpuchip For This Useful Post: [ View ] Gift cpuchip Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes