@@ -2396,16 +2396,16 @@ device_send_unpacked_ibss() {
23962396}
23972397
23982398ipwndfu_init () {
2399- local ipwndfu_comm=" f8d8c34d91cf8c005f76b005c647b889db034cc4 "
2400- local ipwndfu_sha1=" c3370f4afa82117968ef12f6ffa5ecfa391c1148 "
2399+ local ipwndfu_comm=" 3c0e66b97f307f0e97e641c1b9c064dcb9f40cd2 "
2400+ local ipwndfu_sha1=" 9e8b5947fcfa2bec097d60fd74b17583993517c8 "
24012401 ipwndfu=" ipwndfu_python3"
24022402 if [[ $device_sudoloop == 1 ]]; then
24032403 psudo=" $sudo "
24042404 fi
24052405 if [[ $platform == " macos" ]] && (( mac_majver <= 11 )) ; then
24062406 ipwndfu=" ipwndfu"
2407- ipwndfu_comm=" f395a331bee8e91eafbd39f3cfdecf9aaf1d7d38 "
2408- ipwndfu_sha1=" 30644c70cc4681d8207f1a03ac54f755557764b0 "
2407+ ipwndfu_comm=" 5466b3dfb5d7a4842ecb97fcc3a5263704eb59b3 "
2408+ ipwndfu_sha1=" e8c4203a100017a00522fd9c4f9ec566167962b6 "
24092409 fi
24102410 if [[ ! -s ../saved/$ipwndfu /ipwndfu || $( cat ../saved/$ipwndfu /sha1check) != " $ipwndfu_sha1 " ]]; then
24112411 rm -rf ../saved/$ipwndfu
@@ -2508,27 +2508,27 @@ file_download() {
25082508 fi
25092509}
25102510
2511- device_fw_key_server () {
2512- local venv_name
2513- local venv
2514- local repo
2515- local python_minver
2516- local error_msg=
2517-
2511+ python3_init () {
25182512 python_minver=$( python3 -c ' import sys; print(sys.version_info[1])' )
25192513 if [[ -z $python_minver ]]; then
25202514 if [[ $platform == " macos" ]]; then
2521- error_msg=" * If you get the 'python3: command not found' error, download and install Python 3 here: https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg"
2522- error_msg+=$' \n * This is the latest version of Python 3 that will run on as low as 10.11 El Capitan.\n '
2515+ error_msg=$' * If you get the "python3: command not found" error, download and install Python 3 from the official website.\n '
25232516 fi
2524- error_msg+=' * For more troubleshooting steps, go to the "Running wikiproxy " wiki page in GitHub.'
2525- error_msg+=$' \n * Troubleshooting link: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/running-wikiproxy '
2517+ error_msg+=' * For more troubleshooting steps, go to the "Python 3 on older macOS " wiki page in GitHub.'
2518+ error_msg+=$' \n * Troubleshooting link: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Python-3-on-older-macOS '
25262519 error " Failed to initialize Python 3." " $error_msg "
25272520 fi
2521+ }
2522+
2523+ device_fw_key_server () {
2524+ local venv_name
2525+ local venv
2526+ local repo=" m1stadev"
2527+ local error_msg=
2528+
2529+ python3_init
25282530 if (( python_minver <= 13 )) ; then
25292531 repo=" LukeZGD"
2530- else
2531- repo=" m1stadev"
25322532 fi
25332533 venv_name=" wikiproxy-${repo} _venv"
25342534 venv=" ../saved/$venv_name "
@@ -4931,6 +4931,7 @@ ipsw_prepare_sundanceinh2a() {
49314931 return
49324932 fi
49334933
4934+ python3_init
49344935 download_sundancerepo
49354936
49364937 log " Copying freeze.tar to Cydia.tar"
@@ -12069,7 +12070,15 @@ device_erase() {
1206912070
1207012071device_trollrestore () {
1207112072 local trollrestore=" ../saved/TrollRestore"
12072- local venv=" ${trollrestore} _venv"
12073+ local venv_name=" ${trollrestore} -newpy_venv"
12074+ local venv
12075+
12076+ python3_init
12077+ if (( python_minver <= 13 )) ; then
12078+ venv_name=" ${trollrestore} -oldpy_venv"
12079+ fi
12080+ venv=" ../saved/$venv_name "
12081+
1207312082 device_pair
1207412083 if [[ ! -d $trollrestore ]]; then
1207512084 log " Downloading TrollRestore"
@@ -12078,8 +12087,13 @@ device_trollrestore() {
1207812087 file_extract TrollRestore_Linux.zip $trollrestore
1207912088 fi
1208012089
12090+ # remove old venv
12091+ if [[ -d " ../saved/TrollRestore_venv" ]]; then
12092+ rm -r " ../saved/TrollRestore_venv"
12093+ fi
12094+
1208112095 if [[ ! -d $venv || ! -s $venv /bin/python3 ]]; then
12082- log " Creating venv"
12096+ log " Creating venv for TrollRestore "
1208312097 python3 -m venv $venv
1208412098 fi
1208512099 if [[ ! -d $venv || ! -s $venv /bin/python3 ]]; then
@@ -12088,12 +12102,20 @@ device_trollrestore() {
1208812102 fi
1208912103
1209012104 log " Installing dependencies using pip..."
12091- sed -i.bak ' 1s/.*/pymobiledevice3<=6.2.0/' $trollrestore /requirements.txt
12092- $venv /bin/pip install -r $trollrestore /requirements.txt
12105+ local reqs_txt=" requirements.txt"
12106+ if (( python_minver <= 13 )) ; then
12107+ reqs_txt=" ../resources/trollrestore-oldpy_requirements.txt"
12108+ else
12109+ sed ' 1s/.*/pymobiledevice3<=6.2.0/' " $trollrestore /requirements.txt" > requirements.txt
12110+ fi
12111+ $venv /bin/pip install -r " $reqs_txt "
12112+ if (( python_minver <= 13 )) ; then
12113+ $venv /bin/pip install --no-deps pymobiledevice3\< =4.13.27
12114+ fi
1209312115
1209412116 log " Running TrollRestore..."
1209512117 print " * When it prompts to enter app name, type Tips and press Enter/Return"
12096- " $( cd .. && pwd) /saved/TrollRestore_venv /bin/python3" $trollrestore /trollstore.py
12118+ " $( cd .. && pwd) /saved/$venv_name /bin/python3" $trollrestore /trollstore.py
1209712119}
1209812120
1209912121main () {
0 commit comments