Skip to content

iOS 11 ideviceinstaller, ideviceinfo not working #510

@JonGabilondoAngulo

Description

@JonGabilondoAngulo

Hi,
In iOS 11 the libimobiledevice commands that need the lockdown service have stopped working.
Do you have the same problem ?
Any solution ?

Thanks

Activity

nikias

nikias commented on Jun 5, 2017

@nikias
Member

Haven't tried yet. Is ideviceinfo -s working? Any debug output with -d?

sohgoh

sohgoh commented on Jun 6, 2017

@sohgoh

Now I tried ideviceinfo command using iPhone 7 with iOS 11(15A5278f).

ideviceinfo -s is working, but -d is not.

% ideviceinfo -d
ERROR: Could not connect to lockdownd, error code -3
%
nikias

nikias commented on Jun 6, 2017

@nikias
Member

You didn't compile libimobiledevice with debug support. Re-configure with --enable-debug-code.

sohgoh

sohgoh commented on Jun 6, 2017

@sohgoh

I retry with --enable-debug-code.

In the following the data of DeviceCertificate, HostCertificate, RootCertificate are deleted and EscrowBag and other ids are modified by me.

% ideviceinfo -d
11:53:55 lockdown.c:675 lockdownd_client_new(): device udid: 1bf59ed911dc402c423e18f30ee70fd3fbedc348a
11:53:55 lockdown.c:405 lockdownd_query_type(): called
11:53:55 property_list_service.c:128 internal_plist_send(): sending 284 bytes
11:53:55 service.c:140 service_send(): sending 4 bytes
11:53:55 service.c:140 service_send(): sending 284 bytes
11:53:55 property_list_service.c:133 internal_plist_send(): sent 284 bytes
11:53:55 property_list_service.c:134 internal_plist_send(): printing 284 bytes plist:
<?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">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>ideviceinfo</string>
	<key>Request</key>
	<string>QueryType</string>
</dict>
</plist>
11:53:55 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
11:53:55 property_list_service.c:202 internal_plist_receive_timeout(): 297 bytes following
11:53:55 property_list_service.c:215 internal_plist_receive_timeout(): received 297 bytes
11:53:55 property_list_service.c:241 internal_plist_receive_timeout(): printing 297 bytes plist:
<?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">
<plist version="1.0">
<dict>
	<key>Request</key>
	<string>QueryType</string>
	<key>Type</key>
	<string>com.apple.mobile.lockdown</string>
</dict>
</plist>
11:53:55 lockdown.c:421 lockdownd_query_type(): success with type com.apple.mobile.lockdown
11:53:55 property_list_service.c:128 internal_plist_send(): sending 5035 bytes
11:53:55 service.c:140 service_send(): sending 4 bytes
11:53:55 service.c:140 service_send(): sending 5035 bytes
11:53:55 property_list_service.c:133 internal_plist_send(): sent 5035 bytes
11:53:55 property_list_service.c:134 internal_plist_send(): printing 5035 bytes plist:
<?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">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>ideviceinfo</string>
	<key>PairRecord</key>
	<dict>
		<key>DeviceCertificate</key>
		<data>

(deleted)

		</data>
		<key>EscrowBag</key>
		<data>
		KFuRgF3rLcsJ3Fwcu455P8rgZHq5E8d0l8R6g3V42f0=
		</data>
		<key>HostCertificate</key>
		<data>

(deleted)

		</data>
		<key>HostID</key>
		<string>2B0A7912-815A-4944-8731-3E395852052F</string>
		<key>RootCertificate</key>
		<data>

(deleted)

		</data>
		<key>SystemBUID</key>
		<string>A57D15E8-02AE-4298-B74D-56824CEE970F</string>
		<key>WiFiMACAddress</key>
		<string>18:ef:1f:e4:ea:fa</string>
	</dict>
	<key>Request</key>
	<string>ValidatePair</string>
	<key>ProtocolVersion</key>
	<string>2</string>
</dict>
</plist>
11:53:55 idevice.c:399 internal_connection_receive_timeout(): ERROR: usbmuxd_recv_timeout returned -35 (Undefined error: 0)
11:53:55 service.c:163 service_receive_with_timeout(): could not read data
11:53:55 property_list_service.c:193 internal_plist_receive_timeout(): initial read=0
11:53:55 property_list_service.c:195 internal_plist_receive_timeout(): initial read failed!
ERROR: Could not connect to lockdownd, error code -8
%
nikias

