diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index ce82f97..549305d 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -27,7 +27,7 @@ abort() { ui_print "$*"; umount /system; umount /data; exit 1; } show_progress 1.34 4; ui_print " "; -mkdir -p /tmp/anykernel; +mkdir -p /tmp/anykernel/bin; cd /tmp/anykernel; unzip -o "$ZIP"; if [ $? != 0 -o -z "$(ls /tmp/anykernel)" ]; then @@ -38,8 +38,8 @@ ui_print "$(file_getprop /tmp/anykernel/anykernel.sh kernel.string)"; ui_print " "; ui_print "AnyKernel2 by osm0sis @ xda-developers"; ui_print " "; -/sbin/busybox mount -o ro /system; -/sbin/busybox mount /data; +mount -o ro /system; +mount /data; if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.devicecheck)" == 1 ]; then ui_print "Checking device..."; @@ -59,14 +59,19 @@ fi; if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.initd)" == 1 ]; then ui_print "Creating init.d..."; ui_print " "; - /sbin/busybox mount -o remount,rw /system; + mount -o remount,rw /system; mkdir /system/etc/init.d; set_perm_recursive 0 0 0755 0755 /system/etc/init.d; - /sbin/busybox mount -o remount,ro /system; + mount -o remount,ro /system; fi; ui_print "Installing kernel..."; -/sbin/sh /tmp/anykernel/anykernel.sh $2; +chmod -R 755 /tmp/anykernel/tools /tmp/anykernel/bin; +bb=/tmp/anykernel/tools/busybox; +for i in $($bb --list); do + ln -s $bb /tmp/anykernel/bin/$i; +done; +PATH="/tmp/anykernel/bin:$PATH" $bb ash /tmp/anykernel/anykernel.sh $2; if [ $? != "0" ]; then abort; fi; @@ -74,10 +79,10 @@ fi; if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.modules)" == 1 ]; then ui_print " "; ui_print "Pushing modules..."; - /sbin/busybox mount -o remount,rw /system; + mount -o remount,rw /system; cp -rf /tmp/anykernel/modules/* /system/lib/modules/; set_perm_recursive 0 0 0755 0644 /system/lib/modules; - /sbin/busybox mount -o remount,ro /system; + mount -o remount,ro /system; fi; if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.cleanup)" == 1 ]; then diff --git a/tools/busybox b/tools/busybox new file mode 100755 index 0000000..f64115a Binary files /dev/null and b/tools/busybox differ