System-level KernelSU module: aapt2/aidl/zipalign (API 35), BusyBox, platform-tools, all as static arm64 binaries in the Android framework. Termux integration for Java/Kotlin/Gradle/Python via pkg. CLI tools: buildchain, bc-build, bc-sign. WebUI on :8089 for toolchain management. Turns any Android phone into a native compilation powerhouse.
26 lines
879 B
Bash
Executable File
26 lines
879 B
Bash
Executable File
#!/sbin/sh
|
|
umask 022
|
|
OUTFD=$2
|
|
ZIPFILE=$3
|
|
ui_print() { echo "$1"; }
|
|
mount /data 2>/dev/null
|
|
[ -f /data/adb/magisk/util_functions.sh ] || { ui_print "Requires KernelSU-Next"; exit 1; }
|
|
. /data/adb/magisk/util_functions.sh
|
|
[ $MAGISK_VER_CODE -lt 20400 ] && { ui_print "Requires KernelSU-Next"; exit 1; }
|
|
setup_flashable
|
|
mount_partitions
|
|
api_level_arch_detect
|
|
MODID=buildchain
|
|
MODPATH=$MOUNTPATH/$MODID
|
|
ui_print "- Extracting BuildChain"
|
|
unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2
|
|
set_perm_recursive $MODPATH 0 0 0755 0644
|
|
set_perm_recursive $MODPATH/tools 0 2000 0755 0755
|
|
set_perm_recursive $MODPATH/scripts 0 2000 0755 0755
|
|
set_perm $MODPATH/service.sh 0 0 0755
|
|
set_perm $MODPATH/post-fs-data.sh 0 0 0755
|
|
set_perm $MODPATH/uninstall.sh 0 0 0755
|
|
ui_print "- BuildChain installed"
|
|
ui_print "- Reboot, then run: buildchain setup"
|
|
ui_print "- WebUI at http://localhost:8089"
|