#!/bin/sh # extract the partitions from the full dump dd if=fw.bin bs=131072 count=1 of=00_mbm0.bin dd if=fw.bin bs=131072 skip=1 count=2 of=01_mbm1.bin dd if=fw.bin bs=131072 skip=3 count=1 of=02_kct.bin dd if=fw.bin bs=131072 skip=4 count=1 of=03_blob.bin dd if=fw.bin bs=131072 skip=5 count=8 of=04_raw_kernel.bin dd if=fw.bin bs=131072 skip=13 count=72 of=05_resource.bin dd if=fw.bin bs=131072 skip=85 count=48 of=06_userfs_db.bin dd if=fw.bin bs=131072 skip=133 count=64 of=07_userfs_general.bin dd if=fw.bin bs=131072 skip=197 count=1 of=08_secure_setup.bin dd if=fw.bin bs=131072 skip=198 count=1 of=09_tcmd.bin dd if=fw.bin bs=131072 skip=199 count=1 of=10_logo.bin dd if=fw.bin bs=131072 skip=200 count=7 of=11_fota.bin dd if=fw.bin bs=131072 skip=207 count=96 of=12_language.bin dd if=fw.bin bs=131072 skip=303 count=1 of=13_setup.bin dd if=fw.bin bs=131072 skip=304 of=14_rootfs.bin # extract the kernel dd if=04_raw_kernel.bin bs=1 skip=2048 count=917500 of=zImage # download gen-blob and magic-boot-from-flash wget http://people.openezx.org/wyrm/gen-blob/gen-blob wget http://people.openezx.org/wyrm/gen-blob/magic-boot-from-flash # prepare the kernel to be flashed cat magic-boot-from-flash zImage > zImage-flash # start flashing stuff.. echo boot_usb flash 0x2600000 14_rootfs.bin echo boot_usb flash 0x25e0000 13_setup.bin echo boot_usb flash 0x19e0000 12_language.bin echo boot_usb flash 0x1900000 11_fota.bin echo boot_usb flash 0x18e0000 10_logo.bin echo boot_usb flash 0x18c0000 09_tcmd.bin echo boot_usb flash 0x18a0000 08_secure_setup.bin echo boot_usb flash 0x10a0000 07_userfs_general.bin echo boot_usb flash 0xaa0000 06_userfs_db.bin echo boot_usb flash 0x1a0000 05_resource.img echo boot_usb flash 0xc0000 zImage-flash echo boot_usb flash 0xa0000 gen-blob