libimobiledevice-win32 / libimobiledevice-vs

Visual Studio solution to build all of libimobiledevice at once
GNU Lesser General Public License v2.1
89 stars 62 forks source link

Compiled code does not work (restore fails everytime) #13

Open iphonerestorer opened 4 years ago

iphonerestorer commented 4 years ago

Hi,

1) I've compiled the code on two separate Windows 10 machines, with clean msvc2019 installs. Followed all the steps in the readme.

2) Some additional notes, linker directory needs to be update to the location of "libcurl.lib" and I assumed the configuration needs to be switched to 64-bit (despite 32 in the name).

3) long story short I've executed compiled "idevicerestore.exe -l -d", every single time (on both machines and multiple iphones) it fails in the same moment (see below).

What's odd? I've used another compilation of this library (although only binaries are available): https://github.com/Devjam81/libimobile2019 -- and it worked without any problems on all of my iphones.

Any ideas why it fails in libimobiledevice-vs case? Thanks.

` 2:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\idevice.c:523 internal_connection_receive(): ERROR: usbmuxd_recv returned -108 (Unknown error) ERROR: Unable to receive data from ASR ERROR: Unable to receive validation packet ERROR: ASR was unable to validate the filesystem ERROR: Unable to send filesystem ERROR: Unable to successfully restore device 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:205 internal_plist_receive_timeout(): initial read=4 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:211 internal_plist_receive_timeout(): 48498 bytes following 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:224 internal_plist_receive_timeout(): received 48498 bytes 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:250 internal_plist_receive_timeout(): supress printing 48498 bytes plist...

Restoring to APFS Inverter Image = /mnt1/apfs_invert_asr_img executing /usr/sbin/asr -source asr://localhost:12345 -target /mnt1/apfs_invert_asr_img --embed -erase -noprompt --chunkchecksum --puppetstrings --expectedhash XXXSECRETHASHXXX ASR STATUS: start 412 multicast-client ASR: Waiting for connection attempt from server ASR STATUS: setup ASR: Validating target...done ASR STATUS: metadata ASR: Validating source... ASR: Can't gather image metadata ASR: Could not validate source - error 110 ASR STATUS: fail restore_apfs_image : failed to restore an APFS image, error = 14 [11:14:21.0892-GMT]{3>5} CHECKPOINT FAILURE:(FAILURE:14) (null):[0x065B] asr_and_invert_image [0]D(failed to restore APFS image) restore-step-results = {0x1107065B:{0:14}} restore-step-codes = {0x1107065B:{0:14}} restore-step-domains = {0x1107065B:{0:"AMRestoreErrorDomain"}} restore-step-error = {0x1107065B:"[0]D(failed to restore APFS image)"} restore-step-uptime = 157 restore-step-user-progress = 1 [11:14:21.0894-GMT]{3>5} CHECKPOINT NOTICE: (NVRAM set) restore-step-user-progress=1 [sync=true] (first failure) [11:14:21.0895-GMT]{3>5} CHECKPOINT FAILURE:(FAILURE:14) RESTORED:[0x0677] perform_main_os_prepare [0]D(failed to restore APFS image) restore-step-results = {0x11070677:{0:14};0x1107065B:{0:14}} restore-step-codes = {0x11070677:{0:14};0x1107065B:{0:14}} restore-step-domains = {0x11070677:{0:"AMRestoreErrorDomain"};0x1107065B:{0:"AMRestoreErrorDomain"}} restore-step-error = {0x11070677:"[0]D(failed to restore APFS image)"} restore-step-uptime = 157 restore-step-user-progress = 1 [11:14:21.0897-GMT]{3>5} CHECKPOINT BEGIN: RESTORED:[0x067C] cleanup_boot_command restore-step-ids = {0x11030677:40;0x1103065B:48;0x1103067C:49} restore-step-names = {0x11030677:perform_main_os_prepare;0x1103065B:asr_and_invert_image;0x1103067C:cleanup_boot_command} restore-step-uptime = 157 restore-step-user-progress = 1 entering reset_boot_command_if_value [11:14:21.0899-GMT]{3>5} CHECKPOINT END: RESTORED:[0x067C] cleanup_boot_command restore-step-ids = {0x11030677:40;0x1103065B:48} restore-step-names = {0x11030677:perform_main_os_prepare;0x1103065B:asr_and_invert_image} restore-step-uptime = 157 restore-step-user-progress = 1 [11:14:21.0900-GMT]{3>5} CHECKPOINT BEGIN: RESTORED:[0x1614] cleanup_recovery_os_volume restore-step-ids = {0x11030677:40;0x1103065B:48;0x11031614:50} restore-step-names = {0x11030677:perform_main_os_prepare;0x1103065B:asr_and_invert_image;0x11031614:cleanup_recovery_os_volume} restore-step-uptime = 157 restore-step-user-progress = 1 [11:14:21.0901-GMT]{3>5} CHECKPOINT END: RESTORED:[0x1614] cleanup_recovery_os_volume restore-step-ids = {0x11030677:40;0x1103065B:48} restore-step-names = {0x11030677:perform_main_os_prepare;0x1103065B:asr_and_invert_image} restore-step-uptime = 157 restore-step-user-progress = 1 [11:14:21.0903-GMT]{3>5} CHECKPOINT BEGIN: RESTORED:[0x0647] cleanup_check_result restore-step-ids = {0x11030677:40;0x1103065B:48;0x11030647:51} restore-step-names = {0x11030677:perform_main_os_prepare;0x1103065B:asr_and_invert_image;0x11030647:cleanup_check_result} restore-step-uptime = 157 restore-step-user-progress = 1 [11:14:21.0904-GMT]{3>5} CHECKPOINT END: RESTORED:[0x0647] cleanup_check_result restore-step-ids = {0x11030677:40;0x1103065B:48} restore-step-names = {0x11030677:perform_main_os_prepare;0x1103065B:asr_and_invert_image} restore-step-uptime = 157 restore-step-user-progress = 1 [11:14:21.0905-GMT]{3>5} CHECKPOINT BEGIN: RESTORED:[0x0648] cleanup_send_final_status restore-step-ids = {0x11030677:40;0x1103065B:48;0x11030648:52} restore-step-names = {0x11030677:perform_main_os_prepare;0x1103065B:asr_and_invert_image;0x11030648:cleanup_send_final_status} restore-step-uptime = 157 restore-step-user-progress = 1

12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\restore.c:348 restored_goodbye(): called 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:132 internal_plist_send(): sending 285 bytes 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\service.c:144 service_send(): sending 4 bytes 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\service.c:144 service_send(): sending 285 bytes 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:137 internal_plist_send(): sent 285 bytes 12:14:21 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:138 internal_plist_send(): printing 285 bytes plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

Label idevicerestore Request Goodbye

12:14:31 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\property_list_service.c:196 internal_plist_receive_timeout(): initial read failed! 12:14:31 J:\libmobiledevice\libimobiledevice-vs\libimobiledevice\src\restore.c:356 restored_goodbye(): did not get goodbye response back ERROR: Unable to restore device

`

bricedenice59 commented 4 years ago

Same for me...
freshly compiled with VS2015, link to libs updated, doesn't work at all, ame issue with ASR... compiled via the normal way (./autogen.sh, make.... ) and I am able to flash my iPhone... Have you had the chance to fix the issue or understand wat's going on ? did we miss something ?

vipinbeni commented 3 years ago

Same for me.. any idea to resolve the same internal_connection_receive(): ERROR: usbmuxd_recv returned -108 (Unknown error)