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