#144 ✓invalid
Toni

APIEpicFail

Reported by Toni | May 28th, 2010 @ 08:43 AM | in 1.2.0 Release

When trying to archive apps from phone with ideviceinstaller -a I get this error every time:

Archive - TakingInstallLock (0%)
Archive - EmptyingApplication (2%)
Archive - Error occured: APIEpicFail

Versions used:

ideviceinstaller-ba6d098b6fe12ecdb0cde2c283ff77d2a8a22a06
sbmanager-c2cfddae8fabbb80f8d1b85abf3cea84b13355c8
usbmuxd-1.0.4
libimobiledevice-1.0.1

Comments and changes to this ticket

  • Martin S.

    Martin S. May 28th, 2010 @ 08:56 AM

    • Milestone set to 1.2.0 Release
    • Tag set to api, ideviceinstaller, installation_proxy
    • State changed from “new” to “open”
    • What app exactly do you attempt to archive?

    For instance, some apps installed on jailbroken devices (cydia etc.) can not be archived. In general that would be apps which have not been installed using the "native" way onto the device.

    • Which device and iPhone OS version?

    APIEpicFail is returned if the device receives impossible actions (like archiving Cydia as noted above).

  • Toni

    Toni May 28th, 2010 @ 09:26 AM

    Hello Martin!

    My iPhone is not jailbroken and so forth I don't have cydia installed

    I tried to archive several apps like:

    Skype 1.3.0.275
    Subnet Calc 1.5
    Level 1.1
    Opera Mini 1.0.2

    My phone is 3G ()model MB489KS and OS 3.1.3

  • Martin S.

    Martin S. May 28th, 2010 @ 10:07 AM

    Thanks for the information.
    Could you please supply a log running ideviceinstaller additionally with the "-D" option? It will output the whole communication so we can track down what happens.

  • Martin S.

    Martin S. May 28th, 2010 @ 10:09 AM

    • Assigned user changed from “Martin S.” to “Nikias Bassen”

    Adding Nikias to the bunch. :)

  • Toni

    Toni May 28th, 2010 @ 10:29 AM

    As requested:

    There are three logs in the same file, commands witch were run at this order:

    ideviceinstaller -D
    ideviceinstaller -Dl
    ideviceinstaller -D -a com.skype.skype

  • Toni

    Toni May 28th, 2010 @ 10:30 AM

    sorry about typo:

    commands which were run

    -toni-

  • Nikias Bassen

    Nikias Bassen May 28th, 2010 @ 11:36 AM

    OK, could you please do the following:
    run idevicesyslog on one terminal
    then run ideviceinstaller -D -a com.skype.skype on another terminal
    and then copy both outputs to separate logfiles you then post here ;)

  • Toni

    Toni May 28th, 2010 @ 11:54 AM

    Hello Niklas!

    As requested:

    syslog and installerlog

  • Martin S.

    Martin S. May 28th, 2010 @ 12:18 PM

    The issue is clearly this:

    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 store_binary_dict: Could not create /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist: Permission denied
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 : stat /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist uid=0 gid=501 p=100644
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 : stat /private/var/mobile/Library/MobileInstallation uid=501 gid=501 p=40755
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 MobileInstallationArchive: Could not store /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 handle_archive: API failed
    

    It is unable to write the ArchivedApplications.plist file on your device. Why it fails to do so is a different question... ;)

  • Toni

    Toni May 28th, 2010 @ 12:27 PM

    I agree, fortunately I don't have to figure that out ;)

    Please let me know if I can assist in any way however...

  • Martin S.

    Martin S. May 28th, 2010 @ 12:37 PM

    You might try to think of why it can't do that to help. This is certainly your device filesystem permissions being screwed up for some reason and this is not an ideviceinstaller bug. ;)

    Did you ever sync apps with iTunes?
    Did you update or did you restore to 3.1.3? If you did, from which previous OS version?
    Can you think of anything you did (or even forget to do compared to iTunes app sync) related to apps?

  • Toni

    Toni May 28th, 2010 @ 12:56 PM

    Okay here are some background:

    When I bought this phone it had OS version 2.0
    Almost the first thing I did ( after using it couple of months ) was jailbreak with pwnage.
    After Apple released 2.5 ( ? or something like that ) I restored the phone and upgraded to that version.
    Since that I have only had official OS version installed. Of course I have upgrade first to OS 3.0 and then OS 3.1.3

    I do sync the phone regularly with iTunes ( Mac version ), some of the apps are purchased with iTunes and then installed to the iphone. All the apps appear in the iTunes.

    I can't think any strange functioning going on, sorry but I don't think this has helped you very much...

  • Martin S.

    Martin S. May 28th, 2010 @ 01:22 PM

    Ok, could you please try to "buy" whatever free app on your device, install it, then connect to iTunes and verify if iTunes "synced" that app/IPA file onto your computer please?

    According to what we see here this should fail.

  • Toni

    Toni May 28th, 2010 @ 01:34 PM

    Just ahead of you !

    I did that, sync to iPhone worked like a charm.
    Then I tried to archive the app with ideviceinstall but that is no-go.

    Then I did purchase with iPhone, sync again, then archiving with ideviceinstall but... still error.

    Purchase and sync didn't make any difference.

    I'm leaving away for the weekend, but I do get back to this first thing on Monday morning.

  • Nikias Bassen

    Nikias Bassen May 28th, 2010 @ 01:54 PM

    Hi,

    you can try the following.
    1. download the attached archive
    2. extract it, go to idevicefileinject and type make
    3. run ./idevicefileinject with your device plugged in
    4. wait for restore process to complete

    This will overwrite the file mentioned in the device's syslog with an empty one with correct ownership information.

  • Nikias Bassen
  • Toni

    Toni May 31st, 2010 @ 06:03 AM

    Good morning everyone!

    @Niklas:

    I did the procedure you instructed, but it's still no-go.

    Here is log file, if you can that there is something different this time.

  • Nikias Bassen

    Nikias Bassen May 31st, 2010 @ 02:34 PM

    Hi,
    the log does not show anything different. Can you please create another log just as before using idevicesyslog ? This one showed the problem in detail last time.
    Thanks

  • Toni
  • Nikias Bassen

    Nikias Bassen June 1st, 2010 @ 02:52 PM

    Hi, nothing to see in the syslog... make sure to start idevicesyslog before running ideviceinstaller. If you did that, then there's no hint on what's going wrong in the syslog. Sorry. If you had jailbroken your device you could just check and change the permissions but it's up to you.

  • Toni

    Toni June 2nd, 2010 @ 05:45 AM

    Hi Niklas, as mentioned before this phone is not jailbroken any more. Maybe I'll just wait for the next update and try this again.

    Thank you all for your efforts.

  • Nikias Bassen

    Nikias Bassen June 2nd, 2010 @ 07:04 AM

    • State changed from “open” to “invalid”

    OK I'm setting this ticket to invalid since the error is not libimobiledevice/ideviceinstaller-related.

  • Toni

    Toni June 2nd, 2010 @ 07:32 AM

    I'll have to disagree on that since iTunes works just fine (sync, backup and restore). Also ideviceinstaller does list installed software and starts archiving but fails to finish it I do believe the error is very much ideviceinstaller-related.

  • Toni

    Toni June 2nd, 2010 @ 07:52 AM

    I did recheck the last log file attached and for some reason it's different from the one on my disk.

    There for I did run these commands again:

    First terminal:

    idevicesyslog > idevicesyslog.log

    Second terminal:

    ideviceinstaller -a com.logitech.TouchMouse

    The resulting log-file attached. Please consider looking into this before closing this ticket.

  • Martin S.

    Martin S. June 2nd, 2010 @ 09:05 AM

    Hehe, judging from the last log, it's still a permission issue:

    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 store_binary_dict: Could not create /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist: Permission denied
    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 : stat /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist uid=0 gid=501 p=10064
    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 MobileInstallationArchive: Could not store /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist
    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 handle_archive: API failed
    Wed Jun  2 10:41:08 unknown mobile_installation_proxy[613] <Error>: handle_archive: Uninstallation failed
    

    Are you sure you can "install an app" on the device, then sync with iTunes and it will sync the app correctly onto your computer (and create an ipa file)?

    Also this is the request ideviceinstaller makes:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>ApplicationIdentifier</key>
        <string>com.skype.skype</string>
        <key>ClientOptions</key>
        <dict>
            <key>SkipUninstall</key>
            <true/>
        </dict>
        <key>Command</key>
        <string>Archive</string>
    </dict>
    </plist>
    

    It lists SkipUninstall:True, yet still the device appears to try to uninstall during archiving... why?

    I think the easiest fix for you might be to do an erase restore to 3.1.3 and retry it.
    It should fix permissions and traces you might have from older jailbreaks/modifications.

  • Toni

    Toni June 2nd, 2010 @ 09:21 AM

    Hello Martin!

    Yes, I can install an app on iPhone, then sync it to iTunes, even arrange icons in the iTunes and then sync arranged set of icons back to iPhone.

    I tested this the other way around by installing an app into iTunes and then syncing it into iPhone.

    I did full backup and restore with iTunes, but that didn't make any difference. Is it even possible that this is somehow desktop OS related? I'm using Ubuntu 10.4, but I can install whatever OS necessary with VBox.

    Or then we just let this go, and I'll wait the next version and try that :)

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A project around supporting the iPhone in Linux.

See http://libimobiledevice.org

People watching this ticket

Pages