Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/sbin/sh -x
- mount -o remount,rw /dev/block/stl9 /system
- if [ ! -d /tmp ]; then
- mkdir /tmp
- fi;
- cd /tmp
- if [ -f $1 ]; then
- /tmp/busybox unzip -qq $1 META-INF/com/google/android/updater-script -d /tmp/ #extract the updater-script quietly to /tmp/
- fi;
- if [ -f /tmp/META-INF/com/google/android/updater-script ]; then
- sed -i 1i"# Script modified by Dual Boot installer" /tmp/META-INF/com/google/android/updater-script; #add disclosure
- sed -i 's/stl9/mmcblk0p2/g' /tmp/META-INF/com/google/android/updater-script; #replace system partition with system sd card
- sed -i 's/stl10/mmcblk0p3/g' /tmp/META-INF/com/google/android/updater-script; #replace data partition with data sd card
- sed -i 's/stl11/mmcblk0p4/g' /tmp/META-INF/com/google/android/updater-script; #replace cache partition with cache sd card
- sed -i '/\/dev\/block\/bml7/d' /tmp/META-INF/com/google/android/updater-script; #disable kernel flash
- sed -i 's/[ \t]*$//' /tmp/META-INF/com/google/android/updater-script; #remove trailing whitespaces
- sed -i 's/.$//' /tmp/META-INF/com/google/android/updater-script; #convert to UNIX LF line endings just in case
- echo '#Kernel flashing disabled by DualBoot installer script' >> /tmp/META-INF/com/google/android/updater-script; #add string to end of file
- echo 'ui_print("Flashing Kernel Disabled by Install Script");' >> /tmp/META-INF/com/google/android/updater-script; #add string to end of file
- /tmp/zip -qqru0 $1 META-INF/; #put the updater-script back
- fi;
- if [ -d /tmp/META-INF ]; then
- rm -R /tmp/META-INF;
- fi;
Advertisement
Add Comment
Please, Sign In to add comment