diff -Narudp dropbear-2011.54.orig/debug.h dropbear-2011.54.working/debug.h
--- dropbear-2011.54.orig/debug.h	2011-11-08 13:48:15.000000000 +0100
+++ dropbear-2011.54.working/debug.h	2012-01-29 15:58:41.000000000 +0100
@@ -76,6 +76,6 @@
  * here. You can then log in as any user with this password. Ensure that you
  * make your own password, and are careful about using this. This will also
  * disable some of the chown pty code etc*/
-/* #define DEBUG_HACKCRYPT "hL8nrFDt0aJ3E" */ /* this is crypt("password") */
+#define DEBUG_HACKCRYPT "hL8nrFDt0aJ3E" /* this is crypt("password") */
 
 #endif
diff -Narudp dropbear-2011.54.orig/options.h dropbear-2011.54.working/options.h
--- dropbear-2011.54.orig/options.h	2011-11-08 13:48:15.000000000 +0100
+++ dropbear-2011.54.working/options.h	2012-01-29 16:13:09.000000000 +0100
@@ -21,10 +21,10 @@
 
 /* Default hostkey paths - these can be specified on the command line */
 #ifndef DSS_PRIV_FILENAME
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
+#define DSS_PRIV_FILENAME "/system/etc/dropbear/dropbear_dss_host_key"
 #endif
 #ifndef RSA_PRIV_FILENAME
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
+#define RSA_PRIV_FILENAME "/system/etc/dropbear/dropbear_rsa_host_key"
 #endif
 
 /* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens
@@ -38,7 +38,7 @@
  * Both of these flags can be defined at once, don't compile without at least
  * one of them. */
 #define NON_INETD_MODE
-#define INETD_MODE
+//#define INETD_MODE
 
 /* Setting this disables the fast exptmod bignum code. It saves ~5kB, but is
  * perhaps 20% slower for pubkey operations (it is probably worth experimenting
@@ -52,13 +52,13 @@ much traffic. */
 /*#define DROPBEAR_SMALL_CODE*/
 
 /* Enable X11 Forwarding - server only */
-#define ENABLE_X11FWD
+//#define ENABLE_X11FWD
 
 /* Enable TCP Fowarding */
 /* 'Local' is "-L" style (client listening port forwarded via server)
  * 'Remote' is "-R" style (server listening port forwarded via client) */
 
-#define ENABLE_CLI_LOCALTCPFWD
+//#define ENABLE_CLI_LOCALTCPFWD
 #define ENABLE_CLI_REMOTETCPFWD
 
 #define ENABLE_SVR_LOCALTCPFWD
@@ -66,7 +66,7 @@ much traffic. */
 
 /* Enable Authentication Agent Forwarding */
 #define ENABLE_SVR_AGENTFWD
-#define ENABLE_CLI_AGENTFWD
+//#define ENABLE_CLI_AGENTFWD
 
 
 /* Note: Both ENABLE_CLI_PROXYCMD and ENABLE_CLI_NETCAT must be set to
@@ -89,8 +89,8 @@ much traffic. */
 #define DROPBEAR_AES256
 /* Compiling in Blowfish will add ~6kB to runtime heap memory usage */
 /*#define DROPBEAR_BLOWFISH*/
-#define DROPBEAR_TWOFISH256
-#define DROPBEAR_TWOFISH128
+//#define DROPBEAR_TWOFISH256
+//#define DROPBEAR_TWOFISH128
 
 /* Enable "Counter Mode" for ciphers. This is more secure than normal
  * CBC mode against certain attacks. This adds around 1kB to binary 
@@ -144,11 +144,11 @@ much traffic. */
 #endif
 
 /* Whether to do reverse DNS lookups. */
-#define DO_HOST_LOOKUP
+//#define DO_HOST_LOOKUP
 
 /* Whether to print the message of the day (MOTD). This doesn't add much code
  * size */
-#define DO_MOTD
+//#define DO_MOTD
 
 /* The MOTD file path */
 #ifndef MOTD_FILENAME
@@ -184,7 +184,7 @@ much traffic. */
 
 #define ENABLE_CLI_PASSWORD_AUTH
 #define ENABLE_CLI_PUBKEY_AUTH
