Yet Another Bash for Android
After hunting around and not finding any dynamically linked Bash executable created using the NDK, I (as usual) decided to do it myself.
Here I give you dynamically linked bash 4.2 compiled using Crystax NDK r8
, along with patches from http://dan.drown.org/android/src/bash/
. The process to build it is documented on this page
. The API version used was Android-8 (Froyo and upwards) and the toolchain used was gcc-4.7.
To use, place in any location where executables can run from (eg. /data/local/tmp or /data/data/jackpal.androidterm/app_HOME), gunzip it
, change permissions
Please note that if you run it without root, it will give the following error message intermittently:
chdir: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
This is because without root access, "/data" is inaccessible (Default permissions 771 with owner:group as "system:system").
As alternatives, there are statically linked bash binaries available from multiple sources, for example this
Utilities for Android: GNU make 3.82
, GNU grep 2.12
, GNU diffutils 2.8
, file 5.11
, Strace 4.6
(Using NDK r8c), GNU Bash 4.2
: Nexus 4 8GB
(Stock 4.4 unrooted), Toshiba AC100
(2.2 by silver-alx
: Huawei U8150 (Stock 2.2 rooted)
Nexus S GT-I9020T (Stock 4.1.2 unrooted)