nikias commented on Jun 6, 2017

@nikias
Member

Hmm the device just disconnects early as it seems. Apple changed something apparently.

nikias

nikias commented on Jun 6, 2017

@nikias
Member

Can you try to run idevicepair unpair and paste the output of idevicepair -d pair ?

rcmpayne

rcmpayne commented on Jun 6, 2017

@rcmpayne

Same issue here on windows with iOS 11 beta. 10.3.3 is working without issue

libplist: 2.0.0
usbmuxd: 1.1.1
libusbmuxd: 1.1.0
git clone http://git.libimobiledevice.org/libimobiledevice.git
git pull
./autogen.sh
./configure --without-cython --enable-debug-code --prefix=/c/6.6.2017_debug
Make
Make install

C:\6.6.2017_debug>ideviceinfo.exe -s works
C:\6.6.2017_debug>ideviceinfo.exe -d fails 
C:\6.6.2017_debug>idevicepair.exe unpair
SUCCESS: Unpaired with device 0dc8ad0d68e7fb8b5299c15c971c6f2c4953ba98
C:\6.6.2017_debug>idevicepair -d pair
14:01:28 lockdown.c:675 lockdownd_client_new(): device udid: 0dc8ad0d68e7fb8b5299c15c971c6f2c4953ba98
14:01:28 lockdown.c:405 lockdownd_query_type(): called
14:01:28 property_list_service.c:128 internal_plist_send(): sending 284 bytes
14:01:28 service.c:140 service_send(): sending 4 bytes
14:01:28 service.c:140 service_send(): sending 284 bytes
14:01:28 property_list_service.c:133 internal_plist_send(): sent 284 bytes
14:01:28 property_list_service.c:134 internal_plist_send(): printing 284 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>Request</key>
        <string>QueryType</string>
</dict>
</plist>
14:01:28 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
14:01:28 property_list_service.c:202 internal_plist_receive_timeout(): 297 bytes following
14:01:28 property_list_service.c:215 internal_plist_receive_timeout(): received 297 bytes
14:01:28 property_list_service.c:241 internal_plist_receive_timeout(): printing 297 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Request</key>
        <string>QueryType</string>
        <key>Type</key>
        <string>com.apple.mobile.lockdown</string>
</dict>
</plist>
14:01:28 lockdown.c:421 lockdownd_query_type(): success with type com.apple.mobile.lockdown
14:01:28 property_list_service.c:128 internal_plist_send(): sending 333 bytes
14:01:28 service.c:140 service_send(): sending 4 bytes
14:01:28 service.c:140 service_send(): sending 333 bytes
14:01:28 property_list_service.c:133 internal_plist_send(): sent 333 bytes
14:01:28 property_list_service.c:134 internal_plist_send(): printing 333 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>Key</key>
        <string>DevicePublicKey</string>
        <key>Request</key>
        <string>GetValue</string>
</dict>
</plist>
14:01:28 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
14:01:28 property_list_service.c:202 internal_plist_receive_timeout(): 914 bytes following
14:01:28 property_list_service.c:215 internal_plist_receive_timeout(): received 914 bytes
14:01:28 property_list_service.c:241 internal_plist_receive_timeout(): printing 914 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Key</key>
        <string>DevicePublicKey</string>
        <key>Request</key>
        <string>GetValue</string>
        <key>Value</key>
        <data>
        LS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JSUJDZ0tDQVFFQXBXWVhCdXBX
        My9WEFRQUIKLS0tLS1F
        TkQgUlNBIFBVQkxJQyBLRVktLS0tLQo=
        </data>
</dict>
</plist>
14:01:28 lockdown.c:474 lockdownd_get_value(): success
14:01:28 lockdown.c:485 lockdownd_get_value(): has a value
14:01:28 lockdown.c:813 pair_record_generate(): device public key follows:
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEApWYXBupW3/Gh50/iY32tOPeXsWzgJikNy+ylJxeXciGpFaIZ71xu
NNEEa+frB4ok6XzCnJyB0naUl3Bt4Fn7FTj1PxdTvBb4LRWj8jec2xNHY9OOBY0e
Lb6FX3f+MEyiE2oe+ce1V49MGemvVvrDTFaPUVqNMZzkUzNloaSfZg5cRDjmb27l
MZtfqis9IhdY8brO3eFoBwSia6CY9GnoovxPnMhq1967fjkiaqXoJM/LquIcLYDJ
g9z9/VlQ1a4nTeYVBrm0EDTyXG/zbxFdDPkY+oFd2ukQcp9cNsNpyP2mGD2yWs2E
GA+saQ9BV1XMW1GNGnYJQl2YR4XL/zvsFQIDAQAB
-----END RSA PUBLIC KEY-----

