forked from ca1e/DeepSea
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathswitchScript.sh
More file actions
128 lines (105 loc) · 3.31 KB
/
switchScript.sh
File metadata and controls
128 lines (105 loc) · 3.31 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/bin/bash
### Credit to the Authors at https://rentry.org/CFWGuides
### Script created by Fraxalotl
# -------------------------------------------
### Install jq if not already installed
if [[ "$OSTYPE" == "msys" ]]; then
# Windows
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
chocolatey install jq
elif [[ "$OSTYpe" == "darwin" ]]; then
# MacOS
brew install jq
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
# linux
sudo apt-get install jq
fi
### Fetch latest Hekate + Nyx from https://github.com/CTCaer/hekate/releases/latest/
echo Downloading Hekate...
curl -sL https://api.github.com/repos/CTCaer/hekate/tags \
| jq -r '.[0].zipball_url' \
| xargs -I {} curl -sL {} -o hekate.zip
echo Done!
### Fetch latest atmosphere from https://github.com/Atmosphere-NX/Atmosphere/releases/latest
curl -sL https://api.github.com/repos/Atmosphere-NX/Atmosphere/tags \
| jq -r '.[0].zipball_url' \
| xargs -I {} curl -sL {} -o atmosphere.zip
echo Done!
### Fetch latest SigPatches.zip from https://github.com/ITotalJustice/patches/releases/latest
echo Downloading Sigpatches...
curl -sL https://jits.cc/patches -o sigpatches.zip;
echo Done!
# -------------------------------------------
### Unzip Downloaded Packages
echo Unzipping Zips...
unzip -u hekate.zip
unzip -u atomsphere.zip
unzip -u sigpatches.zip
echo Done!
### Cleanup Downloaded Zips
echo Cleaning up...
rm hekate.zip
rm atmosphere.zip
rm sigpatches.zip
echo Done!
### Place fusee.bin in /bootloader/payloads/
if [[ "$OSTYPE" == "msys" ]]; then
move fusee.bin /bootloader/payloads
else
mv fusee.bin /bootloader/payloads
# -------------------------------------------
### Write hekate_ipl.ini in /bootloader/ directory
echo Writing hekate_ipl.ini in /bootloader/ directory...
mkdir -p /bootloader
cat > /bootloader/hekate_ipl.ini << ENDOFFILE
[config]
autoboot=0
autoboot_list=0
bootwait=3
backlight=100
autohosoff=0
autonogc=1
updater2p=0
bootprotect=0
[Atmosphere CFW]
payload=bootloader/payloads/fusee.bin
icon=bootloader/res/icon_payload.bmp
[Stock SysNAND]
fss0=atmosphere/package3
stock=1
emummc_force_disable=1
icon=bootloader/res/icon_switch.bmp
ENDOFFILE
echo Done!
# -------------------------------------------
### write exosphere.ini in root of SD Card
echo Writing exosphere.ini in root of SD card...
cat > /exosphere.ini << ENDOFFILE
[exosphere]
debugmode=1
debugmode_user=0
disable_user_exception_handlers=0
enable_user_pmu_access=0
blank_prodinfo_sysmmc=0
blank_prodinfo_emummc=1
allow_writing_to_cal_sysmmc=0
log_port=0
log_baud_rate=115200
log_inverted=0
ENDOFFILE
echo Done!
# -------------------------------------------
### Write default.txt in /atmosphere/hosts
echo Writing default.txt in /atmosphere/hosts
mkdir -p /atmosphere/hosts
cat > /atmosphere/hosts/default.txt << ENDOFFILE
# Block Nintendo Servers
127.0.0.1 *nintendo.*
127.0.0.1 *nintendo-europe.com
127.0.0.1 *nintendoswitch.*
95.216.149.205 *conntest.nintendowifi.net
95.216.149.205 *ctest.cdn.nintendo.net
ENDOFFILE
echo Done!
# -------------------------------------------
echo Your Switch SD card is prepared!