first commit

This commit is contained in:
Kyan 2025-09-14 02:30:16 +02:00
commit 66ee671c6e
14 changed files with 142 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
images/app/*
images/tree/*/*
images/vhd/*

23
createlookup.sh Normal file
View file

@ -0,0 +1,23 @@
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 <profile>"
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

28
extractapps.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 <profile>"
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

25
generatetree.sh Normal file
View file

@ -0,0 +1,25 @@
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 <profile>"
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

View file

@ -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
1 SDFE_2.00.00_20200813163739_0.vhd 2.00.00 929a27e2-6aae-b54c-ba86-13d515152fb6 base
2 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
3 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
4 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

20
patchvhdlebe.sh Normal file
View file

@ -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

5
profiles/waccalily/apps.csv Executable file
View file

@ -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
1 2.00.00 base https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_2.00.00_20200813163739_0.app
2 2.01.00 2.00.00 https://archive.org/download/WACCA/EXP/SDFE_2.01.00_20200923205643_1_2.00.00.app
3 2.02.00 2.01.00 https://archive.org/download/WACCA/EXP/SDFE_2.02.00_20201030154849_2_2.01.00.app
4 2.03.00 2.02.00 https://archive.org/download/WACCA/EXP/SDFE_2.03.00_20201130071007_3_2.02.00.app
5 2.04.00 2.03.00 https://archive.org/download/WACCA/EXP/SDFE_2.04.00_20210114100544_4_2.03.00.app

3
profiles/waccalily/metadata Executable file
View file

@ -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"

5
profiles/waccalilyr/apps.csv Executable file
View file

@ -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
1 2.00.00 base https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_2.00.00_20200813163739_0.app
2 2.50.00 2.00.00 https://archive.org/download/WACCA/EXP/SDFE_2.50.00_20210129180947_1_2.00.00.app
3 2.51.00 2.50.00 https://archive.org/download/WACCA/EXP/SDFE_2.51.00_20210309120850_2_2.50.00.app
4 2.52.00 2.50.00 https://archive.org/download/WACCA/EXP/SDFE_2.52.00_20210426101902_2_2.50.00.app
5 2.53.00 2.52.00 https://archive.org/download/WACCA/EXP/SDFE_2.53.00_20210607052915_3_2.52.00.app

3
profiles/waccalilyr/metadata Executable file
View file

@ -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"

9
profiles/waccareverse/apps.csv Executable file
View file

@ -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
1 3.00.00 base https://archive.org/download/WACCA/EXP/3.00.00%20USB/SDFE_3.00.00_20210701023921_0.app
2 3.01.00 3.00.00 https://archive.org/download/WACCA/EXP/SDFE_3.01.00_20210817052556_1_3.00.00.app
3 3.02.00 3.01.00 https://archive.org/download/WACCA/EXP/SDFE_3.02.00_20210927052723_2_3.01.00.app
4 3.03.00 3.02.00 https://archive.org/download/WACCA/EXP/SDFE_3.03.00_20211112063023_3_3.02.00.app
5 3.04.00 3.03.00 https://archive.org/download/WACCA/EXP/SDFE_3.04.00_20211208062838_4_3.03.00.app
6 3.05.00 3.04.00 https://archive.org/download/WACCA/EXP/SDFE_3.05.00_20220203063543_5_3.04.00.app
7 3.06.00 3.05.00 https://archive.org/download/WACCA/EXP/SDFE_3.06.00_20220412064126_6_3.05.00.app
8 3.07.00 3.06.00 https://archive.org/download/WACCA/EXP/SDFE_3.07.00_20220609093125_7_3.06.00.app
9 3.07.01 3.07.00 https://archive.org/download/WACCA/EXP/SDFE_3.07.01_20220628165934_8_3.07.00.app

3
profiles/waccareverse/metadata Executable file
View file

@ -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"

8
profiles/waccas/apps.csv Executable file
View file

@ -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
1 version backingversion url
2 1.50.00 base https://archive.org/download/WACCA/EXP/1.50.00%20USB/SDFE_1.50.00_20191225123843_0.app
3 1.50.01 1.50.00 https://archive.org/download/WACCA/EXP/SDFE_1.50.01_20200130145033_1_1.50.00.app
4 1.50.02 1.50.01 https://archive.org/download/WACCA/EXP/SDFE_1.50.02_20200227161144_2_1.50.01.app
5 1.50.03 1.50.02 https://archive.org/download/WACCA/EXP/SDFE_1.50.03_20200316131604_3_1.50.02.app
6 1.50.04 1.50.03 https://archive.org/download/WACCA/EXP/SDFE_1.50.04_20200325170234_4_1.50.03.app
7 1.50.05 1.50.04 https://archive.org/download/WACCA/EXP/SDFE_1.50.05_20200608155410_5_1.50.04.app
8 1.50.06 1.50.05 https://archive.org/download/WACCA/EXP/SDFE_1.50.06_20200722145703_6_1.50.05.app

3
profiles/waccas/metadata Executable file
View file

@ -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"