Skip to content

Commit

Permalink
irecv: change recovery chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Nov 25, 2021
1 parent 2e372dd commit 7f8aee2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymobiledevice3/irecv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from pymobiledevice3.irecv_devices import IRECV_DEVICES, IRecvDevice

USB_TIMEOUT = 10000
IRECV_TRANSFER_SIZE_RECOVERY = 0x2000
IRECV_TRANSFER_SIZE_DFU = 0x800


class Mode(Enum):
Expand Down Expand Up @@ -122,7 +124,7 @@ def ctrl_transfer(self, bmRequestType, bRequest, **kwargs):
return self._device.ctrl_transfer(bmRequestType, bRequest, **kwargs)

def send_buffer(self, buf: bytes):
packet_size = 0x8000 if self.mode.is_recovery else 0x800
packet_size = IRECV_TRANSFER_SIZE_RECOVERY if self.mode.is_recovery else IRECV_TRANSFER_SIZE_DFU

# initiate transfer
if self.mode.is_recovery:
Expand Down

0 comments on commit 7f8aee2

Please sign in to comment.