Installing Dropbear

From MyWiki

Jump to: navigation, search

Dropbear is at the Android repository but it's not build when executing make. This page will explain how you can build Dropbear and login with your own SSH client.

Dropbear needs to be patched to work with Android. Android does not use a ‘/etc/passwd’ file, so that needs to be patched together with some directory changes. This also adds a statically password. This password is located at the bottom of ‘debug.h’ in the dropbear directory. The default password is “password”. The patch can be found here: http://pastebin.com/f3dedc5e7

Start compiling Dropbear:

$ ./configure
$ STATIC=1 make PROGRAMS="dropbear dropbearkey"

More Dropbear programs can be added.

Copy these binaries to Android's /system/bin directory. Dropbear looks for a shell to spawn in the file ‘/etc/shells’. You should create that file in the Android file system with the text: ‘/system/bin/sh’.

$ echo "/system/bin/sh" > /etc/shells

Then create a Dropbear directory:

$ mkdir /data/dropbear

It should be possible to run Dropbear and connect with password ‘password’. You will login to the Android shell. It’s easier to work with the BusyBox shell.

$ /system/bin/busybox sh
$ export PATH=$PATH:/sbin:/system/sbin:/system/bin:/system/xbin

Personal tools