安裝busybox installer
/system/bin/mount -o rw,remount /
mkdir /opt
mkdir /bin
ln -s /system/bin/sh /bin/sh
/data/opt 作為opt的根目錄
mkdir /data/opt
mount -o ro,remount /
mount -o bind /data/opt /opt
安裝Entware
wget -O - http://pkg.entware.net/binaries/armv7/installer/entware_install.sh | sh
增加init.d支持: https://forum.xda-developers.com/showthread.php?t=2711680
/system/bin/mount -o rw,remount /system
echo 'busybox run-parts /system/etc/init.d/' >> /system/etc/init.qcom.post_boot.sh
mkdir /system/etc/init.d
chmod 755 /system/etc/init.d
init 腳本:
cat << EOF >/system/etc/init.d/00entware
#!/system/bin/sh
sleep 3
/system/bin/mount -o rw,remount /
sleep 1
/system/bin/mkdir /opt
/system/bin/mkdir /bin
ln -s /system/bin/sh /bin/sh
/system/bin/mount -o ro,remount /
sleep 3
mount -o bind /data/opt /opt
sleep 2
/opt/etc/init.d/rc.unslung start
EOF
/system/bin/mount -o ro,remount /system