diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c30b32..8504c91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,12 +47,12 @@ jobs: - name: Move linux arm64 binaries and other files run: | rm -r ./bin/linux/arm64 - cp -R ./exclude/bin/linux/arm ./bin/linux + cp -R ./exclude/bin/linux/armhf ./bin/linux - - name: Zip linux arm files - run: zip -r ${{ github.event.repository.name }}_linux_arm_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE resources/ restore.sh README.md + - name: Zip linux armhf files + run: zip -r ${{ github.event.repository.name }}_linux_armhf_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE resources/ restore.sh README.md - - name: Move linux arm binaries and other files + - name: Move linux armhf binaries and other files run: | rm -r ./bin/linux cp -R ./exclude/bin/windows ./bin @@ -77,7 +77,7 @@ jobs: files: | ${{ github.event.repository.name }}_complete_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip ${{ github.event.repository.name }}_macos_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip - ${{ github.event.repository.name }}_linux_arm_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip + ${{ github.event.repository.name }}_linux_armhf_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip ${{ github.event.repository.name }}_linux_arm64_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip ${{ github.event.repository.name }}_linux_x86_64_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip ${{ github.event.repository.name }}_windows_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip diff --git a/bin/linux/arm64/sshpass b/bin/linux/arm64/sshpass new file mode 100755 index 0000000..639be08 Binary files /dev/null and b/bin/linux/arm64/sshpass differ diff --git a/bin/linux/arm/bspatch b/bin/linux/armhf/bspatch similarity index 100% rename from bin/linux/arm/bspatch rename to bin/linux/armhf/bspatch diff --git a/bin/linux/arm/futurerestore_new b/bin/linux/armhf/futurerestore_new similarity index 100% rename from bin/linux/arm/futurerestore_new rename to bin/linux/armhf/futurerestore_new diff --git a/bin/linux/arm/futurerestore_old b/bin/linux/armhf/futurerestore_old similarity index 100% rename from bin/linux/arm/futurerestore_old rename to bin/linux/armhf/futurerestore_old diff --git a/bin/linux/arm/gaster b/bin/linux/armhf/gaster similarity index 100% rename from bin/linux/arm/gaster rename to bin/linux/armhf/gaster diff --git a/bin/linux/arm/hfsplus b/bin/linux/armhf/hfsplus similarity index 100% rename from bin/linux/arm/hfsplus rename to bin/linux/armhf/hfsplus diff --git a/bin/linux/arm/iBoot32Patcher b/bin/linux/armhf/iBoot32Patcher similarity index 100% rename from bin/linux/arm/iBoot32Patcher rename to bin/linux/armhf/iBoot32Patcher diff --git a/bin/linux/arm/ideviceenterrecovery b/bin/linux/armhf/ideviceenterrecovery similarity index 100% rename from bin/linux/arm/ideviceenterrecovery rename to bin/linux/armhf/ideviceenterrecovery diff --git a/bin/linux/arm/ideviceinfo b/bin/linux/armhf/ideviceinfo similarity index 100% rename from bin/linux/arm/ideviceinfo rename to bin/linux/armhf/ideviceinfo diff --git a/bin/linux/arm/idevicererestore b/bin/linux/armhf/idevicererestore similarity index 100% rename from bin/linux/arm/idevicererestore rename to bin/linux/armhf/idevicererestore diff --git a/bin/linux/arm/idevicerestore b/bin/linux/armhf/idevicerestore similarity index 100% rename from bin/linux/arm/idevicerestore rename to bin/linux/armhf/idevicerestore diff --git a/bin/linux/arm/iproxy b/bin/linux/armhf/iproxy similarity index 100% rename from bin/linux/arm/iproxy rename to bin/linux/armhf/iproxy diff --git a/bin/linux/arm/ipsw b/bin/linux/armhf/ipsw similarity index 100% rename from bin/linux/arm/ipsw rename to bin/linux/armhf/ipsw diff --git a/bin/linux/arm/ipwnder b/bin/linux/armhf/ipwnder similarity index 100% rename from bin/linux/arm/ipwnder rename to bin/linux/armhf/ipwnder diff --git a/bin/linux/arm/irecovery b/bin/linux/armhf/irecovery similarity index 100% rename from bin/linux/arm/irecovery rename to bin/linux/armhf/irecovery diff --git a/bin/linux/arm/irecovery2 b/bin/linux/armhf/irecovery2 similarity index 100% rename from bin/linux/arm/irecovery2 rename to bin/linux/armhf/irecovery2 diff --git a/bin/linux/arm/partialzip b/bin/linux/armhf/partialzip similarity index 100% rename from bin/linux/arm/partialzip rename to bin/linux/armhf/partialzip diff --git a/bin/linux/arm/powdersn0w b/bin/linux/armhf/powdersn0w similarity index 100% rename from bin/linux/arm/powdersn0w rename to bin/linux/armhf/powdersn0w diff --git a/bin/linux/armhf/sshpass b/bin/linux/armhf/sshpass new file mode 100755 index 0000000..99da9fa Binary files /dev/null and b/bin/linux/armhf/sshpass differ diff --git a/bin/linux/arm/ticket b/bin/linux/armhf/ticket similarity index 100% rename from bin/linux/arm/ticket rename to bin/linux/armhf/ticket diff --git a/bin/linux/arm/tsschecker b/bin/linux/armhf/tsschecker similarity index 100% rename from bin/linux/arm/tsschecker rename to bin/linux/armhf/tsschecker diff --git a/bin/linux/arm/validate b/bin/linux/armhf/validate similarity index 100% rename from bin/linux/arm/validate rename to bin/linux/armhf/validate diff --git a/bin/linux/arm/xpwntool b/bin/linux/armhf/xpwntool similarity index 100% rename from bin/linux/arm/xpwntool rename to bin/linux/armhf/xpwntool diff --git a/bin/linux/x86_64/sshpass b/bin/linux/x86_64/sshpass new file mode 100755 index 0000000..e21fe11 Binary files /dev/null and b/bin/linux/x86_64/sshpass differ diff --git a/bin/macos/sshpass b/bin/macos/sshpass new file mode 100755 index 0000000..fc845e2 Binary files /dev/null and b/bin/macos/sshpass differ diff --git a/bin/windows/sshpass b/bin/windows/sshpass new file mode 100644 index 0000000..35a5cd8 Binary files /dev/null and b/bin/windows/sshpass differ diff --git a/restore.sh b/restore.sh index c20c27e..9125bfd 100755 --- a/restore.sh +++ b/restore.sh @@ -122,7 +122,7 @@ set_tool_paths() { if [[ $(uname -m) == "a"* && $(getconf LONG_BIT) == 64 ]]; then dir+="arm64" elif [[ $(uname -m) == "a"* ]]; then - dir+="arm" + dir+="armhf" elif [[ $(uname -m) == "x86_64" ]]; then dir+="x86_64" else @@ -284,8 +284,8 @@ set_tool_paths() { idevicererestore+="$dir/idevicererestore" ipwnder+="$dir/ipwnder" irecovery2+="$dir/irecovery2" - scp="$(which scp) -F ../resources/ssh_config" - ssh="$(which ssh) -F ../resources/ssh_config" + scp="scp -F ../resources/ssh_config" + ssh="ssh -F ../resources/ssh_config" } install_depends() { @@ -661,6 +661,20 @@ device_find_mode() { fi } +device_sshpass() { + # ask for device password and use sshpass for scp and ssh + local pass=$1 + if [[ -z $pass ]]; then + read -s -p "$(input 'Enter the root password of your iOS device: ')" pass + echo + fi + if [[ -z $pass ]]; then + pass="alpine" + fi + scp="$dir/sshpass -p $pass $scp" + ssh="$dir/sshpass -p $pass $ssh" +} + device_enter_mode() { # usage: device_enter_mode {Recovery, DFU, kDFU, pwnDFU} # attempt to enter given mode, and device_find_mode function will then set device_mode variable @@ -729,7 +743,7 @@ device_enter_mode() { log "Please read the message below:" print "1. Make sure to have installed the requirements from Cydia." print " - Only proceed if you have followed Section 2 (and 2.1 for iOS 10) in the GitHub wiki." - print " - You will be prompted to enter the root password of your iOS device twice." + print " - You will be prompted to enter the root password of your iOS device." print " - The default root password is \"alpine\"" print " - Do not worry that your input is not visible, it is still being entered." print "2. Afterwards, the device will disconnect and its screen will stay black." @@ -738,8 +752,8 @@ device_enter_mode() { echo "chmod +x /tmp/kloader*" > kloaders if [[ $device_det == 1 ]]; then - echo "[[ -e /.installed_kok3shiX || -e /.installed_p0insettia || -e /.installed_socket ]] && /tmp/kloader /tmp/pwnediBSS || \ - /tmp/kloader_hgsp /tmp/pwnediBSS" >> kloaders + echo '[[ $(uname -a | grep -c "MarijuanARM") == 1 ]] && /tmp/kloader_hgsp /tmp/pwnediBSS || \ + /tmp/kloader /tmp/pwnediBSS' >> kloaders sendfiles+=("../resources/kloader_hgsp") sendfiles+=("../resources/kloader") elif [[ $device_det == 5 ]]; then @@ -751,14 +765,20 @@ device_enter_mode() { fi sendfiles+=("kloaders" "pwnediBSS") + device_sshpass log "Entering kDFU mode..." print "* This may take a while, but should not take longer than a minute." + if [[ $device_det == 1 ]]; then + print "* If the script seems to be stuck here, read Section 2.1 in the GitHub wiki for more details." + fi $scp -P 2222 ${sendfiles[@]} root@127.0.0.1:/tmp if [[ $? == 0 ]]; then $ssh -p 2222 root@127.0.0.1 "bash /tmp/kloaders" & else warn "Failed to connect to device via USB SSH." - print "* For Linux users, try running \"sudo systemctl restart usbmuxd\" before retrying USB SSH." + if [[ $platform == "linux" ]]; then + print "* Try running \"sudo systemctl restart usbmuxd\" before retrying USB SSH." + fi if [[ $device_det == 1 ]]; then print "* Try to re-install both OpenSSH and Dropbear, reboot, re-jailbreak, and try again." print "* Alternatively, place your device in DFU mode (see \"Troubleshooting\" wiki page for details)"