1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
export PATH=DEVICEWORKDIR:$PATH
echo "Cleaning rootit files"
busybox rm -f DEVICEWORKDIR/rootit
busybox rm -f DEVICEWORKDIR/psneuter
busybox rm -f DEVICEWORKDIR/zergrush
busybox rm -f DEVICEWORKDIR/sh
busybox rm -f DEVICEWORKDIR/boomsh
echo "Mounting /system R/W"
busybox mount -o remount,rw yaffs2 /system >/dev/null 2>&1
export RCU=$?
if busybox test $RCU -eq 0
then
echo "Copying Superuser.apk to /system/app"
export RES=`dd if=DEVICEWORKDIR/Superuser.apk of=/system/app/Superuser.apk`
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
echo "Copying su to /system/xbin"
dd if=DEVICEWORKDIR/su of=/system/xbin/su
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
echo "Copying busybox to /system/xbin"
dd if=DEVICEWORKDIR/busybox of=/system/xbin/busybox
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
chown root.root /system/app/Superuser.apk
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
chown root.root /system/xbin/su
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
chown root.root /system/xbin/busybox
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
chmod 644 /system/app/Superuser.apk
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
chmod 06755 /system/xbin/su
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
chmod 04755 /system/xbin/busybox
export RCU=$?
else
echo FTError $RES
exit 31
fi
if busybox test $RCU -eq 0
then
/system/xbin/busybox --install -s /system/xbin
export RCU=$?
else
echo FTError $RES
exit 31
fi
busybox rm -f DEVICEWORKDIR/su
busybox rm -f DEVICEWORKDIR/busybox
busybox rm -f DEVICEWORKDIR/Superuser.apk
busybox rm -f DEVICEWORKDIR/rootit2
/system/bin/reboot
|