forked from roothide/Bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sh
executable file
·84 lines (59 loc) · 2.16 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#! /bin/sh
SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; )
rm -rf output # delete old Bootstrap-G.tipa
echo "[MAKE BOOTSTRAP] making Bootstrap-G dylibs..(1/7)"
# Gonna build choma first
cd "$SCRIPT_DIR"
cd Bootstrap/include/choma
make clean && make
cd ../libs
cd launchdhooker
make clean && make
cd ../SBtools/sbtool
make clean && make
cd ../sbhooker
make clean && make
cd "$SCRIPT_DIR"
cd roothelper
make clean && make
echo "[MAKE BOOTSTRAP] made dylibs & tools, signing, then moving them now (2/7)"
cd "$SCRIPT_DIR"
./Bootstrap/include/choma/output/tests/ct_bypass -i Bootstrap/include/libs/launchdhooker/.theos/obj/debug/launchdhooker.dylib -r -o Bootstrap/include/libs/launchdhooker/launchdhooker.dylib
if [ -e Bootstrap/include/libs/launchdhooker/launchdhooker.dylib ]
then
rm -rf Bootstrap/include/libs/launchdhooker/.theos
else
echo "[MAKE BOOTSTRAP] ERR: launchdhooker.dylib wasn't moved/signed correctly"
exit
fi
./Bootstrap/include/choma/output/tests/ct_bypass -i Bootstrap/include/libs/SBtools/sbtool/.theos/obj/debug/SBTool -r -o Bootstrap/include/libs/SBtools/sbtool/SBTool
if [ -e Bootstrap/include/libs/SBtools/sbtool/SBTool ]
then
rm -rf Bootstrap/include/libs/SBtools/sbtool/.theos
else
echo "[MAKE BOOTSTRAP] ERR: SBTool wasn't moved/signed correctly"
exit
fi
cd "$SCRIPT_DIR"
./Bootstrap/include/choma/output/tests/ct_bypass -i Bootstrap/include/libs/SBtools/sbhooker/.theos/obj/debug/SBHooker.dylib -r -o Bootstrap/include/libs/SBtools/sbhooker/SBHooker.dylib
if [ -e Bootstrap/include/libs/SBtools/sbhooker/SBHooker.dylib ]
then
rm -rf Bootstrap/include/libs/SBtools/sbhooker/.theos
else
echo "[MAKE BOOTSTRAP] ERR: SBHooker.dylib wasn't moved/signed correctly"
exit
fi
./Bootstrap/include/choma/output/tests/ct_bypass -i roothelper/.theos/obj/debug/RootHelper -r -o roothelper/RootHelper
ldid -Sroothelper/entitlements.plist -Cadhoc roothelper/RootHelper
if [ -e roothelper/RootHelper ]
then
rm -rf roothelper/.theos
else
echo "[MAKE BOOTSTRAP] ERR: RootHelper wasn't moved/signed correctly"
exit
fi
# continue from here
echo "[MAKE BOOTSTRAP] dylibs & tools moved & signed successfully, running [COPY BOOTSTRAP]"
cd "$SCRIPT_DIR"
chmod ++x copy.sh
./copy.sh