forked from mineek/sunst0rm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.sh
executable file
·40 lines (36 loc) · 858 Bytes
/
boot.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
#!/usr/bin/env bash
pwnd=$(./bin/irecovery -q | grep -c "PWND")
if [ $pwnd = 0 ]; then
echo "Ensure device is in pwned DFU mode with signature checks removed."
exit
fi
sleep 1
cpid=$(./bin/irecovery -q | grep "CPID" | sed "s/CPID: //")
./bin/irecovery -f boot/iBSS.img4
sleep 2
# send iBSS again.
./bin/irecovery -f boot/iBSS.img4
sleep 3
./bin/irecovery -f boot/iBEC.img4
sleep 2
if [[ "$cpid" == *"0x80"* ]]; then
./bin/irecovery -f boot/iBEC.img4
sleep 2
./bin/irecovery -c "go"
sleep 5
fi
./bin/irecovery -f boot/bootlogo.img4
sleep 1
./bin/irecovery -c "setpicture 0x1"
sleep 1
./bin/irecovery -f boot/devicetree.img4
sleep 1
./bin/irecovery -c "devicetree"
sleep 1
./bin/irecovery -f boot/trustcache.img4
sleep 1
./bin/irecovery -c "firmware"
sleep 1
./bin/irecovery -f boot/krnlboot.img4
sleep 1
./bin/irecovery -c "bootx"