#295 open
Quincy

ideviceinstaller workflow: Problems with archiving/reinstallation

Reported by Quincy | October 26th, 2012 @ 12:46 AM | in 1.4.0 Release

I'm currently playing around with the up-to-date libimobiledevice and ideviceinstaller on Linux connecting to a redsn0w jailbroken iPhone 3G iOS 4.2.1

Having a fresh ipa file of any app I can install it using "ideviceinstaller -i ARCHIVE". Then the application is used and some user data is stored. When the app is archived (via "-a APPID" app+user data) and restored at a later point in time ("-r APPID") the full state of the app including user data is restored.
When making a copy of the archive to the connected PC I assume that the file being restored with the -r option is copied unmodified to the PC. When opening it, one can see Payload (=app) and Container (=user data) subdirectories. Trying to use this archive for a reinstallation from the PC fails with the error "Unable to locate Payload folder in archive!".
To my investigation the reason for that is, that the archive coming from the device does not contain the directory entry for "Payload" itself, but the archive listing ("unzip -lv") looks like

0 Stored 0 0% 10-13-2012 22:41 00000000 Payload/<appname>.app/
6700 Defl:N 6705 -0% 10-13-2012 22:40 3f2ff0eb Payload/<appname>.app/<filename>

In contrast to that the original ipa files lists like

0 Stored 0 0% 09-24-2012 22:07 00000000 Payload/
0 Stored 0 0% 10-18-2012 00:28 00000000 Payload/<appname>.app/
737 Stored 737 0% 09-24-2012 22:04 6736c91f Payload/<appname>.app/<filename>

Repacking the file ("zip -r *" in the extracted directory) on the PC yields a zip file which gives a listing similar to the original one with the subdirectories listed (and which is btw much smaller because the phone does no compressing). This one can be processed with "-i ARCHIVE" option. I don't know if this is an artefact of jailbreaking or if the archives are generally missing these directory entries when they are created on the phone.

Additionally there is no user data available after installation from an archive containing app and user data, only the app is installed like using the original archive. So either the behaviour of the installation process is incomplete or there is an option for a complete restore as it is done with archives sitting on the device itself is missing. Currently it is contra intuitive that one can archive apps together with user data, but there is no (direct) way of reinstalling them completely.

Comments and changes to this ticket

  • Martin S.

    Martin S. November 22nd, 2012 @ 11:37 AM

    • State changed from “new” to “open”
    • Tag set to ideviceinstaller, installation_proxy
    • Milestone set to 1.4.0 Release
    • Milestone order changed from “190981” to “0”

    The file is copied unmodified to the PC.
    I think the bug here is rather within the install command which assumes the "Payload" entry needs to be the first entry in the ZIP file.

    The device probably uses a worse compression as that improves performance and is less CPU demanding.

  • Martin S.

    Martin S. January 11th, 2013 @ 07:57 PM

    Please try git master for a fix. The "Payload/*.app" directory will now be located differently which should work for more cases. I noticed that archived IPA files also had a "Container" folder which showed up in the beginning of the zip file list which made installation fail, too.

    That archived apps do not restore their documents might be because we have something missing there or that it will only be restored using the "restore" command, not during "install". Need to investigate further once time allows.

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

Referenced by

Pages