#258 ✓resolved
viewrain

The latest libimobildevice is not stable working for iOS 5.1

Reported by viewrain | March 16th, 2012 @ 05:30 AM

Hi, all:

I've built libimobiledevice with the latest source code. I tested "ideviceinfo" and "idevicesyslog" against the iPad 2(iOS 5.1). Sometimes it worked, but sometimes there were errors, like this:

$ ideviceinfo GnuTLS error: The request is invalid.
$ ideviceinfo

$ idevicesyslog usbmuxd_send: Error -1 when sending: Broken pipe

$ idevicesyslog GnuTLS error: The request is invalid.

When I saw the "GnutTLS error", I also saw the device system log was: """ Mar 16 13:15:19 Administratormato-iPad lockdownd[26] : 00381000 lockssl_handshake: SSLHandshake returned -9800
Mar 16 13:15:19 Administratormato-iPad lockdownd[26] : 00381000 handle_start_session: Could not enable SSL. Closing connection.
"""

I downloaded the sourcecode http://www.libimobiledevice.org/downloads/libimobiledevice-1.1.1.ta.... I tested on Mac iOS 10.6.8 and Mac iOS 10.7.3 both, and encountered the same issue. The arch is i386.

Thanks

Comments and changes to this ticket

  • Martin S.

    Martin S. March 16th, 2012 @ 11:13 AM

    • State changed from “new” to “open”
    • Tag set to gnutls, ssl
    • Assigned user set to “Martin S.”

    Which is the GNUTLS version you used as this appears to be the issue?

  • viewrain

    viewrain March 19th, 2012 @ 01:59 AM

    I install gnutls by fink.

    i gnutls26 2.10.2-4 GNU TLS encryption library i gnutls26-shlibs 2.10.2-4 GNU TLS encryption library

  • viewrain

    viewrain March 20th, 2012 @ 10:28 AM

    Any update? Have you reproduce the same issue? Thanks a lot.

  • Martin S.

    Martin S. March 20th, 2012 @ 01:26 PM

    Please don't use the 1.1.1 source code as iOS 5+ support is only available in git master for now.
    The next release should fix this issue.

    Meanwhile you can try HEAD:
    http://cgit.sukimashita.com/libimobiledevice.git/snapshot/libimobil...

  • viewrain

    viewrain March 21st, 2012 @ 08:41 AM

    Thanks for your help.
    I got the source code by "git clone http://git.sukimashita.com/libimobiledevice.git"
    It was successful to run "./autogen.sh --without-swig", but failed to make.
    Here's the error log:

    $ make make all-recursive
    Making all in src
    CC idevice.lo CC debug.lo CC userpref.lo CC property_list_service.lo CC device_link_service.lo CC lockdown.lo CC afc.lo CC file_relay.lo CC notification_proxy.lo CC installation_proxy.lo CC sbservices.lo CC mobile_image_mounter.lo CC screenshotr.lo CC mobilesync.lo CC mobilebackup.lo CC house_arrest.lo CC mobilebackup2.lo CC restore.lo CCLD libimobiledevice.la Making all in include
    make[2]: Nothing to be done for `all'.
    Making all in tools
    CC idevice_id-idevice_id.o In file included from idevice_id.c:4:
    ../include/libimobiledevice/libimobiledevice.h:33:25: error: plist/plist.h: No such file or directory In file included from idevice_id.c:5:
    ../include/libimobiledevice/lockdown.h:79: error: expected declaration specifiers or ‘...’ before ‘plist_t’ ../include/libimobiledevice/lockdown.h:80: error: expected declaration specifiers or ‘...’ before ‘plist_t’ ../include/libimobiledevice/lockdown.h:85: error: expected declaration specifiers or ‘...’ before ‘plist_t’ ../include/libimobiledevice/lockdown.h:86: error: expected declaration specifiers or ‘...’ before ‘plist_t’ ../include/libimobiledevice/lockdown.h:90: error: expected declaration specifiers or ‘...’ before ‘plist_t’ idevice_id.c: In function ‘main’:
    idevice_id.c:31: warning: declaration of ‘devname’ shadows a global declaration
    /usr/include/stdlib.h:290: warning: shadowed declaration is here make[2]: [idevice_id-idevice_id.o] Error 1
    make[1]:
    [all-recursive] Error 1
    make: *** [all] Error 2

  • Martin S.

    Martin S. March 21st, 2012 @ 11:27 AM

    Do you have development packages for libplist installed?
    Does the same happen if you do "./configure --prefix=/usr --without-swig"?

    If it still fails, please try to add " $(libplist_CFLAGS)" to tools/Makefile.am on line 3:

    - AM_CFLAGS = $(GLOBAL_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(openssl_CFLAGS) $(LFS_CFLAGS)
    + AM_CFLAGS = $(GLOBAL_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(openssl_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS)
    

    Thanks.

  • viewrain

    viewrain March 22nd, 2012 @ 05:25 AM

    Hi, Martin:
    It works for me if I add " $(libplist_CFLAGS)" to tools/Makefile.am on line 3: - AM_CFLAGS = $(GLOBAL_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(openssl_CFLAGS) $(LFS_CFLAGS) + AM_CFLAGS = $(GLOBAL_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(openssl_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS)

    Thanks for your help!

    But the same issues occurs on the latest ideviceinstaller. I get the source code by "git clone git://git.sukimashita.com/ideviceinstaller.git". When I ran "ideviceinstaller -l" against iOS 5.1 device, sometimes it works, sometimes no output, sometimes get: """ GnuTLS error: The request is invalid.
    Could not connect to lockdownd. Exiting.
    """

    Would you please help to solve the problem?

    Thanks.

  • Martin S.

    Martin S. March 22nd, 2012 @ 12:05 PM

    This is very OS X specific, you appear to have the libraries scattered around the system.

    The ideviceinstaller problem most likely shows that you compiled ideviceinstaller against an old libimobiledevice that is somewhere on your system.

    Make sure to remove all installations, build and install a fresh libimobiledevice, then build ideviceinstaller again.

    Latest libimobiledevice git master also allows to use OpenSSL instead of GNUTLS which you might try, too.

  • viewrain

    viewrain March 23rd, 2012 @ 03:06 AM

    Thanks.
    I encountered another problem when rebuilt the ideviceinstaller from the latest sourcecode. I could run "./configure" successfully, but failed to make:

    $ make make all-recursive
    Making all in src
    CC ideviceinstaller-ideviceinstaller.o ideviceinstaller.c: In function ‘zip_f_get_contents’:
    ideviceinstaller.c:166: error: ‘LLONG_MAX’ undeclared (first use in this function)
    ideviceinstaller.c:166: error: (Each undeclared identifier is reported only once
    ideviceinstaller.c:166: error: for each function it appears in.)
    make[2]: [ideviceinstaller-ideviceinstaller.o] Error 1
    make[1]:
    [all-recursive] Error 1
    make: *** [all] Error 2

  • Martin S.

    Martin S. March 23rd, 2012 @ 09:53 AM

    Hmm, could you try to add "#include <limits.h>" at the top (line 36) of src/ideviceinstaller.c?

  • viewrain

    viewrain March 26th, 2012 @ 05:43 AM

    Thanks, Martin. I've added "#include <limits.h>" at the top (line 36) of src/ideviceinstaller.c. And it works for me now~~

  • Martin S.

    Martin S. March 27th, 2012 @ 09:50 AM

    • State changed from “open” to “resolved”

    Thanks for testing. Pushed changes to master repositiories.

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

Tags

Pages