14:01:28 userpref.c:389 pair_record_generate_keys_and_certs(): Generating keys and certificates...
14:01:28 userpref.c:187 userpref_read_system_buid(): using 305843672103436834131978564 as SystemBUID
14:01:28 property_list_service.c:128 internal_plist_send(): sending 329 bytes
14:01:28 service.c:140 service_send(): sending 4 bytes
14:01:28 service.c:140 service_send(): sending 329 bytes
14:01:28 property_list_service.c:133 internal_plist_send(): sent 329 bytes
14:01:28 property_list_service.c:134 internal_plist_send(): printing 329 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>Key</key>
        <string>WiFiAddress</string>
        <key>Request</key>
        <string>GetValue</string>
</dict>
</plist>
14:01:28 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
14:01:28 property_list_service.c:202 internal_plist_receive_timeout(): 335 bytes following
14:01:28 property_list_service.c:215 internal_plist_receive_timeout(): received 335 bytes
14:01:28 property_list_service.c:241 internal_plist_receive_timeout(): printing 335 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Key</key>
        <string>WiFiAddress</string>
        <key>Request</key>
        <string>GetValue</string>
        <key>Value</key>
        <string>f0:24:75:82:a0:53</string>
</dict>
</plist>
14:01:28 lockdown.c:474 lockdownd_get_value(): success
14:01:28 lockdown.c:485 lockdownd_get_value(): has a value
14:01:28 property_list_service.c:128 internal_plist_send(): sending 4842 bytes
14:01:28 service.c:140 service_send(): sending 4 bytes
14:01:28 service.c:140 service_send(): sending 4842 bytes
14:01:28 property_list_service.c:133 internal_plist_send(): sent 4842 bytes
14:01:28 property_list_service.c:134 internal_plist_send(): printing 4842 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>PairRecord</key>
        <dict>
                <key>DeviceCertificate</key>
                <data>
                LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN1akNDQWFLZ0F3SUJB
                eSszWGxZbnNiRG1wWGM2MDRrYkRJZVJqTkJDOFNRaE45Ci0tLS0tRU5EIENF
                UlRJRklDQVRFLS0tLS0K
                </data>
                <key>HostCertificate</key>
                <data>
                LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNtekNDQVlPZ0F3SUJB
                Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREFBTUI0WERURTNNRFl3TmpFM01E
                VWV4ZDZSSVpscDBwTEZVaHdYanViMmhpb09LQWt0ZWhOQ2pJPQotLS0tLUVO
                RCBDRVJUSUZJQ0FURS0tLS0tCg==
                </data>
                <key>RootCertificate</key>
                <data>
                LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNqakNDQVhhZ0F3SUJB
                ZENxWXYrT29OL1RpYXE0dFhBUT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0t
                LS0K
                </data>
                <key>SystemBUID</key>
                <string>305843672103436834131978564</string>
                <key>HostID</key>
                <string>D966B752-5AEF-08A2-390F-F35DFF0A294F</string>
        </dict>
        <key>Request</key>
        <string>Pair</string>
        <key>ProtocolVersion</key>
        <string>2</string>
        <key>PairingOptions</key>
        <dict>
                <key>ExtendedPairingErrors</key>
                <true/>
        </dict>
</dict>
</plist>
14:01:29 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
14:01:29 property_list_service.c:202 internal_plist_receive_timeout(): 316 bytes following
14:01:29 property_list_service.c:215 internal_plist_receive_timeout(): received 316 bytes
14:01:29 property_list_service.c:241 internal_plist_receive_timeout(): printing 316 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>EscrowBag</key>
        <data>
        PLO2DixMnY2291+WbnYhFv/XuUV9hAj9HYy/n3B5HAE=
        </data>
        <key>Request</key>
        <string>Pair</string>
