-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS 18 beta6 restore failed #668
Comments
|
Are you using latest libtatsu (1.0.3)? |
Yes, I compiled libtatsu from the master branch (windows) |
Ok, just making sure. Can you run idevicerestore with |
You can try with this patch, but I think it won't have any effect on the current problem... diff --git a/src/restore.c b/src/restore.c
index d3828f9..d836470 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -698,16 +698,22 @@ static int _restore_service_send(restore_service_client_t service, plist_t plist
return -1;
}
-static int _restore_service_recv(restore_service_client_t service, plist_t *plist)
+static int _restore_service_recv_timeout(restore_service_client_t service, plist_t *plist, unsigned int timeout)
{
+ struct restored_client_private {
+ property_list_service_client_t parent;
+ char *udid;
+ char *label;
+ plist_t info;
+ };
if (!service) {
return -1;
}
switch (service->type) {
case SERVICE_TYPE_RESTORED:
- return restored_receive((restored_client_t)service->client, plist);
+ return property_list_service_receive_plist_with_timeout(((struct restored_client_private*)service->client)->parent, plist, timeout);
case SERVICE_TYPE_PLIST:
- return property_list_service_receive_plist((property_list_service_client_t)service->client, plist);
+ return property_list_service_receive_plist_with_timeout((property_list_service_client_t)service->client, plist, timeout);
default:
break;
}
@@ -4090,8 +4096,12 @@ static int _restore_send_file_data(struct _restore_send_file_data_ctx* rctx, voi
if (done == 0 && (memcmp(data, "AEA1", 4) == 0)) {
info("Encountered First Chunk in AEA image\n");
plist_t message = NULL;
- _restore_service_recv(rctx->service, &message);
- restore_send_url_asset(rctx->client, message);
+ property_list_service_error_t err = _restore_service_recv_timeout(rctx->service, &message, 3000);
+ if (err == PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT) {
+ info("NOTE: No URLAsset requested, assuming it is not necessary.");
+ } else if (err == PROPERTY_LIST_SERVICE_E_SUCCESS) {
+ restore_send_url_asset(rctx->client, message);
+ }
}
if (total_size > 0x1000000) { |
I tried the patch but it had no effect on the results |
|
I can't find what is actually wrong with the TSS... again I don't believe this would fix it, but I have a small patch for libtatsu: diff --git a/src/tss.c b/src/tss.c
index fcb683c..3ffba0f 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -37,7 +37,7 @@
#define USER_AGENT_STRING "InetURL/1.0"
-#define AUTH_VERSION "973.40.2"
+#define AUTH_VERSION "1033.0.2"
#ifdef WIN32
#define TSS_CLIENT_VERSION_STRING "libauthinstall_Win-"AUTH_VERSION"" It seems you are running this on Windows, not sure if that might be causing some issue. |
running on windows, alse failed |
Hello. I'm facing the same issue. It receives following 4 requests repeatedly.
The progress-bar on iPhone shows about 95% or more. All log is attached. Thanks. |
I see, because the TSS stuff can be quite tricky even with small differences, would you be able to post an iTunes created TSS request vs. the idevicerestore one? |
Hi, This is what iTunes on Windows does: This is what idevicerestore/libtatsu (latest version) does: I've modified libtatsu to send exactly same request as iTunes, modifying VersionInfo to 1033.0.6 (but not "win"), adding Locality, ApBoardID, ApChipID, ApProductionMode and ApSecurityMode keys, removing SEP key. But it still failed, looping. Thanks. |
Thanks for your help. Still investigating... |
@rekyagis What method are you using to get the debug log on Windows? |
I'm running idevicerestore on Linux and macOS. I get its debug log with -d or -dd option. I also have a Windows PC. Now, I'm investigating its USB packets, but it's harder to understand than before. Please let me know if there's anything I can help. |
Yes, now some stuff is happening in parallel... |
@rekyagis if you manage to make a USB dump, we are currently looking into the |
Thank you. Good advice. This is what idevicerestore sends for FirmwareResponseData response: This is the USB packet damp by Wireshark of iTunes: You can find that there is no "FirmwareData" in response of iTunes. The restore is success with idevicerestore when I remove FirmwareData from the FirmwareResponseData of Yonkers. I think FirmwareData is not necessary in FirmwareResponseData since it is sent as response of SourceBootObjectV4 of Yonkers,SysTopPatch9. Thanks. |
I removed all "FirmwareData" from FirmwareResponseData (just comment out all plist_dict_set_item for "FirmwareData" in restore.c, I found 7 lines). I'm not sure we can remove all "FirmwareData" for another model of iPhone or another version of iOS. But it went well with my case. Thanks. |
Hello, I have also found these lines of code in
Maybe this is a clue as to which versions are compatible with this fix? |
I figured that if FirmwareData is not in ResponseTags, it is not required. I pushed commit 3faf292 that should fix it. |
The fix seems to work (tested on XS and 15), but something happened between the commit on Jul 9 (the previous build I had tested with) and today, as it seems the restoration process takes 3-4 times longer. |
There seems to be a difference in my performance, and now the error appears at the beginning on iphone14 |
I can't see why the recent changes would result in slower performance. Any idea what commit you where using when it was still fine? Remember also that newer iOS versions are larger. |
Initially, I built That was yesterday. It is weird that today the slowness disappeared, even though the hardware is the same (same number of devices in parallel, same workstation). Maybe I am missing something. The slowness was observed when sending the filesystem (after the log 'Sending filesystem now'). |
Now works in recovery mode, but fails in normal state(iphone14,ios18b1) Failure returned 168 error |
@irainbw does it work with 18.0 ? |
It works in recovery mode, but not in normal mode.Test before |
Can you capture a tss request from Windows/macOS with the device in normal mode? Since we are facing a TSS issue it must be with the request. In recovery mode it does not send the eUICC stuff since it's not available in that mode... |
Hello
I'm trying to update to iOS 18b6 with the latest build of idevicerestore. (iPhone 14)
A loop problem occurred.
last message:
iPhone14_iOS18b6.txt
The text was updated successfully, but these errors were encountered: