Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Failure to retrieve long plist with format information

#48

In attempts to find out how to retrieve the equivialent to the "supported formats plist" earlier device generations have been sending after issuing a specific SCSI command the way to do it was actually trivial.

It is retrieved by sending a command plist with the domain "com.apple.mobile.iTunes" with the "GetValue" request to lockdownd. Basically what iphoneinfo is doing right now.

The issue here is though that the whole plist is somehow not retrieved correctly and libplist fails to parse it later.

The following code demonstrates this:

#! /usr/bin/env python


from libiphone.iPhone import * from libplist.PList import *


phone = iPhone() phone.set_debug_mask(DBGMASK_ALL) if not phone.init_device() : print "Couldn't find device, is it connected ?" exit(1)


lckd = phone.get_lockdown_client() if not lckd : print "Failed to start lockdown service." exit(1)


xml = """<plist> <dict>

&lt;key&gt;Domain&lt;/key&gt;
&lt;string&gt;com.apple.mobile.iTunes&lt;/string&gt;
&lt;key&gt;Request&lt;/key&gt;
&lt;string&gt;GetValue&lt;/string&gt;



</dict></plist>"""
plist = PListNode( xml ) lckd.send(plist) plist = lckd.receive()

The information contains things like what image formats are supported and information about the iTunes DB which is useful/needed for libgpod and friends.

Have not yet have time to investigate why it fails to retrieve the whole thing but from what I checked it only retrieves exactly 16300 bytes (perhaps it is related to what Matt discovered some while ago about some missing stuff in the usbmux protocol implementation).
All this using the current usbmuxd refactored version.

Reported by Martin S. · June 7th, 2009 @ 11:58 AM

State: resolved
Milestone: 1.0 Release
Assigned to: Matt Colyer Matt Colyer

Activity

  1. Nikias Bassen
    Nikias Bassen
    • State changed from new to open

    The problem is in iphone_lckd_recv: when an encrypted plist is received that is not sent in one packet by the device then only the first packet is received. I modified the function to do the same as with unencrypted plists, i.e. retrieve any following packet to complete the full packet size that always is sent before the plist itself. So consider it fixed.

    June 8th, 2009 @ 12:53 AM

  2. Martin S.
    Martin S.

    Ah, superb, it's working now! Perhaps this might also fix some other stuff I encountered...

    June 8th, 2009 @ 08:51 AM

  3. Nikias Bassen
    Nikias Bassen
    • Assigned user set to Matt Colyer

    @Matt please close this ticket if you've merged the patch into git.

    June 9th, 2009 @ 10:58 AM

  4. Matt Colyer

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.