libimobiledevice / libideviceactivation

A library to handle the activation process of iOS devices
https://libimobiledevice.org
GNU Lesser General Public License v2.1
295 stars 135 forks source link

ideviceactivate return -256 but the device successfully activated #16

Closed jackczhang closed 7 years ago

jackczhang commented 8 years ago
ideviceactivation.exe activate -d

idevice_activation_request_new_from_lockdownd: Unable to get MEID from lockdownd
idevice_activation_request_new_from_lockdownd: Unable to get IMSI from lockdownd
- timeout on name lookup is not supported
-   Trying 17.149.240.70...
- Connected to albert.apple.com (17.149.240.70) port 443 (#0)
- ALPN, offering http/1.1
- Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
- error setting certificate verify locations, continuing anyway:
-   CAfile: E:/MinGW-w64_libimobiledevice/ssl/certs/ca-bundle.crt
  CApath: none
- SSL connection using TLSv1.2 / AES128-GCM-SHA256
- ALPN, server did not agree to a protocol
- Server certificate:
-        subject: jurisdictionC=US; jurisdictionST=California; businessCategory=Private Organization; serialNumber=C0806592; C=US; postalCode=95014; ST=California; L=Cupertino; street=1 Infinite Loop; O=Apple Inc.; OU=GNCS Traffic Management; CN=albert.apple.com
-        start date: 2015-03-19 00:00:00 GMT
-        expire date: 2017-03-18 23:59:59 GMT
-        subjectAltName: albert.apple.com matched
-        issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec Class 3 EV SSL CA - G3
-        SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
  > POST /deviceservices/deviceActivation HTTP/1.1
  Host: albert.apple.com
  User-Agent: iOS Device Activator (MobileActivation-20 built on Jan 15 2012 at 19:07:28)
  Accept: _/_
  Content-Length: 9126
  Expect: 100-continue
  Content-Type: multipart/form-data; boundary=------------------------6b2e16a153f30a52

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0
< Content-Type: text/xml
< Content-Length: 7153
< Date: Tue, 28 Jun 2016 07:09:11 GMT
<
- Connection #0 to host albert.apple.com left intact
  <plist version="1.0"><dict><key>iphone-activation</key><dict><key>activation-record</key><dict><key>FairPlayKeyData</key><data>LS0tLS1CRUdJTiBDT05UQUlORVItLS0tLQpBQUVBQVJ3OXpacVBNTklQUWxqTkZaZmZmSWRJNTZCZHB3b0pRbFpZV253QUNjT3A1ZDhMcC9JbG5FV093ejFLClBIbjNSYURzOFhoczBNeHNZb0NJWnBxS2ZKUitIeXJDQndaM2lEaWVvdnkrU3dwY0RYK3VMUUMxRXBJc3ZkSGwKSVVDa0ZlV1RWbHNpRi9kRm1hT1FsdVdmSlFCVEdERGYyb041S0ZCeDl3WXVlUjVoaEw1dHFvcWNodG0xZ0RHMwp3bjd4RUxnSndKOWpOUVdnSnJ5dFhMQllFRlJLUnhCRFBSNldvTTZQdzVaOXJVcGZtaFRjMktsbWx6ZUtUeGJ2Cno0TFQ0L3RsSFlLYWFyL09NMzN2NSs3Z3ViV004ZVM3L0R5NmVtdUFOZzY5TVVxejl2RTU2cHp3YTRBOHFqWXMKbE1CeldwbDZEblEwbWI5aWYwWFJ6R3dFMHFlV3ozdFJoUTlxc1FraGM2RzNNQ0wwaWQxanVkSGdhRE9laEljRwpqdkk5SFVnK3c5QXVBbG8ydE5SNGpuTWkwZDBIem9LNFVHSnFWbER6ajVHbFJMV044VENpTlNTWkt3NlY3WGtLCi9YMUZibzZoRStRWFJockVBVmVTT296TmdvNWp5NWN6L2I1TTRHaFpMT0dVeGRZMTF1cGhyL3U0OEVERndMYngKNkJWUGo5QnhUem9pRENua1JXUmNMMFZyVTdvUUhtcVUrU2g1NGpqdmRJMTk0T3hsRkRrNFZtQUROUk5yZzFiVQp5OExON29BTWRqdG55U1BhWHZrZytFV096MEkxVTFJUVl0L2xQU2psTnNXajF1cWFYOXNrbWdSL04rVXJ0L0lsCnVnL3d1d0RmV3hRNTh4VXZTSnZQb3BZZEhnVFpZMURCOWc3RGo2TlY3eGhRVG1VR3RURHlkdDN6blh2VFVjenEKUHdmcGh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U3dTd1N3U3dStmbHo0RUFBQUFBSitYUHdRQkFBQUFuNWRBQkFFQUFBQUVnWUNKdndFdFc4S093bTBNekVIRHFRcWJsV0JkTlBrUXpKOGNVK0pDU0c0NDZjbGpGQ1pxWEo3c3NSS0krQTJ0YzMyc1d3a2lpWWJMVkxPd2hGL0dlLzZGbDNObXJuQS9lYlI4czZ6Q2ovS1BlaHZiVlZFcXZjcWlpUENtdnB4OVVXcjZvOFFKQml2MWpOT2ppOVRKWGQwL1U1QThrRXhIZmpOTW5TZ0tDZnAxVmFPQm5UQUxCZ2txaGtpRzl3MEJBUUVEZ1kwQU1JR0pBb0dCQU8wNlAyVFI2Q0Njd1ZJR05POStMN0lKZmdBc1EwUG4rS3JyNWtxendMWUF4RFVtY0dsYXgxNlJmbkVTZ1FBYXBBMnROR0hCRGNkbmJVdGJiaHl5Z3paOWN6R1MybVVhWWl2VkhvakR6V1MrcHBZTmRnVmk4Rlk1UlRoaEEvRk9xWDE4RHNPZy94UWcwWUw4aGdaKzhMTVBMQkd1d0haV0pqQnhwcEw4SURqOUFnTUJBQUU9XG4iOwp9</data></dict><key>unbrick</key><true/></dict></dict></plist>

Failed to activate device with record.

It reports failed to activate device, indeed device was successfully activated.

truonggiang0710 commented 8 years ago

I have same problem ! Please help me update new function to verify active status exactly.

Thanks a lot !

truonggiang0710 commented 8 years ago

Anyone can help me, please ?

nikias commented 7 years ago

Somehow the device reports an error here. Really hard to understand why it would succeed but still report an error. Closing because this issue is quite old. The new code changes I pushed might just have fixed this issue.

windowalter commented 1 year ago

ideviceactivation.exe activate -s This command need server which actually skip setup step in activation. Could you help me to how to create that server