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.

ideviceinstaller doesn't handle apps with symlinks in them

#341

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);

Reported by Christien Rioux · September 26th, 2013 @ 07:12 PM

State: resolved
Milestone: 1.2.0 Release
Assigned to: Martin S. Martin S.

Activity

  1. Martin S.
    Martin S.
    • 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.

    October 2nd, 2013 @ 03:35 PM

  2. Christien Rioux
    Christien Rioux

    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

    October 2nd, 2013 @ 05:22 PM

  3. Martin S.
    Martin S.
    • 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.

    May 27th, 2014 @ 09:35 AM

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.