Issue #5 resolved

Strange error

Anonymous created an issue

I am trying to write a new class in this project, but when I "readXMLReply" I continually get an error "Can't receive reply size". Any insight on when this sort of thing occurs? I can't figure out why it would throw this error.

Comments (11)

  1. Jeff Laing repo owner

    I guess the question is "what service are you talking to, and are you sure that it sends an XML reply?".

    The basic protocol between Mac and device is to send a 32-bit byte count (in network order) followed by the raw XML representation of a request dictionary; the standard response is expected to be a 32-bit byte count (in network order) followed by the raw XML representation of a reply dictionary.

    "Can't receive reply size" happens when the device does not send the byte count.

    I would imagine that the service you tried to talk to did not respond. There isn't much else I can say without more info on what you are trying to do.

  2. Jeff Laing repo owner

    I hope you don't mind but I have rearranged your changes a little and added a few more methods. I have tested it on an iPad Air and an iPad Mini, both running iOS7 and it seems to screen snap just fine.

  3. Nathan Van Fleet

    Oh I like your changes. I hadn't used some of the classes as you saw because they returned NSDictionary so I just sent and read xmlreply which is something that some classes did anyhow so I didn't think it was an issue.

    I also didn't see a common class that did the mode to copy, and I wasn't 100% sure if there were overlaps with this protocol so I didn't know where to start with a base class as you did. But I noticed the thing about getting contact information and it basically looks similar to me, maybe it can be gotten to work.

    Take note that it's not com.apple.screenshotr but com.apple.mobile.screenshotr. I would like to try this with a non development iPhone/Mac but I don't really have access to such a thing.

  4. Jeff Laing repo owner

    I understand - what you did looked fine and it was a good first step - I just keep refactoring these things probably more than I should, to try to minimise the repetition that can creep in otherwise.

    Now that more of the plumbing is in place, I may well try getting some of the others going though as always, other priorities get in the way. But you can see that I have made abortive starts at syncing contact info in the past...

    I did try it on a non-development iPad which is how I know how it behaves - you get a failure 0x3, 0x0, 0x22 at service start time because the service name literally does not exist. It looks like the lockdownd daemon does not just read Services.plist - it also scans a directory under /Developer/...something... for <servicename>.plist. If that directory is not present, it will not find the screenshot service.

  5. Jeff Laing repo owner

    Well, let me just say "thanks" and feel free to add any more services that you like - its not my top priority project any more and every bit of help counts.

    Its been ages since I even had a jailbroken device which is what it takes to pull the binaries back from the device to start disassembling - I notice there are a truckload more services that need investigating, and new filesets for the relay to pass back.

    Thanks again,

    Jeff.

  6. Log in to comment