-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathbuild.sh
executable file
·37 lines (36 loc) · 1.23 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh -e
rm -rf build
echo "* extracting and mounting fw"
./utils/extractAndMountFw.sh &> /dev/null
echo "* extracting uks.sqsh from official firmware"
./utils/extractUksFromFirmware.sh &> /dev/null
echo "* patching uks.sqsh with the sexy pubdevkey01.pem"
./utils/patchUksSqsh.sh &> /dev/null
echo "* extracting hotfix"
./utils/extractHotfix.sh
rm -rf newHotfix
mkdir newHotfix
# echo "moving patched uks to the new hotfix"
# cp patchedUks.sqsh newHotfix
# echo "patching bridge in the new hotfix" # we don't need to patch it anymore
# patch originalHotfix/bridge < utils/bridge.patch &> /dev/null
# patch originalHotfix/install-bridge.sh < utils/install-bridge.sh.patch &> /dev/null
mv originalHotfix/* newHotfix
mkdir build
rm -rf originalHotfix
echo "* building the new hotfix for the devices specified in the official firmware"
python ./utils/buildHotfixForAllLangs.py "$1"
./utils/unmountAndDeleteFw.sh
rm -rf newHotfix
echo "* moving patched uks to LanguageBreak directory"
cp -r LanguageBreak build/
cp README.MD build/
cp patchedUks.sqsh build/LanguageBreak
rm -rf patchedUks.sqsh
echo "* done. language break generated for:"
cat build/DEVICES.txt
cd build
tar -czf ../LanguageBreak.tar.gz .
cd ..
rm -rf build/*
mv LanguageBreak.tar.gz build/