</dict>
</plist>
14:01:29 lockdown.c:967 lockdownd_do_pair(): Pair success
14:01:29 lockdown.c:969 lockdownd_do_pair(): internal pairing mode
14:01:29 lockdown.c:978 lockdownd_do_pair(): Saving EscrowBag from response in pair record
14:01:29 lockdown.c:984 lockdownd_do_pair(): Saving WiFiAddress from device in pair record
SUCCESS: Paired with device 0dc8ad0d68e7fb8b5299c15c971c6f2c4953ba98
C:\6.6.2017_debug>>ideviceinfo.exe -d
14:04:27 lockdown.c:675 lockdownd_client_new(): device udid: 0dc8ad0d68e7fb8b5299c15c971c6f2c4953ba98
14:04:27 lockdown.c:405 lockdownd_query_type(): called
14:04:27 property_list_service.c:128 internal_plist_send(): sending 284 bytes
14:04:27 service.c:140 service_send(): sending 4 bytes
14:04:27 service.c:140 service_send(): sending 284 bytes
14:04:27 property_list_service.c:133 internal_plist_send(): sent 284 bytes
14:04:27 property_list_service.c:134 internal_plist_send(): printing 284 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>ideviceinfo</string>
        <key>Request</key>
        <string>QueryType</string>
</dict>
</plist>
14:04:27 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
14:04:27 property_list_service.c:202 internal_plist_receive_timeout(): 297 bytes following
14:04:27 property_list_service.c:215 internal_plist_receive_timeout(): received 297 bytes
14:04:27 property_list_service.c:241 internal_plist_receive_timeout(): printing 297 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Request</key>
        <string>QueryType</string>
        <key>Type</key>
        <string>com.apple.mobile.lockdown</string>
</dict>
</plist>
14:04:27 lockdown.c:421 lockdownd_query_type(): success with type com.apple.mobile.lockdown
14:04:27 property_list_service.c:128 internal_plist_send(): sending 4915 bytes
14:04:27 service.c:140 service_send(): sending 4 bytes
14:04:27 service.c:140 service_send(): sending 4915 bytes
14:04:27 property_list_service.c:133 internal_plist_send(): sent 4915 bytes
14:04:27 property_list_service.c:134 internal_plist_send(): printing 4915 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>ideviceinfo</string>
        <key>PairRecord</key>
        <dict>
                <key>DeviceCertificate</key>
                <data>
                LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN1akNDQWFLZ0F3SUJB
                 eSszWGxZbnNiRG1wWGM2MDRrYkRJZVJqTkJDOFNRaE45Ci0tLS0tRU5EIENF
                UlRJRklDQVRFLS0tLS0K
                </data>
                <key>HostCertificate</key>
                <data>
                LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNtekNDQVlPZ0F3SUJB
                VWV4ZDZSSVpscDBwTEZVaHdYanViMmhpb09LQWt0ZWhOQ2pJPQotLS0tLUVO
                RCBDRVJUSUZJQ0FURS0tLS0tCg==
                </data>
                <key>RootCertificate</key>
                <data>
                LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNqakNDQVhhZ0F3SUJB
                ZENxWXYrT29OL1RpYXE0dFhBUT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0t
                LS0K
                </data>
                <key>SystemBUID</key>
                <string>305843672103436834131978564</string>
                <key>HostID</key>
                <string>D966B752-5AEF-08A2-390F-F35DFF0A294F</string>
                <key>EscrowBag</key>
                <data>
                PLO2DixMnY2291+WbnYhFv/XuUV9hAj9HYy/n3B5HAE=
                </data>
                <key>WiFiMACAddress</key>
                <string>f0:24:75:82:a0:53</string>
        </dict>
        <key>Request</key>
        <string>ValidatePair</string>
        <key>ProtocolVersion</key>
        <string>2</string>
</dict>
</plist>
14:04:27 idevice.c:399 internal_connection_receive_timeout(): ERROR: usbmuxd_recv_timeout returned -11 (No error)
14:04:27 service.c:163 service_receive_with_timeout(): could not read data
14:04:27 property_list_service.c:193 internal_plist_receive_timeout(): initial read=0
14:04:27 property_list_service.c:195 internal_plist_receive_timeout(): initial read failed!
ERROR: Could not connect to lockdownd, error code -8
sohgoh

sohgoh commented on Jun 7, 2017

@sohgoh

I tried. It seems to be successful.

  • idevicepair unpair
% idevicepair unpair
SUCCESS: Unpaired with device 1b659ed991dc402c423e18f30ee70fd3fbedc38f
%
  • idevicepair -d pair
