Giter Site home page Giter Site logo

libimobiledevice / libimobiledevice Goto Github PK

View Code? Open in Web Editor NEW
6.4K 248.0 1.3K 3.38 MB

A cross-platform protocol library to communicate with iOS devices

Home Page: https://libimobiledevice.org

License: GNU Lesser General Public License v2.1

Shell 0.07% C 86.33% Makefile 0.83% M4 3.83% Cython 8.67% Python 0.27%
ios protocol library c lockdownd

libimobiledevice's Introduction

libimobiledevice

A library to communicate with services on iOS devices using native protocols.

Features

libimobiledevice is a cross-platform software library that talks the protocols to interact with iOS devices.

Unlike other projects, it does not depend on using any existing proprietary libraries and does not require jailbreaking.

Some key features are:

  • Interface: Implements many high-level interfaces for device services
  • Implementation: Object oriented architecture and service abstraction layer
  • Cross-Platform: Tested on Linux, macOS, Windows and Android platforms
  • Utilities: Provides various command-line utilities for device services
  • SSL: Allows choosing between OpenSSL, GnuTLS, or MbedTLS to handle SSL communication
  • Network: Supports network connections with "WiFi sync" enabled devices
  • Python: Provides Cython based bindings for Python

The implemented interfaces of many device service protocols allow applications to:

  • Access filesystem of a device
  • Access documents of file sharing apps
  • Retrieve information about a device and modify various settings
  • Backup and restore the device in a native way compatible with iTunes
  • Manage app icons arrangement on the device
  • Install, remove, list and basically manage apps
  • Activate a device using official servers
  • Manage contacts, calendars, notes and bookmarks
  • Retrieve and remove crashreports
  • Retrieve various diagnostics information
  • Establish a debug connection for app debugging
  • Mount filesystem images
  • Forward device notifications
  • Manage device provisioning
  • Take screenshots from the device screen (requires mounted developer image)
  • Simulate changed geolocation of the device (requires mounted developer image)
  • Relay the syslog of the device
  • Expose a connection for WebKit remote debugging

... and much more.

The library is in development since August 2007 with the goal to bring support for these devices to the Linux Desktop.

Installation / Getting started

Debian / Ubuntu Linux

First install all required dependencies and build tools:

sudo apt-get install \
	build-essential \
	pkg-config \
	checkinstall \
	git \
	autoconf \
	automake \
	libtool-bin \
	libplist-dev \
	libusbmuxd-dev \
	libimobiledevice-glue-dev \
	libssl-dev \
	usbmuxd

If you want to optionally build the documentation or Python bindings use:

sudo apt-get install \
	doxygen \
	cython

Then clone the actual project repository:

git clone https://github.com/libimobiledevice/libimobiledevice.git
cd libimobiledevice

Now you can build and install it:

./autogen.sh
make
sudo make install

If you require a custom prefix or other option being passed to ./configure you can pass them directly to ./autogen.sh like this:

./autogen.sh --prefix=/opt/local --enable-debug
make
sudo make install

By default, OpenSSL will be used as TLS/SSL library. If you prefer GnuTLS, configure with --with-gnutls like this:

./autogen.sh --with-gnutls

MbedTLS is also supported and can be enabled by passing --with-mbedtls to configure. If mbedTLS is not installed in a default location, you need to set the environment variables mbedtls_INCLUDES to the path that contains the MbedTLS headers and mbedtls_LIBDIR to set the library path. Optionally, mbedtls_LIBS can be used to set the library names directly. Example:

./autogen.sh --with-mbedtls mbedtls_INCLUDES=/opt/local/include mbedtls_LIBDIR=/opt/local/lib

Usage

Documentation about using the library in your application is not available yet. The "hacker way" for now is to look at the implementation of the included utilities.

Utilities

The library bundles the following command-line utilities in the tools directory:

Utility Description
idevice_id List attached devices or print device name of given device
idevicebackup Create or restore backup for devices (legacy)
idevicebackup2 Create or restore backups for devices running iOS 4 or later
idevicebtlogger Capture Bluetooth HCI traffic from a device (requires log profile)
idevicecrashreport Retrieve crash reports from a device
idevicedate Display the current date or set it on a device
idevicedebug Interact with the debugserver service of a device
idevicedebugserverproxy Proxy a debugserver connection from a device for remote debugging
idevicediagnostics Interact with the diagnostics interface of a device
ideviceenterrecovery Make a device enter recovery mode
ideviceimagemounter Mount disk images on the device
ideviceinfo Show information about a connected device
idevicename Display or set the device name
idevicenotificationproxy Post or observe notifications on a device
idevicepair Manage host pairings with devices and usbmuxd
ideviceprovision Manage provisioning profiles on a device
idevicescreenshot Gets a screenshot from the connected device
idevicesetlocation Simulate location on device
idevicesyslog Relay syslog of a connected device
afcclient Interact with device filesystem via AFC/HouseArrest

Please consult the usage information or manual pages of each utility for a documentation of available command line options and usage examples like this:

ideviceinfo --help
man ideviceinfo

Contributing

We welcome contributions from anyone and are grateful for every pull request!

If you'd like to contribute, please fork the master branch, change, commit and send a pull request for review. Once approved it can be merged into the main code base.

If you plan to contribute larger changes or a major refactoring, please create a ticket first to discuss the idea upfront to ensure less effort for everyone.

Please make sure your contribution adheres to:

  • Try to follow the code style of the project
  • Commit messages should describe the change well without being too short
  • Try to split larger changes into individual commits of a common domain
  • Use your real name and a valid email address for your commits

We are still working on the guidelines so bear with us!

Links

License

This library and utilities are licensed under the GNU Lesser General Public License v2.1, also included in the repository in the COPYING file.

Credits

Apple, iPhone, iPad, iPod, iPod Touch, Apple TV, Apple Watch, Mac, iOS, iPadOS, tvOS, watchOS, and macOS are trademarks of Apple Inc.

This project is an independent software and has not been authorized, sponsored, or otherwise approved by Apple Inc.

README Updated on: 2023-12-30

libimobiledevice's People

Contributors

