Overview
Busybox for Android NDK, maintained by osm0sis (xda-developers), provides a clean, statically linked BusyBox 1.36.1 binary compiled against the Android NDK (originating from the AIK-mobile toolchain). Many root scripts, shell utilities, and recovery-compatible modules depend on standard GNU/POSIX tools (awk, sed, grep, tar, unzip, nc, vi) with consistent flags rather than Android’s stripped-down toybox or mksh builtins.
This package ships pre-built static binaries for every major Android ABI and automatically handles architecture detection, SELinux capability selection, and safe symlink hygiene.
Technical Architecture & Installer Behavior
Inspecting UPDATE-Busybox.Installer.v1.36.1-ALL-signed.zip confirms the Diffusion Installer Core architecture (customize.sh + diffusion_config.sh):
Bundled Static Binaries
The archive bundles 10 static ELF binaries built from osm0sis/android-busybox-ndk:
- ARM / ARM64:
busybox-arm,busybox-arm-selinux,busybox-arm64,busybox-arm64-selinux - x86 / x86_64:
busybox-x86,busybox-x86-selinux,busybox-x86_64,busybox-x86_64-selinux - MIPS / MIPS64:
busybox-mips,busybox-mips64(non-SELinux;custom_installunsetsSELINUXonmips*)
Installation & Symlink Logic (diffusion_config.sh)
- ZIP Filename Options (
custom_zip_opts):- Default behavior installs the
-selinuxbinary (on ARM/x86 families) and creates applet symlinks. - Adding
nolinks(*nolinks*,*NoLinks*,*NOLINKS*) to the ZIP filename setsNOLINKS=1, installing only thebusyboxbinary. - Adding
noselinux(*noselinux*,*NoSELinux*,*NOSELINUX*) omits the-selinuxsuffix.
- Default behavior installs the
- Target Directory Resolution:
- Under systemless root managers (Magisk, KernelSU, APatch), files are staged inside the module directory (
system/xbinif/system/xbinexists, otherwisesystem/bin). - Permissions are set to
0755with SELinux contextu:object_r:system_file:s0.
- Under systemless root managers (Magisk, KernelSU, APatch), files are staged inside the module directory (
- Stale Symlink Cleanup (
custom_cleanup):- Scans
$XBIN(and legacy/bin/busyboxpaths if migrating) for existing symbolic links resolving to*busyboxand removes them before regenerating symlinks.
- Scans
- Safe Symlink Generation (
custom_postinstall):- Queries
$XBIN/busybox --listand runsbusybox ln -sf busybox $applet. - When installing into
*/bininstead of*/xbin, it compares each applet againstls /system/binso stock Android/system/bincommands (likeshortoolbox/toyboxbinaries) are not accidentally shadowed unless they were already replaced by the module.
- Queries
Installation & Usage
- Download
UPDATE-Busybox.Installer.v1.36.1-ALL-signed.zip(optionally renaming it to includenolinksornoselinuxif desired). - Flash the ZIP in Magisk, KernelSU, or APatch (Modules → Install from storage), or via custom recovery.
- Reboot your device.
Verification Commands
Confirm that the static BusyBox 1.36.1 binary is mounted and check its active path and applet count:
# Locate mounted busybox binary
which busybox
# Verify version and NDK build info
busybox | head -n 2
# Count available applets
busybox --list | wc -l
# Inspect SELinux context on the installed binary
ls -Z "$(which busybox)"
Uninstallation
Removing Busybox for Android NDK from your root manager uninstalls the systemless overlay cleanly upon reboot. If flashed directly to /system in recovery mode without a systemless manager, renaming the ZIP or re-flashing in recovery triggers ACTION=uninstall inside customize.sh, invoking custom_uninstall and custom_cleanup to remove busybox and all associated symlinks.
Frequently Asked Questions
How do I install BusyBox without creating applet symlinks or without SELinux support?
Busybox for Android NDK uses USE_ZIP_OPTS=true in diffusion_config.sh. Simply rename the ZIP file before flashing: include nolinks (case-insensitive) in the filename to skip symlink creation, or noselinux to install the non-SELinux binary instead of the default -selinux variant.
Where is the busybox binary installed under Magisk, KernelSU, or APatch?
The installer checks whether /system/xbin exists (or /magisk/Magisk module paths). When /system/xbin is present, it installs systemlessly to /data/adb/modules/busybox-ndk/system/xbin/busybox; on modern SAR/Android devices without /system/xbin, it falls back to $MODPATH/system/bin/busybox and skips symlinking applets that already exist in /system/bin.