Compiling dropbear for Android

Android has it’s ADB and it’s great. But for me, it’s not always enough, especially since it has no way to authenticate the user and there is no encryption. That’s why I need SSH too. OpenSSH is to big for embedded systems so I’m using dropbear.

Dropbear is already inside of Android tree, in external/dropbear directory. Problem is, Android.mk is configured to only compile SSH client while I need a server. So there are two solutions - changing Android.mk to also compile server or build it externally. In this article I will show the later approach. more ...


1-wire on TP-Link WL-740n

TP-Link WL-740Nv4 is a great piece of hardware for hackers. It’s a low end home WIFI router that can run OpenWRT. It’s based on Atheros AR9331 SoC (which is hacking friendly as there is a lot of information about it on Internet), has MIPS CPU clocked at 400MHz, 4MB of flash, 32MB of RAM (clocked at 400MHz). What’s most important, however, is it’s price - you can easily buy it for about 16 USD here in Poland.

The project

I had to create cheap Ethernet based thermometer. While you can buy commercial products like this, they tend to cost more than 300 USD here in Poland. That’s strange, providing it’s so simple to create such device. I guess there’s not much demand on such devices and low production scale makes price high. more ...


Tabulators in Vim

Vim beginners tend to have some problems operating with tabulators and other non-printable characters. Here’s a quick tour on available options. more ...


Arithmetic in Vim

Vim can do some arithmetic for you. The simplest one are ctrl+a (add) and ctrl+x (subtract) actions. They find nearest digital number in the current line and add/subtract one to/from this number. You can prepend them with count to add/subtract more than one. It’s not very sophisticated but proves to be useful, especially in macros. more ...


Simplest hack ever

I’ve recently made a hack that may be considered as one of the simplest hacks ever, yet for me it is the most effective one that I made so far.

more ...

Busybox vi tutorial

Vim is my editor of choice. I love it, I use it everywhere I can. Problem is, It’s quite heavy and I spend quite a lot of time working on embedded devices where it’s not available. Fortunately, I have busybox on all of the devices and this means I have access to busybox vi command.

Busybox vi is very simple implementation on vi editor which Vim is based on. So it uses the same editing philosophy as Vim but it just have much less features. Still, I like to use it to the fullest. There is no documentation about busybox vi that I’m aware of but since its code is short, I could easily find out what is available. I will start from the basics so that you should be able to use the editor even if you never used vi before. I will also provide some tips on how to use it more effectively.

Since busybox vi is so simple, this tutorial is aiming to document all of its possible features (at least as of this writing). If some feature is not documented, please report a bug. All of the things documented here should also work in Vim (I will try to add notes if there are some noticeable differences between the two) so I believe this could be used as a quite good intro to using Vim too.

more ...

Executing a script in Android init system.

Android has its own init system with a special init.rc configuration file. This file uses its own syntax which, unlike shell scripts used in classical sysvinit, does not allow you to do everything you might need. Instead, it has its own (rather limited) set of actions that it can do (like mkdir, chmod, chown, etc). There is, however, exec keyword defined that should execute specified command (could be a shell script) but unfortunately, it is not implemented (I mean, the keyword is recognized by it does nothing). more ...


Transferring files using serial console

Sometimes I need to send some file to a target system but I don’t (yet) have any network services or clients on the host. Or I may not even have any network at all. Fortunately, there are couple ways of doing this using serial console. I’m presenting two examples on how to achieve that. Both are using different commands on the host side so depending on what’s available on your target device, choose one of them. more ...