libimobiledevice / libirecovery

Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux
https://libimobiledevice.org
GNU Lesser General Public License v2.1
550 stars 207 forks source link

iPad Mini 2 issue #105

Open miticollo opened 1 year ago

miticollo commented 1 year ago

I tried to send iBEC to my iPad Mini 2. But at first attempt irecovery failed

% irecovery -v -f sshramdisk/iBEC.img4  
Attempting to connect... 
opening device 05ac:1227 @ 0x14200000...
Setting to configuration 1
Setting to interface 0:0
Connected to iPad4,4, model j85ap, cpid 0x8960, bdid 0x0a
DFU ERROR, issuing CLRSTATUS
Unable to upload data to device

At second attempt it failed with progress bar

% irecovery -v -f sshramdisk/iBEC.img4
Attempting to connect... 
opening device 05ac:1227 @ 0x14200000...
Setting to configuration 1
Setting to interface 0:0
Connected to iPad4,4, model j85ap, cpid 0x8960, bdid 0x0a
[====================================              ] 70.2%Unable to upload data to device

I compiled tool on my macOS 12.6 without problems. I successfully sent iBSS but no iBEC. I have no problems with my iPhone X.

nikias commented 1 year ago

Can you check if it works when you change this line: https://github.com/libimobiledevice/libirecovery/blob/master/src/libirecovery.c#L2719 from

    int packet_size = recovery_mode ? 0x8000 : 0x800;

to

    int packet_size = recovery_mode ? 0x2000 : 0x800;

?

nikias commented 1 year ago

Oh hmm just saw it fails in DFU mode already, so this won't help... But wouldn't the device reconnect in recovery mode (05ac:1281) after it accepted the iBSS? I don't remember exactly tbh... In any case it would disconnect from USB and reconnect. Does that happen?

miticollo commented 1 year ago

Thank u for the answer. I tried to edit source but nothing has changed. I noticed that after send iBSS on my iPad Pro backlight is present but if I use iPad Mini 2 not. irecovery doesn't disconnect and reconnect iDevices. Anyway with iPad Mini 2 I tried to disconnect and reconnect manually before to load iBEC unsuccessfully.

nikias commented 1 year ago

It's not irecovery that does the reconnect. The devices do it on their own. If it doesn't happen then the iBEC image is not accepted by the device.