diff options
Diffstat (limited to 'extract_rootfs.sh')
-rwxr-xr-x | extract_rootfs.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/extract_rootfs.sh b/extract_rootfs.sh new file mode 100755 index 0000000..d253d71 --- /dev/null +++ b/extract_rootfs.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -xe + +TRIMUI_RESTORE_IMAGE=http://www.trimui.com/download/Trimui_Factory_Recovery_model_S_dark_V0.105_en.zip +TRIMUI_IMG_FILE=trimui_model_S_dark_V0.105_en.img +AWUTILS_REVISION=3f1cbb2c67752b392a88b252c51158d13d8809b5 +EXTFSTOOLS_REVISION=dac938546cc769eca6e57e35d7bb49d0ef458cd3 + +mkdir -p extract_rootfs && cd extract_rootfs + +curl -L https://github.com/Ithamar/awutils/archive/$AWUTILS_REVISION.zip -o awutils.zip && unzip awutils.zip +cd awutils-$AWUTILS_REVISION && make awimage && cd .. + +curl -L https://github.com/petib/extfstools/archive/$EXTFSTOOLS_REVISION.zip -o extfstools.zip && unzip extfstools.zip +cd extfstools-$EXTFSTOOLS_REVISION && make && cd .. + +curl -L $TRIMUI_RESTORE_IMAGE -o trimui_restore_image.zip && unzip trimui_restore_image.zip + +awutils-$AWUTILS_REVISION/awimage $TRIMUI_IMG_FILE + +mkdir -p ../trimui_rootfs +extfstools-$EXTFSTOOLS_REVISION/ext2rd $TRIMUI_IMG_FILE.dump/RFSFAT16_ROOTFS_FEX000000 ./:../trimui_rootfs + +cd .. && rm -r extract_rootfs + |