Update usbexec.py fix --dump-rom crash iPhone 8 #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change USB_READ_LIMIT = "0x8000" to "0xFF0"
This fix error when using "sudo ./ipwndfu --dump-rom" on Linux Mint
Device >> iPhone 8 (iOS 13.1.2)
Error:
Traceback (most recent call last):
File "./ipwndfu", line 200, in
securerom = pwned.read_memory(pwned.platform.rom_base, pwned.platform.rom_size)
File "/home/dev/ipwndfu/usbexec.py", line 89, in read_memory
response = self.command(self.cmd_memcpy(self.cmd_data_address(0), address + len(data), part_length), self.cmd_data_offset(0) + part_length)
File "/home/dev/ipwndfu/usbexec.py", line 108, in command
response = device.ctrl_transfer(0xA1, 2, 0xFFFF, 0, response_length, CMD_TIMEOUT).tostring()
File "/home/dev/ipwndfu/usb/core.py", line 1043, in ctrl_transfer
self.__get_timeout(timeout))
File "/home/dev/ipwndfu/usb/backend/libusb1.py", line 883, in ctrl_transfer
timeout))
File "/home/dev/ipwndfu/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 22] Invalid parameter