Skip to content

Commit

Permalink
Merge pull request #2 from SarKaa/master
Browse files Browse the repository at this point in the history
trying to merge master and exe repos
  • Loading branch information
SarKaa committed Feb 3, 2024
2 parents aa88946 + 25d4b2d commit ff5e904
Show file tree
Hide file tree
Showing 95 changed files with 2,301 additions and 685 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ name: build

on:
push:
workflow_dispatch:

env:
github_token: ${{secrets.GITHUB_TOKEN}}

jobs:
build-windows:
runs-on: windows-2019
defaults:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Some key features are:
- **Implementation**: Object oriented architecture and service abstraction layer
- **Cross-Platform:** Tested on Linux, macOS, Windows and Android platforms
- **Utilities**: Provides various command-line utilities for device services
- **SSL**: Allows choosing between OpenSSL or GnuTLS to handle SSL communication
- **SSL**: Allows choosing between OpenSSL, GnuTLS, or MbedTLS to handle SSL communication
- **Network**: Supports network connections with "WiFi sync" enabled devices
- **Python:** Provides Cython based bindings for Python

Expand Down Expand Up @@ -144,6 +144,7 @@ The library bundles the following command-line utilities in the tools directory:
| `idevicescreenshot` | Gets a screenshot from the connected device |
| `idevicesetlocation` | Simulate location on device |
| `idevicesyslog` | Relay syslog of a connected device |
| `afcclient` | Interact with device filesystem via AFC/HouseArrest |

Please consult the usage information or manual pages of each utility for a
documentation of available command line options and usage examples like this:
Expand Down Expand Up @@ -193,4 +194,4 @@ iPadOS, tvOS, watchOS, and macOS are trademarks of Apple Inc.
This project is an independent software and has not been authorized, sponsored,
or otherwise approved by Apple Inc.

README Updated on: 2022-04-04
README Updated on: 2023-12-30
2 changes: 1 addition & 1 deletion common/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
#include <stdlib.h>
#include <time.h>

#include "src/idevice.h"
#include "debug.h"
#include "libimobiledevice/libimobiledevice.h"
#include "src/idevice.h"

#ifndef STRIP_DEBUG_CODE
#include "asprintf.h"
Expand Down
38 changes: 25 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ LT_INIT
PKG_CHECK_MODULES(libusbmuxd, libusbmuxd-2.0 >= $LIBUSBMUXD_VERSION)
PKG_CHECK_MODULES(libplist, libplist-2.0 >= $LIBPLIST_VERSION)
PKG_CHECK_MODULES(limd_glue, libimobiledevice-glue-1.0 >= $LIMD_GLUE_VERSION)
AC_ARG_WITH([readline],
[AS_HELP_STRING([--without-readline],
[build without support for libreadline (default is yes)])],
[check_libreadline=false],
[check_libreadline=true])
if test "$check_libreadline" = "true"; then
PKG_CHECK_MODULES(readline, readline >= 1.0, have_readline=yes, have_readline=no)
if test "x$have_readline" = "xyes"; then
AC_DEFINE(HAVE_READLINE, 1, [Define if readline library is available])
fi
fi
AM_CONDITIONAL([HAVE_READLINE],[test "x$have_readline" = "xyes"])

