Hi, is it still possible to force a system installation with the latest version?New addition to the OP.
Busybox Installer:
As a byproduct of building my own static busybox compiles in all supported Android architectures for my AIK-mobile package, I figured I might as well offer them up separately as well since there aren't any providers making Android x64 builds when I was researching.
The installer detects what architecture (ARM/64, x86/_64, MIPS/64) your device uses and installs the correct busybox binary to /system/xbin accordingly; it detects and supports "systemless" root installation as well, installing to /su/(x)bin instead. It then cleans up any symlinks from a possible previous installation at that location and cleverly generates new symlinks directly from the output of the installed binary, so they always match.
My busybox configs and patches are available here: https://github.com/osm0sis/android-busybox-ndk
I've submitted some patches to the official busybox mailinglist to resolve some API 21 compatibility, so that will save people time and make it easier for more providers. Anyway, hopefully I got all the applets most people want working.
Edit: Now the zip will also clean up an installation made to /su/bin and then install to /su/xbin.
Edit 2: New special zip features
You may add keywords to zip filename or in a file at /data/.busybox-ndk:
1) system or System or SYSTEM to force a system installation.
2) uninstall or Uninstall or UNINSTALL to uninstall busybox from the zip's detected target location (/su/xbin > /magisk/busybox-ndk/system/xbin > /data/adb/su/xbin > /data/adb/modules/busybox-ndk/system/xbin > /system/xbin, unless system forced per above).
3) nolinks or NoLinks or NOLINKS to opt out of symlink creation and only push the busybox binary.
4) noselinux or NoSELinux or NOSELINUX to force the non-SELinux busybox binary to be installed.
For those curious, I automate bundling my busybox binaries directly with builds from my AIK Build Farm using the following script.
~/bbox-bundle.sh:
Bash:#!/bin/bash # also this # bbox-bundle.sh # # osm0sis @ xda-developers # # requires (in addition to the default basic Ubuntu WSL packages): # zip, default-jre # # ~/aik-build.sh for basic busybox compiles, and ~/ndk-box-kitchen for selinux busybox compiles MAGISK=$HOME/magisk-modules; bold() { echo -e "\033[1m"$@"\033[0m"; } reset() { bold "--- Removing busybox-ndk module ..."; rm -rfv $MAGISK/UPDATE-Busybox.Installer* zipsigner-*.jar Busybox-*-ALL*.zip UPDATE-Busybox.Installer.*-ALL-signed.zip; rmdir $MAGISK 2>/dev/null; } init() { local zipsigner; reset; bold "--- Initializing busybox-ndk module ..."; # busybox-ndk build environment is initialized by aik-build.sh and ndk-box-kitchen/run.sh bold "- Cloning busybox-ndk installer git repository ..."; mkdir -p $MAGISK; git clone https://github.com/Magisk-Modules-Repo/busybox-ndk $MAGISK/UPDATE-Busybox.Installer-ALL; bold "- Downloading zipsigner ..."; zipsigner=$(wget -qO- https://github.com/opengapps/opengapps/tree/master/scripts/zipsigner-resources | grep -o 'opengapps/.*jar' | cut -d\" -f1 | sed 's/blob/raw/'); wget -O $HOME/$(basename $zipsigner) https://github.com/$zipsigner; } main() { local zipflag stdout copy ver i out modver modcode newmodver newmodcode iteration skipmodprop curdir; zipflag=-q; stdout=/dev/null; copy=1; until [ ! "$1" ]; do case $1 in help) echo "bbox-bundle.sh reset, init, [verbose] [nocopy]"; exit 1;; reset|init) $1; return;; verbose) stdout=/dev/stdout; unset zipflag; shift;; nocopy) unset copy; shift;; *) echo "unknown option: $1"; exit 1;; esac; done; ver=$(ls | grep ^busybox- | cut -d- -f2); if [ ! "$ver" ]; then echo "bbox-bundle: busybox repo not found, run aik-build.sh 'init' option"; exit 1; fi; bold "--- Bundling ..."; rm -f Busybox-*-ALL*.zip UPDATE-Busybox.Installer.*-ALL-signed.zip 2>/dev/null; if [ -f AIK-build/mobile/arm/busybox -a "$copy" ]; then bold "- Copying new Busybox $ver builds ..."; cd AIK-build/mobile; for i in *; do cp -fp $i/busybox $MAGISK/UPDATE-Busybox.Installer*-ALL/busybox-$i; done; cd $HOME; fi; if [ -f ndk-box-kitchen/libs/armeabi-v7a/busybox -a "$copy" ]; then bold "- Copying new Busybox $ver SELinux builds ..."; cd ndk-box-kitchen/libs; for i in *; do case $i in armeabi-v7a) out=arm;; arm64-v8a) out=arm64;; *) out=$i;; esac; cp -fp $i/busybox $MAGISK/UPDATE-Busybox.Installer*-ALL/busybox-$out-selinux; done; cd $HOME; fi; modver=$(grep -o "^version=.*$" $MAGISK/UPDATE-Busybox.Installer*-ALL/module.prop | cut -d= -f2); modcode=$(grep -o "^versionCode=.*$" $MAGISK/UPDATE-Busybox.Installer*-ALL/module.prop | cut -d= -f2); if [ "$ver" == "$modver" ]; then newmodver="$modver"; newmodcode="$((modcode + 1))"; iteration=1; else newmodver="$ver"; newmodcode="${ver//.}0"; fi; if [ "$iteration" ]; then echo -ne "\033[1m\n*** Update Magisk module version code ($modcode -> $newmodcode) (y/n)? \033[0m"; read n; echo; case $n in Y|y) ;; *) skipmodprop=1;; esac; fi; if [ ! "$skipmodprop" ]; then sed -i -e "s/version=.*/version=$newmodver/" -e "s/versionCode=.*/versionCode=$newmodcode/" $MAGISK/UPDATE-Busybox.Installer*-ALL/module.prop; sed -i -e "s/version\".*/version\": \"$newmodver\",/" -e "s/versionCode\".*/versionCode\": \"$newmodcode\",/" $MAGISK/UPDATE-Busybox.Installer*-ALL/update.json; fi; bold "- Packing \"Busybox-$ver-ALL.zip\" ..."; cd $MAGISK/UPDATE-Busybox.Installer*-ALL; zip -9 -x .git -x .github -x update.json -r $zipflag $HOME/Busybox-$ver-ALL.zip *; curdir=$(basename $PWD); cd ..; if [ "$curdir" != "UPDATE-Busybox.Installer.v$ver-ALL" ]; then mv UPDATE-Busybox.Installer*-ALL UPDATE-Busybox.Installer.v$ver-ALL; fi; cd $HOME; bold "- Signing as \"UPDATE-Busybox.Installer.v$ver-ALL-signed.zip\" ..."; java -jar zipsigner-*.jar Busybox-$ver-ALL.zip Busybox-$ver-ALL-signed.zip; mv -f Busybox-$ver-ALL-signed.zip UPDATE-Busybox.Installer.v$ver-ALL-signed.zip 2>/dev/null; rm -f Busybox-*-ALL.zip /tmp/signAPK*.tmp 2>/dev/null; } cd $HOME; main "$@"; exit 0;