Giter VIP home page Giter VIP logo

Comments (17)

nikias avatar nikias commented on June 3, 2024 3

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) {

from libideviceactivation.

nikias avatar nikias commented on June 3, 2024

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.

from libideviceactivation.

truonggiang0710 avatar truonggiang0710 commented on June 3, 2024

Do you need more detail information or more time to investigate this issue ?

from libideviceactivation.

nikias avatar nikias commented on June 3, 2024

I could figure out what's missing and am working on a solution.

from libideviceactivation.

nicolassan avatar nicolassan commented on June 3, 2024

Yes, same problem for US, tested with iphone 5s, DFU is Ok but fail on activation.

Do you need more datas ?

from libideviceactivation.

truonggiang0710 avatar truonggiang0710 commented on June 3, 2024

Hi @nikias ,

Any update, please ?

Thanks a lot !

from libideviceactivation.

nikias avatar nikias commented on June 3, 2024

Please try this patch for libimobiledevice: https://gist.github.com/nikias/679b0ae23dcd671d3cea556eb1e7928b
and this one for libideviceactivation: https://gist.github.com/nikias/a8f82602453a5ff0554af61118072ba1

from libideviceactivation.

truonggiang0710 avatar truonggiang0710 commented on June 3, 2024

I try but it's still unsuccessful.
Here log
log2.txt

from libideviceactivation.

daniel-bluesea avatar daniel-bluesea commented on June 3, 2024

same as @truonggiang0710

"Failed to activate device with record."

i printed out the result plist for the mobileactivation_send_command_plist call:

Error Failed to activate device. ({ FunctionName = "init_lockdown_server_block_invoke_2"; NSLocalizedDescription = "Failed to activate device."; NSUnderlyingError = "Error Domain=com.apple.MobileActivation.ErrorDomain Code=-2 \"Invalid activation signature.\" UserInfo={NSUnderlyingError=0x100c260c0 {Error Domain=com.apple.MobileActivation.ErrorDomain Code=-3 \"Failed to verify message signature (2c3PEJbh9Tuh7P/zxVPc2A==): -42022\" UserInfo={SourceLine=444, NSLocalizedDescription=Failed to verify message signature (2c3PEJbh9Tuh7P/zxVPc2A==): -42022, FunctionName=-[MobileActivationDaemon validateActivationDataSignature:activationSignature:withError:]_block_invoke}}, SourceLine=1273, FunctionName=-[MobileActivationDaemon handleActivationInfoWithSession:activationSignature:completionBlock:], NSLocalizedDescription=Invalid activation signature.}"; SourceLine = 210; })

Failed to activate device with record.

from libideviceactivation.

nikias avatar nikias commented on June 3, 2024

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 :)

from libideviceactivation.

nicolassan avatar nicolassan commented on June 3, 2024

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..)

from libideviceactivation.

nikias avatar nikias commented on June 3, 2024

Awesome. Will rework the patches a bit and push to master

from libideviceactivation.

nicolassan avatar nicolassan commented on June 3, 2024

We test all executables (deviceInfo, recovery, activation) all is ok for me, many thanks @nikias

from libideviceactivation.

truonggiang0710 avatar truonggiang0710 commented on June 3, 2024

I test with iPhone 6, iPhone 7, iPhone 8 and iPhone X (iOS 11.2), all is ok for me, thanks @nikias

from libideviceactivation.

xdeng avatar xdeng commented on June 3, 2024

The content returned by the request can not be changed
ARS from http request header

from libideviceactivation.

xdeng avatar xdeng commented on June 3, 2024

Don't use plist_from_xml

from libideviceactivation.

nikias avatar nikias commented on June 3, 2024

Changes are now it git with latest commits:
libimobiledevice: libimobiledevice/libimobiledevice@b7feed9
libideviceactivation: 8b2e167

from libideviceactivation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.