From 66ee671c6e1552cf7a84f6a23ca7e9a6f31c0e22 Mon Sep 17 00:00:00 2001 From: BlackDragon Date: Sun, 14 Sep 2025 02:30:16 +0200 Subject: [PATCH] first commit --- .gitignore | 3 +++ createlookup.sh | 23 +++++++++++++++++++++++ extractapps.sh | 28 ++++++++++++++++++++++++++++ generatetree.sh | 25 +++++++++++++++++++++++++ images/lookup/phase1_waccalilyr.csv | 4 ++++ patchvhdlebe.sh | 20 ++++++++++++++++++++ profiles/waccalily/apps.csv | 5 +++++ profiles/waccalily/metadata | 3 +++ profiles/waccalilyr/apps.csv | 5 +++++ profiles/waccalilyr/metadata | 3 +++ profiles/waccareverse/apps.csv | 9 +++++++++ profiles/waccareverse/metadata | 3 +++ profiles/waccas/apps.csv | 8 ++++++++ profiles/waccas/metadata | 3 +++ 14 files changed, 142 insertions(+) create mode 100644 .gitignore create mode 100644 createlookup.sh create mode 100755 extractapps.sh create mode 100644 generatetree.sh create mode 100644 images/lookup/phase1_waccalilyr.csv create mode 100644 patchvhdlebe.sh create mode 100755 profiles/waccalily/apps.csv create mode 100755 profiles/waccalily/metadata create mode 100755 profiles/waccalilyr/apps.csv create mode 100755 profiles/waccalilyr/metadata create mode 100755 profiles/waccareverse/apps.csv create mode 100755 profiles/waccareverse/metadata create mode 100755 profiles/waccas/apps.csv create mode 100755 profiles/waccas/metadata diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b468cad --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +images/app/* +images/tree/*/* +images/vhd/* \ No newline at end of file diff --git a/createlookup.sh b/createlookup.sh new file mode 100644 index 0000000..ec8bce8 --- /dev/null +++ b/createlookup.sh @@ -0,0 +1,23 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo "Usage: $0 " + exit 1 +fi + +profile="$1" +rm images/lookup/phase1_$1.csv +while IFS=, read -r version backingversion url +do + vhd=$(basename "$url" | sed -E "s/.app/.vhd/") + if [ -f "images/vhd/$vhd" ]; then + input=$(vhdiinfo images/vhd/$vhd) + + identifier=$(echo "$input" | grep -i "Identifier" | head -1 | awk '{print $NF}') + parent_identifier=$(echo "$input" | grep -i "Parent identifier" | awk '{print $NF}') + parent_filename=$(echo "$input" | grep -i "Parent filename" | awk -F': ' '{print $2}') + + echo $vhd,$version,$identifier,$backingversion,$parent_identifier,$parent_filename >> images/lookup/phase1_$1.csv + else + echo "images/vhd/$vhd not found" + fi +done < profiles/$profile/apps.csv \ No newline at end of file diff --git a/extractapps.sh b/extractapps.sh new file mode 100755 index 0000000..73b909d --- /dev/null +++ b/extractapps.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + echo "Usage: $0 " + exit 1 +fi + +profile="$1" + +while IFS=, read -r version backingversion url +do + file=$(basename "$url") + vhd=$(basename "$url" | sed -E "s/.app/.vhd/") + if [ -f images/app/$file ]; then + echo "Found $file" + if [ -f images/vhd/$vhd ]; then + echo "Found $vhd" + else + echo "Decrypting $file" + fsdecrypt images/app/$file + copy images/ + fi + else + if [ ! -f images/vhd/$vhd ]; then + echo "Downloading $file" + fi + fi +done < profiles/$profile/apps.csv \ No newline at end of file diff --git a/generatetree.sh b/generatetree.sh new file mode 100644 index 0000000..f6c162d --- /dev/null +++ b/generatetree.sh @@ -0,0 +1,25 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo "Usage: $0 " + exit 1 +fi + +profile="$1" +while IFS=, read -r vhd version identifier backingversion parent_identifier parent_filename +do + match=0 + echo $vhd + while IFS=, read -r vhd2 version2 identifier2 backingversion2 parent_identifier2 parent_filename2 + do + if [ "$identifier" == "$parent_identifier2" ]; then + echo "Match: $vhd $parent_filename2" + l=$(echo $parent_filename2 | sed 's/\\/\//g') + ln -s $(pwd)/images/vhd/$vhd images/tree/$profile/$basename$(basename $l) + match=1 + fi + done < images/lookup/phase1_$1.csv + if [[ match -eq 0 ]]; then + echo "End of chain $vhd" + ln -s $(pwd)/images/vhd/$vhd images/tree/$profile/"game.vhd" + fi +done < images/lookup/phase1_$1.csv \ No newline at end of file diff --git a/images/lookup/phase1_waccalilyr.csv b/images/lookup/phase1_waccalilyr.csv new file mode 100644 index 0000000..86871ab --- /dev/null +++ b/images/lookup/phase1_waccalilyr.csv @@ -0,0 +1,4 @@ +SDFE_2.00.00_20200813163739_0.vhd,2.00.00,929a27e2-6aae-b54c-ba86-13d515152fb6,base,, +SDFE_2.50.00_20210129180947_1_2.00.00.vhd,2.50.00,ef51ac04-e8a3-e14e-8d4d-254d70ad30a5,2.00.00,929a27e2-6aae-b54c-ba86-13d515152fb6,\Device\FscryptDisk_APP_0\internal_0.vhd +SDFE_2.52.00_20210426101902_2_2.50.00.vhd,2.52.00,1eacb393-f579-cd41-afe7-f2e6689cd879,2.50.00,ef51ac04-e8a3-e14e-8d4d-254d70ad30a5,\Device\FscryptDisk_APP_1\internal_1.vhd +SDFE_2.53.00_20210607052915_3_2.52.00.vhd,2.53.00,ab623e80-e23f-d649-a6be-9788ec521ecc,2.52.00,1eacb393-f579-cd41-afe7-f2e6689cd879,\Device\FscryptDisk_APP_2\internal_2.vhd diff --git a/patchvhdlebe.sh b/patchvhdlebe.sh new file mode 100644 index 0000000..985569a --- /dev/null +++ b/patchvhdlebe.sh @@ -0,0 +1,20 @@ +#!/bin/bash +#Script that patches .vhd files to be correctly read vhditools by turning LE parent filenames into BE +if [ $# -eq 0 ]; then + echo "Usage: $0 <.vhd>" + exit 1 +fi + +str=$(strings -e l $1 | head -n 1) + +echo $str +read -p "Do you want to patch the listed string? (y/N): " -n 1 -r +echo # move to a new line +if [[ $REPLY =~ ^[Yy]$ ]] +then + be=$(echo -n $str | iconv -f UTF-8 -t UTF-16BE | xxd -p -c1 | tr -d '\n ' | sed 's/../\\x&/g') + le=$(echo -n $str | iconv -f UTF-8 -t UTF-16LE | xxd -p -c1 | tr -d '\n ' | sed 's/../\\x&/g') + mv $1 $1.old + bbe -e "s/$le/$be/" $1.old | pv -s $(stat --printf="%s" $1.old) > $1 +fi +rm $1.old diff --git a/profiles/waccalily/apps.csv b/profiles/waccalily/apps.csv new file mode 100755 index 0000000..62cacdc --- /dev/null +++ b/profiles/waccalily/apps.csv @@ -0,0 +1,5 @@ +2.00.00,base,https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_2.00.00_20200813163739_0.app +2.01.00,2.00.00,https://archive.org/download/WACCA/EXP/SDFE_2.01.00_20200923205643_1_2.00.00.app +2.02.00,2.01.00,https://archive.org/download/WACCA/EXP/SDFE_2.02.00_20201030154849_2_2.01.00.app +2.03.00,2.02.00,https://archive.org/download/WACCA/EXP/SDFE_2.03.00_20201130071007_3_2.02.00.app +2.04.00,2.03.00,https://archive.org/download/WACCA/EXP/SDFE_2.04.00_20210114100544_4_2.03.00.app diff --git a/profiles/waccalily/metadata b/profiles/waccalily/metadata new file mode 100755 index 0000000..dcdabbb --- /dev/null +++ b/profiles/waccalily/metadata @@ -0,0 +1,3 @@ +prettyname="WACCA Lily" +icf="https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_ACA.icf" +versionupdate="https://archive.org/download/WACCA/EXP/2.00.00%20USB/%5B%5B%5B%5B%5BVersionUpdate%5D%5D%5D%5D%5D" diff --git a/profiles/waccalilyr/apps.csv b/profiles/waccalilyr/apps.csv new file mode 100755 index 0000000..a2afc93 --- /dev/null +++ b/profiles/waccalilyr/apps.csv @@ -0,0 +1,5 @@ +2.00.00,base,https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_2.00.00_20200813163739_0.app +2.50.00,2.00.00,https://archive.org/download/WACCA/EXP/SDFE_2.50.00_20210129180947_1_2.00.00.app +2.51.00,2.50.00,https://archive.org/download/WACCA/EXP/SDFE_2.51.00_20210309120850_2_2.50.00.app +2.52.00,2.50.00,https://archive.org/download/WACCA/EXP/SDFE_2.52.00_20210426101902_2_2.50.00.app +2.53.00,2.52.00,https://archive.org/download/WACCA/EXP/SDFE_2.53.00_20210607052915_3_2.52.00.app diff --git a/profiles/waccalilyr/metadata b/profiles/waccalilyr/metadata new file mode 100755 index 0000000..afaf598 --- /dev/null +++ b/profiles/waccalilyr/metadata @@ -0,0 +1,3 @@ +prettyname="WACCA Lily R" +icf="https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_ACA.icf" +versionupdate="https://archive.org/download/WACCA/EXP/2.00.00%20USB/%5B%5B%5B%5B%5BVersionUpdate%5D%5D%5D%5D%5D" diff --git a/profiles/waccareverse/apps.csv b/profiles/waccareverse/apps.csv new file mode 100755 index 0000000..2c17e4f --- /dev/null +++ b/profiles/waccareverse/apps.csv @@ -0,0 +1,9 @@ +3.00.00,base,https://archive.org/download/WACCA/EXP/3.00.00%20USB/SDFE_3.00.00_20210701023921_0.app +3.01.00,3.00.00,https://archive.org/download/WACCA/EXP/SDFE_3.01.00_20210817052556_1_3.00.00.app +3.02.00,3.01.00,https://archive.org/download/WACCA/EXP/SDFE_3.02.00_20210927052723_2_3.01.00.app +3.03.00,3.02.00,https://archive.org/download/WACCA/EXP/SDFE_3.03.00_20211112063023_3_3.02.00.app +3.04.00,3.03.00,https://archive.org/download/WACCA/EXP/SDFE_3.04.00_20211208062838_4_3.03.00.app +3.05.00,3.04.00,https://archive.org/download/WACCA/EXP/SDFE_3.05.00_20220203063543_5_3.04.00.app +3.06.00,3.05.00,https://archive.org/download/WACCA/EXP/SDFE_3.06.00_20220412064126_6_3.05.00.app +3.07.00,3.06.00,https://archive.org/download/WACCA/EXP/SDFE_3.07.00_20220609093125_7_3.06.00.app +3.07.01,3.07.00,https://archive.org/download/WACCA/EXP/SDFE_3.07.01_20220628165934_8_3.07.00.app diff --git a/profiles/waccareverse/metadata b/profiles/waccareverse/metadata new file mode 100755 index 0000000..b725f24 --- /dev/null +++ b/profiles/waccareverse/metadata @@ -0,0 +1,3 @@ +prettyname="WACCA Reverse" +icf="https://archive.org/download/WACCA/EXP/3.00.00%20USB/SDFE_ACA.icf" +versionupdate="https://archive.org/download/WACCA/EXP/3.00.00%20USB/%5B%5B%5B%5B%5BVersionUpdate%5D%5D%5D%5D%5D" diff --git a/profiles/waccas/apps.csv b/profiles/waccas/apps.csv new file mode 100755 index 0000000..fce9c05 --- /dev/null +++ b/profiles/waccas/apps.csv @@ -0,0 +1,8 @@ +version,backingversion,url +1.50.00,base,https://archive.org/download/WACCA/EXP/1.50.00%20USB/SDFE_1.50.00_20191225123843_0.app +1.50.01,1.50.00,https://archive.org/download/WACCA/EXP/SDFE_1.50.01_20200130145033_1_1.50.00.app +1.50.02,1.50.01,https://archive.org/download/WACCA/EXP/SDFE_1.50.02_20200227161144_2_1.50.01.app +1.50.03,1.50.02,https://archive.org/download/WACCA/EXP/SDFE_1.50.03_20200316131604_3_1.50.02.app +1.50.04,1.50.03,https://archive.org/download/WACCA/EXP/SDFE_1.50.04_20200325170234_4_1.50.03.app +1.50.05,1.50.04,https://archive.org/download/WACCA/EXP/SDFE_1.50.05_20200608155410_5_1.50.04.app +1.50.06,1.50.05,https://archive.org/download/WACCA/EXP/SDFE_1.50.06_20200722145703_6_1.50.05.app diff --git a/profiles/waccas/metadata b/profiles/waccas/metadata new file mode 100755 index 0000000..3634812 --- /dev/null +++ b/profiles/waccas/metadata @@ -0,0 +1,3 @@ +prettyname="WACCA S" +icf="https://archive.org/download/WACCA/EXP/1.50.00%20USB/SDFE_ACA.icf" +versionupdate="https://archive.org/download/WACCA/EXP/1.50.00%20USB/%5B%5B%5B%5B%5BVersionUpdate%5D%5D%5D%5D%5D"