aburgh avatar aumuell avatar bryanforbes avatar cfergeau avatar corsac-s avatar dki avatar dnicolson avatar dogben avatar doggkruse avatar funkym avatar fxchip avatar hadess avatar jonathanbeck avatar kabiroberai avatar kekiefer avatar knot avatar mcolyer avatar mringwal avatar neheb avatar nikias avatar orbea avatar posixninja avatar qmfrederik avatar saurik avatar tatsh avatar tmzullinger avatar tomriddly avatar upbit avatar wendyisgr33n avatar zbalaton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libimobiledevice's Issues

ideviceprovision quietly fails [temperamental]

Hi,

Ubuntu 13.10 with latest compiled master branch (1.1.6).
Trust is correctly accepted. All other tools apart from screenshot (no dev image), works as expected.

However ideviceprovision returns a empty list of provisioning profiles (There are currently 6 installed). Fails to install provisioning profiles (The profile is sound) and fails to copy them. No error is produced, it simply quietly exits. Have also attempted the -d switch, no change.

The device is a first gen iPad Mini running the latest iOS 7 build.

This can be seen in the logs of the device each time such command is ran.

Jan  2 11:18:28 Emmets-iPad misagent[481] : 00201000 accept_with_timeout: Timed out waiting for a connection
Jan  2 11:18:28 Emmets-iPad misagent[481] : Could not check in with lockdown at 'xpc': 1

Let us know if you need any more info.

And ofcourse after testing all morning it finally worked as I wrote this issue.
However its very temperamental. Sometimes it returns nothing, other times it returns the list. So you have to bash the command until prints something out.

Install is now failing with an error "profile not valid: 0xe8008003"
I am able to install the profile if sent via email. Also the profile is a configuration profile, incase that makes a difference.

Remove profile fails with 0xe800800b

Jan  2 11:54:14 Emmets-iPad wifid[15] : WiFi:[410356454.776492]: Already connected to SDL-2G.
Jan  2 11:54:14 Emmets-iPad wifid[15] : WiFi:[410356454.778534]: Auto join ENABLED by "Preferences"
Jan  2 11:54:15 Emmets-iPad Preferences[387] : void unloadAPTableCellImages(): unloading images
Jan  2 11:54:28 Emmets-iPad misagent[580] : profile not valid: 0xe8008003
Jan  2 11:54:31 Emmets-iPad misagent[579] : 00141000 accept_with_timeout: Timed out waiting for a connection
Jan  2 11:54:31 Emmets-iPad misagent[579] : Could not check in with lockdown at 'xpc': 1
Jan  2 11:54:36 Emmets-iPad misagent[581] : 00201000 accept_with_timeout: Timed out waiting for a connection
Jan  2 11:54:36 Emmets-iPad misagent[581] : Could not check in with lockdown at 'xpc': 1
Jan  2 11:54:41 Emmets-iPad wifid[15] : WiFi:[410356481.440965]: Low Accuracy Location Monitoring Timer Expired
Jan  2 11:54:41 Emmets-iPad wifid[15] : WiFi:[410356481.442022]: Failed to get location information; setting locale to default locale
Jan  2 11:54:41 Emmets-iPad wifid[15] : WiFi:[410356481.442841]: new locale:  , locale: 
Jan  2 11:54:41 Emmets-iPad wifid[15] : WiFi:[410356481.443598]: Stopping Low Accuracy Location Monitoring
Jan  2 11:54:41 Emmets-iPad wifid[15] : WiFi:[410356481.444909]: CLMonitoring is already stopped
Jan  2 11:54:41 Emmets-iPad wifid[15] : WiFi:[410356481.445289]: Stopping Low Accuracy Location Monitoring
Jan  2 11:54:41 Emmets-iPad wifid[15] : WiFi:[410356481.445689]: CLMonitoring is already stopped
Jan  2 11:54:50 Emmets-iPad wifid[15] : WiFi:[410356490.931570]: WiFiLocaleManagerCheckLocale: trying to determine locale...
Jan  2 11:54:50 Emmets-iPad wifid[15] : WiFi:[410356490.932092]: WiFiManagerCoreLocationGetCachedLocation: getting cached location...
Jan  2 11:54:50 Emmets-iPad wifid[15] : WiFi:[410356490.932850]: Starting Low Accuracy Location Monitoring, locationMonitoringTimeout=60.000000
Jan  2 11:54:50 Emmets-iPad wifid[15] : WiFi:[410356490.933577]: WiFiManagerCoreLocationStartLocationUpdates: starting location updates...
Jan  2 11:54:50 Emmets-iPad wifid[15] : WiFi:[410356490.934319]: Location Monitoring successfully started with accuracy=3000.000000meters
Jan  2 11:54:50 Emmets-iPad wifid[15] : WiFi:[410356490.937052]: __WiFiLocationServiceManagerEventCallback, got cb dict  {
Jan  2 11:54:50 Emmets-iPad wifid[15] :   eventType : 0
Jan  2 11:54:50 Emmets-iPad wifid[15] :   location : <+54.59745372,-5.93018117> +/- 65.00m (speed -1.00 mps / course -1.00) @ 1/2/14, 11:54:50 AM Greenwich Mean Time
Jan  2 11:54:50 Emmets-iPad wifid[15] : }

Never mind the issue with installing profile. This only works for provisioning profiles. (You wouldnt happen to know howto install configuration profiles?). Im leaving this issue here as the all the profile related commands are still intermittent.

Cheers,
Emmet

idevicebackup2 backup -- ErrorCode 104: Error removing snapshot directory

It seems backup is almost finished. But, removing snapshot has trouble and cause backup failed. The followings are print out from console.

[==================================================] 100% Finished
Moving 128 files
[==================================================] 100% Finished
Moving 15 files
[==================================================] 100% Finished
Moving 1 file
[==================================================] 100% Finished
Moving 1 file
[==================================================] 100% Finished
[==================================================] 100% Finished
Removing 1 file
Could not remove 'tmp/origin_1/3479d2dacfc1dd6b673a49ca1be89611913a64ec/Snapshot': Directory not empty (39)
[==================================================] 100% Finished
ErrorCode 104: Error removing snapshot directory (MBErrorDomain/104). Underlying error: Directory not empty (MBErrorDomain/100).
Received 9069 files from device.
Backup Failed (Error Code 104).

Here is another device with same trouble. Attach Status.plist for reference:

UUID 84006397-D01C-4608-9DE2-D496A06FBE87 IsFullBackup Version 2.4 BackupState new Date 1983-02-10T20:44:20Z SnapshotState removing

Appreciate for any feedback.

Device not found in ideviceinfo/ifuse but reboots with irecovery -c "reboot"

