mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
likewise for the patcher (note: not yet tested)
This commit is contained in:
parent
d6bdafefa0
commit
c512a0b5c8
@ -309,6 +309,32 @@ detect_odex () {
|
|||||||
error "Android 9 or newer is only supported on de-odexed ROMs currently"
|
error "Android 9 or newer is only supported on de-odexed ROMs currently"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# Setup Busybox
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
setup_busybox () {
|
||||||
|
if [[ "$(uname -m)" == a* ]]; then
|
||||||
|
local bb_arch=arm
|
||||||
|
else local bb_arch=x86
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ${TMPDIR}/busybox.${bb_arch} ]; then
|
||||||
|
BUSY=${TMPDIR}/busybox.${bb_arch}
|
||||||
|
else BUSY=${BASEDIR}/busybox.${bb_arch}
|
||||||
|
fi
|
||||||
|
|
||||||
|
chmod 0755 ${BUSY}
|
||||||
|
|
||||||
|
rm -rf ${BASEDIR}/busybox
|
||||||
|
mkdir -p ${BASEDIR}/busybox
|
||||||
|
|
||||||
|
ln -sf ${BUSY} ${BASEDIR}/busybox/busybox
|
||||||
|
${BUSY} --install -s ${BASEDIR}/busybox/
|
||||||
|
|
||||||
|
export PATH="${BASEDIR}/busybox:/system/bin:/system/xbin"
|
||||||
|
}
|
||||||
|
|
||||||
detect_arch () {
|
detect_arch () {
|
||||||
ABI=$(grep_prop ro.product.cpu.abi | cut -c-3)
|
ABI=$(grep_prop ro.product.cpu.abi | cut -c-3)
|
||||||
ABI2=$(grep_prop ro.product.cpu.abi2 | cut -c-3)
|
ABI2=$(grep_prop ro.product.cpu.abi2 | cut -c-3)
|
||||||
@ -325,35 +351,15 @@ detect_arch () {
|
|||||||
arm | arm64 )
|
arm | arm64 )
|
||||||
ZIPB=${BASEDIR}/zip.arm
|
ZIPB=${BASEDIR}/zip.arm
|
||||||
FILE=${BASEDIR}/file.arm
|
FILE=${BASEDIR}/file.arm
|
||||||
|
|
||||||
if [ -f ${TMPDIR}/busybox.arm ]; then
|
|
||||||
BUSY=${TMPDIR}/busybox.arm
|
|
||||||
else BUSY=${BASEDIR}/busybox.arm
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
x86 | x86_64 )
|
x86 | x86_64 )
|
||||||
ZIPB=${BASEDIR}/zip.x86
|
ZIPB=${BASEDIR}/zip.x86
|
||||||
FILE=${BASEDIR}/file.x86
|
FILE=${BASEDIR}/file.x86
|
||||||
|
|
||||||
if [ -f ${TMPDIR}/busybox.x86 ]; then
|
|
||||||
BUSY=${TMPDIR}/busybox.x86
|
|
||||||
else BUSY=${BASEDIR}/busybox.x86
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
V_EX=${BASEDIR}/vdexExtractor.${ARCH}
|
V_EX=${BASEDIR}/vdexExtractor.${ARCH}
|
||||||
|
|
||||||
chmod 0755 ${BUSY}
|
|
||||||
|
|
||||||
rm -rf ${BASEDIR}/busybox
|
|
||||||
mkdir -p ${BASEDIR}/busybox
|
|
||||||
|
|
||||||
ln -sf ${BUSY} ${BASEDIR}/busybox/busybox
|
|
||||||
${BUSY} --install -s ${BASEDIR}/busybox/
|
|
||||||
|
|
||||||
export PATH="${BASEDIR}/busybox:/system/bin:/system/xbin"
|
|
||||||
|
|
||||||
DALVIKVM_ARCH=$("${FILE}" -m "${BASEDIR}/magic.mgc" -L /system/bin/dalvikvm)
|
DALVIKVM_ARCH=$("${FILE}" -m "${BASEDIR}/magic.mgc" -L /system/bin/dalvikvm)
|
||||||
|
|
||||||
case ${DALVIKVM_ARCH} in
|
case ${DALVIKVM_ARCH} in
|
||||||
|
@ -18,6 +18,7 @@ detect_outfd
|
|||||||
|
|
||||||
show_banner
|
show_banner
|
||||||
|
|
||||||
|
setup_busybox
|
||||||
mount_partitions
|
mount_partitions
|
||||||
|
|
||||||
setup_patcher
|
setup_patcher
|
||||||
|
@ -31,6 +31,7 @@ NanoDroidPatcher () {
|
|||||||
detect_outfd
|
detect_outfd
|
||||||
|
|
||||||
show_banner
|
show_banner
|
||||||
|
setup_busybox
|
||||||
detect_sdk
|
detect_sdk
|
||||||
detect_arch
|
detect_arch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user