Completing busybox installation on Android

There are some android distro’s that comes natively with busybox inside but NOT the symlinks necessaries to have all the set of commands that busybox provides.

I noticed that botbrew crash in its installation due that.
So instead of installing a new busybox, I simply create the links:

adb root
adb shell
echo "saving command list for later usage (remove)"
for i in $(busybox --list | busybox egrep "[[:alnum:]]") ; do echo "${i}" ; done >> /sdcard/busybox_complete_cmd.txt
mount -o remount,rw /system
cd /system/xbin
for i in $(cat /sdcard/busybox_complete_cmd.txt) ; do ln -s busybox ${i} ; done
cd /
mount -o remount,ro /system

That’s all folks.

In the future if you want to remove the symlinks, you can use the same file you’ve generated and something like this:

adb root
adb shell
mount -o remount,rw /system
cd /system/xbin
for i in $(cat /sdcard/busybox_complete_cmd.txt) ; do unlink ${i} ; done
cd /
mount -o remount,ro /system
Openvpn in the TP-LINK WR841N[D]

Hi folks,
Here comes a post to improve that great router from TP-LINK.
Of course, I suppose you’re running openwrt on it to use the whole power of it.
The 1st I saw was that you have available a plenty set of packages… but you don’t have enough ROM to install them :-P
Inspecting a bit, I saw that under /tmp you have a “lot” of free space! (about 14MB), that will be enough to allow run openvpn without problems.
The main problem? Its a ramdisk, so each boot, everything there disappears.
What I’ve done? Install the basics with opkg and wget on boot the rest ;-)


Continue reading “Openvpn in the TP-LINK WR841N[D]”

Oracle Metadata Generator (and svn uploader)

(See comments)

My first (public) script for Oracle :-) [beers]
This script will (hopefully) do:

  • List all the objects on the database for each SID/SCHEMA given
  • Dump the metadata of each object in a different file
  • Upload everything to the svn

If you’re asking why? you must deal more with programmers :-P
This will add a second line of defense to the expdp CONTENT=METADATA_ONLY classic script.
Continue reading “Oracle Metadata Generator (and svn uploader)”

The inexpensive Video-Phone project

Happy new year!!!
After my adventures trying to build Android from source, I want to explain the reason for that.
As I live very far from my fathers and they’re elder, I’ve been thinking for a long time how to have a easy way to make videoconf with them and share photos… The usual things you know?
The main problem was that they’ve never used a PC and the newest gadget they have is a Nokia X2

Continue reading “The inexpensive Video-Phone project”

Explicando un tunel ssh

Que mejor manera de explicar un tunel ssh que con un dibujito?
(Me he dejado las puppets en casa)

A veces parece increíble que a un ingeniero diplomado le cueste entender el concepto de “cerca”, “lejos” y “saltar a través” que supone un tunel.

Personalmente siempre me ha gustado la explicación con ascii art:

+----------+<--port 22-->+----------+<--port 80-->o-----------+
|SSH Client|-------------|ssh_server|-------------| host |
+----------+ +----------+ o-----------+
localhost:8888 computer

En el que basta con explicar que “” no es accesible desde “SSH Client” y mediante el tunel ssh a través de “ssh_server” QUE SÍ TIENE ACCESO, te traes el puerto :80 a tu ordenador en el puerto 8888.
Todo esto con una linea tan simple como:

SSH Client$ ssh -L ssh_server

Os dejo el maravilloso dibujo con el que puede ser que me haya entendido “mi” usuario ;-)

Parallel rsync’ing a huge directory tree

Some days ago I was on the chance to transfer a huge directory.

Huge means ~50TB with +1million files and a deep of only 6 folders under the parent one.
As I must do that kind of transfer more than 10 times with the same amount of folders… I decided to implement some kind of parallel function which launch parallel rsync’s at a given deep of my choose.

The ressult was that “pure bash” little script (the only dependency is “screen”)… You’ll notice that the main function “sync_this()” will run alone in your script only changing 2 or 3 variables ;-)
Continue reading “Parallel rsync’ing a huge directory tree”