2020-07-30 01:28:51 +02:00
|
|
|
#!/bin/bash
|
|
|
|
if [ "$EUID" -ne 0 ]; then
|
|
|
|
echo You need to run this script as root.
|
|
|
|
else
|
|
|
|
clear
|
2020-08-04 01:31:44 +02:00
|
|
|
echo "Copyright (c) 2020, Yaya4 All rights reserved."
|
2020-09-05 20:37:19 +02:00
|
|
|
echo -e "\e[31mUncursus 2.0 Migration Part By Yaya4_4 1.2.3 (Stable)\e[0m"
|
|
|
|
checkDependencies(){
|
|
|
|
echo "Checking Dependencies ..."
|
|
|
|
need2=""
|
|
|
|
command -v wget >/dev/null 2>&1 || need2+="wget "
|
|
|
|
command -v plutil >/dev/null 2>&1 || need2+="com.bingner.plutil "
|
|
|
|
if [[ $need2 != "" ]]; then
|
|
|
|
echo "Installing Dependencies..."
|
|
|
|
apt update
|
|
|
|
apt install $need2 -y
|
|
|
|
fi
|
|
|
|
}
|
2020-09-02 03:45:42 +02:00
|
|
|
checkiOSVersion(){
|
2020-09-03 00:24:06 +02:00
|
|
|
echo "Checking iOS Version ..."
|
2020-07-30 01:28:51 +02:00
|
|
|
VER=$(/usr/bin/plutil -key ProductVersion /System/Library/CoreServices/SystemVersion.plist)
|
|
|
|
if [[ "${VER%.*}" -ge 12 ]] && [[ "${VER%.*}" -lt 13 ]]; then
|
2020-08-02 07:33:49 +02:00
|
|
|
echo "iOS 12 detected, setting the CFVER to 1500"
|
2020-07-30 19:31:05 +02:00
|
|
|
CFVER=1500
|
2020-07-30 01:28:51 +02:00
|
|
|
elif [[ "${VER%.*}" -ge 13 ]]; then
|
2020-08-02 07:33:49 +02:00
|
|
|
echo "iOS 13 detected, setting the CFVER to 1600"
|
2020-07-30 01:28:51 +02:00
|
|
|
CFVER=1600
|
2020-08-29 03:57:26 +02:00
|
|
|
elif [[ "${VER%.*.*}" -ge 13 ]]; then
|
2020-08-02 07:33:49 +02:00
|
|
|
echo "iOS 13 detected, setting the CFVER to 1600"
|
2020-07-30 19:31:05 +02:00
|
|
|
CFVER=1600
|
2020-08-29 03:57:26 +02:00
|
|
|
elif [[ "${VER%.*.*}" -ge 12 ]]; then
|
2020-08-02 07:33:49 +02:00
|
|
|
echo "iOS 12 detected, setting the CFVER to 1500"
|
2020-07-30 01:28:51 +02:00
|
|
|
CFVER=1500
|
2020-08-06 00:13:05 +02:00
|
|
|
else
|
2020-08-06 00:17:21 +02:00
|
|
|
echo "Your iOS Version Is Under iOS 12 Or Either Than 13"
|
2020-09-04 16:46:59 +02:00
|
|
|
exit 1
|
2020-07-30 01:28:51 +02:00
|
|
|
fi
|
2020-09-02 03:45:42 +02:00
|
|
|
}
|
2020-09-03 00:24:06 +02:00
|
|
|
checkSileo(){
|
|
|
|
echo "Checking if sileo for checkrain is installed ..."
|
|
|
|
dpkg -s org.coolstar.sileo &> /dev/null
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "Sileo for checkrain is installed."
|
|
|
|
echo "Uninstalling Sileo..."
|
|
|
|
rm -rf /tmp/sileoremoveal
|
|
|
|
mkdir /tmp/sileoremoveal
|
|
|
|
echo "Downloading necessary debs."
|
|
|
|
wget -q https://apt.bingner.com/debs/1443.00/libapt-pkg5.0_1.8.2-1_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/sileoremoveal
|
|
|
|
wget -q https://apt.bingner.com/debs/1443.00/libapt_1.8.2-1_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/sileoremoveal
|
|
|
|
wget -q https://apt.bingner.com/debs/1443.00/apt-key_1.8.2-1_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/sileoremoveal
|
|
|
|
wget -q https://apt.bingner.com/debs/1443.00/apt_1.8.2-3_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/sileoremoveal
|
|
|
|
wget -q https://apt.bingner.com/debs/1443.00/cydia_1.1.32~b23_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/sileoremoveal
|
|
|
|
wget -q https://apt.bingner.com/debs/1443.00/cydia-lproj_1.1.32~b1_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/sileoremoveal
|
|
|
|
echo "Done. Installing necessary debs."
|
|
|
|
cd /tmp/sileoremoveal
|
|
|
|
dpkg -i --force-all libapt_1.8.2-1_iphoneos-arm.deb
|
|
|
|
dpkg -i --force-all libapt-pkg5.0_1.8.2-1_iphoneos-arm.deb
|
|
|
|
dpkg -i --force-all apt-key_1.8.2-1_iphoneos-arm.deb
|
|
|
|
dpkg -i --force-all apt_1.8.2-3_iphoneos-arm.deb
|
|
|
|
dpkg -i --force-all cydia_1.1.32~b23_iphoneos-arm.deb
|
|
|
|
dpkg -i --force-all cydia-lproj_1.1.32~b1_iphoneos-arm.deb
|
|
|
|
echo "Done. Removing Sileo."
|
|
|
|
dpkg -r org.coolstar.sileo
|
|
|
|
echo "Done. Upgrading"
|
|
|
|
apt update
|
|
|
|
apt full-upgrade -y --allow-downgrades --allow-unauthenticated
|
2020-09-03 01:03:45 +02:00
|
|
|
apt remove sileoprep -y
|
2020-09-03 00:24:06 +02:00
|
|
|
uicache -p /Applications/Sileo.app
|
|
|
|
uicache -p /Applications/Cydia.app
|
|
|
|
rm -rf /tmp/sileoremoveal
|
|
|
|
else
|
2020-09-04 14:11:59 +02:00
|
|
|
echo "Sileo is NOT installed, Proccessing ..."
|
2020-09-03 00:24:06 +02:00
|
|
|
fi
|
|
|
|
}
|
2020-09-02 04:27:27 +02:00
|
|
|
ProcursusMigration(){
|
|
|
|
echo "Migrating..."
|
|
|
|
COREUTILSVER=8.32-4
|
2020-07-30 01:28:51 +02:00
|
|
|
rm /etc/apt/sources.list.d/cydia.list
|
|
|
|
echo "deb https://apt.procurs.us/ iphoneos-arm64/${CFVER} main" >> /etc/apt/sources.list.d/cydia.list
|
2020-08-16 01:05:50 +02:00
|
|
|
rm -rf /tmp/procursus-migration
|
|
|
|
mkdir /tmp/procursus-migration
|
|
|
|
wget -q http://apt.procurs.us/pool/main/iphoneos-arm64/${CFVER}/procursus-keyring_2020.05.09_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/procursus-migration
|
2020-08-21 03:57:50 +02:00
|
|
|
wget -q https://apt.procurs.us/pool/main/iphoneos-arm64/${CFVER}/coreutils_${COREUTILSVER}_iphoneos-arm.deb --no-check-certificate --directory-prefix=/tmp/procursus-migration
|
2020-08-16 01:05:50 +02:00
|
|
|
dpkg -i /tmp/procursus-migration/procursus-keyring_2020.05.09_iphoneos-arm.deb
|
2020-07-30 01:28:51 +02:00
|
|
|
apt update
|
2020-09-01 00:39:04 +02:00
|
|
|
apt install libncursesw6 -y
|
|
|
|
if [ ! -f "/usr/lib/libncurses.6.dylib" ]; then
|
2020-09-02 04:27:27 +02:00
|
|
|
echo "Fixing ..."
|
2020-09-01 00:39:04 +02:00
|
|
|
ln -s /usr/lib/libncursesw.6.dylib /usr/lib/libncurses.6.dylib
|
|
|
|
else
|
|
|
|
echo "Nothing To Do!"
|
|
|
|
fi
|
2020-08-29 03:51:14 +02:00
|
|
|
apt install ncurses-bin -y
|
2020-09-04 14:10:06 +02:00
|
|
|
apt install xz-utils diskdev-cmds -y --allow-unauthenticated -u -o APT::Force-LoopBreak=1
|
2020-09-01 00:39:04 +02:00
|
|
|
apt dist-upgrade -y --allow-unauthenticated -u -o APT::Force-LoopBreak=1
|
2020-08-21 03:57:50 +02:00
|
|
|
dpkg -i --force-all /tmp/procursus-migration/coreutils_${COREUTILSVER}_iphoneos-arm.deb
|
2020-09-02 04:27:27 +02:00
|
|
|
}
|
|
|
|
MigrationCleanUp(){
|
|
|
|
echo "CleaningUp ..."
|
2020-07-30 01:28:51 +02:00
|
|
|
dpkg -r apt1.4
|
2020-08-06 18:25:02 +02:00
|
|
|
apt update
|
|
|
|
apt purge libplist-utils -y libplist3 -y
|
|
|
|
apt autoremove -y
|
|
|
|
apt install libplist-utils -y libplist++-dev -y libplist++-dev -y libplist++3v5 -y libplist-dev -y libplist3 -y ldid -y
|
2020-09-02 04:27:27 +02:00
|
|
|
}
|
|
|
|
ProcursusSourcesSetup(){
|
|
|
|
echo "Settings Up Procursus Source ..."
|
2020-07-30 01:28:51 +02:00
|
|
|
echo "Types: deb" > /etc/apt/sources.list.d/procursus.sources
|
|
|
|
echo "URIs: https://apt.procurs.us/" >> /etc/apt/sources.list.d/procursus.sources
|
|
|
|
echo "Suites: iphoneos-arm64/${CFVER}" >> /etc/apt/sources.list.d/procursus.sources
|
|
|
|
echo "Components: main" >> /etc/apt/sources.list.d/procursus.sources
|
2020-09-02 04:27:27 +02:00
|
|
|
}
|
2020-09-05 20:37:19 +02:00
|
|
|
checkDependencies
|
2020-09-02 04:27:27 +02:00
|
|
|
checkiOSVersion
|
|
|
|
echo -e "\e[32mStarting Migration On iOS $VER ....\e[0m"
|
2020-09-03 00:24:06 +02:00
|
|
|
checkSileo
|
2020-09-02 04:27:27 +02:00
|
|
|
ProcursusMigration
|
|
|
|
MigrationCleanUp
|
|
|
|
ProcursusSourcesSetup
|
2020-07-30 16:07:28 +02:00
|
|
|
echo -e "\e[32mMigration Finished!\e[0m"
|
2020-08-02 07:33:49 +02:00
|
|
|
echo -e "\e[32mBack to Uncursus Script...\e[0m"
|
2020-09-03 01:03:45 +02:00
|
|
|
fi
|