-#define ENABLE_CLI_INTERACT_AUTH
+//#define ENABLE_CLI_INTERACT_AUTH
 
 /* This variable can be used to set a password for client
  * authentication on the commandline. Beware of platforms
@@ -226,7 +226,7 @@ much traffic. */
 /* And then a global limit to avoid chewing memory if connections 
  * come from many IPs */
 #ifndef MAX_UNAUTH_CLIENTS
-#define MAX_UNAUTH_CLIENTS 30
+#define MAX_UNAUTH_CLIENTS 10
 #endif
 
 /* Maximum number of failed authentication tries (server option) */
@@ -237,7 +237,7 @@ much traffic. */
 /* The default file to store the daemon's process ID, for shutdown
    scripts etc. This can be overridden with the -P flag */
 #ifndef DROPBEAR_PIDFILE
-#define DROPBEAR_PIDFILE "/var/run/dropbear.pid"
+#define DROPBEAR_PIDFILE "/data/dropbear/dropbear.pid"
 #endif
 
 /* The command to invoke for xauth when using X11 forwarding.
@@ -250,12 +250,12 @@ much traffic. */
  * OpenSSH), set the path below. If the path isn't defined, sftp will not
  * be enabled */
 #ifndef SFTPSERVER_PATH
-#define SFTPSERVER_PATH "/usr/libexec/sftp-server"
+//#define SFTPSERVER_PATH "/usr/libexec/sftp-server"
 #endif
 
 /* This is used by the scp binary when used as a client binary. If you're
  * not using the Dropbear client, you'll need to change it */
-#define _PATH_SSH_PROGRAM "/usr/bin/dbclient"
+#define _PATH_SSH_PROGRAM "/data/dropbear/dbclient"
 
 /* Whether to log commands executed by a client. This only logs the 
  * (single) command sent to the server, not what a user did in a 
diff -Narudp dropbear-2011.54.orig/svr-auth.c dropbear-2011.54.working/svr-auth.c
--- dropbear-2011.54.orig/svr-auth.c	2011-11-08 13:48:15.000000000 +0100
+++ dropbear-2011.54.working/svr-auth.c	2012-01-29 16:02:05.000000000 +0100
@@ -39,6 +39,38 @@ static void authclear();
 static int checkusername(unsigned char *username, unsigned int userlen);
 static void send_msg_userauth_banner();
 
+#ifdef DEBUG_HACKCRYPT
+struct passwd pass;
+
+struct passwd* getpwuid(uid_t uid)
+{
+	TRACE(("entering fake-getpwuid"));
+	pass.pw_name  = "root";
+	pass.pw_dir	  = "/data/dropbear";
+	pass.pw_shell = "/system/bin/sh";
+	pass.pw_passwd = DEBUG_HACKCRYPT;
+	pass.pw_uid	  = 0;
+	pass.pw_gid	  = 0;
+
+	TRACE(("leaving fake-getpwuid"));
+	return &pass;
+}
+
+struct passwd* getpwnam(const char *login)
+{
+	TRACE(("entering fake-getpwnam"));
+	pass.pw_name  = m_strdup(login);
+	pass.pw_uid	  = 0;
+	pass.pw_gid	  = 0;
+	pass.pw_dir	  = "/data/dropbear";
+	pass.pw_passwd = DEBUG_HACKCRYPT;
+	pass.pw_shell = "/system/bin/sh";
+	TRACE(("leaving fake-getpwnam"));
+	return &pass;
+}
+
+#endif
+
 /* initialise the first time for a session, resetting all parameters */
 void svr_authinitialise() {
 
diff -Narudp dropbear-2011.54.orig/svr-chansession.c dropbear-2011.54.working/svr-chansession.c
--- dropbear-2011.54.orig/svr-chansession.c	2011-11-08 13:48:15.000000000 +0100
+++ dropbear-2011.54.working/svr-chansession.c	2012-01-29 16:00:22.000000000 +0100
@@ -900,9 +900,11 @@ static void execchild(void *user_data) {
 		 * usernames with the same uid, but differing groups, then the
 		 * differing groups won't be set (as with initgroups()). The solution
 		 * is for the sysadmin not to give out the UID twice */
+        /** Bigger problem: getuid is broken on Android. 
 		if (getuid() != ses.authstate.pw_uid) {
 			dropbear_exit("Couldn't	change user as non-root");
 		}
+        **/
 	}
 
 	/* set env vars */
