#341 ✓resolved
Christien Rioux

ideviceinstaller doesn't handle apps with symlinks in them

Reported by Christien Rioux | September 26th, 2013 @ 07:12 PM | in 1.2.0 Release

Here's a patch. Some apps (for example, home depot pro) use symlinks to relative paths inside the ipa file. This causes the apps to not install correctly. Fix is inlined here.

diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 3aac8ae..17d6bb8 100644
--- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c @@ -36,6 +36,7 @@ #include #include #include +#include

#include #include @@ -453,7 +454,13 @@ static void afc_upload_dir(afc_client_t afc, const char* path, const char* afcpa strcat(apath, "/"); strcat(apath, ep->d_name);

  • if ((stat(fpath, &st) == 0) && S_ISDIR(st.st_mode)) {
  • if ((lstat(fpath, &st)==0) && S_ISLNK(st.st_mode)) {
  • char *target=(char *)malloc(st.st_size);
  • readlink(fpath,target,st.st_size);
  • afc_make_link(afc,AFC_SYMLINK,target,fpath); +
  • }
  • else if ((stat(fpath, &st) == 0) && S_ISDIR(st.st_mode)) { afc_upload_dir(afc, fpath, apath); } else { afc_upload_file(afc, fpath, apath);

Comments and changes to this ticket

  • Martin S.

    Martin S. October 2nd, 2013 @ 03:35 PM

    • State changed from “new” to “open”
    • Tag set to ideviceinstaller

    Thanks, please attach a proper patch using "git format-patch" or even better, create a pull request on github.com.
    Alternatively you might wait until we add it ourselfs.

  • Christien Rioux

    Christien Rioux October 2nd, 2013 @ 05:22 PM

    Here's the issue. There's code for ideviceinstaller here:
    https://github.com/libimobiledevice/ideviceinstaller
    and another repository that is different here:
    http://cgit.sukimashita.com/ideviceinstaller.git/

    The code in the latter is newer and supports directory upload rather than ipa file upload. I have found experimentally that some IPA files do not install correctly via just the .ipa file upload, and must be installed via the afc_upload_dir method.

    I would issue a pull request on github, but my edits are only valid for the cgit.sukimashita.com repository.
    So i'm attaching a git format-patch to this ticket for your perusal. If the latest code were on github it would be easier.

    Thanks.

    Also, lighthouse app is telling me my 'upload quota is reached please notify the account owner'. So I put the patch on pastebin instead. Here. http://pastebin.com/5zVe4Ecm

  • Martin S.

    Martin S. May 27th, 2014 @ 09:35 AM

    • State changed from “open” to “resolved”
    • Assigned user set to “Martin S.”
    • Milestone set to 1.2.0 Release

    Thanks, fixed in git HEAD.

    This ticket tracker is deprecated as we've moved to github.com/libimobiledevice.

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