Fedora 20, latest libimobiledevice, usbmuxd, ifuse, libplist.
usbmuxd is running and responds to connections:

Loaded: loaded (/usr/lib/systemd/system/usbmuxd.service; static)
Active: active (running) since Sun 2014-04-13 14:45:19 ART; 20min ago
Main PID: 23769 (usbmuxd)
CGroup: /system.slice/usbmuxd.service
           └─23769 /sbin/usbmuxd -v -v -u -U usbmuxd
...
Apr 13 15:01:22 sebita usbmuxd[23769]: [4] New client on fd 15
Apr 13 15:01:22 sebita usbmuxd[23769]: [4] Client 15 connection closed
Apr 13 15:01:22 sebita usbmuxd[23769]: [4] Disconnecting client fd 15
Apr 13 15:01:41 sebita usbmuxd[23769]: [4] New client on fd 15
Apr 13 15:01:41 sebita usbmuxd[23769]: [4] Client 15 connection closed
Apr 13 15:01:41 sebita usbmuxd[23769]: [4] Disconnecting client fd 15

idevicerestore starts restoration, sends iBEC, reboots phone, etc. Then stops responding when waiting for device to continue:

Attempt x to connect to restore mode device...

ifuse doesn't mount, ideviceinfo doesn't see the device, "idevice_id -l" shows nothing.
"irecovery -s" just shows > prompt, no response, no output.

Win32 compile link error

I got linker error when tried to compile on Win7 with Mingw&MSYS.

Needs to link Ws2_32 library also on common/Makefile.am:
if WIN32
libinternalcommon_la_LIBADD += -lole32 -lWs2_32
endif

IOS7 pairing

I have managed to build 1.1.6 on an arm device running Debian...and I can pair and trust computer..and access iPhone5...however...whenever I unplug the iPhone and plug it back in, I have to trust the computer again. Why won't iPhone remember the trust? Another way: How can I make this trust persistent?

idevice commands fail on Linux when /var/lib/lockdown pre-exists

With the latest trustdialog code, all the idevice commands fail on Linux (regardless of iOS version) because /var/lib is only writable by root. To get the idevice commands working on Linux, I needed to do:

sudo mkdir /var/lib/lockdown
sudo chmod 777 /var/lib/lockdown

Maybe these commands could be added to make install or the code could choose another (usually writable directory).

Regardless, when /var/lib is not writable, the commands silently produce no output. They should produce an error message to the user directing them to the exact problem: that the userpref directory is not writable.

ideviceinstaller does not work on iOS 7.1 Beta 1

I am using an iPhone 5S. The ideviceinstaller worked fine when the iOS version was 7.0.3

I just upgraded the iOS version on my device to 7.1 beta 1. And ideviceinstaller fails with the message "Could not start com.apple.mobile.installation_proxy!"

On looking at the device console log, i see:

Nov 19 20:35:29 10-1-30-218 lockdownd[25] : 001f4000 _send_message: Could not send secure message.
Nov 19 20:35:33 10-1-30-218 mobile_installation_proxy[109] : 00384000 accept_with_timeout: Timed out waiting for a connection
Nov 19 20:35:33 10-1-30-218 mobile_installation_proxy[109] : Could not check in with lockdown at 'xpc': 1

Segfault

Hi,

I got everything with the last versions and compiled with no errors. But when I plug the device, I get the segfault error below. How do I fix that?

[ 4490.782646] lt-ideviceinfo[26180]: segfault at 0 ip 00007f6c5b75e111 sp 00007fffd4e6b4e8 error 4 in libc-2.15.so[7f6c5b6d5000+1b5000]

My scenario is:

  • Ubuntu 12.04.4 LTS
  • libimobiledevice 1.1.6
  • libplist 1.11
  • libusbmuxd 1.0.9

Undefined symbols for architecture

I was installing libimobledevice on my mac when i encountered this error:

Undefined symbols for architecture x86_64:
"_debug_buffer", referenced from:
_afc_dispatch_packet in afc.o
_afc_receive_data in afc.o
_afc_file_lock in afc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libimobiledevice.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I have searched and searched but can not find a solution. Can anyone please help?

libimobiledevice ios7 compatibility on Mac OS X

We have an app running on iOS device (iPad) and a simple c++ daemon on a mac that copies a file to the iOS device when it's connected via USB. On iOS6 it works great, however in iOS7 it gets to the afc_get_device_info() and exits. No error message, no warning. I've already clicked "trust this device" on the iPad, however the error persists. I've downloaded the latest libimobiledevice and recompiled the daemon - no difference. are there any requirements that were updated? libusb? libplist?
edit: osx 10.8.4

idevicebackup2 v1.1.5 not detecting plists in backup directory

Successful backup of iPad1 with iOS 5.1.5 with Ubuntu 13.10. However, cannot get backup info, restore, or unback.

$ /usr/bin/idevicebackup2 info affa3e6e312e30374f771f9ad81ac61a########/
ErrorCode 4: No such file or directory at path "affa3e6e312e30374f771f9ad81ac61a########/Status.plist" (MBErrorDomain/4)

$ sudo /usr/bin/idevicebackup2 restore affa3e6e312e30374f771f9ad81ac61a########/
ERROR: Backup directory "affa3e6e312e30374f771f9ad81ac61a########/" is invalid. No Info.plist found for UDID affa3e6e312e30374f771f9ad81ac61a########.

$ /usr/bin/idevicebackup2 unback affa3e6e312e30374f771f9ad81ac61a########/
Backup directory is "affa3e6e312e30374f771f9ad81ac61a########/"
Started "com.apple.mobilebackup2" service on port 49463.
Negotiated Protocol Version 2.1
Starting to unpack backup...
ErrorCode 205: Error reading backup properties (MBErrorDomain/205). Underlying error: No such file or directory at path "affa3e6e312e30374f771f9ad81ac61a########/Manifest.plist" (MBErrorDomain/4).
The files can now be found in the "unback" directory.
Unback Successful.

$ ls affa3e6e312e30374f771f9ad81ac61a########/.
affa3e6e312e30374f771f9ad81ac61a########/Info.plist
affa3e6e312e30374f771f9ad81ac61a########/Manifest.mbdb
affa3e6e312e30374f771f9ad81ac61a########/Manifest.plist
affa3e6e312e30374f771f9ad81ac61a########/Status.plist

