Closed otreci4sgelt0nas closed 5 months ago
@sasa8810 i am almost sure that you know something about this, could you please tell me the fix ?
Make a venv somewhere
Make a venv somewhere
If by venv you mean this, I've got same error..
camper@debian:~$ python3 -m venv env
camper@debian:~$ source env/bin/activate
(env) camper@debian:~$ cd downr1n
(env) camper@debian:~/downr1n$ sudo ./downr1n.sh --downgrade 14.3
[*] Command ran: sudo ./downr1n.sh --downgrade 14.3
[09:01:11.847][3] usbmuxd v1.1.1 starting up
[09:01:11.847][3] Using libusb 1.0.26
[-] pyimg4 is not installed. we can installl it for you, press any key to start installing pyimg4, or press ctrl + c to cancel
[09:01:11.852][3] Initialization complete
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
camper@debian:~$ pyimg4
Usage: pyimg4 [OPTIONS] COMMAND [ARGS]...
A Python CLI tool for parsing Apple's Image4 format.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
im4m Image4 manifest commands.
im4p Image4 payload commands.
im4r Image4 restore info commands.
img4 Image4 commands.
camper@debian:~$
Even though the pyimg4 is obviously in the env path, as it can be run from anywhere and it shows as working.
camper@debian:~$ pyimg4 Usage: pyimg4 [OPTIONS] COMMAND [ARGS]... A Python CLI tool for parsing Apple's Image4 format. Options: --version Show the version and exit. --help Show this message and exit. Commands: im4m Image4 manifest commands. im4p Image4 payload commands. im4r Image4 restore info commands. img4 Image4 commands. camper@debian:~$
Even though the pyimg4 is obviously in the env path, as it can be run from anywhere and it shows as working.
try: python3 -m pyimg4
echo 'export PATH="~/env/bin:$PATH"' >> ~/.bashrc source ~/.bashrc Then sudo -E ./downr1n.sh --downgrade 14.3
camper@debian:~/x/downr1n$ echo 'export PATH="~/env/bin:$PATH"' >> ~/.bashrc
camper@debian:~/x/downr1n$ source ~/.bashrc
camper@debian:~/x/downr1n$ sudo -E ./downr1n.sh --downgrade 14.3
[sudo] password for camper:
[*] Command ran: sudo ./downr1n.sh --downgrade 14.3
[16:37:11.772][3] usbmuxd v1.1.1 starting up
[16:37:11.773][3] Using libusb 1.0.26
[16:37:11.778][3] Initialization complete
[-] pyimg4 is not installed. we can installl it for you, press any key to start installing pyimg4, or press ctrl + c to cancel
WARNING: The directory '/home/camper/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
tried sudo -H ./downr1n.sh --downgrade 14.3
too.
Guys thank you very much for the help
camper@debian:~$ pyimg4 Usage: pyimg4 [OPTIONS] COMMAND [ARGS]... A Python CLI tool for parsing Apple's Image4 format. Options: --version Show the version and exit. --help Show this message and exit. Commands: im4m Image4 manifest commands. im4p Image4 payload commands. im4r Image4 restore info commands. img4 Image4 commands. camper@debian:~$
Even though the pyimg4 is obviously in the env path, as it can be run from anywhere and it shows as working.
try: python3 -m pyimg4
when I try running this command it works,
but when I for example try sudo python3 -m pyimg4
it says /usr/bin/python3: No module named pyimg4
no module found. It could be because the script run by sudo, It also couldn't find this module? :thinking:
Managed to get it working! done it in sudo mode, I mean logged in as root su root
Now of course good things never comes easy... another error saying that zip module is not really compatible and I'm stucked now somewhere in a middle,
Found the USB handle.
[*] Patching the kernel
[*] Patching the kernel to restore using futurerestore
[*] Patching devicetree
[*] Patching the restored_external and asr, and saving them into the ramdisk ...
'work/devicetree.img4' -> 'boot/iPhone9,3/devicetree.img4'
'work/iBEC.img4' -> 'boot/iPhone9,3/iBEC.img4'
'work/iBSS.img4' -> 'boot/iPhone9,3/iBSS.img4'
'work/kernelcache.img4' -> 'boot/iPhone9,3/kernelcache.img4'
'work/trustcache.img4' -> 'boot/iPhone9,3/trustcache.img4'
[*] Sucess Patching the boot files
[*] Checking if the llb was already replaced
[*] Patching the llb in the ipsw to avoid false dfu mode
[=] Hi, please i need that you write the ios version that this device is on or the version of the ios that it was on (if this device is already downgraded), most of the time is the lastest version of ios. write 0 if you want to skip this (it is not recommended to skip this as this can avoid false dfu mode)
Version detected!. we are gonna use 15.4.1
[*] LLB downloaded correctly
[*] putting this LLB into the ipsw
zip warning: Local Version Needed To Extract does not match CD: Firmware/
zip warning: Local Version Needed To Extract does not match CD: Firmware/AOP/
zip warning: Local Version Needed To Extract does not match CD: Firmware/Maggie/
zip warning: Local Version Needed To Extract does not match CD: Firmware/SE/
zip warning: Local Version Needed To Extract does not match CD: Firmware/all_flash/
updating: Firmware/all_flash/LLB.d10.RELEASE.im4p (deflated 0%)
zip warning: Local Version Needed To Extract does not match CD: Firmware/dfu/
zip warning: Local Version Needed To Extract does not match CD: Firmware/isp_bni/
adding: Firmware/all_flash//LLB.d10.RELEASE.im4p (deflated 0%)
[*] Replaced LLB suscessfully
[*] Executing futurerestore ...
Press ENTER to continue with futurerestore, your device will start to restoring <-
sudo: unrecognized option '--use-pwndfu'
usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABkNnS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABkNnS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command [arg ...]]
usage: sudo [-ABbEHkNnPS] [-r role] [-t type] [-C num] [-D directory] [-g
group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
[VAR=value] [-i | -s] [command [arg ...]]
usage: sudo -e [-ABkNnS] [-r role] [-t type] [-C num] [-D directory] [-g group]
[-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...
if futurerestore failed you can try execute the command below
if futurerestore didn't finish succesfully please try to run (with sudo or without) this command: /home/camper/x/downr1n/binaries/Linux/futurerestore -t blobs/iPhone9,3-14.3.shsh2 --use-pwndfu --skip-blob --rdsk work/rdsk.im4p --rkrn work/krnl.im4p --latest-sep --latest-baseband ipsw/iPhone_4.7_P3_14.3_18C66_Restore.ipsw
if futurerestore restore sucess, you can boot using --boot
^C
(env) root@debian:/home/camper/x/downr1n# ./downr1n.sh --boot
[*] Command ran: sudo ./downr1n.sh --boot
Neverthless trying to boot it, as why not.. iphone stucks with some gibberish on... :)
[*] Booting device
[==================================================] 100.0%
[==================================================] 100.0%
Attempting to connect...
opening device 05ac:1281...
Setting to configuration 1
Setting to interface 0:0
Connected to iPhone9,3, model d101ap, cpid 0x8010, bdid 0x0c
[==================================================] 100.0%Command completed successfully
[==================================================] 100.0%
although, very last lines of codes doesn't output any sign of errors
Future restore didn't success so --boot won't boot
Please try ./downr1n.sh --downgrade 14.3 --debug and then please send the logs
just done it, not sure to from where shall I paste the log so Ive done it from there, where it asked me to put into DFU mode
+ sleep 1
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ cut -d: -f2
+++ grep 05ac:
++ apples=
++ local device_count=0
++ local usbserials=
++ '[' 0 = 0 ']'
++ device_mode=none
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo none
+ '[' none = recovery ']'
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ cut -d: -f2
+++ grep 05ac:
++ apples=
++ local device_count=0
++ local usbserials=
++ '[' 0 = 0 ']'
++ device_mode=none
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo none
+ '[' none = dfu ']'
+ echo '[-] Device did not enter DFU mode, try again'
[-] Device did not enter DFU mode, try again
+ _detect
+ echo '[*] Waiting for devices'
[*] Waiting for devices
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=
++ local device_count=0
++ local usbserials=
++ '[' 0 = 0 ']'
++ device_mode=none
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo none
+ '[' none = none ']'
+ sleep 1
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=
++ local device_count=0
++ local usbserials=
++ '[' 0 = 0 ']'
++ device_mode=none
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo none
+ '[' none = none ']'
+ sleep 1
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=
++ local device_count=0
++ local usbserials=
++ '[' 0 = 0 ']'
++ device_mode=none
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo none
+ '[' none = none ']'
+ sleep 1
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=1227
++ local device_count=0
++ local usbserials=
++ for apple in $apples
++ case "$apple" in
++ device_mode=dfu
++ device_count=1
++ '[' 1 = 0 ']'
++ '[' 1 -ge 2 ']'
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/2-1/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
CPID:8010 CPRV:11 CPFM:03 SCEP:01 BDID:0C ECID:000A51390AD00026 IBFL:3C SRTG:[iBoot-2696.0.0.1.33]
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo dfu
+ '[' dfu = none ']'
++ sed s/dfu/DFU/
+++ get_device_mode
+++ '[' Linux = Darwin ']'
+++ '[' Linux = Linux ']'
++++ lsusb
++++ cut '-d ' -f6
++++ grep 05ac:
++++ cut -d: -f2
+++ apples=1227
+++ local device_count=0
+++ local usbserials=
+++ for apple in $apples
+++ case "$apple" in
+++ device_mode=dfu
+++ device_count=1
+++ '[' 1 = 0 ']'
+++ '[' 1 -ge 2 ']'
+++ '[' Linux = Linux ']'
++++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/2-1/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
+++ usbserials='0123456789ABCD
CPID:8010 CPRV:11 CPFM:03 SCEP:01 BDID:0C ECID:000A51390AD00026 IBFL:3C SRTG:[iBoot-2696.0.0.1.33]
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
+++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
+++ echo dfu
++ echo '[*] Detected dfu mode device'
+ echo '[*]' Detected DFU mode device
[*] Detected DFU mode device
+ grep -E 'pongo|checkra1n_stage2|diag'
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ cut -d: -f2
+++ grep 05ac:
++ apples=1227
++ local device_count=0
++ local usbserials=
++ for apple in $apples
++ case "$apple" in
++ device_mode=dfu
++ device_count=1
++ '[' 1 = 0 ']'
++ '[' 1 -ge 2 ']'
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/2-1/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
CPID:8010 CPRV:11 CPFM:03 SCEP:01 BDID:0C ECID:000A51390AD00026 IBFL:3C SRTG:[iBoot-2696.0.0.1.33]
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo dfu
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=1227
++ local device_count=0
++ local usbserials=
++ for apple in $apples
++ case "$apple" in
++ device_mode=dfu
++ device_count=1
++ '[' 1 = 0 ']'
++ '[' 1 -ge 2 ']'
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/2-1/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
CPID:8010 CPRV:11 CPFM:03 SCEP:01 BDID:0C ECID:000A51390AD00026 IBFL:3C SRTG:[iBoot-2696.0.0.1.33]
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo dfu
+ '[' dfu '!=' normal ']'
+ '[' -z 14.3 ']'
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=1227
++ local device_count=0
++ local usbserials=
++ for apple in $apples
++ case "$apple" in
++ device_mode=dfu
++ device_count=1
++ '[' 1 = 0 ']'
++ '[' 1 -ge 2 ']'
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/2-1/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
CPID:8010 CPRV:11 CPFM:03 SCEP:01 BDID:0C ECID:000A51390AD00026 IBFL:3C SRTG:[iBoot-2696.0.0.1.33]
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo dfu
+ '[' dfu = ramdisk ']'
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=1227
++ local device_count=0
++ local usbserials=
++ for apple in $apples
++ case "$apple" in
++ device_mode=dfu
++ device_count=1
++ '[' 1 = 0 ']'
++ '[' 1 -ge 2 ']'
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/2-1/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
CPID:8010 CPRV:11 CPFM:03 SCEP:01 BDID:0C ECID:000A51390AD00026 IBFL:3C SRTG:[iBoot-2696.0.0.1.33]
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo dfu
+ '[' dfu = normal ']'
+ _dfuhelper
++ get_device_mode
++ '[' Linux = Darwin ']'
++ '[' Linux = Linux ']'
+++ lsusb
+++ cut '-d ' -f6
+++ grep 05ac:
+++ cut -d: -f2
++ apples=1227
++ local device_count=0
++ local usbserials=
++ for apple in $apples
++ case "$apple" in
++ device_mode=dfu
++ device_count=1
++ '[' 1 = 0 ']'
++ '[' 1 -ge 2 ']'
++ '[' Linux = Linux ']'
+++ cat /sys/bus/usb/devices/1-1.5/serial /sys/bus/usb/devices/2-1/serial /sys/bus/usb/devices/usb1/serial /sys/bus/usb/devices/usb2/serial /sys/bus/usb/devices/usb3/serial
++ usbserials='0123456789ABCD
CPID:8010 CPRV:11 CPFM:03 SCEP:01 BDID:0C ECID:000A51390AD00026 IBFL:3C SRTG:[iBoot-2696.0.0.1.33]
0000:00:1d.0
0000:00:14.0
0000:00:14.0'
++ grep -qE '(ramdisk tool|SSHRD_Script) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{1,2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}'
++ echo dfu
+ '[' dfu = dfu ']'
+ echo '[*] Device already on dfu mode'
[*] Device already on dfu mode
+ return
+ sleep 3
+ echo '[* ]Patching some boot files...'
[* ]Patching some boot files...
+ '[' 1 = 1 ']'
+ sleep 1
+ mkdir -p boot/iPhone9,3
+ '[' '' = 1 ']'
++ awk '/d101ap/{x=1}x&&/iBSS[.]/{print;exit}' work/BuildManifest.plist
++ grep '<string>'
++ cut '-d>' -f2
++ cut '-d<' -f1
+ cp ipsw/extracted/iPhone9,3/14.3/Firmware/dfu/iBSS.d10.RELEASE.im4p work/
++ awk '/d101ap/{x=1}x&&/iBoot[.]/{print;exit}' work/BuildManifest.plist
++ grep '<string>'
++ cut '-d<' -f1
++ cut '-d>' -f2
+ cp ipsw/extracted/iPhone9,3/14.3/Firmware/all_flash/iBoot.d10.RELEASE.im4p work/
++ awk '/d101ap/{x=1}x&&/DeviceTree[.]/{print;exit}' work/BuildManifest.plist
++ grep '<string>'
++ cut '-d>' -f2
++ cut '-d<' -f1
+ cp ipsw/extracted/iPhone9,3/14.3/Firmware/all_flash/DeviceTree.d101ap.im4p work/
++ awk '/d101ap/{x=1}x&&/kernelcache.release/{print;exit}' work/BuildManifest.plist
++ grep '<string>'
++ cut '-d>' -f2
++ cut '-d<' -f1
+ cp ipsw/extracted/iPhone9,3/14.3/kernelcache.release.iphone9 work/
+ '[' Linux = Darwin ']'
++ binaries/Linux/PlistBuddy work/BuildManifest.plist -c 'Print BuildIdentities:0:Manifest:OS:Info:Path'
++ sed 's/"//g'
+ cp ipsw/extracted/iPhone9,3/14.3//Firmware/038-83137-079.dmg.trustcache work/
+ '[' Linux = Darwin ']'
++ binaries/Linux/PlistBuddy work/BuildManifest.plist -c 'Print BuildIdentities:0:Manifest:OS:Info:Path'
++ sed 's/"//g'
+ /home/camper/x/downr1n/binaries/Linux/img4 -i work/038-83137-079.dmg.trustcache -o work/trustcache.img4 -M work/IM4M -T rtsc
+ echo '[*] Finished moving the boot files to work'
[*] Finished moving the boot files to work
+ sleep 2
+ echo '[*] Decrypthing ibss and iboot'
[*] Decrypthing ibss and iboot
++ awk '/d101ap/{x=1}x&&/iBSS[.]/{print;exit}' work/BuildManifest.plist
++ grep '<string>'
++ cut '-d>' -f2
++ sed 's/Firmware[/]dfu[/]//'
++ cut '-d<' -f1
+ /home/camper/x/downr1n/binaries/Linux/gaster decrypt work/iBSS.d10.RELEASE.im4p work/iBSS.dec
usb_timeout: 5
[libusb] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227
CPID: 0x8010
Found the USB handle.
Stage: RESET
ret: true
[libusb] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227
CPID: 0x8010
Found the USB handle.
Stage: SPRAY
ret: true
[libusb] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227
CPID: 0x8010
Found the USB handle.
Stage: SETUP
ret: true
[libusb] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227
CPID: 0x8010
Found the USB handle.
Stage: PATCH
ret: true
[libusb] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227
CPID: 0x8010
Found the USB handle.
Now you can boot untrusted images.
[libusb] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227
Found the USB handle.
+ sleep 1
+ /home/camper/x/downr1n/binaries/Linux/iBoot64Patcher work/iBSS.dec work/iBSS.patched -n
+ /home/camper/x/downr1n/binaries/Linux/img4 -i work/iBSS.patched -o work/iBSS.img4 -M work/IM4M -A -T ibss
++ awk '/d101ap/{x=1}x&&/iBoot[.]/{print;exit}' work/BuildManifest.plist
++ grep '<string>'
++ cut '-d>' -f2
++ sed 's/Firmware[/]all_flash[/]//'
++ cut '-d<' -f1
+ /home/camper/x/downr1n/binaries/Linux/gaster decrypt work/iBoot.d10.RELEASE.im4p work/iBEC.dec
+ sleep 1
+ '[' '' = 1 ']'
++ '[' 0x8010 = 0x8960 ']'
++ '[' 0x8010 = 0x7000 ']'
++ '[' 0x8010 = 0x7001 ']'
++ '[' '' = 1 ']'
+ /home/camper/x/downr1n/binaries/Linux/iBoot64Patcher work/iBEC.dec work/iBEC.patched -b '-v wdt=-1 ' -n ''
++ [[ 0x8010 == *\0\x\8\0\1* ]]
++ echo ibss
+ /home/camper/x/downr1n/binaries/Linux/img4 -i work/iBEC.patched -o work/iBEC.img4 -M work/IM4M -A -T ibss
+ '[' '' = 1 ']'
+ echo '[*] Patching the kernel'
[*] Patching the kernel
++ [[ 14.3 = \1\5\.* ]]
++ [[ 14.3 = \1\4\.* ]]
++ echo -b
++ [[ 14.3 = \1\3\.* ]]
+ /home/camper/x/downr1n/binaries/Linux/Kernel64Patcher work/kcache.raw work/kcache.patched -b
+ [[ iPhone9,3 == *\i\P\h\o\n\e\8* ]]
+ [[ iPhone9,3 == *\i\P\a\d\6* ]]
+ [[ iPhone9,3 == *\i\P\a\d\5* ]]
+ python3 -m pyimg4 im4p create -i work/kcache.patched -o work/kcache.im4p -f rkrn --lzss
+ python3 -m pyimg4 img4 create -p work/kcache.im4p -o work/kernelcache.img4 -m work/IM4M
+ echo '[*] Patching the kernel to restore using futurerestore'
[*] Patching the kernel to restore using futurerestore
+ /home/camper/x/downr1n/binaries/Linux/Kernel64Patcher work/kcache.raw work/krnl.patched -a -b
+ [[ iPhone9,3 == \i\P\h\o\n\e\8* ]]
+ [[ iPhone9,3 == \i\P\a\d\6* ]]
+ [[ iPhone9,3 == *\i\P\a\d\5* ]]
+ python3 -m pyimg4 im4p create -i work/krnl.patched -o work/krnl.im4p -f rkrn --lzss
+ echo '[*] Patching devicetree'
[*] Patching devicetree
++ awk '/d101ap/{x=1}x&&/DeviceTree[.]/{print;exit}' work/BuildManifest.plist
++ grep '<string>'
++ cut '-d>' -f2
++ sed 's/Firmware[/]all_flash[/]//'
++ cut '-d<' -f1
+ /home/camper/x/downr1n/binaries/Linux/img4 -i work/DeviceTree.d101ap.im4p work/devicetree.img4 -M work/IM4M -T rdtr
+ '[' Linux = Darwin ']'
++ binaries/Linux/PlistBuddy work/BuildManifest.plist -c 'Print BuildIdentities:0:Manifest:RestoreRamDisk:Info:Path'
++ sed 's/"//g'
+ cp ipsw/extracted/iPhone9,3/14.3/038-83284-083.dmg work/
+ '[' Linux = Darwin ']'
++ binaries/Linux/PlistBuddy work/BuildManifest.plist -c 'Print BuildIdentities:0:Manifest:RestoreRamDisk:Info:Path'
++ sed 's/"//g'
+ /home/camper/x/downr1n/binaries/Linux/img4 -i work/038-83284-083.dmg -o work/ramdisk.dmg
+ echo '[*] Patching the restored_external and asr, and saving them into the ramdisk ...'
[*] Patching the restored_external and asr, and saving them into the ramdisk ...
+ '[' Linux = Darwin ']'
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg extract /usr/sbin/asr work/asr
+ /home/camper/x/downr1n/binaries/Linux/asr64_patcher work/asr work/patched_asr
+ /home/camper/x/downr1n/binaries/Linux/ldid -e work/asr
+ /home/camper/x/downr1n/binaries/Linux/ldid -Swork/asr.plist work/patched_asr
+ chmod 755 work/patched_asr
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg rm /usr/sbin/asr
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg add work/patched_asr /usr/sbin/asr
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg chmod 100755 /usr/sbin/asr
+ [[ ! 14.3 = \1\3\.* ]]
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg extract /usr/local/bin/restored_external work/restored_external
+ /home/camper/x/downr1n/binaries/Linux/restored_external64_patcher work/restored_external work/patched_restored_external
+ /home/camper/x/downr1n/binaries/Linux/ldid -e work/restored_external
+ /home/camper/x/downr1n/binaries/Linux/ldid -Swork/restored_external.plist work/patched_restored_external
+ chmod 755 work/patched_restored_external
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg rm /usr/local/bin/restored_external
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg add work/patched_restored_external /usr/local/bin/restored_external
+ /home/camper/x/downr1n/binaries/Linux/hfsplus work/ramdisk.dmg chmod 100755 /usr/local/bin/restored_external
+ python3 -m pyimg4 im4p create -i work/ramdisk.dmg -o work/rdsk.im4p -f rdsk
+ cp -v work/devicetree.img4 work/iBEC.img4 work/iBSS.img4 work/kernelcache.img4 work/trustcache.img4 boot/iPhone9,3
'work/devicetree.img4' -> 'boot/iPhone9,3/devicetree.img4'
'work/iBEC.img4' -> 'boot/iPhone9,3/iBEC.img4'
'work/iBSS.img4' -> 'boot/iPhone9,3/iBSS.img4'
'work/kernelcache.img4' -> 'boot/iPhone9,3/kernelcache.img4'
'work/trustcache.img4' -> 'boot/iPhone9,3/trustcache.img4'
+ echo '[*] Sucess Patching the boot files'
[*] Sucess Patching the boot files
+ echo '[*] Checking if the llb was already replaced'
[*] Checking if the llb was already replaced
+ '[' '!' -e boot/iPhone9,3/.llbreplaced ']'
+ sleep 1
+ set +e
+ /home/camper/x/downr1n/binaries/Linux/gaster reset
+ sleep 1
+ /home/camper/x/downr1n/binaries/Linux/irecovery -f blobs/iPhone9,3-14.3.shsh2
+ '[' '' = 1 ']'
+ echo '[*] Executing futurerestore ...'
[*] Executing futurerestore ...
+ _runFuturerestore
+ read -p 'Press ENTER to continue with futurerestore, your device will start to restoring <-'
Press ENTER to continue with futurerestore, your device will start to restoring <-
+ rm -rf /tmp/futurerestore/
+ '[' Linux == Linux ']'
+ sudo -u /home/camper/x/downr1n/binaries/Linux/futurerestore -t blobs/iPhone9,3-14.3.shsh2 --use-pwndfu --skip-blob --rdsk work/rdsk.im4p --rkrn work/krnl.im4p --latest-sep --latest-baseband ipsw/iPhone_4.7_P3_14.3_18C66_Restore.ipsw
sudo: unrecognized option '--use-pwndfu'
usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABkNnS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABkNnS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command [arg ...]]
usage: sudo [-ABbEHkNnPS] [-r role] [-t type] [-C num] [-D directory] [-g
group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user]
[VAR=value] [-i | -s] [command [arg ...]]
usage: sudo -e [-ABkNnS] [-r role] [-t type] [-C num] [-D directory] [-g group]
[-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...
+ sleep 2
+ echo 'if futurerestore failed you can try execute the command below'
if futurerestore failed you can try execute the command below
+ echo -e '\033[1;33mif futurerestore didn'\''t finish succesfully please try to run (with sudo or without) this command:\033[0m \033[1m/home/camper/x/downr1n/binaries/Linux/futurerestore -t blobs/iPhone9,3-14.3.shsh2 --use-pwndfu --skip-blob --rdsk work/rdsk.im4p --rkrn work/krnl.im4p --latest-sep --latest-baseband ipsw/iPhone_4.7_P3_14.3_18C66_Restore.ipsw\033[0m'
if futurerestore didn't finish succesfully please try to run (with sudo or without) this command: /home/camper/x/downr1n/binaries/Linux/futurerestore -t blobs/iPhone9,3-14.3.shsh2 --use-pwndfu --skip-blob --rdsk work/rdsk.im4p --rkrn work/krnl.im4p --latest-sep --latest-baseband ipsw/iPhone_4.7_P3_14.3_18C66_Restore.ipsw
+ echo 'if futurerestore restore sucess, you can boot using --boot'
if futurerestore restore sucess, you can boot using --boot
++ _exit_handler
++ '[' Linux = Darwin ']'
++ '[' 0 -eq 0 ']'
++ exit
Mmh very weird things, what Linux distro is that ?
Mmh very weird things, what Linux distro is that ?
Indeed, it's Debian 12 (bookworm)
Which one do you use? I don't mind switching to be honest :)
I use Kali Linux 😅 which is based on Debian sooo it should work for you, I think futurerestore on Linux have something I need to test it soo please hand on until I check it and then I will tell you through here
Seems like everyones here using Kali ;D anyway after a small break, I simply launched advised command /home/camper/x/downr1n/binaries/Linux/futurerestore -t blobs/iPhone9,3-14.3.shsh2 --use-pwndfu --skip-blob --rdsk work/rdsk.im4p --rkrn work/krnl.im4p --latest-sep --latest-baseband ipsw/iPhone_4.7_P3_14.3_18C66_Restore.ipsw
and it somehow worked! Done: restoring succeeded!
Seems like everyones here using Kali ;D anyway after a small break, I simply launched advised command
/home/camper/x/downr1n/binaries/Linux/futurerestore -t blobs/iPhone9,3-14.3.shsh2 --use-pwndfu --skip-blob --rdsk work/rdsk.im4p --rkrn work/krnl.im4p --latest-sep --latest-baseband ipsw/iPhone_4.7_P3_14.3_18C66_Restore.ipsw
and it somehow worked!Done: restoring succeeded!
w0w it worked well just --boot now and it must boot
All good it booted :) Thanks again it was a pleasure :+1: :+1: :+1:
Glad that it worked buddy
Hey @edwin170, that was nice chatting with you I'd pm you here but apparently that not really possible. Could you hit me a message on discord please? https://discordapp.com/users/905764188645912576 I'd like to ask question one or two if you don't mind of course :)
Hey @edwin170, that was nice chatting with you I'd pm you here but apparently that not really possible. Could you hit me a message on discord please? https://discordapp.com/users/905764188645912576 I'd like to ask question one or two if you don't mind of course :)
just join to dualra1n server and you can ask me there : )
@edwin170: I have found the solution to this pip install problem (not only pyimg4), it is needed to replace:
python3 -m pip install "$package"
to python3 -m pip install "$package" --break-system-packages
python3 -m pip install "$package==$required_version"
topython3 -m pip install "$package==$required_version" --break-system-packages
Same for bypassr1n.sh:
python3 -m pip install pyimg4
to python3 -m pip install pyimg4 --break-system-packages
- --break-system-packages
wow, question isn't --break-system-packages insecure ? i mean it could remove any important python package that you had ?
Hello there, Well I just don't know if I'm writing in correct place but I have a problem installing pyimg4. I keeps showing this error if for example I let the script install it for me.
I have already tried installing with pipx this package.. I have tried
sudo apt install python-piyimg4
Of course tried simplypython3 -m pip install piyimg4
(as that what the script does I believe)Nevertheless this is all happening on a clean Debian and it's a second time I'm reinstalling OS to figure out why it stucks on exactly this error..
And basically I have tried everything what was advice here https://askubuntu.com/questions/1465218/pip-error-on-ubuntu-externally-managed-environment-%C3%97-this-environment-is-extern Also the guide followed https://youtu.be/-TJ_WM4zAMA?si=T6dIoWd7xDrvR6N5
packages were installed:
xz-utils libimobiledevice-utils libusbmuxd-tools git curl python3-pip unzip clang pipx
I'd really appreciate if someone could help me, I might just missing something.
Thank you in advance