% idevicepair -d pair
09:03:41 lockdown.c:675 lockdownd_client_new(): device udid: 1b659ed991dc402c423e18f30ee70fd3fbedc38f
09:03:41 lockdown.c:405 lockdownd_query_type(): called
09:03:41 property_list_service.c:128 internal_plist_send(): sending 284 bytes
09:03:41 service.c:140 service_send(): sending 4 bytes
09:03:41 service.c:140 service_send(): sending 284 bytes
09:03:41 property_list_service.c:133 internal_plist_send(): sent 284 bytes
09:03:41 property_list_service.c:134 internal_plist_send(): printing 284 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>Request</key>
        <string>QueryType</string>
</dict>
</plist>
09:03:41 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
09:03:41 property_list_service.c:202 internal_plist_receive_timeout(): 297 bytes following
09:03:41 property_list_service.c:215 internal_plist_receive_timeout(): received 297 bytes
09:03:41 property_list_service.c:241 internal_plist_receive_timeout(): printing 297 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Request</key>
        <string>QueryType</string>
        <key>Type</key>
        <string>com.apple.mobile.lockdown</string>
</dict>
</plist>
09:03:41 lockdown.c:421 lockdownd_query_type(): success with type com.apple.mobile.lockdown
09:03:41 property_list_service.c:128 internal_plist_send(): sending 333 bytes
09:03:41 service.c:140 service_send(): sending 4 bytes
09:03:41 service.c:140 service_send(): sending 333 bytes
09:03:41 property_list_service.c:133 internal_plist_send(): sent 333 bytes
09:03:41 property_list_service.c:134 internal_plist_send(): printing 333 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>Key</key>
        <string>DevicePublicKey</string>
        <key>Request</key>
        <string>GetValue</string>
</dict>
</plist>
09:03:41 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
09:03:41 property_list_service.c:202 internal_plist_receive_timeout(): 914 bytes following
09:03:41 property_list_service.c:215 internal_plist_receive_timeout(): received 914 bytes
09:03:41 property_list_service.c:241 internal_plist_receive_timeout(): printing 914 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Key</key>
        <string>DevicePublicKey</string>
        <key>Request</key>
        <string>GetValue</string>
        <key>Value</key>
        <data>

(---cut---)

        </data>
</dict>
</plist>
09:03:41 lockdown.c:474 lockdownd_get_value(): success
09:03:41 lockdown.c:485 lockdownd_get_value(): has a value
09:03:41 lockdown.c:813 pair_record_generate(): device public key follows:
-----BEGIN RSA PUBLIC KEY-----
(---cut---)
-----END RSA PUBLIC KEY-----

09:03:41 userpref.c:389 pair_record_generate_keys_and_certs(): Generating keys and certificates...
09:03:41 userpref.c:187 userpref_read_system_buid(): using A59D14F8-02AE-4298-B74D-56824CEE970F as SystemBUID
09:03:41 property_list_service.c:128 internal_plist_send(): sending 329 bytes
09:03:41 service.c:140 service_send(): sending 4 bytes
09:03:41 service.c:140 service_send(): sending 329 bytes
09:03:41 property_list_service.c:133 internal_plist_send(): sent 329 bytes
09:03:41 property_list_service.c:134 internal_plist_send(): printing 329 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>Key</key>
        <string>WiFiAddress</string>
        <key>Request</key>
        <string>GetValue</string>
</dict>
</plist>
09:03:41 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
09:03:41 property_list_service.c:202 internal_plist_receive_timeout(): 335 bytes following
09:03:41 property_list_service.c:215 internal_plist_receive_timeout(): received 335 bytes
09:03:41 property_list_service.c:241 internal_plist_receive_timeout(): printing 335 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Key</key>
        <string>WiFiAddress</string>
        <key>Request</key>
        <string>GetValue</string>
        <key>Value</key>
        <string>81:e1:7e:e4:ea:e2</string>
</dict>
</plist>
09:03:41 lockdown.c:474 lockdownd_get_value(): success
09:03:41 lockdown.c:485 lockdownd_get_value(): has a value
09:03:41 property_list_service.c:128 internal_plist_send(): sending 4851 bytes
09:03:41 service.c:140 service_send(): sending 4 bytes
09:03:41 service.c:140 service_send(): sending 4851 bytes
09:03:41 property_list_service.c:133 internal_plist_send(): sent 4851 bytes
09:03:41 property_list_service.c:134 internal_plist_send(): printing 4851 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>idevicepair</string>
        <key>PairRecord</key>
        <dict>
                <key>DeviceCertificate</key>
                <data>
(---cut---)
                </data>
                <key>HostCertificate</key>
                <data>
