Activation Token

From The iPhone Wiki
(Redirected from Activation token)
Jump to: navigation, search

Layout of Activation Token

This is the CFDictionary string representation which gets sent to Apple's server.The object can be obtained by using the MobileDevice Library, AMDeviceCopyValue function with the "ActivationInfo" value.

It is generated by lockdownd. Upon generation it stores ActivationRandomness in data ark and later checks it, thus only the last generated token it valid. SHA1 is generated in lockdown and then it makes a request to fairplayd to complete signature process and obtain certificate chain.

       (base64-encoded activation info here)
       (base64-encoded RSA certificate chain including root CA in DER format)
       (base64-encoded signature (SHA1+RSA) of ActivationInfoXML, validated using FairPlayCertChain certificate)

Key: ActivationInfoXML

The ActivationInfo plist file above has a key called ActivationInfoXML. The base64 data value of that key represents the plist file below

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
 <plist version="1.0">
       <string>(Hash of hardware IDs)<string>
       <string>(Hash of hardware IDs not directly used as a key - the TEA key can be derived from this)<string>
       (base64 encoded cert)
       <string>(String ENUM "iPhone", "iPod", "iPod touch", "iPad")</string>
       <string>(ICCID as base-10 string)</string>
       <string>(IMEI as base-10 string)</string>
       <string>(IMSI as base-10 string)</string>
       <string>(String like "+1 (555) 555-5555")</string>
       (base64-encoded binary GID1)
       (base64-encoded binary GID2)
       <string>(ENUM kCTSIMSupportSIMStatusReady kCTSIMSupportSIMStatusNotReady kCTSIMSupportSIMStatusOperatorLocked)</string>
       <string>(hex UUID)</string>

SIMGIDs and PhoneNumber are present only if installed SIM has them and it was read correctly.

If ActivationState is not Unactivated or token signature is not correct, Apple server will respond with message "there's problem with your device".

Activation Protocol

Use SSL and send the request below with the values

POST /WebObjects/ALUnbrick.woa/wa/deviceActivation HTTP/1.1
Accept-Encoding: gzip
Accept-Language: en-us, en;q=0.50
Content-Type: multipart/form-data; boundary=DeviceActivation
Content-Length: 1234
Cache-Control: no-cache

Content-Disposition: form-data; name="activation-info"

       (base64-encoded activation info here)
       (base64-encoded cert in DER format)
       (base64-encoded signature (SHA1+RSA) of ActivationInfoXML)