additional recursive operations in afc protocol

I did some reversing in the afc server binary for iOS 6.x and 7.x as a result of an issue opened up on the ruby idevice bindings -- (adamely/idevice#1) -- this had to do with recursive AFC operations.

There appear to be several AFC_OP_ constants that are not defined/implemented in libimobiledevice, but present in the afc protocol (at least the versions I looked at) -- wonder if these were intentionally passed over for some reason, or if not... would it be worth adding them?

using the same basic naming convention and comments format as in src/afc.h

AFC_OP_PATH_CONTENTS_SIZE      = 0x00000021, /* GetSizeOfPathContents */
AFC_OP_REMOVE_PATH_RECURSIVELY = 0x00000022, /* RemovePathAndContents */
AFC_OP_OPENDIR         = 0x00000023,    /* DirectoryEnumeratorRefOpen */
AFC_OP_OPENDIR_RESULT  = 0x00000024,    /* DirectoryEnumeratorRefOpenResult */
AFC_OP_READDIR         = 0x00000025,    /* DirectoryEnumeratorRefRead */
AFC_OP_CLOSEDIR        = 0x00000026,    /* DirectoryEnumeratorRefClose */

Note also: there's these that were also apparently not added:

AFC_OP_FILE_HASH       = 0x0000001D,    /* GetFileHash */

...

AFC_OP_FILE_HASH_RANGE = 0x0000001F,    /* GetFileHashWithRange */
AFC_OP_FILE_SET_IMMUTABLE_HINT = 0x00000020, /* FileRefSetImmutableHint */

idevice commands from trustdialog branch failing on iOS 6.1.2

I'm giving the new trustdialog branch a try and found several of the idevice commands, including ideviceinfo and idevicedate failing on my iOS6 iPhone, where the master branch works perfectly fine. A little debugging shows me lockdownd_client_new_with_handshake is failing consistently. I can provide additional debugging details, but before I do, I should probably ask: is the trustdialog branch expected to be backwards compatible with iOS6 at all?

Incorrect use of BIO* resulting crash

On userpref.c, userpref_device_record_gen_keys_and_cert(const char* udid)

called:
root_cert_pem.size = BIO_get_mem_data(membp, &root_cert_pem.data);

and later tryed to free it by calling:
free(root_cert_pem.data);
resulting instant crash on windows.

Actually bio data should be copied to root_pem.data, and free BIO
BUF_MEM *bptr;
BIO_get_mem_ptr(membp, &bptr);

root_key_pem.data = (char*) malloc(bptr->length);
memcpy(root_key_pem.data, bptr->data, bptr->length);

BIO_free(membp);
membp = NULL;

// and finally
free(root_cert_pem.data);

usbmuxd_send Broken pipe

I have used the "new" usbmuxd to take over the trust dialog box and ran ipheth.ko to communicate with iphone (IOS7.04). now I can access internet with iphone tethering.
But I often find these log to prevent the pair successfully.

br0: port 2(ipeth0) entering learning state
br0: topology change detected, propagating
br0: port 2(ipeth0) entering forwarding state
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe


usbmuxd_send: Error -1 when sending: Broken pipe
GnuTLS error: Error in the push function.
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_get_result: Received packet is too small!
usbmuxd_connect: Connect failed, Error code=-1

define inline debug functions where they are declared

I believe it is recommended practice to always defined inline functions when declaring them. The debug.h header, however, declares some inline functions that it does not define itself --- they are defined instead in debug.c. I am trying to setup libimobiledevice to build on our internal build system at Google, and the inline declaration without definition is preventing me from doing this. Maybe I'm missing the magic flag to make this OK. I am far from a C expert (perhaps I should wrangle someone here that is), but maybe consider defining the inline functions when they are declared. Any guesses about the kind of compiler or linking options that help the compiler find the inline definitions would be appreciated, too.

When comes libimobiledevice 1.1.6 with support for iOS 7?

I encountered an error "Trust dialog loop" in iOS 7. This critical request. Many people got this error. In other such issues, you said that the problem is solved and changes committed in master branch. When can we expect the next release of your library? Any other projects or problems prevent release?

Can't install

Sorry ìf this is a dump question. I can't install the tar.gz.

When I ./configure:

ooker@Ooker-Aspire-4741 ~/Desktop/libimobiledevice-1.0.7 $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /home/ooker/Desktop/libimobiledevice-1.0.7': configure: error: C compiler cannot create executables Seeconfig.log' for more details

When I make:
ooker@Ooker-Aspire-4741 ~/Desktop/libimobiledevice-1.0.7 $ make
make: *** No targets specified and no makefile found. Stop.

I think the problem is old because someone has asked before: http://askubuntu.com/questions/120319/how-do-i-install-libimobiledevice

Please help. Thank you.

Move doxygen comments to public header files

Xcode 5 on OS X will parse source files for doxygen comments and create dynamic documentation for use in the editor (e.g., Option-click on a function name to get a pop-up window with the doxygen description of the function). Currently, doxygen comments are attached to the definitions, so they are not visible to Xcode when using the library in another app. Thus the question, can they be moved to the public headers?

Technically, I don't see any issue. In fact, the Makefile is already configured to look at both header and implementation files for doxygen. Is there any objection to doing so, either out of preference or for stylistic reasons? If not, I will create a patch, but I want to confirm it would accepted before taking time to do it.

Thanks.

libimobiledevice for win32

The source for "libimobiledevice (DLL,LIB) for Win32 (inoffical)" points to an invalid website. Can you please get that fixed? Refer to screenshot for details.

libimobiledevice org

libimobiledevice win32

get problem with afc_receive_data() function

I build libimobiledevice in windows 32bit with VS2008 ,when I build the afccheck.c and ideviceinstaller.c , I mean the program can run ,but It failed when the afc_receive_data() function called .
the error information below:
internal_plist_receive_timeout>>received 334 bytes
afc_lock>>Locked
afc_dispatch_packet>>doin things the old way
afc_dispatch_packet>>packet length = 66
service_send>>sending 40 bytes
afc_dispatch_packet>>packet data follows
service_send>>sending 26 bytes
internal_connection_receive_timeout>>ERROR: usbmuxd_recv_timeout returned -11 (Resource temporarily unavailable)
service_receive_with_timeout>>could not read data
afc_receive_data>>Just didn't get enough.
afc_file_open>>Didn't get any further data
afc_unlock>>Unlocked
Write operation failed
afc_lock>>Locked

is the afc_receive_data ,It can not receive data ,Is the send packet wrong in windows?

need some help ,

tkg _ 3 7y64eb 6_nu wi

Compile error

Hello,
I made a 'pull' and got error on 'make':

Undefined symbols for architecture x86_64:
"_debug_buffer", referenced from:
_afc_dispatch_packet in afc.o
_afc_receive_data in afc.o
_afc_file_lock in afc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libimobiledevice.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

ErrorCode 1: Error copying keychain data (MBErrorDomain/1)

Hi, I meet the error :ErrorCode 1: Error copying keychain data (MBErrorDomain/1)
The iphone has a passcode.
When I enter the correct passcode and unlock the iphone, I can run the idevicebackup2 and get some backup data successfully.
But it can't run until the iphone come into lock mode again.

In a period iphone come into lock mode, Then idevicebackup print the error code:
ErrorCode 1: Error copying keychain data (MBErrorDomain/1)

I test the AppleMobileBackup of itunes, and it can finished in the same situation.
Can u please fix this?

ios:6.1.2
host:windows7
libimobiledevice:1.1.5

Cannot open shared library libmobiledevice.so.4

hello,
i'm using linux mint and tried to install new libmobiledevice

installation was without errors, but i can't use anything:
"error while loading shared libraries: libmobiledevice.so.4: cannot open shared object file: No such file or directory"

Where i should look for it?

i checked /usr/local/lib - and there i can see libmobiledevice.so.4 and libmobiledevice.so.4.0.1

installation was in /usr/local

Can't Mount iOS devices on Fedora 19 with latest libimobiledevice/ifuse/etc

I have removed the yum packages for libimobiledevice, ifuse, and usbmuxd. Have got the latest from github and installed libplist, libusbmuxd, libimobiledevice, ifuse, and usbmuxd. I run
sudo usbmuxd -f -v
and then run
sudo ifuse -o -ro -u deviceSn /mnt/src1
When I try and do an "ls /mnt/src1" I get "Transport endpoint is not connected"

The usbmuxd screen shows the following when the ifuse command is run:
[06:17:54.362][4] New client on fd 14
[06:17:54.364][4] Client 14 connection closed
[06:17:54.364][4] Disconnecting client fd 14
[06:17:54.364][4] New client on fd 14
[06:17:54.372][4] New client on fd 15
[06:17:54.374][4] New client on fd 20
[06:17:54.385][4] New client on fd 21
[06:17:54.393][4] New client on fd 22
[06:17:54.954][4] Disconnecting client fd 14
[06:17:54.954][4] Client 15 connection closed
[06:17:54.954][4] Disconnecting client fd 15
[06:17:54.954][4] Client 20 connection closed
[06:17:54.954][4] Disconnecting client fd 20
[06:17:54.954][4] Client 21 connection closed
[06:17:54.954][4] Disconnecting client fd 21
[06:17:54.954][4] Client 22 connection closed
[06:17:54.954][4] Disconnecting client fd 22

SIGSEGV from unexpected lockdown result in lockdownd_get_value()

If a lockdownd_get_value() request returns a plist with an error instead of a value, the function attempts to dereference NULL. I reproduced the error by running the commands below with a device connected over wifi to an OS X machine (over USB, the request is allowed, which may be an interesting observation):

$  idevice_id -l
abcdef...
$ idevice_id -d --udid abcdef...

The tail of the output of the second command is:

10:32:42 /Users/aburgh/Projects/iPhone/libimobiledevice/src/property_list_service.c:154 internal_plist_send(): printing 327 bytes plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>idevice_id</string>
    <key>Key</key>
    <string>DeviceName</string>
    <key>Request</key>
    <string>GetValue</string>
</dict>
</plist>
10:32:42 /Users/aburgh/Projects/iPhone/libimobiledevice/src/property_list_service.c:234 internal_plist_receive_timeout(): initial read=4
10:32:42 /Users/aburgh/Projects/iPhone/libimobiledevice/src/property_list_service.c:243 internal_plist_receive_timeout(): 330 bytes following
10:32:42 /Users/aburgh/Projects/iPhone/libimobiledevice/src/property_list_service.c:256 internal_plist_receive_timeout(): received 330 bytes
10:32:42 /Users/aburgh/Projects/iPhone/libimobiledevice/src/property_list_service.c:282 internal_plist_receive_timeout(): printing 330 bytes plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Error</key>
    <string>GetProhibited</string>
    <key>Key</key>
    <string>DeviceName</string>
    <key>Request</key>
    <string>GetValue</string>
</dict>
</plist>
10:32:42 /Users/aburgh/Projects/iPhone/libimobiledevice/src/lockdown.c:108 lockdown_check_result(): ERROR: GetProhibited
fish: Job 1, 'idevice_id -d (idevice_id -l)' terminated by signal SIGSEGV (Address boundary error)

The problem is in lockdown.c at line 442. Here is the code starting at line 437:

    /* Now get device's answer */
    ret = lockdownd_receive(client, &dict);
    if (ret != LOCKDOWN_E_SUCCESS)
        return ret;

    if (lockdown_check_result(dict, "GetValue") == RESULT_SUCCESS) {
        debug_info("success");
        ret = LOCKDOWN_E_SUCCESS;
    }
    if (ret != LOCKDOWN_E_SUCCESS) {
        plist_free(dict);
        return ret;
    }

As it is, the code that follows sets the return value to NULL but returns LOCKDOWN_E_SUCCESS. The caller in this case, lockdownd_get_device_name(), confirms the return value is success and assumes that a value was returned.

The if statement which calls lockdown_check_result() should probably have an else clause that sets ret to an error value. LOCKDOWN_E_GET_VALUE_PROHIBITED would be appropriate for my case, but I doubt that is a safe assumption, so lockdown_check_result() should either return a generic error or return a more specific one based on the value of the Error key in the response.

Issues with Cython HouseArrestClient

The new cython bindings are great. In working with HouseArrestClient, I've come across two minor issues:

  1. Most methods in the cython bindings are declared as cpdef and thus callable by python. HouseArrestClient.send_request() and HouseArrestClient.send_command() methods in are marked as cdef so you can't call them except from other cython code.
  2. HouseArrestClient.to_afc_client() wants to be able to create an AfcClient object without calling the body of AfcClient.__cinit__(), instead initializing it with an instance of afc_client_t created via afc_client_new_from_house_arrest_client(). Since we can't just overload __cinit__ constructors, one solution would be to provide default parameters for the constructor and don't execute the standard initializer if they are left are blank.

I've put together a really simple patch that addresses these issues and makes HouseArrestClient functional via python, and can submit it if you'd like.

Thanks!

Kurt

ipad air stuck in trust/don't trust loop?

Using an iPad Air with iOS 7.0.3:
Gnome keeps telling me that it is failing to mount the iPad,
while the iPad keeps asking me if I can trust/don't trust
the computer.
When trying with ifuse, the iPad asks if I can trust/don't trust
the computer, and the computer says
"Please disable the password protection ...."
even when password protection is OFF.
The pad is jailbreaked.
libimobiledevice 1.1.5
ifuse 1.1.2
usbmuxd 1.0.8

iOS 7 Compatibility / Trust Dialog handling

Hi, i just wanted to drop you note, since for other project i'm working on, i finally managed to finish correct handling of device trusthip.

first, there is little difference in pairing plist
you need to add 2 fields
at end of pair record dictionary
SystemBUID - plString - it's 26 numbers (at least, that is sent by itunes), or might be 10-16 (eg 27. characters, still 26 numbers split by dash) - this value must be persistent (like HostID)
Pair request (as well as validate request), need to have
ProtocolVersion - plString - value is 2

difference is also in pairing itself
first you call VerifyPairing - if it's first time, you will receive invalid HostID error and then call Pair method
if you receive password protected error, check for ProductVersion, if it's 7 (eg. ios 7), you send Pair request - if it fails, with password protected error - retry (in my app, i'm doing 5 retries with 5 sec pause between - device disconnects lockdown service after 30 sec automaticaly)

