Coder Social home page Coder Social logo

libimobiledevice / libusbmuxd Goto Github PK

View Code? Open in Web Editor NEW
555.0 42.0 269.0 350 KB

A client library to multiplex connections from and to iOS devices

Home Page: https://libimobiledevice.org

License: GNU Lesser General Public License v2.1

Shell 0.83% C 71.97% Makefile 1.22% M4 25.98%
usbmuxd ios library c iproxy usb

libusbmuxd's Introduction

libusbmuxd

A client library for applications to handle usbmux protocol connections with iOS devices.

Table of Contents

Features

This project is a client library to multiplex connections from and to iOS devices alongside command-line utilities.

It is primarily used by applications which use the libimobiledevice library to communicate with services running on iOS devices.

The library does not establish a direct connection with a device but requires connecting to a socket provided by the usbmuxd daemon.

The usbmuxd daemon is running upon installing iTunes on Windows and Mac OS X.

The libimobiledevice project provides an open-source reimplementation of the usbmuxd daemon to use on Linux or as an alternative to communicate with iOS devices without the need to install iTunes.

Some key features are:

  • Protocol: Provides an interface to handle the usbmux protocol
  • Port Proxy: Provides the iproxy utility to proxy ports to the device
  • Netcat: Provides the inetcat utility to expose a raw connection to the device
  • Cross-Platform: Tested on Linux, macOS, Windows and Android platforms
  • Flexible: Allows using the open-source or proprietary usbmuxd daemon

Furthermore the Linux build optionally provides support using inotify if available.

Building

Prerequisites

You need to have a working compiler (gcc/clang) and development environent available. This project uses autotools for the build process, allowing to have common build steps across different platforms. Only the prerequisites differ and they are described in this section.

libusbmuxd requires libplist and libimobiledevice-glue. On Linux, it also requires usbmuxd installed on the system, while macOS has its own copy and on Windows AppleMobileDeviceSupport package provides it. Check libplist's Building and libimobiledevice-glue's Building section of the respective README on how to build them. Note that some platforms might have them as a package.

Linux (Debian/Ubuntu based)

  • Install all required dependencies and build tools:
    sudo apt-get install \
    	build-essential \
    	pkg-config \
    	checkinstall \
    	git \
    	autoconf \
    	automake \
    	libtool-bin \
    	libplist-dev \
    	libimobiledevice-glue-dev \
    	usbmuxd
    In case libplist-dev, libimobiledevice-glue-dev, or usbmuxd are not available, you can manually build and install them. See note above.

macOS

  • Make sure the Xcode command line tools are installed. Then, use either MacPorts or Homebrew to install automake, autoconf, libtool, etc.

    Using MacPorts:

    sudo port install libtool autoconf automake pkgconfig

    Using Homebrew:

    brew install libtool autoconf automake pkg-config

Windows

  • Using MSYS2 is the official way of compiling this project on Windows. Download the MSYS2 installer and follow the installation steps.

    It is recommended to use the MSYS2 MinGW 64-bit shell. Run it and make sure the required dependencies are installed:

    pacman -S base-devel \
    	git \
    	mingw-w64-x86_64-gcc \
    	make \
    	libtool \
    	autoconf \
    	automake-wrapper \
    	pkg-config

    NOTE: You can use a different shell and different compiler according to your needs. Adapt the above command accordingly.

Configuring the source tree

You can build the source code from a git checkout, or from a .tar.bz2 release tarball from Releases. Before we can build it, the source tree has to be configured for building. The steps depend on where you got the source from.

Since libusbmuxd depends on other packages, you should set the pkg-config environment variable PKG_CONFIG_PATH accordingly. Make sure to use a path with the same prefix as the dependencies. If they are installed in /usr/local you would do

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  • From git

    If you haven't done already, clone the actual project repository and change into the directory.

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

    Configure the source tree for building:

    ./autogen.sh
  • From release tarball (.tar.bz2)

    When using an official release tarball (libusbmuxd-x.y.z.tar.bz2) the procedure is slightly different.

    Extract the tarball:

    tar xjf libusbmuxd-x.y.z.tar.bz2
    cd libusbmuxd-x.y.z

    Configure the source tree for building:

    ./configure

Both ./configure and ./autogen.sh (which generates and calls configure) accept a few options, for example --prefix to allow building for a different target folder. You can simply pass them like this:

./autogen.sh --prefix=/usr/local

or

./configure --prefix=/usr/local

Once the command is successful, the last few lines of output will look like this:

[...]
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration for libusbmuxd 2.1.0:
-------------------------------------------

  Install prefix: .........: /usr/local
  inotify support (Linux) .: no

  Now type 'make' to build libusbmuxd 2.1.0,
  and then 'make install' for installation.

Usage

iproxy

This utility allows binding local TCP ports so that a connection to one (or more) of the local ports will be forwarded to the specified port (or ports) on a usbmux device.

Bind local TCP port 2222 and forward to port 22 of the first device connected via USB:

iproxy 2222:22

This would allow using ssh with localhost:2222 to connect to the sshd daemon on the device. Please mind that this is just an example and the sshd daemon is only available for jailbroken devices that actually have it installed.

Please consult the usage information or manual page for a full documentation of available command line options:

iproxy --help
man iproxy

inetcat

This utility is a simple netcat-like tool that allows opening a read/write interface to a TCP port on a usbmux device and expose it via STDIN/STDOUT.

Use ssh ProxyCommand to connect to a jailbroken iOS device via SSH:

ssh -oProxyCommand="inetcat 22" root@localhost

Please consult the usage information or manual page for a full documentation of available command line options:

inetcat --help
man inetcat

Environment

The environment variable USBMUXD_SOCKET_ADDRESS allows to change the location of the usbmuxd socket away from the local default one.

An example of using an utility from the libimobiledevice project with an usbmuxd socket exposed on a port of a remote host:

export USBMUXD_SOCKET_ADDRESS=192.168.179.1:27015
ideviceinfo

This sets the usbmuxd socket address to 192.168.179.1:27015 for applications that use the libusbmuxd library.

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

Links

License

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

The utilities iproxy and inetcat are licensed under the GNU General Public License v2.0.

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 library and has not been authorized, sponsored, or otherwise approved by Apple Inc.

README Updated on: 2024-03-27

libusbmuxd's People

Contributors

aburgh avatar aguinetqb avatar cfergeau avatar dafyddcrosby avatar davidedmundson avatar fidetro avatar funkym avatar hyperair avatar matthewgentoo avatar mickacompelson avatar neheb avatar nikias avatar posixninja avatar qmfrederik avatar smartype 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

libusbmuxd's Issues

Segfault on Ubuntu13.04 with iphone5s

gdb ./usbmuxd
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/pedgrfx/carplay/libimobile/usbmuxd/src/usbmuxd...done.
(gdb) run -f -v -v
Starting program: /home/pedgrfx/carplay/libimobile/usbmuxd/src/usbmuxd -f -v -v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[11:52:59.411][3] usbmuxd v1.0.9 starting up
[11:52:59.411][4] Creating socket
[11:52:59.411][5] initialized config_dir to /var/lib/lockdown
[11:52:59.411][5] client_init
[11:52:59.411][5] device_init
[11:52:59.411][4] Initializing USB
[11:52:59.411][5] usb_init for linux / libusb 1.0
[11:52:59.412][4] Found new device with v/p 05ac:12a8 at 1-11
[11:52:59.412][4] Found interface 1 with endpoints 04/85 for device 1-11
[11:52:59.412][4] Using wMaxPacketSize=512 for device 1-11
[11:52:59.412][3] Connecting to new device on location 0x1000b as ID 1
[11:52:59.412][5] All 3 RX loops started successfully
[11:52:59.413][4] 1 device detected
[11:52:59.413][3] Initialization complete
[11:52:59.413][4] New client on fd 13
[11:52:59.413][5] Client command in fd 13 len 204 ver 1 msg 8 tag 15

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7323301 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff7323301 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff77a615b in plist_get_string_val (node=0x0, val=val@entry=0x7fffffffe1f8) at plist.c:582
#2 0x0000000000405500 in client_command (hdr=0x643ee0, client=0x61ba80) at client.c:479
#3 process_recv (client=0x61ba80) at client.c:714
#4 client_process (fd=, events=) at client.c:740
#5 0x0000000000404172 in main_loop (listenfd=8) at main.c:235
#6 main (argc=, argv=) at main.c:642

