Skip to content

Commit

Permalink
Update some linux bins and other changes part 2
Browse files Browse the repository at this point in the history
- remove the --disable-usbmuxd arg
- switch to usbmuxd2 for linux
- fixes to changes from previous commit
- update limd binaries for linux
- linux binaries changes do not include armhf, i dont think anyone uses the arm 32-bit version of lik anyway
  • Loading branch information
LukeZGD committed Nov 15, 2024
1 parent 06bf43a commit 33c5956
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@
- **macOS** 10.11 and newer (10.12 and newer recommended for full support)
- [**Ubuntu**](https://ubuntu.com/) 22.04 and newer, and Ubuntu-based distros like [Linux Mint](https://www.linuxmint.com/)
- [**Fedora**](https://getfedora.org/) 37 and newer, Fedora Atomic (Silverblue, Kinoite, etc.) also supported
- Users on Fedora 41 (or newer) may have issues connecting to older iOS devices. This applies to devices on lower than iOS 4.
- Workaround for now is to run this command: `sudo update-crypto-policies --set DEFAULT:SHA1`
- [**Debian**](https://www.debian.org/) 12 Bookworm and newer, Sid, and Debian-based distros
- [**Arch Linux**](https://www.archlinux.org/) and Arch-based distros like [EndeavourOS](https://endeavouros.com/)
- Less tested distros: [**openSUSE Tumbleweed**](https://get.opensuse.org/tumbleweed/), [**Gentoo**](https://www.gentoo.org/), [**Void Linux**](https://voidlinux.org/)
Expand All @@ -148,6 +146,8 @@
- [libideviceactivation](https://github.com/LukeeGD/libideviceactivation) - libimobiledevice
- [ideviceinstaller](https://github.com/LukeeGD/ideviceinstaller) - libimobiledevice
- [ifuse](https://github.com/LukeeGD/ifuse) - libimobiledevice
- [static-cross-openssh](https://github.com/binary-manu/static-cross-openssh) - scp and ssh binaries (used on Linux only)
- [usbmuxd2](https://github.com/LukeZGD/usbmuxd2) - tihmstar; LukeZGD fork (used on Linux only)
- [anisette-server](https://github.com/Dadoum/Provision) from Provision - Dadoum (used for sideloading on Linux)
- [AltServer-Linux](https://github.com/NyaMisty/AltServer-Linux) - NyaMisty (used for sideloading on Linux)
- [Sideloader](https://github.com/Dadoum/Sideloader) - Dadoum (used for sideloading on Linux)
Expand Down
Binary file modified bin/linux/arm64/ideviceactivation
Binary file not shown.
Binary file modified bin/linux/arm64/idevicebackup2
Binary file not shown.
Binary file modified bin/linux/arm64/idevicediagnostics
Binary file not shown.
Binary file modified bin/linux/arm64/ideviceenterrecovery
Binary file not shown.
Binary file modified bin/linux/arm64/ideviceinfo
Binary file not shown.
Binary file modified bin/linux/arm64/ideviceinstaller
Binary file not shown.
Binary file modified bin/linux/arm64/idevicepair
Binary file not shown.
Binary file removed bin/linux/arm64/usbmuxd
Binary file not shown.
Binary file added bin/linux/arm64/usbmuxd2
Binary file not shown.
Binary file modified bin/linux/x86_64/ideviceactivation
Binary file not shown.
Binary file modified bin/linux/x86_64/idevicebackup2
Binary file not shown.
Binary file modified bin/linux/x86_64/idevicediagnostics
Binary file not shown.
Binary file modified bin/linux/x86_64/ideviceenterrecovery
Binary file not shown.
Binary file modified bin/linux/x86_64/ideviceinfo
Binary file not shown.
Binary file modified bin/linux/x86_64/ideviceinstaller
Binary file not shown.
Binary file modified bin/linux/x86_64/idevicepair
Binary file not shown.
Binary file added bin/linux/x86_64/lib/libcrypto.so.1.1
Binary file not shown.
Binary file added bin/linux/x86_64/lib/libssl.so.1.1
Binary file not shown.
Binary file removed bin/linux/x86_64/usbmuxd
Binary file not shown.
Binary file added bin/linux/x86_64/usbmuxd2
Binary file not shown.
53 changes: 30 additions & 23 deletions restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ List of options:
--debug For script debugging (set -x and debug mode)
--dfuhelper Launch to DFU Mode Helper only
--disable-sudoloop Disable running tools as root for Linux
--disable-usbmuxd Disable running usbmuxd as root for Linux
--entry-device Enable manual device and ECID entry
--exit-recovery Attempt to exit recovery mode
--help Display this help message
Expand Down Expand Up @@ -155,6 +154,7 @@ set_tool_paths() {
"jammy" | "kinetic" ) ubuntu_ver=22;;
"lunar" | "mantic" ) ubuntu_ver=23;;
"noble" | "oracular" ) ubuntu_ver=24;;
"plucky" ) ubuntu_ver=25;;
esac
if [[ -z $ubuntu_ver ]]; then
source /etc/upstream-release/lsb-release 2>/dev/null
Expand Down Expand Up @@ -183,10 +183,6 @@ set_tool_paths() {
if [[ $(command -v rpm-ostree) ]]; then
distro="fedora-atomic"
fi
if (( fedora_ver >= 41 )); then
warn "Users on Fedora 41 (or newer) may have issues connecting to older iOS devices. This applies to devices on lower than iOS 4."
print "* Workaround for now is to run this command: sudo update-crypto-policies --set FEDORA40"
fi
elif [[ $ID == "opensuse-tumbleweed" ]]; then
distro="opensuse"
elif [[ $ID == "gentoo" || $ID_LIKE == "gentoo" || $ID == "pentoo" ]]; then
Expand Down Expand Up @@ -259,17 +255,20 @@ set_tool_paths() {
error "Failed to find bin directory for $platform_arch, found $(ls -x ../bin/linux) instead." \
"* Download the \"linux_$platform_arch\" or \"complete\" version to continue (or do a git clone)"
fi
if [[ -z $device_disable_usbmuxd ]]; then
trap "clean_usbmuxd" EXIT
fi
if [[ -z $device_disable_usbmuxd && $othertmp == 0 ]]; then
trap "clean_usbmuxd" EXIT
if [[ $othertmp == 0 ]]; then
if [[ $(command -v systemctl 2>/dev/null) ]]; then
sudo systemctl stop usbmuxd
fi
#sudo killall usbmuxd 2>/dev/null
#sleep 1
log "Running usbmuxd"
sudo -b $dir/usbmuxd -pf &>../saved/usbmuxd.log
if [[ $platform_arch == "armhf" ]]; then
log "Running usbmuxd"
sudo -b $dir/usbmuxd -pf &>../saved/usbmuxd.log
else
log "Running usbmuxd2"
sudo -b $dir/usbmuxd2 &>../saved/usbmuxd.log
fi
elif [[ $othertmp != 0 ]]; then
log "Detected existing tmp folder(s), there might be other Legacy iOS Kit instance(s) running"
log "Not running usbmuxd"
Expand Down Expand Up @@ -1651,8 +1650,9 @@ device_enter_mode() {
tool_pwned=$?
log "gaster reset"
$gaster reset
elif [[ $device_type == "iPod2,1" || $2 == "alloc8" ]]; then
elif [[ $device_type == "iPod2,1" || $mode == "device_alloc8" ]]; then
# touch 2 uses ipwndfu
# also installing alloc8 requires pwning with ipwndfu
device_ipwndfu pwn
tool_pwned=$?
elif [[ $device_proc == 4 ]] || [[ $device_proc == 6 && $platform == "macos" && $platform_arch == "x86_64" ]]; then
Expand Down Expand Up @@ -1683,7 +1683,7 @@ device_enter_mode() {
device_ipwndfu pwn
tool_pwned=$?
elif [[ $device_proc == 6 ]]; then
# A6 mac uses ipwnder_lite
# A6 asi mac uses ipwnder_lite
log "Placing device to pwnDFU mode using ipwnder_lite"
$ipwnder -d
tool_pwned=$?
Expand Down Expand Up @@ -7587,15 +7587,15 @@ menu_ipsw_browse() {
local text="Target"
local picker

local menu_items=($(ls ../$device_type*.ipsw 2>/dev/null))
local menu_items=($(ls ../$device_type*Restore.ipsw 2>/dev/null))
if [[ $1 == "base" ]]; then
text="Base"
menu_items=()
case $device_type in
iPhone3,[13] ) menu_items=($(ls ../${device_type}_7.1.2*.ipsw 2>/dev/null));;
iPad1,1 | iPod3,1 ) menu_items=($(ls ../${device_type}_5.1.1*.ipsw 2>/dev/null));;
iPhone5* ) menu_items=($(ls ../${device_type}_7*.ipsw 2>/dev/null));;
* ) menu_items=($(ls ../${device_type}_7.1*.ipsw 2>/dev/null));;
iPhone3,[13] ) menu_items=($(ls ../${device_type}_7.1.2*Restore.ipsw 2>/dev/null));;
iPad1,1 | iPod3,1 ) menu_items=($(ls ../${device_type}_5.1.1*Restore.ipsw 2>/dev/null));;
iPhone5* ) menu_items=($(ls ../${device_type}_7*Restore.ipsw 2>/dev/null));;
* ) menu_items=($(ls ../${device_type}_7.1*Restore.ipsw 2>/dev/null));;
esac
fi
case $1 in
Expand All @@ -7608,7 +7608,7 @@ menu_ipsw_browse() {
if [[ $versionc == "$device_latest_vers" ]]; then
menu_items=()
elif [[ -n $versionc ]]; then
menu_items=($(ls ../${device_type}_${versionc}*.ipsw 2>/dev/null))
menu_items=($(ls ../${device_type}_${versionc}*Restore.ipsw 2>/dev/null))
fi
menu_items+=("Open File Picker" "Enter Path" "Go Back")

Expand Down Expand Up @@ -7637,7 +7637,7 @@ menu_ipsw_browse() {
newpath="$($cocoadialog fileselect --with-extensions ipsw)"
else
menu_zenity_check
newpath="$($zenity --file-selection --file-filter='IPSW | *.ipsw' --title="Select $text IPSW file")"
newpath="$($zenity --file-selection --file-filter='IPSW | *Restore.ipsw' --title="Select $text IPSW file")"
fi
fi
if [[ ! -s "$newpath" ]]; then
Expand Down Expand Up @@ -8144,7 +8144,7 @@ device_ssh() {
}

device_alloc8() {
device_enter_mode pwnDFU alloc8
device_enter_mode pwnDFU
device_ipwndfu alloc8
log "Done!"
print "* This may take several tries. It can fail a lot with \"Operation timed out\" error."
Expand Down Expand Up @@ -8474,7 +8474,15 @@ device_activate() {
print "* For hacktivation, go to \"Restore/Downgrade\" instead."
fi
fi
"$dir/ideviceactivation" activate
if [[ $platform_arch != "x86_64" ]] && (( fedora_ver >= 41 )); then
warn "Users on Fedora 41 (or newer) may have issues connecting to older iOS devices. This applies to devices on lower than iOS 4."
print "* Workaround for now is to run this command: sudo update-crypto-policies --set DEFAULT:SHA1"
fi
if [[ $platform == "linux" && $platform_arch == "x86_64" ]]; then
LD_LIBRARY_PATH=$dir/lib "$dir/ideviceactivation" activate
else
"$dir/ideviceactivation" activate
fi
case $device_type in
iPod[123],1 )
if (( device_det <= 3 )); then
Expand Down Expand Up @@ -9143,7 +9151,6 @@ for i in "$@"; do
"--memory" ) ipsw_memory=1;;
"--disable-bbupdate" ) device_disable_bbupdate=1;;
"--disable-sudoloop" ) device_disable_sudoloop=1;;
"--disable-usbmuxd" ) device_disable_usbmuxd=1;;
"--activation-records" ) device_actrec=1;;
"--ipsw-hacktivate" ) ipsw_hacktivate=1;;
"--skip-ibss" ) device_skip_ibss=1;;
Expand Down

0 comments on commit 33c5956

Please sign in to comment.