# Checks for header files.
AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/time.h])
Expand Down Expand Up @@ -165,15 +177,15 @@ AC_ARG_WITH([mbedtls],
[Do not look for mbedtls])],
[use_mbedtls=$withval],
[use_mbedtls=no])
if test "x$use_mbedtls" == "xyes"; then
if test "x$use_mbedtls" = "xyes"; then
default_openssl=no
fi
AC_ARG_WITH([gnutls],
[AS_HELP_STRING([--without-gnutls],
[Do not look for GnuTLS])],
[use_gnutls=$withval],
[use_gnutls=no])
if test "x$use_gnutls" == "xyes"; then
if test "x$use_gnutls" = "xyes"; then
default_openssl=no
fi
AC_ARG_WITH([openssl],
Expand All @@ -182,7 +194,7 @@ AC_ARG_WITH([openssl],
[use_openssl=$withval],
[use_openssl=$default_openssl])

if test "x$use_mbedtls" == "xyes"; then
if test "x$use_mbedtls" = "xyes"; then
CACHED_CFLAGS="$CFLAGS"
conf_mbedtls_CFLAGS=""
if test -n "$mbedtls_INCLUDES"; then
Expand All @@ -209,7 +221,7 @@ if test "x$use_mbedtls" == "xyes"; then
ssl_requires=""
AC_SUBST(ssl_requires)
else
if test "x$use_openssl" == "xyes"; then
if test "x$use_openssl" = "xyes"; then
pkg_req_openssl="openssl >= 0.9.8"
PKG_CHECK_MODULES(openssl, $pkg_req_openssl, have_openssl=yes, have_openssl=no)
if test "x$have_openssl" != "xyes"; then
Expand All @@ -225,7 +237,7 @@ else
AC_SUBST(ssl_requires)
fi
else
if test "x$use_gnutls" == "xyes"; then
if test "x$use_gnutls" = "xyes"; then
pkg_req_gnutls="gnutls >= 2.2.0"
pkg_req_libtasn1="libtasn1 >= 1.1"
PKG_CHECK_MODULES(libgnutls, $pkg_req_gnutls)
Expand All @@ -246,9 +258,9 @@ else
fi
fi
fi
AM_CONDITIONAL(HAVE_MBEDTLS, test "x$use_mbedtls" == "xyes")
AM_CONDITIONAL(HAVE_OPENSSL, test "x$use_openssl" == "xyes")
AM_CONDITIONAL(HAVE_GCRYPT, test "x$use_gnutls" == "xyes")
AM_CONDITIONAL(HAVE_MBEDTLS, test "x$use_mbedtls" = "xyes")
AM_CONDITIONAL(HAVE_OPENSSL, test "x$use_openssl" = "xyes")
AM_CONDITIONAL(HAVE_GCRYPT, test "x$use_gnutls" = "xyes")

AC_ARG_ENABLE([wireless-pairing],
[AS_HELP_STRING([--disable-wireless-pairing],
Expand All @@ -271,12 +283,12 @@ else
fi

AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden")
AC_SUBST(GLOBAL_CFLAGS)

case "$GLOBAL_CFLAGS" in
*-fvisibility=hidden*)
AC_DEFINE([HAVE_FVISIBILITY], [1], [Define if compiled with -fvisibility=hidden])
esac
if test "x$enable_static" = "xyes" -a "x$enable_shared" = "xno"; then
GLOBAL_CFLAGS+=" -DLIBIMOBILEDEVICE_STATIC"
fi

AC_SUBST(GLOBAL_CFLAGS)

# check for large file support
AC_SYS_LARGEFILE
Expand Down
5 changes: 3 additions & 2 deletions cython/lockdown.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,12 @@ cdef class LockdownClient(PropertyListService):
if issubclass(service, BaseService) and \
service.__service_name__ is not None \
and isinstance(service.__service_name__, (str, bytes)):
c_service_name = <bytes>service.__service_name__
c_service_name_str = service.__service_name__.encode('utf-8')
elif isinstance(service, (str, bytes)):
c_service_name = <bytes>service
c_service_name_str = service.encode('utf-8')
else:
raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument")
c_service_name = c_service_name_str

try:
self.handle_error(lockdownd_start_service(self._c_client, c_service_name, &c_descriptor))
Expand Down
76 changes: 76 additions & 0 deletions docs/afcclient.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.TH "afcclient" 1
.SH NAME
afcclient \- Interact with AFC/HouseArrest service on a connected device.
.SH SYNOPSIS
.B afcclient
[OPTIONS] [COMMAND ...]

.SH DESCRIPTION

Utility to interact with AFC/HouseArrest service. This allows access to parts
of the filesystem on an iOS device.

\f[B]afcclient\f[] can be used interactively with a command prompt, or run a single command and exit.

.SH COMMANDS
.TP
.B devinfo
print device information
.TP
.B info PATH
print file attributes of file at PATH
.TP
.B ls PATH
print directory contents of PATH
.TP
.B mv OLD NEW
rename file OLD to NEW
.TP
.B mkdir PATH
create directory at PATH
.TP
.B ln [-s] FILE [LINK]
Create a (symbolic) link to file named LINKNAME. \f[B]NOTE: This feature has been disabled in newer versions of iOS\f[].
.TP
.B rm PATH
remove item at PATH
.TP
.B get PATH [LOCALPATH]
transfer file at PATH from device to LOCALPATH, or current directory if omitted. If LOCALPATH is a directory, the file will be stored inside the directory.
\f[B]WARNING\f[]: Existing files will be overwritten!
.TP
.B put LOCALPATH [PATH]
transfer local file at LOCALPATH to device at PATH, or current directory if omitted. If PATH is a directory, the file will be stored inside the directory.
\f[B]WARNING\f[]: Existing files will be overwritten!
.TP

.SH OPTIONS
.TP
.B \-u, \-\-udid UDID
target specific device by UDID
.TP
.B \-n, \-\-network
connect to network device (not recommended, since the connection might be terminated at any time)
.TP
.B \--container <appid>
Access the app container directory of the app with given \f[B]appid\f[]
.TP
.B \--documents <appid>
Access the Documents directory of the app with given \f[B]appid\f[]
.TP
.B \-h, \-\-help
Prints usage information
.TP
.B \-d, \-\-debug
Enable communication debugging
.TP
.B \-v, \-\-version
Prints version information

.SH AUTHOR
Nikias Bassen

.SH ON THE WEB
https://libimobiledevice.org

https://github.com/libimobiledevice/libimobiledevice
2 changes: 1 addition & 1 deletion docs/idevicebackup2.1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ restore last backup to the device.
restore system files, too.
.TP
.B \t\-\-no\-reboot
reboot the system when done.
do NO reboot the system when done.
.TP
.B \t\-\-copy
create a copy of backup folder before restoring.
Expand Down
9 changes: 8 additions & 1 deletion docs/idevicesyslog.1
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,17 @@ enable communication debugging
prints usage information
.TP
.B \-v, \-\-version
prints version information.
Prints version information.
.TP
.B \-\-no\-colors
disable colored output
.TP
.B \-o, \-\-output FILE
Write to FILE instead of stdout. This will disable writing colored output, but can be re-enabled with \f[B]\-\-colors\f[].
If FILE already exists, it will be overwritten without warning.
.TP
.B \-\-colors
Force writing colored output, e.g. when using \f[B]\-\-output\f[].

.SH FILTER OPTIONS
.TP
Expand Down
8 changes: 4 additions & 4 deletions doxygen.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*

EXCLUDE_SYMBOLS =
EXCLUDE_SYMBOLS = LIBIMOBILEDEVICE_API

# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
Expand Down Expand Up @@ -2023,15 +2023,15 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

MACRO_EXPANSION = NO
MACRO_EXPANSION = YES

# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
# EXPAND_AS_DEFINED tags.
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

EXPAND_ONLY_PREDEF = NO
EXPAND_ONLY_PREDEF = YES

# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
Expand Down Expand Up @@ -2072,7 +2072,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

EXPAND_AS_DEFINED =
EXPAND_AS_DEFINED = LIBIMOBILEDEVICE_API

# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
# remove all references to function-like macros that are alone on a line, have
Expand Down
Loading

0 comments on commit ff5e904

Please sign in to comment.