after users confirms trust on device, device automatically resets USB after user confirms trust.

next time verifypairing should go without issues.

Please note, that if you disconnect lockdown link after verify, prior succesfull pairing, you need to start whole process again.
If you start with Pair request, after initializiing lockdown, device will show "trust this connection" dialog. that's why you need to start with Verify operation.

following values are for sure available regardless trustship status
DeviceUniqueID
ProductType
ProductClass
ProductVersion
DeviceName - James' iphone

changing order of operation (verify then pair) works with ios 4 devices also (iphone 3g was available for my test), SystemBUID and ProtocolVersion is either ignore, or understood by ios 4 devices, so there is no need to make extra chane in pair record for devices running ios4, i had no ios 3 device at hand, so can't say, if they work.

idevicedate.c not able to sync(set time of device to current system time)

Hi,
I have tried to git clone libimobiledevice by
git clone http://git.sukimashita.com/libimobiledevice.git

compile code and go to libimobiledevice/tools to test idevicedate

~$ ./idevicedate -c
Tue Sep 3 18:58:18 CST 2013

The connected iphone 3GS does not affect its time.

~$ ./idevicedate -s '1378205962'
Tue Sep 3 18:59:22 CST 2013

This way is same. The connected iphone 3GS does not affect its time, either.

I have also tried latest idevicedate.c from following link:
http://cgit.sukimashita.com/libimobiledevice.git/tree/tools/idevicedate.c?id=f40f19078a9a694558126d8e1da5e5b109ea5e5b