Problems with libusbmuxd-dev

hi, i really need help with this problem, i try to build imobiledevice, but ubuntu says that libusbmuxd isn't the lastest version, i try to download libusbmuxd from libimobiledevice.org, but i don't know how can a make it works, if some one can help me :(
captura de pantalla de 2017-04-08 04 11 02

Cannot compile on windows 64bit with msys2

Hello.
i'm trying to compile libusbmuxd but there's a linker problem that i don't know how to solve.
Here's the full log i also included libplist compile log so you have more info:

Note: it seems that libusbmuxd is not able to detect libplist automatically so i had to manually tell where it was placed.

luckc@DESKTOP-CG79PC9 MSYS ~/libimobiledevice/libusbmuxd
$ libplist_LIBS=/usr/local/lib libplist_CFLAGS=/usr/local/include ./autogen.sh
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
configure.ac:28: installing './compile'
configure.ac:6: installing './missing'
common/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-pc-msys file names to x86_64-pc-msys format... func_convert_file_noop
checking how to convert x86_64-pc-msys file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-msys/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libplist... yes
checking sys/inotify.h usability... no
checking sys/inotify.h presence... no
checking for sys/inotify.h... no
checking for ANSI C header files... (cached) yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strndup... yes
checking whether to enable WIN32 build settings... no
checking for pthread_create, pthread_mutex_lock in -lpthread... yes
checking for supported compiler flags...  -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating common/Makefile
config.status: creating src/Makefile
config.status: creating include/Makefile
config.status: creating tools/Makefile
config.status: creating libusbmuxd.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration for libusbmuxd 1.1.0:

  Install prefix: .........: /usr/local
  inotify support (Linux) .: no

  Now type 'make' to build libusbmuxd 1.1.0,
  and then 'make install' for installation.


luckc@DESKTOP-CG79PC9 MSYS ~/libimobiledevice/libusbmuxd
$ make
make  all-recursive
make[1]: ingresso nella directory "/home/luckc/libimobiledevice/libusbmuxd"
Making all in common
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libusbmuxd/common"
  CC       socket.lo
  CC       collection.lo
  CCLD     libinternalcommon.la
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libusbmuxd/common"
Making all in src
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libusbmuxd/src"
  CC       libusbmuxd.lo
gcc: warning: /usr/local/include: linker input file unused because linking not done
  CCLD     libusbmuxd.la
.libs/libusbmuxd.o: In function `create_plist_message':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:397: undefined reference to `plist_new_dict'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:397:(.text+0x8a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_new_dict'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:398: undefined reference to `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:398:(.text+0x99): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:398: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:398:(.text+0xab): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:399: undefined reference to `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:399:(.text+0xb7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:399: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:399:(.text+0xc9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:400: undefined reference to `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:400:(.text+0xd1): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:400: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:400:(.text+0xe3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:401: undefined reference to `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:401:(.text+0xef): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:401: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:401:(.text+0x101): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:402: undefined reference to `plist_new_uint'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:402:(.text+0x10b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `plist_new_uint'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:402: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:402:(.text+0x11d): additional relocation overflows omitted from the output
.libs/libusbmuxd.o: In function `send_plist_packet':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:388: undefined reference to `plist_to_xml'
.libs/libusbmuxd.o: In function `device_record_from_plist':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:141: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:142: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:147: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:148: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:153: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:154: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:161: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:162: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:143: undefined reference to `plist_get_uint_val'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:149: undefined reference to `plist_get_uint_val'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:155: undefined reference to `plist_get_string_val'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:163: undefined reference to `plist_get_uint_val'
.libs/libusbmuxd.o: In function `receive_packet':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:209: undefined reference to `plist_from_xml'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:217: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:218: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:225: undefined reference to `plist_get_string_val'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:274: undefined reference to `plist_free'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:231: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:232: undefined reference to `plist_get_uint_val'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:279: undefined reference to `plist_free'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:241: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:262: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:264: undefined reference to `plist_get_uint_val'
.libs/libusbmuxd.o: In function `send_pair_record_packet':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:482: undefined reference to `plist_new_string'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:482: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:484: undefined reference to `plist_copy'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:484: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:488: undefined reference to `plist_free'
.libs/libusbmuxd.o: In function `send_listen_packet':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:414: undefined reference to `plist_free'
.libs/libusbmuxd.o: In function `send_list_devices_packet':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:458: undefined reference to `plist_free'
.libs/libusbmuxd.o: In function `usbmuxd_get_device_list':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:881: undefined reference to `plist_free'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:853: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:854: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:884: undefined reference to `plist_free'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:856: undefined reference to `plist_array_get_size'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:859: undefined reference to `plist_array_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:860: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:872: undefined reference to `plist_free'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:867: undefined reference to `plist_free'
.libs/libusbmuxd.o: In function `send_connect_packet':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:428: undefined reference to `plist_new_uint'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:428: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:429: undefined reference to `plist_new_uint'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:429: undefined reference to `plist_dict_set_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:432: undefined reference to `plist_free'
.libs/libusbmuxd.o: In function `send_read_buid_packet':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:471: undefined reference to `plist_free'
.libs/libusbmuxd.o: In function `usbmuxd_read_buid':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1147: undefined reference to `plist_free'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1139: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1140: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1141: undefined reference to `plist_get_string_val'
.libs/libusbmuxd.o: In function `usbmuxd_read_pair_record':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1195: undefined reference to `plist_free'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1183: undefined reference to `plist_dict_get_item'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1184: undefined reference to `plist_get_node_type'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1186: undefined reference to `plist_get_data_val'
.libs/libusbmuxd.o: In function `usbmuxd_save_pair_record':
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1222: undefined reference to `plist_new_data'
/home/luckc/libimobiledevice/libusbmuxd/src/libusbmuxd.c:1235: undefined reference to `plist_free'
collect2: error: ld returned 1 exit status
Makefile:419: set di istruzioni per l'obiettivo "libusbmuxd.la" non riuscito
make[2]: *** [libusbmuxd.la] Errore 1
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libusbmuxd/src"
Makefile:465: set di istruzioni per l'obiettivo "all-recursive" non riuscito
make[1]: *** [all-recursive] Errore 1
make[1]: uscita dalla directory "/home/luckc/libimobiledevice/libusbmuxd"
Makefile:374: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2

here's libplist log:

luckc@DESKTOP-CG79PC9 MSYS ~/libimobiledevice/libplist
$ ./autogen.sh
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
configure.ac:28: installing './compile'
configure.ac:41: installing './config.guess'
configure.ac:41: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
cython/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether g++ is available and compiles a program... yes
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-pc-msys file names to x86_64-pc-msys format... func_convert_file_noop
checking how to convert x86_64-pc-msys file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-msys/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libxml2... yes
checking for ANSI C header files... (cached) yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for asprintf... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strndup... yes
checking for stpcpy... yes
checking for vasprintf... yes
checking whether byte ordering is bigendian... no
checking whether to enable WIN32 build settings... no
checking for a Python interpreter with version >= 2.3... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... msys
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for cython... /usr/bin/cython
checking for Cython version... 0.23
configure: Cython executable is '/usr/bin/cython'
checking for python2.7... (cached) /usr/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... yes
checking for Python include path... /usr/bin/python-config is /usr/bin/python-config
-I/usr/include/python3.4m -I/usr/include/python3.4m
checking for Python library path... /usr/bin/python-config is /usr/bin/python-config
 -L/usr/lib -lpython3.4m -lintl -ldl
checking for Python site-packages path... /usr/lib/python2.7/site-packages
checking python extra libraries... ('', '-ldl')
checking python extra linking flags...
checking consistency of all components of python development environment... yes
checking for libplist Cython bindings... Package libplist was not found in the pkg-config search path.
Perhaps you should add the directory containing `libplist.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libplist' found
Using built-in libplist Cython bindings (assuming this is a first build)
checking for supported compiler flags...  -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libcnary/Makefile
config.status: creating src/Makefile
config.status: creating src/libplist.pc
config.status: creating src/libplist++.pc
config.status: creating include/Makefile
config.status: creating tools/Makefile
config.status: creating cython/Makefile
config.status: creating test/Makefile
config.status: creating doxygen.cfg
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration for libplist 1.13.0:
-------------------------------------------

  Install prefix: .........: /usr/local
  Python bindings .........: yes

  Now type 'make' to build libplist 1.13.0,
  and then 'make install' for installation.


luckc@DESKTOP-CG79PC9 MSYS ~/libimobiledevice/libplist
$ make
make  all-recursive
make[1]: ingresso nella directory "/home/luckc/libimobiledevice/libplist"
Making all in libcnary
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libplist/libcnary"
  CC       node.lo
  CC       list.lo
  CC       node_list.lo
  CC       iterator.lo
  CC       node_iterator.lo
  CCLD     libcnary.la
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libplist/libcnary"
Making all in src
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libplist/src"
  CC       base64.lo
  CC       bytearray.lo
  CC       hashtable.lo
  CC       ptrarray.lo
  CC       xplist.lo
  CC       bplist.lo
  CC       plist.lo
  CCLD     libplist.la
  CXX      Node.lo
  CXX      Structure.lo
  CXX      Array.lo
  CXX      Boolean.lo
  CXX      Data.lo
  CXX      Date.lo
  CXX      Dictionary.lo
  CXX      Integer.lo
  CXX      Key.lo
  CXX      Real.lo
  CXX      String.lo
  CXX      Uid.lo
  CXXLD    libplist++.la
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libplist/src"
Making all in include
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libplist/include"
make[2]: Nessuna operazione da eseguire per "all".
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libplist/include"
Making all in tools
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libplist/tools"
  CC       plistutil.o
  CCLD     plistutil.exe
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libplist/tools"
Making all in cython
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libplist/cython"
/usr/bin/cython -I. -I../src -o plist.c plist.pyx
make  all-am
make[3]: ingresso nella directory "/home/luckc/libimobiledevice/libplist/cython"
  CC       plist_la-plist_util.lo
  CC       plist_la-plist.lo
  CCLD     plist.la
libtool: warning: undefined symbols not allowed in x86_64-pc-msys shared libraries; building static only
make[3]: uscita dalla directory "/home/luckc/libimobiledevice/libplist/cython"
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libplist/cython"
Making all in test
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libplist/test"
  CC       plist_cmp.o
  CCLD     plist_cmp.exe
  CC       plist_test.o
  CCLD     plist_test.exe
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libplist/test"
make[2]: ingresso nella directory "/home/luckc/libimobiledevice/libplist"
make[2]: uscita dalla directory "/home/luckc/libimobiledevice/libplist"
make[1]: uscita dalla directory "/home/luckc/libimobiledevice/libplist"

Cannot connect to a device in recovery mode (lay mans terms)

I have an Icloud locked Iphone 4s and whenever I use imobiledevice to restore a custom ipsw i get an error message sayin it cannot connect to my iphone in recovery mode. I have read multiple other threds on this issue but I dont understand them. Can anyone help me with this issue but make it simple and easy to understand for beginners. Thank you!

Unable to install via Homebrew - SSL certificate expired

Hello. I am trying to follow the instructions on https://flutter.dev/docs/get-started/install/macos and I am using Homebrew to install this dependency. It is unable to install due to the following error:

Failure while executing; `git clone --branch master https://git.sukimashita.com/libusbmuxd.git /Users/andre/Library/Caches/Homebrew/usbmuxd--git` exited with 128. Here's the output:
Cloning into '/Users/andre/Library/Caches/Homebrew/usbmuxd--git'...
fatal: unable to access 'https://git.sukimashita.com/libusbmuxd.git/': SSL certificate problem: certificate has expired

Pointing a web browser at https://git.sukimashita.com/ indeed shows that the site's SSL certificate has expired.

What do you recommend for resolving this issue?


Full Homebrew output:

Andres-MacBook-Pro:~ andre$ brew install --HEAD usbmuxd
==> Installing dependencies for usbmuxd: autoconf, automake, libtool, pkg-config, libplist and libusb
==> Installing usbmuxd dependency: autoconf
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.mojave.bottle.4.tar.gz
######################################################################## 100.0%
==> Pouring autoconf-2.69.mojave.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
==> Summary
🍺  /usr/local/Cellar/autoconf/2.69: 71 files, 3.0MB
==> Installing usbmuxd dependency: automake
==> Downloading https://homebrew.bintray.com/bottles/automake-1.16.1_1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring automake-1.16.1_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/automake/1.16.1_1: 131 files, 3.4MB
==> Installing usbmuxd dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtool-2.4.6_1.mojave.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺  /usr/local/Cellar/libtool/2.4.6_1: 71 files, 3.7MB
==> Installing usbmuxd dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.29.2.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB
==> Installing usbmuxd dependency: libplist
==> Downloading https://homebrew.bintray.com/bottles/libplist-2.0.0_1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libplist-2.0.0_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libplist/2.0.0_1: 29 files, 345.7KB
==> Installing usbmuxd dependency: libusb
==> Downloading https://homebrew.bintray.com/bottles/libusb-1.0.22.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libusb-1.0.22.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libusb/1.0.22: 29 files, 508KB
==> Installing usbmuxd --HEAD
==> Cloning https://git.sukimashita.com/libusbmuxd.git
Cloning into '/Users/andre/Library/Caches/Homebrew/usbmuxd--git'...
fatal: unable to access 'https://git.sukimashita.com/libusbmuxd.git/': SSL certificate problem: certificate has expired
Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "usbmuxd"
Failure while executing; `git clone --branch master https://git.sukimashita.com/libusbmuxd.git /Users/andre/Library/Caches/Homebrew/usbmuxd--git` exited with 128. Here's the output:
Cloning into '/Users/andre/Library/Caches/Homebrew/usbmuxd--git'...
fatal: unable to access 'https://git.sukimashita.com/libusbmuxd.git/': SSL certificate problem: certificate has expired

Win32-libusbmuxd unresolved symbols

I've got next linker errors:
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol _mutex_init usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _thread_free usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _mutex_unlock usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _thread_join usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _thread_new usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _thread_cancel usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _mutex_lock usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _thread_once usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1
Error LNK2001 unresolved external symbol _thread_alive usbmuxd D:\imobile\libusbmuxd\libusbmuxd.obj 1

Device removed notification arrived when connecting another iPhone

I have registered to listen device added/removed notifications.
Use case:
Connect iPhone, pair and trust, wait for device is ready.
Connect another iPhone, pair and trust.

When pairing another iPhone, i got notification device removed notification from BOTH devices.
after a while both devices will arrive again.

Note: This happens only on Mac. On Windows there is no extra 'device removed' notifications.

Build Error in macOS10.14.6

I'm trying to build the lastest libusbmuxd to match the lastest libimobiledevice, so firstly I uninstalled the libusbmuxd by using brew uninstall usbmuxd, and then used brew install --HEAD usbmuxd to install the lastest version. But I got the error when I install it:

==> ./autogen.sh
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/usbmuxd/HEAD-b097ea3_1
==> make install
Last 15 lines from /Users/victor/Library/Logs/Homebrew/usbmuxd/03.make:
make[2]: Nothing to be done for `install-data-am'.
Making install in src
/bin/sh ../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I..  -I../include -I../common  -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden -pthread -I/usr/local/Cellar/libplist/2.0.0_1/include -g -O2 -c -o libusbmuxd.lo libusbmuxd.c
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -I../include -I../common -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden -pthread -I/usr/local/Cellar/libplist/2.0.0_1/include -g -O2 -c libusbmuxd.c  -fno-common -DPIC -o .libs/libusbmuxd.o
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -I../include -I../common -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden -pthread -I/usr/local/Cellar/libplist/2.0.0_1/include -g -O2 -c libusbmuxd.c -o libusbmuxd.o >/dev/null 2>&1
/bin/sh ../libtool  --tag=CC   --mode=link clang -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden -pthread -I/usr/local/Cellar/libplist/2.0.0_1/include -g -O2  -L/usr/local/Cellar/libplist/2.0.0_1/lib -lplist -version-info 5:0:1 -no-undefined   -o libusbmuxd.la -rpath /usr/local/Cellar/usbmuxd/HEAD-b097ea3_1/lib libusbmuxd.lo ../common/libinternalcommon.la
libtool: link: clang -dynamiclib  -o .libs/libusbmuxd.4.dylib  .libs/libusbmuxd.o   -Wl,-force_load,../common/.libs/libinternalcommon.a  -L/usr/local/Cellar/libplist/2.0.0_1/lib -lplist  -pthread -g -O2   -pthread -install_name  /usr/local/Cellar/usbmuxd/HEAD-b097ea3_1/lib/libusbmuxd.4.dylib -compatibility_version 6 -current_version 6.0 -Wl,-single_module
Undefined symbols for architecture x86_64:
  "_assert", referenced from:
      _collection_init in libinternalcommon.a(collection.o)
      _collection_add in libinternalcommon.a(collection.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[1]: *** [libusbmuxd.la] Error 1
make: *** [install-recursive] Error 1

I have checked whether it is the homebrew's bug by using brew update and brew doctor, and then fixed all the warnings. But it does no help. Here is my homebrew version:

$ brew -v
Homebrew 2.1.9
Homebrew/homebrew-core (git revision 94426; last commit 2019-08-08)
Homebrew/homebrew-cask (git revision b5bd27; last commit 2019-08-09)

And the operation system I am using is MacOS 10.14.6.
Hope for your help!

clang compilation error

clang detects an unnecessary conditional expression in libusbmuxd.c:

libusbmuxd/src/libusbmuxd.c:575:16: error: comparison of array 'pevent->name' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
pevent->name != NULL &&

SSL certificate error while installing via Homebrew

I am getting the following error while installing through brew install.

==> Installing dependencies for usbmuxd: libplist
==> Installing usbmuxd dependency: libplist
==> Downloading https://homebrew.bintray.com/bottles/libplist-2.0.0_1.mojave.bottle.tar.gz
==> Pouring libplist-2.0.0_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libplist/2.0.0_1: 29 files, 345.7KB
==> Installing usbmuxd --HEAD
==> Cloning https://git.sukimashita.com/libusbmuxd.git
Cloning into '/Users/travis/Library/Caches/Homebrew/usbmuxd--git'...
fatal: unable to access 'https://git.sukimashita.com/libusbmuxd.git/': SSL certificate problem: certificate has expired
Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "usbmuxd"
Failure while executing; `git clone --branch master https://git.sukimashita.com/libusbmuxd.git /Users/travis/Library/Caches/Homebrew/usbmuxd--git` exited with 128. Here's the output:
Cloning into '/Users/travis/Library/Caches/Homebrew/usbmuxd--git'...
fatal: unable to access 'https://git.sukimashita.com/libusbmuxd.git/': SSL certificate problem: certificate has expired

Looks to be similar to #64 but it is happening for me consistently.

idevice_id -l command lists same udid twice

Hi,

I am facing the issue that ideviceinstaller shows same udid twice.
The 2 USB ports in MAC lists one UDID each.
If i unplug anyone of the USB , one out the list disappears.
Backup sync in the IphoneX is switched off.

Below is my setup.
MAC ---USB --- IphoneX(Connected to Router Wifi)
Also, MAC---USBport--- EthernetPort of Router

Can someone please help me with this issue.

Thanks,
Arya

Cannot connect to restore mode device

I've been porting this code to a visual studio solution, I'm unable to solve this issue however:

When applying a firmware with idevicerestore, its successful up to putting the device in restore mode. Then it goes on to restore_device and restore_open_with_timeout where it subscribes to what I assume is the connect event and then just waits until the attempts are up and fails.

Meanwhile in libusbmuxd, the device_monitor thread starts, successfully gets the socket from usbmuxd_listen, goes into get_next_event, receive_packet, socket_receive_timeout, socket_check_fd and stops at winsock select function (timeout is 0 so blocks forever).

I triple checked my porting to make sure I didn't introduce any bugs and as far as I can tell I shouldn't have. I'm looking for any tips/advice on how to debug this, thanks.

Getting error when trying to compile

Here is what I get:

...
Making all in tools
  CCLD     iproxy
ld: warning: ignoring file ../common/.libs/libinternalcommon.a, file was built for archive which is not the architecture being linked (x86_64): ../common/.libs/libinternalcommon.a
Undefined symbols for architecture x86_64:
  "_socket_accept", referenced from:
      _main in iproxy-iproxy.o
  "_socket_close", referenced from:
      _main in iproxy-iproxy.o
      _acceptor_thread in iproxy-iproxy.o
      _run_ctos_loop in iproxy-iproxy.o
      _run_stoc_loop in iproxy-iproxy.o
  "_socket_create", referenced from:
      _main in iproxy-iproxy.o
  "_socket_receive_timeout", referenced from:
      _run_ctos_loop in iproxy-iproxy.o
      _run_stoc_loop in iproxy-iproxy.o
  "_socket_send", referenced from:
      _run_ctos_loop in iproxy-iproxy.o
      _run_stoc_loop in iproxy-iproxy.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What could be the problem?!? I'm using OSX 10.13.6.
Xcode 10.1 and Homebrew are installed in the system..

unsafe string operations leading to possible memory corruption

It seems a pretty unlikely scenario to trigger this, but the following code in device_info_from_device_record() and get_next_event() can leave udid unterminated:

        memset(devinfo->udid, '\0', sizeof(devinfo->udid));
        memcpy(devinfo->udid, dev->serial_number, sizeof(devinfo->udid));

Later in usbmuxd_get_device_by_udid(), udid is strcpy()d which could cause all sorts of chaos.

I believe a well-formed serial number should be 40 chars, so the fix (in both locations) is simple:

         memset(devinfo->udid, '\0', sizeof(devinfo->udid));
-        memcpy(devinfo->udid, dev->serial_number, sizeof(devinfo->udid));
+        memcpy(devinfo->udid, dev->serial_number, sizeof(devinfo->udid) - 1);

This might be a security issue if usbmuxd forwards notifications from potentially malicious devices. I believe any such device would need to be physically connected to USB, so exposure is limited.

Read/Write between Mac and iPhone using libusbmuxd

I current use libimobiledevice to work around Mac and iPhone. libusbmuxd is very helpful to get device (iPhone/iPad) information when connects to Mac app through USB.

I want more, I want to read/write data (a file like document, image, video, ...) from Mac to iPhone and vice versa but I can't get any document or tutorial on the Internet guiding how to do it.

Can anyone help me

Missing file: m4/as-compiler-flag.m4

The m4 macro for "AS_COMPILER_FLAGS" is not found when you run the autogen.sh. This was found on a Mac OS X install, not sure if that is relevant or not. Adding a copy of as-compiler-flag.m4 from the internet and adding 'EXTRA_DIST=as-compiler-flag.m4" to the Makefile.am resolved the issue.

This is the error I was getting:
./configure: line 16174: syntax error near unexpected token GLOBAL_CFLAGS,' ./configure: line 16174:AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden")'

Question on compiling on Windows

Maybe i'm doing this 100% wrong, but when i try to compile the software using visual studio 2012, it gives a plist error. I also tried CMAKE to no avail. It gets the build files, but errors out on the build. I'm on windows 7/8.x.

Do you have any other instructions or suggestionson how to make this work the simple socket messaging on a windows machine with a non jailbroken iphone and the usbmuxd that comes with itunes? I would like to get this working with peertalk. This worked great on the raspberry pi running Wheezy.

Thanks for your help!

segfault when attaching iPhone

[ 8390.186788] usb 3-6: new high-speed USB device number 10 using xhci_hcd
[ 8390.336132] usb 3-6: New USB device found, idVendor=05ac, idProduct=12a8
[ 8390.336137] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8390.336140] usb 3-6: Product: iPhone
[ 8390.336142] usb 3-6: Manufacturer: Apple Inc.
[ 8390.336145] usb 3-6: SerialNumber: 9a2*elided*
[ 8390.386199] ipheth 3-6:4.2: Apple iPhone USB Ethernet device attached
[ 8390.394531] ipheth 3-6:4.2 enp0s20u6c4i2: renamed from eth0
[ 8390.395001] usbmuxd[23403]: segfault at fffffffffffffff9 ip 00007f0c61bc198d sp 00007f0c5f91bdb0 error 5 in libc-2.27.so[7f0c61b2a000+1e7000]
[ 8390.421028] IPv6: ADDRCONF(NETDEV_UP): enp0s20u6c4i2: link is not ready
[ 8390.421523] IPv6: ADDRCONF(NETDEV_UP): enp0s20u6c4i2: link is not ready

Using latest git revision 8b82ef1 compiled on Ubuntu 18.04. Please let me know what next steps I should take to debug.

Brew not able to install: syntax error near unexpected token `libplist,'

The error is caused by this line:
https://github.com/libimobiledevice/libusbmuxd/blob/master/configure.ac#L36

After commenting the line (and making sure that libplist is installed) everything worked as expected.

The following is the log of the execution of brew install --HEAD usbmuxd.

  brew install --HEAD usbmuxd
==> Cloning https://git.sukimashita.com/libusbmuxd.git
Updating /Users/josef/Library/Caches/Homebrew/usbmuxd--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 9db5747 socket: Make sure to use socket_close() really everywhere
==> ./autogen.sh
Last 15 lines from /Users/josef/Library/Logs/Homebrew/usbmuxd/01.autogen.sh:
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... clang++ -E
checking for ld used by clang++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC... -fno-common -DPIC
checking if clang++ PIC flag -fno-common -DPIC works... yes
checking if clang++ static flag -static works... no
checking if clang++ supports -c -o file.o... yes
checking if clang++ supports -c -o file.o... (cached) yes
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin18.2.0 dyld
checking how to hardcode library paths into programs... immediate
./configure: line 16735: syntax error near unexpected token `libplist,'
./configure: line 16735: `PKG_CHECK_MODULES(libplist, libplist >= $LIBPLIST_VERSION)'

Issue a release

Please issue a release to encapsulate the changes since 1.0.10.

Broken pipe causes idevice commands to have non-zero exit code in Linux

On Linux, capturing the output of the idevice commands on Linux is very flaky. This is a problem that seems to have originated with the split branch.

Try this for example on Linux:
date=$(idevicedate) && echo $date
And see that at least 9 times out of 10, it produces no output. Running idevicedate in isolation still produces output, however. The reason is that idevicedate is completing with a nonzero exit code, specifically exit code 141. I've tracked this down to a SIGPIPE encountered when writing to /var/run/usbmuxd.

I can work around this by adding
signal(SIGPIPE, SIG_IGN);
to the start of idevicedate, but then it has to be added to every single idevice command.

libusbmuxd should be fixed to avoid the broken pipe.

crashes on startup when approximately10 or more iOS devices connected

We're using libuxbmuxd on a hub with 27 iOS devices connected. All devices are running iOS 8.4

I am testing master/HEAD from the git repos of libplist, libuxbmuxd, usbmuxd, libimobiledevice. Target is Debian Wheezy on ARM. I checked out the source with git clone and then configured, built, and installed as per the instructions.

When more than approximately 10 devices are plugged in, starting usbmuxd crashes immediately. This happens whether using foreground or background mode. Here is the command line session. (I will attach the logs to the ticket.)

With fewer than ~10 devices it starts OK, and usually allows the devices to be plugged in one at a time without crashing.

root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash2.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash3.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash4.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash5.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash6.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash7.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash8.txt
glibc detected *** usbmuxd: free(): invalid pointer: 0x0028bdc0 ***
Aborted
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash9.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash10.txt
Segmentation fault
root@ts7400-4a3ffe:~# usbmuxd -U root -vv -f 2> crash11.txt
Segmentation fault

This worked without crashes with libusbmuxd 1.0.7. It works with occasional crashes with the latest "official" tarballs on the website (libplist-1.12.tar.bz2 libusbmuxd-1.0.10.tar.bz2 usbmuxd-1.0.9.tar.bz2 libimobiledevice-1.1.7.tar.bz2).

Please let me know:

  • Should we be using something other than master/HEAD for the latest code.
  • Where to start looking to debug this

We would like to use the version that is most compatible with iOS 8.4.

Question about usbmuxd_connect

Hello guys, I encounter a problem when connecting an iOS device using USB wire, which is caused by the return value of the function usbmuxd_connect. So I'm writing to ask in what circumstance does the function retrun a negtive value? BTW, where can I get the implementation of this function? Thanks for your help!
int usbmuxd_connect(const int handle, const unsigned short tcp_port);

(not sure it's a bug, but...) Python-Client (tcprelay.py) missing

Whatever happened to the python client? Is there a replacement for tcprelay? I used that script HEAVILY. It was incredibly useful!

BTW, using the copy I still had lying around, the latest version of libusbmuxd works with the python script. So why not keep it?

Incoming packet size mismatch

Hi,

I get all the time this error on different iOS devices:

Apr 10 14:37:23 vfergbxp usbmuxd[12019]: [1] Incoming packet size mismatch (dev 7, expected 7894, got 4096)
Apr 10 14:37:27 vfergbxp usbmuxd[12019]: [1] Incoming packet size mismatch (dev 7, expected 5786, got 4096)

I'm using libusbmuxd version 1.0.9 and usbmuxd from master.

What may be the cause? Can it be related to the fact I'm running it on VirtualBox?

Thanks!

Compiling libusbmuxd on windows

So I have successfully got to a point where I am compiling libusbmuxd on windows mingw to use it for windows platform.

However although autogen.sh and configure is done without error

it fails to make libusbmuxd at below . Does anyone have any idea on this? Is there a clear instruction on how to build in windows? Quoatmotion seems to have something but they don't detail anything on how to compile...

$ make
make all-recursive
make[1]: Entering directory /home/Naver/libusbmuxd-1.0.10' Making all in common make[2]: Entering directory/home/Naver/libusbmuxd-1.0.10/common'
CC collection.lo
CCLD libinternalcommon.la
make[2]: Leaving directory /home/Naver/libusbmuxd-1.0.10/common' Making all in src make[2]: Entering directory/home/Naver/libusbmuxd-1.0.10/src'
CC libusbmuxd.lo
libusbmuxd.c:46:26: error: expected ';', ',' or ')' before numeric constant
#define sleep(x) Sleep(x_1000)
^
libusbmuxd.c:46:25: error: expected ';', ',' or ')' before '' token
#define sleep(x) Sleep(x_1000)
^
make[2]: *
* [libusbmuxd.lo] Error 1
make[2]: Leaving directory /home/Naver/libusbmuxd-1.0.10/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/Naver/libusbmuxd-1.0.10'
make: *** [all] Error 2

Unable to run make and make install

This is on a Mac running Yosemite. autogen.sh ran successfully.

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in common
  CC       socket.lo
  CC       collection.lo
  CCLD     libinternalcommon.la
Making all in src
  CC       libusbmuxd.lo
  CCLD     libusbmuxd.la
Making all in include
make[2]: Nothing to be done for `all'.
Making all in tools
  CC       iproxy-iproxy.o
  CCLD     iproxy
make[2]: Nothing to be done for `all-am'.


Crash when usbmuxd_subscribe called more than once

If you call usbmuxd_subscribe more than once, but do not call usbmuxd_unsubscribe in between, the device_monitor thread which is created by usbmuxd_subscribe is started multiple times.

When messages such as MESSAGE_DEVICE_REMOVE are received, all of these threads will attempt to find the device, and remove the handle for that device. This leads to race conditions and ultimately to free(devinfo) being called twice.

I see three options to resolve this:

  1. Make usbmuxd_subscribe check whether another callback is already registered, and if so, return -EALREADY to let the caller know this was not a valid operation
  2. The same as above, but silently call usbmuxd_unsubscribe and register the new callback
  3. Support handling multiple callbacks.

My preference currently goes to 1, and I can submit a PR for this, but before I do that, I'd like to check with you whether this is the project's preferred option.

gcc-9.1 compile error

make[2]: Entering directory '/root/iphone/libusbmuxd/src'
CC libusbmuxd.lo
libusbmuxd.c:865:12: error: static declaration of 'pselect' follows non-static declaration
865 | static int pselect(int nfds, fd_set readfds, fd_set writefds, fd_set exceptfds, const struct timespec timeout, const sigset_t *sigmask)
| ^~~~~~~
In file included from /usr/include/sys/types.h:196,
from /usr/include/stdlib.h:394,
from libusbmuxd.c:27:
/usr/include/sys/select.h:113:12: note: previous declaration of 'pselect' was here
113 | extern int pselect (int _nfds, fd_set *__restrict _readfds,
| ^~~~~~~

I changed the following:

static int pselect(int nfds, fd_set *readfds, fd

to

int pselect(int nfds, fd_set *readfds, fd

Now libusbmuxd compiles fine.

Can't compile due to libplist

As I had watched issue "Can't compile due to libplist dependency", but it was closed.
I met the error, and my mac version is 10.11.6 ,then I used "./autogen.sh".Like this

/usr/local/bin/glibtoolize: line 406: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 3601: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 3845: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 861: /usr/local/Library/ENV/4.3/sed: No such file or directory
: putting auxiliary files in '.'.
: linking file './ltmain.sh'
/usr/local/bin/glibtoolize: line 3771: /usr/local/Library/ENV/4.3/sed: No such file or directory
configure.ac:28: installing './compile'
configure.ac:6: installing './missing'
common/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin15.6.0 file names to x86_64-apple-darwin15.6.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin15.6.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libplist... no
configure: error: Package requirements (libplist >= 1.11) were not met:

Package 'libxml-2.0', required by 'libplist', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libplist_CFLAGS
and libplist_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

And the I used "brew install libplist",I found I had installed Warning: libplist-1.12 already installed.

Different versions

What causes different versions to run? All devices that I own are using the plist version.

Can't compile due to libplist dependency

I'm getting an error:

configure: error: Package requirements (libplist >= 1.11) were not met:

Requested 'libplist >= 1.11' but version of libplist is 1.10

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Looking at libplist, it seems the latest tag is 1.10

I ran sudo make install but pkg-config can't find it

OS X Sierra. libplist seems to have built and installed fine, but this is preventing me from building libimobiledevice

Making install in common
make[2]: Nothing to be done for install-exec-am'. make[2]: Nothing to be done for install-data-am'.
Making install in src
/opt/local/bin/gmkdir -p '/usr/local/lib'
/bin/sh ../libtool --mode=install /opt/local/bin/ginstall -c libusbmuxd.la '/usr/local/lib'
libtool: install: /opt/local/bin/ginstall -c .libs/libusbmuxd.4.dylib /usr/local/lib/libusbmuxd.4.dylib
libtool: install: (cd /usr/local/lib && { ln -s -f libusbmuxd.4.dylib libusbmuxd.dylib || { rm -f libusbmuxd.dylib && ln -s libusbmuxd.4.dylib libusbmuxd.dylib; }; })
libtool: install: /opt/local/bin/ginstall -c .libs/libusbmuxd.lai /usr/local/lib/libusbmuxd.la
libtool: install: /opt/local/bin/ginstall -c .libs/libusbmuxd.a /usr/local/lib/libusbmuxd.a
libtool: install: chmod 644 /usr/local/lib/libusbmuxd.a
libtool: install: ranlib /usr/local/lib/libusbmuxd.a
make[2]: Nothing to be done for install-data-am'. Making install in include make[2]: Nothing to be done for install-exec-am'.
/opt/local/bin/gmkdir -p '/usr/local/include'
/opt/local/bin/ginstall -c -m 644 usbmuxd.h usbmuxd-proto.h '/usr/local/include/.'
Making install in tools
/opt/local/bin/gmkdir -p '/usr/local/bin'
/bin/sh ../libtool --mode=install /opt/local/bin/ginstall -c iproxy '/usr/local/bin'
libtool: install: /opt/local/bin/ginstall -c .libs/iproxy /usr/local/bin/iproxy
make[2]: Nothing to be done for install-data-am'. make[2]: Nothing to be done for install-exec-am'.
/opt/local/bin/gmkdir -p '/usr/local/lib/pkgconfig'
/opt/local/bin/ginstall -c -m 644 libusbmuxd.pc '/usr/local/lib/pkgconfig'
Michaels-iMac:libusbmuxd mike$ pkg-config --validate libusbmuxd
Package libusbmuxd was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusbmuxd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusbmuxd' found

symbol(s) not found for architecture x86_64

macbook pro 2011 with os x 10.10, use lastest libusbmuxd.

libplist was install by make
the libplist headers was copy to /usr/local/include/plist/

if do not add those 2 lines, config libusbmuxd will told not install libplist.... i do not know why...
export libplist_CFLAGS=/usr/local/include/
export libplist_LIBS=/usr/local/lib/

applematoMacBook-Pro:libusbmuxd apple$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in common
CC socket.lo
CC collection.lo
CCLD libinternalcommon.la
Making all in src
CC libusbmuxd.lo
clang: warning: /usr/local/include/plist/: 'linker' input unused
CCLD libusbmuxd.la
Undefined symbols for architecture x86_64:
"_plist_array_get_item", referenced from:
_usbmuxd_get_device_list in libusbmuxd.o
"_plist_array_get_size", referenced from:
_usbmuxd_get_device_list in libusbmuxd.o
"_plist_copy", referenced from:
_send_pair_record_packet in libusbmuxd.o
"_plist_dict_get_item", referenced from:
_usbmuxd_get_device_list in libusbmuxd.o
_device_record_from_plist in libusbmuxd.o
_receive_packet in libusbmuxd.o
_usbmuxd_read_buid in libusbmuxd.o
_usbmuxd_read_pair_record in libusbmuxd.o
"_plist_dict_set_item", referenced from:
_usbmuxd_connect in libusbmuxd.o
_usbmuxd_read_pair_record in libusbmuxd.o
_send_pair_record_packet in libusbmuxd.o
_usbmuxd_delete_pair_record in libusbmuxd.o
_create_plist_message in libusbmuxd.o
"_plist_free", referenced from:
_device_monitor in libusbmuxd.o
_usbmuxd_get_device_list in libusbmuxd.o
_receive_packet in libusbmuxd.o
_usbmuxd_connect in libusbmuxd.o
_usbmuxd_read_buid in libusbmuxd.o
_usbmuxd_read_pair_record in libusbmuxd.o
_send_pair_record_packet in libusbmuxd.o
...
"_plist_from_xml", referenced from:
_receive_packet in libusbmuxd.o
"_plist_get_data_val", referenced from:
_usbmuxd_read_pair_record in libusbmuxd.o
"_plist_get_node_type", referenced from:
_usbmuxd_get_device_list in libusbmuxd.o
_device_record_from_plist in libusbmuxd.o
_receive_packet in libusbmuxd.o
_usbmuxd_read_buid in libusbmuxd.o
_usbmuxd_read_pair_record in libusbmuxd.o
"_plist_get_string_val", referenced from:
_device_record_from_plist in libusbmuxd.o
_receive_packet in libusbmuxd.o
_usbmuxd_read_buid in libusbmuxd.o
"_plist_get_uint_val", referenced from:
_device_record_from_plist in libusbmuxd.o
_receive_packet in libusbmuxd.o
"_plist_new_data", referenced from:
_usbmuxd_save_pair_record in libusbmuxd.o
"_plist_new_dict", referenced from:
_create_plist_message in libusbmuxd.o
"_plist_new_string", referenced from:
_usbmuxd_read_pair_record in libusbmuxd.o
_send_pair_record_packet in libusbmuxd.o
_usbmuxd_delete_pair_record in libusbmuxd.o
_create_plist_message in libusbmuxd.o
"_plist_new_uint", referenced from:
_usbmuxd_connect in libusbmuxd.o
_create_plist_message in libusbmuxd.o
"_plist_to_xml", referenced from:
_device_monitor in libusbmuxd.o
_usbmuxd_get_device_list in libusbmuxd.o
_usbmuxd_connect in libusbmuxd.o
_usbmuxd_read_buid in libusbmuxd.o
_usbmuxd_read_pair_record in libusbmuxd.o
_send_pair_record_packet in libusbmuxd.o
_usbmuxd_delete_pair_record in libusbmuxd.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]: *** [libusbmuxd.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Add option to bind iproxy socket to 0.0.0.0

Executing iproxy LOCAL_TCP_PORT DEVICE_TCP_PORT will bind LOCAL_TCP_PORT to localhost only.

Make an optional flag to bind to 0.0.0.0 so that the port will be exposed and accessible by other hosts.
This is useful to build small device-farm, where all devices connected to one host and other hosts are used to run tests, etc. on devices connected remotely.

Current solution we use is socat

socat tcp-listen:LOCAL_TCP_PORT,reuseaddr,fork tcp:0.0.0.0:LOCAL_TCP_PORT

But this requires extra dependencies to be installed on host and managing extra process per port.

Getting Segmentation Fault

Hi, in

@libusbmuxd.c
Line 270:

	if (!devinfo->udid[0]) {
		LIBUSBMUXD_ERROR("%s: Failed to get SerialNumber (UDID)!\n", __func__);
		free(devinfo);
		devinfo = NULL;
	}
	if (!devinfo->conn_type) {
		...

Shouldn't this sequence of conditions be in a if/else structure? if we set devinfo to NULL in the first condition we'll most probably obtain a Segmentation fault in the second.
thank you

Get Device Info through libusbmuxd

Hello,
I want all the information related to an idevice(name,device capacity etc.) connected with computer on windows.
How can this be achieved using libusbmuxd on windows.
Please help.

Device Not Work By Flutter

Warning: CocoaPods recommended version 1.5.0 or greater not installed.
Pods handling may fail on some projects involving plugins.
To upgrade:
brew upgrade cocoapods
pod setup

Starting Xcode build...
Xcode build done. 14.4s
Installing and launching...
timeout waiting for the application to start

Device is Active by Flutter,But Not Work

botao-macbookpro:ios botao$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v0.10.1, on Mac OS X 10.14 18A391, locale
zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.1)
! Some Android licenses not accepted. To resolve this, run: flutter doctor
--android-licenses
[!] iOS toolchain - develop for iOS devices (Xcode 10.0)
✗ Verify that all connected devices have been paired with this computer in
Xcode.
If all devices have been paired, libimobiledevice and ideviceinstaller may
require updating.
To update, run:
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
! CocoaPods out of date (1.5.0 is recommended).
CocoaPods is used to retrieve the iOS platform side's plugin code that
responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work
on iOS.
For more info, see https://flutter.io/platform-plugins
To upgrade:
brew upgrade cocoapods
pod setup
[✓] Android Studio (version 3.1)
[✓] Connected device (1 available)

No package 'libplist' found

I previously installed libplist getting the following summary:
Configuration for libplist 2.0.0:

Install prefix ..........: /usr/local
Debug code ..............: no
Python bindings .........: no

Now type 'make' to build libplist 2.0.0,
and then 'make install' for installation.

I then issued the make and make install command, getting no errors.

After that, I ran autogen.sh of libusbmuxd, and I get the "No package 'libplist' found" error.

I'm on macOS El Capitan

/usr/sbin/asr was terminated by signal 11

i am trying to bypass an icloud lock for a friend and idevicrestore.exe keeps stopping at a specific point and tells me that /usr/sbin/asr was terminated by signal 11
ERROR: unable to restore device.

this is the code I use
idevicerestore.exe -u --98583376DB551E9C90029D0580BC64AAB0E2EA46 iPhone3,3_7.1.2_11D257_Restore.ipsw

Here is my cmd session:
Connected to com.apple.mobile.restored, version 13
Device has successfully entered restore mode
Hardware Information:
BoardID: 6
ChipID: 35120
UniqueChipID: 354318619951
ProductionMode: true
Previous restore exit status: 0x100
Partition NAND device (28)
Waiting for NAND (29)
Waiting for NAND (29)
Waiting for device (33)
Checking filesystems (16)
Checking filesystems (16)
Unknown operation (51)
Waiting for NAND (29)
Waiting for NAND (29)
About to send RootTicket...
Sending RootTicket now...
Done sending RootTicket
About to send filesystem...
Connected to ASR
Validating the filesystem
ERROR: Unable to receive data from ASR
ERROR: Unable to receive validation packet
ERROR: ASR was unable to validate the filesystem
ERROR: Unable to send filesystem
ERROR: Unable to successfully restore device
Got status message
Status: Fail
Log is available:
it peerManager=0xa205c400
start:156
start:156
000096.839452 wlan.N[1] AppleBCMWLANCore::setPowerStateGated(): powerState 1,
fStateFlags 0x20, dev 0x803ab000 (this 1, provider 0)
000096.839496 wlan.N[2] AppleBCMWLANCore::setPowerStateGated(): Received power
state change before driver has initialized, ignoring
AppleSynopsysOTGDevice::gated_handleUSBCableConnect cable connected, but don't h
ave device configuration yet
display-scale = 2
display-rotation = 0
found applelogo at /usr/share/progressui/[email protected]
found display: primary
display: 640 x 960
found PTP interface
AppleSynopsysOTGDevice - Configuration: PTP
AppleSynopsysOTGDevice Interface: PTP
AppleSynopsysOTGDevice - Configuration: iPod USB Interface
AppleSynopsysOTGDevice Interface: USBAudioControl
AppleSynopsysOTGDevice Interface: USBAudioStreaming
AppleSynopsysOTGDevice Interface: IapOverUsbHid
AppleSynopsysOTGDevice - Configuration: PTP + Apple Mobile Device
AppleSynopsysOTGDevice Interface: PTP
AppleSynopsysOTGDevice Interface: AppleUSBMux
AppleSynopsysOTGDevice - Configuration: PTP + Apple Mobile Device + Apple USB Et
hernet
AppleSynopsysOTGDevice Interface: PTP
AppleSynopsysOTGDevice Interface: AppleUSBMux
AppleSynopsysOTGDevice Interface: AppleUSBEthernet
AppleSynopsysOTGDevice::gated_registerFunction Register function USBAudioControl

AppleSynopsysOTGDevice::gated_registerFunction Register function USBAudioStreami
ng
IOAccessoryPortUSB::start
AppleSynopsysOTGDevice::gated_registerFunction Register function IapOverUsbHid
virtual bool AppleUSBDeviceMux::start(IOService ) build: Jun 11 2014 20:11:28
init_waste
AppleSynopsysOTGDevice::gated_registerFunction Register function AppleUSBMux
AppleSynopsysOTGDevice::gated_registerFunction Register function AppleUSBEtherne
t
AppleUSBEthernetDevice::start: device-mac-address not found for device in the de
vice-tree, generating a fake one
AppleSynopsysOTGDevice::gated_registerFunction Register function PTP
AppleSynopsysOTGDevice::startUSBStack Starting usb stack
IOReturn AppleUSBDeviceMux::setPropertiesGated(OSObject *) setting debug level t
o 7
AppleUSBDeviceMux::handleConnectResult new session 0xa364f840 established 62078<
-lo0->49152 62078<-usb->26112
void AppleUSBDeviceMux::handleMuxTCPInput(mbuf_t) received reset, closing 0xa364
f840
recv(13, 4) failed: connection closed
unable to read message size: -1
could not receive message
AppleUSBDeviceMux::handleConnectResult new session 0xa364f840 established 62078<
-lo0->49153 62078<-usb->26368
AppleUSBDeviceMux::sessionUpcall socket is closed, session 0xa364f840 (62078<-lo
0->49153 62078<-usb->26368)
AppleUSBDeviceMux::handleConnectResult new session 0xa364f840 established 62078<
-lo0->49154 62078<-usb->26624
client protocol version 13
*
* UUID 256172B6-0663-3AC5-C19D-A8F171E4D268 ***
Restore options:
UUID => <CFString 0x15577cb0 [0x3b3ae0]>{conte
nts = "256172B6-0663-3AC5-C19D-A8F171E4D268"}
MinimumSystemPartition => <CFNumber 0x15577c00 [0x3b3ae0]>{value
= +1522, type = kCFNumberSInt64Type}
SystemPartitionSize => <CFNumber 0x15579040 [0x3b3ae0]>{value
= +1522, type = kCFNumberSInt64Type}
PersonalizedDuringPreflight => <CFBoolean 0x3b3e90 [0x3b3ae0]>{value
= true}
SystemPartitionPadding => <CFBasicHash 0x15577ce0 [0x3b3ae0]>{ty
pe = mutable dict, count = 5,
entries =>
2 : <CFString 0x15577c30 [0x3b3ae0]>{contents = "128"} = <CFNumber 0x155
77c60 [0x3b3ae0]>{value = +1280, type = kCFNumberSInt64Type}
3 : <CFString 0x15577d10 [0x3b3ae0]>{contents = "16"} = <CFNumber 0x1557
8cc0 [0x3b3ae0]>{value = +160, type = kCFNumberSInt64Type}
4 : <CFString 0x15578cd0 [0x3b3ae0]>{contents = "32"} = <CFNumber 0x1557
8c00 [0x3b3ae0]>{value = +320, type = kCFNumberSInt64Type}
5 : <CFString 0x15578b00 [0x3b3ae0]>{contents = "8"} = <CFNumber 0x15579
190 [0x3b3ae0]>{value = +80, type = kCFNumberSInt64Type}
8 : <CFString 0x15578bb0 [0x3b3ae0]>{contents = "64"} = <CFNumber 0x1557
8af0 [0x3b3ae0]>{value = +640, type = kCFNumberSInt64Type}
}

entering load_sep_os
device has no sep
entering partition_nand_device
device supports boot-from-NAND
nand device is already partitioned
entering wait_for_storage_device
Searching for NAND service
Found NAND service: IOFlashStoragePartition
NAND initialized. Waiting for devnode.
entering clear_remap_variable
executing /usr/sbin/nvram
entering format_effaceable_storage
effaceable storage is formatted, nothing to do
entering ramrod_probe_media
device partitioning scheme is GPT
find_filesystem_partitions: storage=/dev/disk0s1 system=/dev/disk0s1s1 data=/dev
/disk0s1s2
executing /sbin/fsck_hfs
** /dev/rdisk0s1s1
Executing fsck_hfs (version hfs-277.10.5).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is System
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** Trimming unused blocks.
** The volume System appears to be OK.
executing /sbin/mount_hfs
/dev/disk0s1s1 mounted on /mnt1
entering check_for_restore_log
restore log does not exist
entering unmount_filesystems
error unmounting '/mnt2': Invalid argument
entering clean_NAND
entering format_storage_for_LwVM
entering ramrod_probe_media
device partitioning scheme is GPT
find_filesystem_partitions: storage=/dev/disk0s1 system=/dev/disk0s1s1 data=/dev
/disk0s1s2
entering check_for_suspicious_partitions
executing /sbin/fsck_hfs
** /dev/rdisk0s1s2
Executing fsck_hfs (version hfs-277.10.5).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is Data
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** Trimming unused blocks.
** The volume Data appears to be OK.
executing /sbin/mount_hfs
mount_hfs: Could not exec re-keying daemon /usr/libexec/rolld: No such file or d
irectory
/dev/disk0s1s2 mounted on /mnt1
ramrod_roll_media_keys: data_partition = /dev/disk0s1s2
ramrod_roll_media_keys: storage_media = /dev/disk0s1
ramrod_roll_media_keys: data_partition_name = disk0s1s2
ramrod_roll_media_keys: data_partition_uuid = 285AA8B1-8DDB-4A73-9875-9B01FD3802
0F
executing /usr/sbin/nvram
entering mount_filesystems
executing /sbin/fsck_hfs
** /dev/rdisk0s1s1
Executing fsck_hfs (version hfs-277.10.5).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is System
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** Trimming unused blocks.
** The volume System appears to be OK.
executing /sbin/mount_hfs
/dev/disk0s1s1 mounted on /mnt1
executing /sbin/fsck_hfs
** /dev/rdisk0s1s2
Executing fsck_hfs (version hfs-277.10.5).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is Data
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** Trimming unused blocks.
** The volume Data appears to be OK.
executing /sbin/mount_hfs
LwVM::gptUUIDExists - UUID already rekeyed
mount_hfs: Could not exec re-keying daemon /usr/libexec/rolld: No such file or d
irectory
/dev/disk0s1s2 mounted on /mnt2
entering resize_system_partition_to_options
User specified system partition size, skipping firmware extras size.
Found SystemPartitionPadding value of 83886080 bytes
Erasing system partition prior to resize operation.
block size for /dev/disk0s1s1: 8192
/sbin/newfs_hfs -s -v System -J -b 8192 -n a=8192,c=8192,e=8192 /dev/disk0s1s1
executing /sbin/newfs_hfs -s -v System -J -b 8192 -n a=8192,c=8192,e=8192 /dev/d
isk0s1s1
Initialized /dev/rdisk0s1s1 as a 2 GB case-sensitive HFS Plus volume with a 8192
k journal
executing /sbin/fsck_hfs
** /dev/rdisk0s1s1
Executing fsck_hfs (version hfs-277.10.5).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is System
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** Trimming unused blocks.
** The volume System appears to be OK.
executing /sbin/mount_hfs
/dev/disk0s1s1 mounted on /mnt1
Trying to resize system partition to 1679818752 bytes aka 1602 MB
entering adjust_partition_preflight
partition:0 requiredSize=205056
no change in size
Successfully resized the system partition
entering maximize_data_partition
entering adjust_partition_preflight
partition:1 requiredSize=2251799813685248
maximizing data partition to 6289358847 bytes
entering adjust_partition_preflight
partition:1 requiredSize=767744
no change in size
Successfully resized data partition to consume free blocks
The system partition now has a total HFS+ capacity of 1602 MB
entering ramrod_probe_media
device partitioning scheme is GPT
find_filesystem_partitions: storage=/dev/disk0s1 system=/dev/disk0s1s1 data=/dev
/disk0s1s2
entering unmount_filesystems
entering ramrod_ticket_update
looking up root ticket hash
device tree ticket-hash: <CFData 0x1557a500 [0x3b3ae0]>{length = 20, capacity =
20, bytes = 0x611a3db4b619688ff9936b18ac7387617eb792ad}
ticket_hash: 611A3DB4B619688FF9936B18AC7387617EB792AD
received valid ticket (2741 bytes)
entering restore_images
Successfully marked device node /dev/rdisk0s1s1 as static data
executing /usr/sbin/asr -source asr://localhost:12345 -target /dev/disk0s1s1 -er
ase -noprompt --chunkchecksum --puppetstrings
void AppleUSBDeviceMux::handleConnectResult(struct BulkUSBMuxSession *, errno_t)
new session to port 12345 failed: 61
ASR: asr: Unable to disable idle sleep - -536870199
ASR STATUS: start 241.1 multicast-client
ASR: Waiting for connection attempt from server
AppleUSBDeviceMux::handleConnectResult new session 0xa364f370 established 12345<
-lo0->49156 12345<-usb->27136
ASR STATUS: setup
ASR: Validating target...
ASR: done
ASR STATUS: metadata
ASR: Validating source...
ASR: (null)
/usr/sbin/asr was terminated by signal 11
AppleUSBDeviceMux::sessionUpcall socket is closed, session 0xa364f370 (12345<-lo
0->49156 12345<-usb->27136)

ERROR: Unable to restore device

anyway to fix this?

usbmuxd_get_device_list detecting IPad over wifi

On Windows, usbmuxd_get_device_list is detecting my IPad 1 over wifi, when the IPad is not connected via USB. Is this meant to happen?

The usbmuxd_device_info_t.product_id ==0 when detected over wifi, and the correct product_id when on usb, so a simple fix would be to add a check for di->product_id != 0:

got_device_list:

    // explicitly close connection
    UNLOCK;
    socket_close(sfd);

    // create copy of device info entries from collection
    newlist = (usbmuxd_device_info_t*)malloc(sizeof(usbmuxd_device_info_t) * (collection_count(&tmpdevs) + 1));
    dev_cnt = 0;
    FOREACH(usbmuxd_device_info_t *di, &tmpdevs, usbmuxd_device_info_t *) {
        if (di && di->product_id != 0) {
            memcpy(&newlist[dev_cnt], di, sizeof(usbmuxd_device_info_t));
            free(di);
            dev_cnt++;
        }
    } ENDFOREACH

socket communications problems with libusbmuxd

A few issues with libusbmuxd/common/socket.c

  1. socket_check_fd() initializes a timeval struct outside of a retry loop around a select() statement. This is non-portable as select() may modify the timeval structure to indicate the amount left on the timer, shrinking the timeout with each retry. Consider moving initialization of the timeval structure inside the retry loop.

  2. socket_receive_timeout() misinforms under the condition when the socket has been closed by the peer. In this case the select() from socket_check_fd() will return immediately with a 1 but the recv() call will return 0. Together, these indicate the socket was closed. socket_receive_timeout() then returns -EAGAIN. It should probably return -ECONNRESET as -EAGAIN indicates the caller can try again.

  3. There are two very different implementations of socket.c contained in libusbmuxd and libimobiledevice that use the same function name space. This may cause problems for code that links against both libraries.

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.