Skip to content
Android Build Script For Various GNU Binaries
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bash_patches
ndk_static_patches
.gitattributes
.gitignore
README.md
bc_libmath.h
build.sh
coreutils.patch
coreutils_modules

README.md

GNU Utils for Android Build Script

This will build any of the following static GNU binaries:
bash, bc (also includes dc), coreutils (includes advanced cp/mv - progress bar functionality), cpio, diffutils (includes cmp, diff, diff3, sdiff), ed, findutils (includes find, locate, updatedb, xargs), gawk (GNU awk), grep (also includes egrep and fgrep), gzip (also includes gunzip and gzexe), ncurses (includes capconvert, clear, infocmp, tabs, tic, toe, tput, tset), patch, sed, tar

Build instructions

sudo apt install build-essential gcc-multilib libgnutls28-dev lzip # For debian/ubuntu based distributions - install equivalent dev tools and dependencies for yours
./build.bash --help # For more info on usage

Compatibility

The below table notes if the binary is compatible with android ndk, linaro, or gcc compilers. If static or dynamic is listed, then only that link method is working

NDK? Linaro? GCC?
bash Static Yes Yes
bc Yes Yes Yes
coreutils No Static Static
cpio Yes Yes Yes
diffutils Static Yes Yes
ed Yes Yes Yes
findutils No Yes Yes
gawk Static Yes Yes
grep Yes Yes Yes
gzip Yes Yes Yes
ncurses Yes Yes Yes
patch Yes Yes Yes
sed Yes Yes Yes
tar Yes Yes Yes

Coreutils won't accept fPIE and related args for dynamic compile

Credits

Credits for Bash and Patches

License

MIT

You can’t perform that action at this time.