Closed truonggiang0710 closed 6 years ago
It breaks down to the following error message:
ERROR: HandleActivationInfoWithSessionRequest: Request contains invalid key: ARS ({
FunctionName = "init_lockdown_server_block_invoke";
NSLocalizedDescription = "Request contains invalid key: ARS";
SourceLine = 197;
})
I need to understand what the actual problem here is.
Do you need more detail information or more time to investigate this issue ?
I could figure out what's missing and am working on a solution.
Yes, same problem for US, tested with iphone 5s, DFU is Ok but fail on activation.
Do you need more datas ?
Hi @nikias ,
Any update, please ?
Thanks a lot !
Please try this patch for libimobiledevice: https://gist.github.com/nikias/679b0ae23dcd671d3cea556eb1e7928b and this one for libideviceactivation: https://gist.github.com/nikias/a8f82602453a5ff0554af61118072ba1
I try but it's still unsuccessful. Here log log2.txt
same as @truonggiang0710
"Failed to activate device with record."
i printed out the result plist for the mobileactivation_send_command_plist call:
<?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">
Failed to activate device with record.
Hmm... So the device gets the actual signature (the ARS it complained about before) but something seems still wrong. I will check again. Also @truonggiang0710 you didn't compile libimobiledevice with --enable-debug-code :)
I think it has todo on how we pass the activation data to the device. It is parsed from xml to plist format in libideviceactivation and then back to xml (and again to plist data) in libimobiledevice so my guess is that this will make the data not match with the signature.
Follow up patch for libimobiledevice:
diff --git a/src/mobileactivation.c b/src/mobileactivation.c
index 7ae35bb..a5a9841 100644
--- a/src/mobileactivation.c
+++ b/src/mobileactivation.c
@@ -91,6 +91,9 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_free(mobil
static plist_t plist_data_from_plist(plist_t plist)
{
+ if (plist && plist_get_node_type(plist) == PLIST_DATA) {
+ return plist_copy(plist);
+ }
plist_t result = NULL;
char *xml = NULL;
uint32_t xml_len = 0;
and for libideviceactivation:
diff --git a/src/activation.c b/src/activation.c
index 0a56dc7..6105071 100644
--- a/src/activation.c
+++ b/src/activation.c
@@ -170,7 +171,7 @@ static idevice_activation_error_t idevice_activation_activation_record_from_plis
response->is_activation_ack = 1;
}
}
- response->activation_record = plist_copy(plist);
+ response->activation_record = plist_new_data(response->raw_content, response->raw_content_size);
} else {
plist_t activation_node = plist_dict_get_item(plist, "iphone-activation");
if (!activation_node) {
ok, it's working with the 2 patches !
Ok to activate with iPhone 5s and IOS 11.2
I'm testing the other exe (recovery, info, DFU etc..)
Awesome. Will rework the patches a bit and push to master
We test all executables (deviceInfo, recovery, activation) all is ok for me, many thanks @nikias
I test with iPhone 6, iPhone 7, iPhone 8 and iPhone X (iOS 11.2), all is ok for me, thanks @nikias
The content returned by the request can not be changed ARS from http request header
Don't use plist_from_xml
Changes are now it git with latest commits: libimobiledevice: https://github.com/libimobiledevice/libimobiledevice/commit/b7feed9f5a62833c1df3f503fd3693e2ed2e4738 libideviceactivation: https://github.com/libimobiledevice/libideviceactivation/commit/8b2e1679a8ce64a88640cb6722c2d00ad4b14d2e
Hello @nikias ,
Lib cannot activate device on iOS 11.2. Please help me resolve it ? Here's log log.txt