Result is same.

Could not get idea on how to sync time and set timestamp back to iphone.
May I ask how to do both?

Thank you for your time.

webinspector_receive_with_timeout returns WEBINSPECTOR_E_PLIST_ERROR if message too long

Transfering bug from deprecated bug tracker. See http://libiphone.lighthouseapp.com/projects/27916-libiphone/tickets/336

libimobiledevice 1.1.5
libplist 1.10
usbmuxd 1.0.8

I successfully use webinspector service with mobile safari. But I think, that there is a bug, when I try to receive bigger message.

For instance if I send:
{id":183,"method":"CSS.getMatchedStylesForNode","params":{"nodeId":26,"includeInherited":true,"includePseudo...

And now I want to read:
webinspector_error_t res = webinspector_receive_with_timeout(client, &plist, timeout_ms);

The result is WEBINSPECTOR_E_PLIST_ERROR in this case. I think, that the problem is, that the massage is too big.

My software also works with iOS Simulator. I use different communication mechanism with Simulator and I don't have such problems.
I'm attaching output of what I'm getting from iOS Simulator, which should be the same (or similar) as from device.

iossim.plist is expected result. This specific response I'm getting from iOS Simulator.
iossim.json is json decoded from previous plist.

Both files are attached to original issue http://libiphone.lighthouseapp.com/projects/27916-libiphone/tickets/336

Thanks,
Jan

iDevice not detected on Ubuntu13.04

I installed the latest git upload from cgit of all packages
libimobiledevice1.1.6
libusbmuxd1.0.9
usbmuxd1.0.8
libplist1.11
But still when i connect the device the device is showing trust dialog once, and after accepting the trust dialog goes away and the device is charging. But when i fire up the commands on the terminal its showing
No device found, is it plugged in?

I tried the same on 12.04 and its working perfectly well with all commands properly. I am sure i have not missed any package. Some dependency needed for 13.04 ?

I have tried upgrading and updating and rebooting but could not find a way to make it work. What may have gone wrong ?

Best way to install the latest libimobiledevice?

Hi there. I was wondering if you could give me a quick run-down on accessing the latest libimobiledevice (with iOS 7 compatibility)? I'm running Debian Testing but even Debian Unstable doesn't seem to have the fixes I need to tether my iPhone for internet access.
I am comfortable compiling libimobiledevice/master HEAD, libplist/master HEAD, libusbmuxd/master HEAD and usbmuxd/split HEAD, but do you have any advice on installing these without breaking the packaging system?
Regards,
Dan.

Build fails on Windows (MinGW/MSYS) /redeclaration of types/

I'm trying to build libimobiledevice on Windows. Now I'm stuck at

$ make
make  all-recursive
make[1]: Entering directory `/c/Users/beci/source/libimobiledevice'
Making all in common
make[2]: Entering directory `/c/Users/beci/source/libimobiledevice/common'
  CC     socket.lo
In file included from C:/MinGW/msys/1.0/include/stdio.h:32:0,
                 from socket.c:22:
C:/MinGW/msys/1.0/include/sys/stat.h:118:12: warning: redundant redeclaration of 'chmod' [-Wredundant-decls]
 int _EXFUN(chmod,( const char *__path, mode_t __mode ));
            ^
C:/MinGW/msys/1.0/include/_ansi.h:38:30: note: in definition of macro '_EXFUN'
 #define _EXFUN(name, proto)  name proto
                              ^
C:/MinGW/msys/1.0/include/sys/unistd.h:22:16: note: previous declaration of 'chmod' was here
 int     _EXFUN(chmod, (const char *__path, mode_t __mode ));
                ^
C:/MinGW/msys/1.0/include/_ansi.h:38:30: note: in definition of macro '_EXFUN'
 #define _EXFUN(name, proto)  name proto
                              ^
C:/MinGW/msys/1.0/include/sys/stat.h:119:16: warning: redundant redeclaration of 'fchmod' [-Wredundant-decls]
 int     _EXFUN(fchmod,(int __fd, mode_t __mode));
                ^
C:/MinGW/msys/1.0/include/_ansi.h:38:30: note: in definition of macro '_EXFUN'
 #define _EXFUN(name, proto)  name proto
                              ^
C:/MinGW/msys/1.0/include/sys/unistd.h:38:16: note: previous declaration of 'fchmod' was here
 int     _EXFUN(fchmod, (int __fildes, mode_t __mode ));
                ^
C:/MinGW/msys/1.0/include/sys/unistd.h:38:9: note: in expansion of macro '_EXFUN'
 int     _EXFUN(fchmod, (int __fildes, mode_t __mode ));
         ^
In file included from socket.c:31:0:
c:\mingw\include\winsock2.h:132:2: warning: #warning "fd_set and associated macros have been defined in sys/types.
This may cause runtime problems with W32 sockets" [-Wcpp]
 #warning "fd_set and associated macros have been defined in sys/types.  \
  ^
c:\mingw\include\winsock2.h:140:8: error: redefinition of 'struct timeval'
 struct timeval {
        ^
In file included from socket.c:28:0:
C:/MinGW/msys/1.0/include/sys/time.h:16:8: note: originally defined here
 struct timeval {
        ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\stdint.h:9:0,
                 from socket.h:26,
                 from socket.c:41:
c:\mingw\include\stdint.h:39:21: error: conflicting types for 'int8_t'
 typedef signed char int8_t;
                     ^
In file included from C:/MinGW/msys/1.0/include/sys/unistd.h:9:0,
                 from C:/MinGW/msys/1.0/include/unistd.h:6,
                 from socket.c:26:
C:/MinGW/msys/1.0/include/sys/types.h:106:14: note: previous declaration of 'int8_t' was here
 typedef char int8_t;
              ^
make[2]: *** [socket.lo] Error 1
make[2]: Leaving directory `/c/Users/beci/source/libimobiledevice/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/Users/beci/source/libimobiledevice'
make: *** [all] Error 2

It looks like some issue with including header files.
I'm building on Windows 8 with latest MinGW/MSYS

Please help,
thanks.

Error compiling on mint 14

Triying to compile normally gets me this error:

/usr/bin/ld: ../common/.libs/libinternalcommon.a(userpref.o): undefined reference to symbol 'X509_free@@OPENSSL_1.0.0'
/usr/bin/ld: note: 'X509_free@@OPENSSL_1.0.0' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libcrypto.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libcrypto.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [idevicepair] Error 1
make[2]: Leaving directory /home/paco/iphone/libimobiledevice/tools' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/paco/iphone/libimobiledevice'
make: *** [all] Error 2

idevicescreenshot not creating a screenshot?

Ubuntu apt-get repo version of libimobiledevice and libimobiledevice-utils seems to be missing the idevicescreenshot binary, so I tried to build from source.

$ idevicescreenshot
usbmuxd_connect: Reading connect result...
usbmuxd_connect: Connect success!
Exiting.

No tiff is created, I git cloned the libraries from https://github.com/libimobiledevice/ with the exception of http://sourceforge.net/projects/libusbx/files/releases/1.0.17/source/
(I believe it was required for building usbmuxd, because the newest version of libusb available in the Ubuntu repo is 1.0.0)

iOS versrion 6.1.3
Development mode enabled

Coworker is able to take screenshots with a version of libimobiledevice that he installed on his Mac using brew

ifuse gives the following error too:
$ ifuse mnt/
usbmuxd_connect: Reading connect result...
usbmuxd_connect: Connect success!
Failed to connect to lockdownd service on the device.
Try again. If it still fails try rebooting your device.

lockdownd verification is handled by libimobiledevice right?

DeviceColor

Color for iPhone 5 Space Grey is 99989b in /System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices.bundle/Contents.Info.plist
but libimobiledevice return a 3b3b3c

Restore fail with "Device is not ready yet"

Hi!

When I restore a big backup (tested with 4GB and 10GB), restore failed while it is pending with the "Device is not ready yet. Going to try again in 2 seconds..." message without end.

It always appear at the same time for both restore (22% and 50%). I launch the restore command with --system and --reboot arguments.

I use idevicebackup2 with iOS 7.1 devices (tested with multiple devices).

What could cause this message? Backup seems correct according to info command and because I succesfully restore it with iTunes.

Thanks!

How to get WiFi IP?

ideviceinfo returns a big amount of information, including WiFiAddress. But instead of returning the IP, it returns the MAC Address. Is there any way to return de IP of the device?

GP Fault in libimobiledevice

Plugging in mt iPhone 4S I get this in dmesg. Networking works but the camera is not detected nor does the device show up in Amarok.
If you need more info then tel me what to do and I'll doi it.

Colin Close

73858.750057] ipheth 8-8:4.2: Apple iPhone USB Ethernet now disconnected
[73870.803030] usb 8-8: new high-speed USB device number 32 using ehci-pci
[73870.920446] usb 8-8: New USB device found, idVendor=05ac, idProduct=12a0
[73870.920450] usb 8-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[73870.920453] usb 8-8: Product: iPhone
[73870.920456] usb 8-8: Manufacturer: Apple Inc.
[73870.920458] usb 8-8: SerialNumber: a81e8ad3615a7e5dbc990bd94ac6a55d671fced3
[73871.195456] ipheth 8-8:4.2: Apple iPhone USB Ethernet device attached
[73871.759555] traps: iphone-set-info[8856] general protection ip:7f1d6471cb36 sp:7fffec4a9130 error:0 in libimobiledevice.so.4.0.1[7f1d64711000+1d000]

win7 cython error

Error compiling Cython file:

...
cimport plist

^

imobiledevice.pxd:1:8: 'plist.pxd' not found

Error compiling Cython file:

...
ctypedef class builtin.Exception [object PyBaseExceptionObject]:
pass

cdef class BaseError(Exception):
cdef dict _lookup_table
cdef int16_t _c_errcode

^

imobiledevice.pxd:11:9: 'int16_t' is not a type identifier

Error compiling Cython file:

...
cdef class BaseError(Exception):
cdef dict _lookup_table
cdef int16_t _c_errcode

cdef class Base:
cdef inline int handle_error(self, int16_t ret) except -1

^

imobiledevice.pxd:14:39: 'int16_t' is not a type identifier

Error compiling Cython file:

...
cdef dict _lookup_table
cdef int16_t _c_errcode

cdef class Base:
cdef inline int handle_error(self, int16_t ret) except -1
cdef BaseError _error(self, int16_t ret)

^

imobiledevice.pxd:15:32: 'int16_t' is not a type identifier

Error compiling Cython file:

...
cpdef disconnect(self)

cdef class iDevice(Base):
cdef idevice_t _c_dev

cpdef iDeviceConnection connect(self, uint16_t port)
                                     ^

imobiledevice.pxd:46:42: 'uint16_t' is not a type identifier

Error compiling Cython file:

...

cdef class BaseService(Base):
pass

cdef class PropertyListService(BaseService):
cpdef send(self, plist.Node node)

^

imobiledevice.pxd:52:21: 'Node' is not a type identifier

Error compiling Cython file:

...

cdef class PropertyListService(BaseService):
cpdef send(self, plist.Node node)
cpdef object receive(self)
cpdef object receive_with_timeout(self, int timeout_ms)
cdef int16_t _send(self, plist.plist_t node)

^

imobiledevice.pxd:55:9: 'int16_t' is not a type identifier

Error compiling Cython file:

...

cdef class PropertyListService(BaseService):
cpdef send(self, plist.Node node)
cpdef object receive(self)
cpdef object receive_with_timeout(self, int timeout_ms)
cdef int16_t _send(self, plist.plist_t node)

^

imobiledevice.pxd:55:29: 'plist_t' is not a type identifier

Error compiling Cython file:

...
cdef class PropertyListService(BaseService):
cpdef send(self, plist.Node node)
cpdef object receive(self)
cpdef object receive_with_timeout(self, int timeout_ms)
cdef int16_t _send(self, plist.plist_t node)
cdef int16_t _receive(self, plist.plist_t* c_node)

^

imobiledevice.pxd:56:9: 'int16_t' is not a type identifier

Error compiling Cython file:

...
cdef class PropertyListService(BaseService):
cpdef send(self, plist.Node node)
cpdef object receive(self)
cpdef object receive_with_timeout(self, int timeout_ms)
cdef int16_t _send(self, plist.plist_t node)
cdef int16_t _receive(self, plist.plist_t* c_node)

^

imobiledevice.pxd:56:32: 'plist_t' is not a type identifier

Error compiling Cython file:

...
cpdef send(self, plist.Node node)
cpdef object receive(self)
cpdef object receive_with_timeout(self, int timeout_ms)
cdef int16_t _send(self, plist.plist_t node)
cdef int16_t _receive(self, plist.plist_t* c_node)
cdef int16_t _receive_with_timeout(self, plist.plist_t* c_node, int timeout
ms)

^

imobiledevice.pxd:57:9: 'int16_t' is not a type identifier

Error compiling Cython file:

...
cpdef send(self, plist.Node node)
cpdef object receive(self)
cpdef object receive_with_timeout(self, int timeout_ms)
cdef int16_t _send(self, plist.plist_t node)
cdef int16_t _receive(self, plist.plist_t* c_node)
cdef int16_t _receive_with_timeout(self, plist.plist_t* c_node, int timeout
ms)

^

imobiledevice.pxd:57:45: 'plist_t' is not a type identifier

Error compiling Cython file:

...
char *host_certificate
char *host_id
char *root_certificate
ctypedef lockdownd_pair_record *lockdownd_pair_record_t
cdef struct lockdownd_service_descriptor:
uint16_t port

^

imobiledevice.pxd:70:8: 'uint16_t' is not a type identifier

Error compiling Cython file:

...
char *host_id
char *root_certificate
ctypedef lockdownd_pair_record *lockdownd_pair_record_t
cdef struct lockdownd_service_descriptor:
uint16_t port
uint8_t ssl_enabled

^

imobiledevice.pxd:71:8: 'uint8_t' is not a type identifier

Error compiling Cython file:

...
cdef class LockdownClient(PropertyListService):
cdef lockdownd_client_t _c_client
cdef readonly iDevice device

cpdef bytes query_type(self)
cpdef plist.Node get_value(self, bytes domain=*, bytes key=*)
     ^

imobiledevice.pxd:87:10: 'Node' is not a type identifier

Error compiling Cython file:

...
cpdef tuple start_session(self, bytes host_id)
cpdef stop_session(self, bytes session_id)
cpdef pair(self, object pair_record=)
cpdef validate_pair(self, object pair_record=
)
cpdef unpair(self, object pair_record=*)
cpdef activate(self, plist.Node activation_record)

^

imobiledevice.pxd:97:25: 'Node' is not a type identifier

libimobiledevice for Windows

Hi,
It will be a great help if someone can give me a step by step details about building libimobiledevice for windows 7.
This issue is very much similar to Issue#11.But no one is replying on that thread.

Please help me out.:(

SIGPIPE on SSL_shutdown causes idevice commands to have non-zero exit code in Linux

To see a sympton of this, in bash try
date=$(idevicedate) && echo $date
And see that at least 9 times out of 10, it produces no output. Echo $? to see the exit code is 141, not zero, indicating a SIGPIPE.

I have tracked it down the the SSL_shutdown call in idevice.c. I have worked around the issue by temporarily ignoring SIGPIPE signals when calling SSL_shutdown. Specifically, I've replaced the SSL_shutdown call on line 824 with:

signal(SIGPIPE, SIG_IGN);
SSL_shutdown(connection->ssl_data->session);
signal(SIGPIPE, SIG_DFL);

It is unclear to me whether there is a bug here or whether ignoring the SIGPIPE is just standard when using openssl.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.