(---cut---)
                </data>
                <key>RootCertificate</key>
                <data>
(---cut---)
                </data>
                <key>SystemBUID</key>
                <string>A59D14F8-02AE-4298-B74D-56824CEE970F</string>
                <key>HostID</key>
                <string>7B0787C1-7A5B-9D5D-0C26-77A7F59E4A18</string>
        </dict>
        <key>Request</key>
        <string>Pair</string>
        <key>ProtocolVersion</key>
        <string>2</string>
        <key>PairingOptions</key>
        <dict>
                <key>ExtendedPairingErrors</key>
                <true/>
        </dict>
</dict>
</plist>
09:03:42 property_list_service.c:193 internal_plist_receive_timeout(): initial read=4
09:03:42 property_list_service.c:202 internal_plist_receive_timeout(): 316 bytes following
09:03:42 property_list_service.c:215 internal_plist_receive_timeout(): received 316 bytes
09:03:42 property_list_service.c:241 internal_plist_receive_timeout(): printing 316 bytes plist:
<?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">
<plist version="1.0">
<dict>
        <key>EscrowBag</key>
        <data>
        /AIWwoNXU/VzFKTEeGl9gU0DhuuY/QbkHeVS1N1uYla=
        </data>
        <key>Request</key>
        <string>Pair</string>
</dict>
</plist>
09:03:42 lockdown.c:967 lockdownd_do_pair(): Pair success
09:03:42 lockdown.c:969 lockdownd_do_pair(): internal pairing mode
09:03:42 lockdown.c:978 lockdownd_do_pair(): Saving EscrowBag from response in pair record
09:03:42 lockdown.c:984 lockdownd_do_pair(): Saving WiFiAddress from device in pair record
SUCCESS: Paired with device 1b659ed991dc402c423e18f30ee70fd3fbedc38f
%
sohgoh

sohgoh commented on Jun 7, 2017

@sohgoh

It seems that response failed at line 730 of lockdown.c and the response is returning with LOCKDOWN_E_ESCROW_LOCKED (-35).
Temporarily commenting out will make ideviceinfo successful.

     /* in any case, we need to validate pairing to receive trusted host status */
     ret = lockdownd_validate_pair(client_loc, NULL);
nikias

nikias commented on Jun 7, 2017

@nikias
Member

The ValidatePair request was removed from iOS lockdownd, so it doesn't understand it. It will return that the command is invalid.
Commenting that line in lockdown.c out will make it work when the device is already paired, yes. Since we need to keep backwards compatibility I need to work out a solution that works in all cases.

EliyahuStern

EliyahuStern commented on Jun 7, 2017

@EliyahuStern

How about:

  • Add a version double to idevice struct.
  • Initialize it inside get_device_info (if it is simple).
  • in lockdownd_client_new_with_handshake:
    • if os version is not set, call get_device_info(simple).
    • skip lockdownd_validate_pair call in in case version >= 11.0.
nikias

nikias commented on Jun 7, 2017

@nikias
Member

@EliyahuStern generally yes, just need to make sure the actual pairing works with the open source usbmuxd for a new pairing.
Even for < 11 it actually works without validatepair (since starting a session only works with a correct pairing).

mexmer

mexmer commented on Jun 7, 2017

@mexmer

@nikias just installed ios 11 beta little while ago, and found that my code is not working (early disconnect after validate pair), so i checked with libimobile and same issue.
then i decided to look at github, and see you are already working on it.

i still plan to do communication capture (with hardware usb monitor), since itunes for windows seems to be working with ios11 beta.

they might have something up in the sleeves, that makes seamless communication with old and new devices possible 🐱

nikias

nikias commented on Jun 7, 2017

@nikias
Member

@mexmer as I said, ValidatePair is technically not required even for older devices. At some point IIRC it was required to gain trusted host status (ideviceinfo -k TrustedHostAttached), but at least on iOS 5.0.1 it is true without performing ValidatePair.

mexmer

mexmer commented on Jun 7, 2017

@mexmer

i would probly leave it in my app for elder devices, but seems that ios 11 works without it. will need to redo session start handling tho', (i have different workflow that libimobile tools, and some stuff is running in paralel )

i still plan to check itunes communication.

not sending validatepair saves one roundtrip tho' 😄

55 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @saurik@sohgoh@nikias@pmnordkvist@hugozerken

        Issue actions

          iOS 11 ideviceinstaller, ideviceinfo not working · Issue #510 · libimobiledevice/libimobiledevice