forked from raspberryenvoie/odysseyn1x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_android-sandcastle
executable file
·49 lines (40 loc) · 1.4 KB
/
setup_android-sandcastle
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
#!/bin/sh
# Load functions and variables
. /usr/bin/common
cd /root/android-sandcastle/
# Show ASCII art
android_logo
cat << "EOF"
Connect a jailbroken iDevice with an internet connection
The keyboard layout is in American Qwerty.
Your iDevice's default password is alpine.
EOF
# Ask if the user uses odysseyra1n or checkra1n and set port to 22 for odysseyra1n or 44 for checkra1n
until [ "$port" = 22 ] || [ "$port" = 44 ]; do
prompt 'Are you using odysseyra1n or checkra1n [O/c] ' jailbreak
case "$jailbreak" in
[oO][dD][yY][sS][sS][eE][yY][rR][aA][1iI][nN]|[oO])
port='22' ;;
[cC][hH][eE][cC][kK][rR][aA][1iI][nN]|[cC])
port='44' ;;
*)
echo 'Invalid input!' ;;
esac
done
IPROXY=$(iproxy 28605 "$port" >/dev/null 2>&1 & echo $!)
clear
blue_echo 'Copying the setup script to your device...'
if scp -qP28605 -o "StrictHostKeyChecking no" -o "UserKnownHostsFile=/dev/null" isetup [email protected]:/tmp/setup.sh; then
done_echo 'Done copying the setup script to your device.'
else
failed_echo 'Failed to copy the setup script to your device.'
fi
blue_echo 'Downloading NAND...'
if ssh -qp28605 -o "StrictHostKeyChecking no" -o "UserKnownHostsFile=/dev/null" [email protected] "chmod 755 /tmp/setup.sh && /tmp/setup.sh"; then
done_echo 'Done downloading NAND.'
echo 'Select "Start Android" to boot into Android'
enter_to_quit
/usr/bin/menu_projectsandcastle
else
failed_echo 'Failed to download NAND.'
fi