mirror of
https://github.com/tihmstar/futurerestore.git
synced 2026-11-13 22:26:47 +00:00
opensource_v2
This commit is contained in:
parent
76ae6df6f9
commit
698ce147c1
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -22,3 +22,6 @@ missing
|
|||
*/futurerestore*
|
||||
stamp-h1
|
||||
xcuserdata
|
||||
Build
|
||||
configure~
|
||||
xcshareddata
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
|
|
@ -1,6 +0,0 @@
|
|||
[submodule "external/tsschecker"]
|
||||
path = external/tsschecker
|
||||
url = https://github.com/tihmstar/tsschecker.git
|
||||
[submodule "external/idevicerestore"]
|
||||
path = external/idevicerestore
|
||||
url = https://github.com/tihmstar/idevicerestore.git
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = external/idevicerestore external/tsschecker futurerestore
|
||||
install installdirs: SUBDIRS = futurerestore
|
||||
SUBDIRS = futurerestore
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ __Only use if you are sure what you're doing.__
|
|||
* [libirecovery](https://github.com/libimobiledevice/libirecovery);
|
||||
* [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice);
|
||||
* [img4tool](https://github.com/tihmstar/img4tool);
|
||||
* [liboffsetfinder64](https://github.com/tihmstar/liboffsetfinder64);
|
||||
* [libipatcher](https://github.com/tihmstar/libipatcher)
|
||||
|
||||
* ## Submodules
|
||||
Make sure these projects compile on your system (install it's dependencies):
|
||||
|
|
|
|||
27
autogen.sh
27
autogen.sh
|
|
@ -1,27 +1,12 @@
|
|||
#!/bin/bash
|
||||
gprefix=`which glibtoolize 2>&1 >/dev/null`
|
||||
if [ $? -eq 0 ]; then
|
||||
glibtoolize --force
|
||||
else
|
||||
libtoolize --force
|
||||
fi
|
||||
|
||||
#cleanup cache for correct versioning when run multiple times
|
||||
rm -rf autom4te.cache
|
||||
|
||||
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
autoheader
|
||||
automake --add-missing
|
||||
autoreconf -i
|
||||
|
||||
export NOCONFIGURE=1
|
||||
|
||||
SUBDIRS="external/idevicerestore external/tsschecker"
|
||||
for SUB in $SUBDIRS; do
|
||||
pushd $SUB
|
||||
./autogen.sh
|
||||
popd
|
||||
done
|
||||
|
||||
unset NOCONFIGURE
|
||||
|
||||
if [ -z "$NOCONFIGURE" ]; then
|
||||
./configure "$@"
|
||||
fi
|
||||
./configure "$@"
|
||||
|
|
|
|||
41
configure.ac
41
configure.ac
|
|
@ -27,9 +27,8 @@ case $host_os in
|
|||
esac
|
||||
|
||||
# Checks the flags.
|
||||
CFLAGS+=" -DIDEVICERESTORE_NOMAIN=1 -DTSSCHECKER_NOMAIN=1"
|
||||
CXXFLAGS+=" -std=c++11"
|
||||
CFLAGS+=" -std=c11"
|
||||
CXXFLAGS+=" -std=c++17"
|
||||
CFLAGS+=" -std=c17"
|
||||
|
||||
AC_DEFUN([AX_UNPRECIOUS], [
|
||||
m4_define([_AC_PRECIOUS_VARS], m4_bpatsubst(_AC_PRECIOUS_VARS, [$1], []))
|
||||
|
|
@ -37,18 +36,19 @@ AC_DEFUN([AX_UNPRECIOUS], [
|
|||
AX_UNPRECIOUS([CFLAGS])
|
||||
export CFLAGS
|
||||
|
||||
AC_CONFIG_SUBDIRS(external/idevicerestore external/tsschecker)
|
||||
AC_CONFIG_SRCDIR([futurerestore])
|
||||
|
||||
# Checks the libraries.
|
||||
LIBIPATCHER_REQUIRES_STR="libipatcher >= 61"
|
||||
LIBPLIST_REQUIRES_STR="libplist-2.0 >= 2.2.0"
|
||||
LIBPLIST_REQUIRES_STR="libplist-2.0 >= 2.3.0"
|
||||
LIBZIP_REQUIRES_STR="libzip >= 0.10"
|
||||
LIBIMOBILEDEVICE_REQUIRES_STR="libimobiledevice-1.0 >= 1.2.1"
|
||||
LIBFRAGMENTZIP_REQUIRES_STR="libfragmentzip >= 47"
|
||||
LIBFWKEYFETCH_REQUIRES_STR="libfwkeyfetch >= 1"
|
||||
LIBIRECOVERY_REQUIRES_STR="libirecovery-1.0 >= 1.0.0"
|
||||
IMG4TOOL_REQUIRES_STR="libimg4tool >= 162"
|
||||
LIBGENERAL_REQUIRES_STR="libgeneral >= 26"
|
||||
LIBIDEVICERESTORE_REQUIRES_STR="libidevicerestore >= 1.0.0"
|
||||
LIBRA1NSN0W_REQUIRES_STR="libra1nsn0w >= 158"
|
||||
|
||||
PKG_CHECK_MODULES(libplist, $LIBPLIST_REQUIRES_STR)
|
||||
PKG_CHECK_MODULES(libzip, $LIBZIP_REQUIRES_STR)
|
||||
|
|
@ -57,31 +57,9 @@ PKG_CHECK_MODULES(libfragmentzip, $LIBFRAGMENTZIP_REQUIRES_STR)
|
|||
PKG_CHECK_MODULES(libirecovery, $LIBIRECOVERY_REQUIRES_STR)
|
||||
PKG_CHECK_MODULES(libimg4tool, $IMG4TOOL_REQUIRES_STR)
|
||||
PKG_CHECK_MODULES(libgeneral, $LIBGENERAL_REQUIRES_STR)
|
||||
|
||||
# Optional module libipatcher
|
||||
AC_ARG_WITH([libipatcher],
|
||||
[AS_HELP_STRING([--without-libipatcher],
|
||||
[build with bundle-less odysseus support (default is yes)])],
|
||||
[build_libipatcher=false],
|
||||
[build_libipatcher=true])
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
LIBIPATCHER_FLAGS=$($PKG_CONFIG --cflags libipatcher)
|
||||
if [test -z "$LIBIPATCHER_FLAGS"]; then
|
||||
do_libipatcher=no
|
||||
else
|
||||
AC_MSG_CHECKING([for futurerestore libipatcher])
|
||||
if test "$build_libipatcher" = "true"; then
|
||||
PKG_CHECK_MODULES(libipatcher, $LIBIPATCHER_REQUIRES_STR)
|
||||
AC_DEFINE(HAVE_LIBIPATCHER, 1, [Define if you have libipatcher])
|
||||
do_libipatcher=yes
|
||||
else
|
||||
do_libipatcher=no
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_LIBIPATCHER],[test "x$do_libipatcher" = "xyes"])
|
||||
|
||||
AC_DEFINE(CUSTOM_LOGGING, 1, [required for futurerestore])
|
||||
PKG_CHECK_MODULES(libidevicerestore, $LIBIDEVICERESTORE_REQUIRES_STR)
|
||||
PKG_CHECK_MODULES(libra1nsn0w, $LIBRA1NSN0W_REQUIRES_STR)
|
||||
PKG_CHECK_MODULES(libfwkeyfetch, $LIBFWKEYFETCH_REQUIRES_STR)
|
||||
|
||||
LT_INIT
|
||||
|
||||
|
|
@ -95,7 +73,6 @@ Configuration for $PACKAGE $VERSION:
|
|||
-------------------------------------------
|
||||
|
||||
Install prefix ..........: $prefix
|
||||
With libipatcher ........: $do_libipatcher
|
||||
Now type 'make' to build $PACKAGE $VERSION,
|
||||
and then 'make install' for installation.
|
||||
"
|
||||
|
|
|
|||
1
external/idevicerestore
vendored
1
external/idevicerestore
vendored
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c97e02e22b9971471db5dcb3b9e02eb30222d6c0
|
||||
1
external/tsschecker
vendored
1
external/tsschecker
vendored
|
|
@ -1 +0,0 @@
|
|||
Subproject commit b9d193aa6e6d24421094873c830692d02d8b32f5
|
||||
|
|
@ -7,45 +7,32 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
5669111D23B3D86E00C93279 /* libbz2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669111C23B3D86E00C93279 /* libbz2.a */; };
|
||||
5669111F23B3D88200C93279 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669111E23B3D88200C93279 /* libcrypto.a */; };
|
||||
5669112123B3D89B00C93279 /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112023B3D89B00C93279 /* libcurl.tbd */; };
|
||||
5669112323B3D89E00C93279 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112223B3D89E00C93279 /* libz.tbd */; };
|
||||
5669112523B3D8B200C93279 /* libfragmentzip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112423B3D8B200C93279 /* libfragmentzip.a */; };
|
||||
5669112723B3D8BE00C93279 /* libgeneral.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112623B3D8BE00C93279 /* libgeneral.a */; };
|
||||
5669112923B3D8CF00C93279 /* libimg4tool.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112823B3D8CE00C93279 /* libimg4tool.a */; };
|
||||
5669112B23B3D8DA00C93279 /* libimobiledevice.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112A23B3D8DA00C93279 /* libimobiledevice.a */; };
|
||||
5669112D23B3D8E200C93279 /* libipatcher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112C23B3D8E200C93279 /* libipatcher.a */; };
|
||||
5669112F23B3D8ED00C93279 /* libirecovery.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669112E23B3D8ED00C93279 /* libirecovery.a */; };
|
||||
5669113123B3D91B00C93279 /* libpartialzip-1.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669113023B3D91B00C93279 /* libpartialzip-1.0.a */; };
|
||||
5669113323B3D92B00C93279 /* libplist.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669113223B3D92B00C93279 /* libplist.a */; };
|
||||
5669113523B3D94300C93279 /* libzip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5669113423B3D94300C93279 /* libzip.a */; };
|
||||
2A3E771029ACA1590079E6B4 /* libimg3tool.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A3E770F29ACA1590079E6B4 /* libimg3tool.0.dylib */; };
|
||||
2A3E771129ACA1590079E6B4 /* libimg3tool.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2A3E770F29ACA1590079E6B4 /* libimg3tool.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2A4C882A2DF810E10010BA7E /* libfwkeyfetch.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A4C88292DF810E10010BA7E /* libfwkeyfetch.0.dylib */; };
|
||||
2A4C882B2DF810E10010BA7E /* libfwkeyfetch.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2A4C88292DF810E10010BA7E /* libfwkeyfetch.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2A76ED882A5BFBED0074B9E4 /* libtsschecker.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A76ED872A5BFBED0074B9E4 /* libtsschecker.0.dylib */; };
|
||||
2A76ED892A5BFBED0074B9E4 /* libtsschecker.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2A76ED872A5BFBED0074B9E4 /* libtsschecker.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2A8D85DB296D7056004894E4 /* libra1nsn0w.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A8D85DA296D7056004894E4 /* libra1nsn0w.0.dylib */; };
|
||||
2A8D85DC296D7056004894E4 /* libra1nsn0w.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2A8D85DA296D7056004894E4 /* libra1nsn0w.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2A8D85DE296D75B1004894E4 /* libpatchfinder.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A8D85DD296D75B1004894E4 /* libpatchfinder.0.dylib */; };
|
||||
2A8D85DF296D75B1004894E4 /* libpatchfinder.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2A8D85DD296D75B1004894E4 /* libpatchfinder.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2AC7AB922A8279A0004F21C9 /* libplist-2.0.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AC7AB912A8279A0004F21C9 /* libplist-2.0.4.dylib */; };
|
||||
2AC7AB932A8279A0004F21C9 /* libplist-2.0.4.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2AC7AB912A8279A0004F21C9 /* libplist-2.0.4.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2AE12620296C1F6B0051DB0F /* libgeneral.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE1261F296C1F6B0051DB0F /* libgeneral.0.dylib */; };
|
||||
2AE12621296C1F6B0051DB0F /* libgeneral.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2AE1261F296C1F6B0051DB0F /* libgeneral.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2AE12626296C1F830051DB0F /* libidevicerestore.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE12625296C1F830051DB0F /* libidevicerestore.0.dylib */; };
|
||||
2AE12627296C1F830051DB0F /* libidevicerestore.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2AE12625296C1F830051DB0F /* libidevicerestore.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2AE1262C296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE1262B296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib */; };
|
||||
2AE1262D296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2AE1262B296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2AE12632296C278E0051DB0F /* libimobiledevice-1.0.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE12631296C278E0051DB0F /* libimobiledevice-1.0.6.dylib */; };
|
||||
2AE12633296C278E0051DB0F /* libimobiledevice-1.0.6.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2AE12631296C278E0051DB0F /* libimobiledevice-1.0.6.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2AE12635296C306A0051DB0F /* libimg4tool.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE12634296C306A0051DB0F /* libimg4tool.0.dylib */; };
|
||||
2AE12636296C306A0051DB0F /* libimg4tool.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2AE12634296C306A0051DB0F /* libimg4tool.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
2AF0D6332C63BFA000CDBC03 /* libirecovery-1.0.5.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AF0D6322C63BFA000CDBC03 /* libirecovery-1.0.5.dylib */; };
|
||||
2AF0D6342C63BFA000CDBC03 /* libirecovery-1.0.5.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2AF0D6322C63BFA000CDBC03 /* libirecovery-1.0.5.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
878587471D89CFDC008689F0 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 878587461D89CFDC008689F0 /* main.cpp */; };
|
||||
8799B0B21D89D99D002F4D5F /* futurerestore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8799B0B01D89D99D002F4D5F /* futurerestore.cpp */; };
|
||||
8799B0B31D89DAE7002F4D5F /* idevicerestore.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785875C1D89D1C1008689F0 /* idevicerestore.c */; };
|
||||
8799B0B41D89DAF6002F4D5F /* tss.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587761D89D1C1008689F0 /* tss.c */; };
|
||||
8799B0B51D89DAFF002F4D5F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587511D89D1C1008689F0 /* common.c */; };
|
||||
8799B0B61D89DAFF002F4D5F /* dfu.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587531D89D1C1008689F0 /* dfu.c */; };
|
||||
8799B0B71D89DAFF002F4D5F /* normal.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785876C1D89D1C1008689F0 /* normal.c */; };
|
||||
8799B0B81D89DAFF002F4D5F /* recovery.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785876E1D89D1C1008689F0 /* recovery.c */; };
|
||||
8799B0B91D89DB0D002F4D5F /* img3.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785875E1D89D1C1008689F0 /* img3.c */; };
|
||||
8799B0BB1D89DB12002F4D5F /* download.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587551D89D1C1008689F0 /* download.c */; settings = {COMPILER_FLAGS = "-DPACKAGE_VERSION=\"\""; }; };
|
||||
8799B0BC1D89DB27002F4D5F /* ipsw.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587621D89D1C1008689F0 /* ipsw.c */; };
|
||||
8799B0BD1D89DB27002F4D5F /* limera1n.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587641D89D1C1008689F0 /* limera1n.c */; };
|
||||
8799B0BE1D89DB27002F4D5F /* restore.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587701D89D1C1008689F0 /* restore.c */; };
|
||||
8799B0BF1D89DB38002F4D5F /* asr.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785874F1D89D1C1008689F0 /* asr.c */; };
|
||||
8799B0C01D89DB38002F4D5F /* fdr.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587581D89D1C1008689F0 /* fdr.c */; };
|
||||
8799B0C11D89DB38002F4D5F /* fls.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785875A1D89D1C1008689F0 /* fls.c */; };
|
||||
8799B0C21D89DB46002F4D5F /* thread.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587741D89D1C1008689F0 /* thread.c */; };
|
||||
8799B0C31D89DB4B002F4D5F /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587721D89D1C1008689F0 /* socket.c */; };
|
||||
8799B0C41D89DB55002F4D5F /* mbn.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785876A1D89D1C1008689F0 /* mbn.c */; };
|
||||
8799B0C51D89DB67002F4D5F /* locking.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587671D89D1C1008689F0 /* locking.c */; };
|
||||
8799B0CA1D89E371002F4D5F /* img4.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587601D89D1C1008689F0 /* img4.c */; };
|
||||
8799B0CB1D89F796002F4D5F /* tsschecker.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785879F1D89D2BA008689F0 /* tsschecker.c */; };
|
||||
8799B0CC1D89F7B9002F4D5F /* download.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587981D89D2BA008689F0 /* download.c */; };
|
||||
87B517C3236EF36B009EAB8F /* ftab.c in Sources */ = {isa = PBXBuildFile; fileRef = 87B517C1236EF36B009EAB8F /* ftab.c */; };
|
||||
87B517C6236EF3B0009EAB8F /* json_plist.c in Sources */ = {isa = PBXBuildFile; fileRef = 87B517C5236EF3B0009EAB8F /* json_plist.c */; };
|
||||
87B517C9236EF3CD009EAB8F /* jsmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 87B517C7236EF3CD009EAB8F /* jsmn.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
|
@ -55,6 +42,18 @@
|
|||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
2AE12633296C278E0051DB0F /* libimobiledevice-1.0.6.dylib in Embed Libraries */,
|
||||
2AE12636296C306A0051DB0F /* libimg4tool.0.dylib in Embed Libraries */,
|
||||
2AC7AB932A8279A0004F21C9 /* libplist-2.0.4.dylib in Embed Libraries */,
|
||||
2A8D85DF296D75B1004894E4 /* libpatchfinder.0.dylib in Embed Libraries */,
|
||||
2A4C882B2DF810E10010BA7E /* libfwkeyfetch.0.dylib in Embed Libraries */,
|
||||
2AE1262D296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib in Embed Libraries */,
|
||||
2A3E771129ACA1590079E6B4 /* libimg3tool.0.dylib in Embed Libraries */,
|
||||
2AE12621296C1F6B0051DB0F /* libgeneral.0.dylib in Embed Libraries */,
|
||||
2AF0D6342C63BFA000CDBC03 /* libirecovery-1.0.5.dylib in Embed Libraries */,
|
||||
2AE12627296C1F830051DB0F /* libidevicerestore.0.dylib in Embed Libraries */,
|
||||
2A8D85DC296D7056004894E4 /* libra1nsn0w.0.dylib in Embed Libraries */,
|
||||
2A76ED892A5BFBED0074B9E4 /* libtsschecker.0.dylib in Embed Libraries */,
|
||||
);
|
||||
name = "Embed Libraries";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
@ -71,6 +70,21 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
2A3E770F29ACA1590079E6B4 /* libimg3tool.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libimg3tool.0.dylib; path = ../../../../usr/local/lib/libimg3tool.0.dylib; sourceTree = "<group>"; };
|
||||
2A4C88292DF810E10010BA7E /* libfwkeyfetch.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfwkeyfetch.0.dylib; path = ../../../../usr/local/lib/libfwkeyfetch.0.dylib; sourceTree = "<group>"; };
|
||||
2A76ED872A5BFBED0074B9E4 /* libtsschecker.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtsschecker.0.dylib; path = ../../../../usr/local/lib/libtsschecker.0.dylib; sourceTree = "<group>"; };
|
||||
2A8D85DA296D7056004894E4 /* libra1nsn0w.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libra1nsn0w.0.dylib; path = ../../../../usr/local/lib/libra1nsn0w.0.dylib; sourceTree = "<group>"; };
|
||||
2A8D85DD296D75B1004894E4 /* libpatchfinder.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpatchfinder.0.dylib; path = ../../../../usr/local/lib/libpatchfinder.0.dylib; sourceTree = "<group>"; };
|
||||
2AC7AB912A8279A0004F21C9 /* libplist-2.0.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libplist-2.0.4.dylib"; path = "../../../../usr/local/lib/libplist-2.0.4.dylib"; sourceTree = "<group>"; };
|
||||
2AE1261F296C1F6B0051DB0F /* libgeneral.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libgeneral.0.dylib; path = ../../../../usr/local/lib/libgeneral.0.dylib; sourceTree = "<group>"; };
|
||||
2AE12622296C1F760051DB0F /* libirecovery-1.0.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libirecovery-1.0.3.dylib"; path = "../../../../usr/local/lib/libirecovery-1.0.3.dylib"; sourceTree = "<group>"; };
|
||||
2AE12625296C1F830051DB0F /* libidevicerestore.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libidevicerestore.0.dylib; path = ../../../../usr/local/lib/libidevicerestore.0.dylib; sourceTree = "<group>"; };
|
||||
2AE12628296C1F9C0051DB0F /* libipatcher.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libipatcher.0.dylib; path = ../../../../usr/local/lib/libipatcher.0.dylib; sourceTree = "<group>"; };
|
||||
2AE1262B296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libimobiledevice-glue-1.0.0.dylib"; path = "../../../../usr/local/lib/libimobiledevice-glue-1.0.0.dylib"; sourceTree = "<group>"; };
|
||||
2AE1262E296C270B0051DB0F /* libplist-2.0.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libplist-2.0.3.dylib"; path = "../../../../usr/local/lib/libplist-2.0.3.dylib"; sourceTree = "<group>"; };
|
||||
2AE12631296C278E0051DB0F /* libimobiledevice-1.0.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libimobiledevice-1.0.6.dylib"; path = "../../../../usr/local/lib/libimobiledevice-1.0.6.dylib"; sourceTree = "<group>"; };
|
||||
2AE12634296C306A0051DB0F /* libimg4tool.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libimg4tool.0.dylib; path = ../../../../usr/local/lib/libimg4tool.0.dylib; sourceTree = "<group>"; };
|
||||
2AF0D6322C63BFA000CDBC03 /* libirecovery-1.0.5.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libirecovery-1.0.5.dylib"; path = "../../../../usr/local/lib/libirecovery-1.0.5.dylib"; sourceTree = "<group>"; };
|
||||
5669111C23B3D86E00C93279 /* libbz2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbz2.a; path = ../../../../../usr/local/lib/libbz2.a; sourceTree = "<group>"; };
|
||||
5669111E23B3D88200C93279 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../../../../../usr/local/lib/libcrypto.a; sourceTree = "<group>"; };
|
||||
5669112023B3D89B00C93279 /* libcurl.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcurl.tbd; path = usr/lib/libcurl.tbd; sourceTree = SDKROOT; };
|
||||
|
|
@ -86,60 +100,8 @@
|
|||
5669113423B3D94300C93279 /* libzip.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzip.a; path = ../../../../../usr/local/lib/libzip.a; sourceTree = "<group>"; };
|
||||
878587431D89CFDC008689F0 /* futurerestore */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = futurerestore; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
878587461D89CFDC008689F0 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
8785874F1D89D1C1008689F0 /* asr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = asr.c; sourceTree = "<group>"; };
|
||||
878587501D89D1C1008689F0 /* asr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asr.h; sourceTree = "<group>"; };
|
||||
878587511D89D1C1008689F0 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = common.c; sourceTree = "<group>"; };
|
||||
878587521D89D1C1008689F0 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
|
||||
878587531D89D1C1008689F0 /* dfu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dfu.c; sourceTree = "<group>"; };
|
||||
878587541D89D1C1008689F0 /* dfu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dfu.h; sourceTree = "<group>"; };
|
||||
878587551D89D1C1008689F0 /* download.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = download.c; sourceTree = "<group>"; };
|
||||
878587561D89D1C1008689F0 /* download.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = download.h; sourceTree = "<group>"; };
|
||||
878587571D89D1C1008689F0 /* endianness.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = endianness.h; sourceTree = "<group>"; };
|
||||
878587581D89D1C1008689F0 /* fdr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fdr.c; sourceTree = "<group>"; };
|
||||
878587591D89D1C1008689F0 /* fdr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fdr.h; sourceTree = "<group>"; };
|
||||
8785875A1D89D1C1008689F0 /* fls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fls.c; sourceTree = "<group>"; };
|
||||
8785875B1D89D1C1008689F0 /* fls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fls.h; sourceTree = "<group>"; };
|
||||
8785875C1D89D1C1008689F0 /* idevicerestore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = idevicerestore.c; sourceTree = "<group>"; };
|
||||
8785875D1D89D1C1008689F0 /* idevicerestore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = idevicerestore.h; sourceTree = "<group>"; };
|
||||
8785875E1D89D1C1008689F0 /* img3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img3.c; sourceTree = "<group>"; };
|
||||
8785875F1D89D1C1008689F0 /* img3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = img3.h; sourceTree = "<group>"; };
|
||||
878587601D89D1C1008689F0 /* img4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img4.c; sourceTree = "<group>"; };
|
||||
878587611D89D1C1008689F0 /* img4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = img4.h; sourceTree = "<group>"; };
|
||||
878587621D89D1C1008689F0 /* ipsw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ipsw.c; sourceTree = "<group>"; };
|
||||
878587631D89D1C1008689F0 /* ipsw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ipsw.h; sourceTree = "<group>"; };
|
||||
878587641D89D1C1008689F0 /* limera1n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = limera1n.c; sourceTree = "<group>"; };
|
||||
878587651D89D1C1008689F0 /* limera1n.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = limera1n.h; sourceTree = "<group>"; };
|
||||
878587661D89D1C1008689F0 /* limera1n_payload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = limera1n_payload.h; sourceTree = "<group>"; };
|
||||
878587671D89D1C1008689F0 /* locking.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = locking.c; sourceTree = "<group>"; };
|
||||
878587681D89D1C1008689F0 /* locking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = locking.h; sourceTree = "<group>"; };
|
||||
8785876A1D89D1C1008689F0 /* mbn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mbn.c; sourceTree = "<group>"; };
|
||||
8785876B1D89D1C1008689F0 /* mbn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mbn.h; sourceTree = "<group>"; };
|
||||
8785876C1D89D1C1008689F0 /* normal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = normal.c; sourceTree = "<group>"; };
|
||||
8785876D1D89D1C1008689F0 /* normal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = normal.h; sourceTree = "<group>"; };
|
||||
8785876E1D89D1C1008689F0 /* recovery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = recovery.c; sourceTree = "<group>"; };
|
||||
8785876F1D89D1C1008689F0 /* recovery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = recovery.h; sourceTree = "<group>"; };
|
||||
878587701D89D1C1008689F0 /* restore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = restore.c; sourceTree = "<group>"; };
|
||||
878587711D89D1C1008689F0 /* restore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = restore.h; sourceTree = "<group>"; };
|
||||
878587721D89D1C1008689F0 /* socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = socket.c; sourceTree = "<group>"; };
|
||||
878587731D89D1C1008689F0 /* socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = "<group>"; };
|
||||
878587741D89D1C1008689F0 /* thread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = thread.c; sourceTree = "<group>"; };
|
||||
878587751D89D1C1008689F0 /* thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = thread.h; sourceTree = "<group>"; };
|
||||
878587761D89D1C1008689F0 /* tss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tss.c; sourceTree = "<group>"; };
|
||||
878587771D89D1C1008689F0 /* tss.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tss.h; sourceTree = "<group>"; };
|
||||
878587981D89D2BA008689F0 /* download.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = download.c; sourceTree = "<group>"; };
|
||||
878587991D89D2BA008689F0 /* download.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = download.h; sourceTree = "<group>"; };
|
||||
8785879A1D89D2BA008689F0 /* jssy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jssy.c; path = ../external/jssy/jssy/jssy.c; sourceTree = "<group>"; };
|
||||
8785879B1D89D2BA008689F0 /* jssy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jssy.h; path = ../external/jssy/jssy/jssy.h; sourceTree = "<group>"; };
|
||||
8785879F1D89D2BA008689F0 /* tsschecker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsschecker.c; sourceTree = "<group>"; };
|
||||
878587A01D89D2BA008689F0 /* tsschecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tsschecker.h; sourceTree = "<group>"; };
|
||||
8799B0B01D89D99D002F4D5F /* futurerestore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = futurerestore.cpp; sourceTree = "<group>"; };
|
||||
8799B0B11D89D99D002F4D5F /* futurerestore.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = futurerestore.hpp; sourceTree = "<group>"; };
|
||||
87B517C1236EF36B009EAB8F /* ftab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ftab.c; sourceTree = "<group>"; };
|
||||
87B517C2236EF36B009EAB8F /* ftab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftab.h; sourceTree = "<group>"; };
|
||||
87B517C4236EF3B0009EAB8F /* json_plist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = json_plist.h; sourceTree = "<group>"; };
|
||||
87B517C5236EF3B0009EAB8F /* json_plist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = json_plist.c; sourceTree = "<group>"; };
|
||||
87B517C7236EF3CD009EAB8F /* jsmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jsmn.c; sourceTree = "<group>"; };
|
||||
87B517C8236EF3CD009EAB8F /* jsmn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsmn.h; sourceTree = "<group>"; };
|
||||
87F574C71E151DA6008D5C4D /* libcommonCrypto.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcommonCrypto.tbd; path = usr/lib/system/libcommonCrypto.tbd; sourceTree = SDKROOT; };
|
||||
87F574CC1E151EF8008D5C4D /* libcorecrypto.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcorecrypto.tbd; path = usr/lib/system/libcorecrypto.tbd; sourceTree = SDKROOT; };
|
||||
87F574CE1E151F11008D5C4D /* libSystem.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libSystem.tbd; path = usr/lib/libSystem.tbd; sourceTree = SDKROOT; };
|
||||
|
|
@ -150,19 +112,18 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5669113323B3D92B00C93279 /* libplist.a in Frameworks */,
|
||||
5669111D23B3D86E00C93279 /* libbz2.a in Frameworks */,
|
||||
5669112523B3D8B200C93279 /* libfragmentzip.a in Frameworks */,
|
||||
5669112923B3D8CF00C93279 /* libimg4tool.a in Frameworks */,
|
||||
5669112D23B3D8E200C93279 /* libipatcher.a in Frameworks */,
|
||||
5669112B23B3D8DA00C93279 /* libimobiledevice.a in Frameworks */,
|
||||
5669112F23B3D8ED00C93279 /* libirecovery.a in Frameworks */,
|
||||
5669113123B3D91B00C93279 /* libpartialzip-1.0.a in Frameworks */,
|
||||
5669112723B3D8BE00C93279 /* libgeneral.a in Frameworks */,
|
||||
5669112123B3D89B00C93279 /* libcurl.tbd in Frameworks */,
|
||||
5669112323B3D89E00C93279 /* libz.tbd in Frameworks */,
|
||||
5669111F23B3D88200C93279 /* libcrypto.a in Frameworks */,
|
||||
5669113523B3D94300C93279 /* libzip.a in Frameworks */,
|
||||
2AC7AB922A8279A0004F21C9 /* libplist-2.0.4.dylib in Frameworks */,
|
||||
2A3E771029ACA1590079E6B4 /* libimg3tool.0.dylib in Frameworks */,
|
||||
2AF0D6332C63BFA000CDBC03 /* libirecovery-1.0.5.dylib in Frameworks */,
|
||||
2AE12632296C278E0051DB0F /* libimobiledevice-1.0.6.dylib in Frameworks */,
|
||||
2A4C882A2DF810E10010BA7E /* libfwkeyfetch.0.dylib in Frameworks */,
|
||||
2A76ED882A5BFBED0074B9E4 /* libtsschecker.0.dylib in Frameworks */,
|
||||
2A8D85DB296D7056004894E4 /* libra1nsn0w.0.dylib in Frameworks */,
|
||||
2A8D85DE296D75B1004894E4 /* libpatchfinder.0.dylib in Frameworks */,
|
||||
2AE12635296C306A0051DB0F /* libimg4tool.0.dylib in Frameworks */,
|
||||
2AE1262C296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib in Frameworks */,
|
||||
2AE12620296C1F6B0051DB0F /* libgeneral.0.dylib in Frameworks */,
|
||||
2AE12626296C1F830051DB0F /* libidevicerestore.0.dylib in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -189,7 +150,6 @@
|
|||
878587451D89CFDC008689F0 /* futurerestore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8785874D1D89D1A4008689F0 /* external */,
|
||||
8799B0B11D89D99D002F4D5F /* futurerestore.hpp */,
|
||||
8799B0B01D89D99D002F4D5F /* futurerestore.cpp */,
|
||||
878587461D89CFDC008689F0 /* main.cpp */,
|
||||
|
|
@ -197,86 +157,24 @@
|
|||
path = futurerestore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8785874D1D89D1A4008689F0 /* external */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
878587961D89D2BA008689F0 /* tsschecker */,
|
||||
8785874E1D89D1C1008689F0 /* idevicerestore */,
|
||||
);
|
||||
name = external;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8785874E1D89D1C1008689F0 /* idevicerestore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8785874F1D89D1C1008689F0 /* asr.c */,
|
||||
878587501D89D1C1008689F0 /* asr.h */,
|
||||
878587511D89D1C1008689F0 /* common.c */,
|
||||
878587521D89D1C1008689F0 /* common.h */,
|
||||
878587531D89D1C1008689F0 /* dfu.c */,
|
||||
878587541D89D1C1008689F0 /* dfu.h */,
|
||||
878587551D89D1C1008689F0 /* download.c */,
|
||||
878587561D89D1C1008689F0 /* download.h */,
|
||||
878587571D89D1C1008689F0 /* endianness.h */,
|
||||
878587581D89D1C1008689F0 /* fdr.c */,
|
||||
878587591D89D1C1008689F0 /* fdr.h */,
|
||||
8785875A1D89D1C1008689F0 /* fls.c */,
|
||||
8785875B1D89D1C1008689F0 /* fls.h */,
|
||||
8785875C1D89D1C1008689F0 /* idevicerestore.c */,
|
||||
8785875D1D89D1C1008689F0 /* idevicerestore.h */,
|
||||
8785875E1D89D1C1008689F0 /* img3.c */,
|
||||
8785875F1D89D1C1008689F0 /* img3.h */,
|
||||
878587601D89D1C1008689F0 /* img4.c */,
|
||||
878587611D89D1C1008689F0 /* img4.h */,
|
||||
87B517C5236EF3B0009EAB8F /* json_plist.c */,
|
||||
87B517C4236EF3B0009EAB8F /* json_plist.h */,
|
||||
87B517C1236EF36B009EAB8F /* ftab.c */,
|
||||
87B517C2236EF36B009EAB8F /* ftab.h */,
|
||||
87B517C7236EF3CD009EAB8F /* jsmn.c */,
|
||||
87B517C8236EF3CD009EAB8F /* jsmn.h */,
|
||||
878587621D89D1C1008689F0 /* ipsw.c */,
|
||||
878587631D89D1C1008689F0 /* ipsw.h */,
|
||||
878587641D89D1C1008689F0 /* limera1n.c */,
|
||||
878587651D89D1C1008689F0 /* limera1n.h */,
|
||||
878587661D89D1C1008689F0 /* limera1n_payload.h */,
|
||||
878587671D89D1C1008689F0 /* locking.c */,
|
||||
878587681D89D1C1008689F0 /* locking.h */,
|
||||
8785876A1D89D1C1008689F0 /* mbn.c */,
|
||||
8785876B1D89D1C1008689F0 /* mbn.h */,
|
||||
8785876C1D89D1C1008689F0 /* normal.c */,
|
||||
8785876D1D89D1C1008689F0 /* normal.h */,
|
||||
8785876E1D89D1C1008689F0 /* recovery.c */,
|
||||
8785876F1D89D1C1008689F0 /* recovery.h */,
|
||||
878587701D89D1C1008689F0 /* restore.c */,
|
||||
878587711D89D1C1008689F0 /* restore.h */,
|
||||
878587721D89D1C1008689F0 /* socket.c */,
|
||||
878587731D89D1C1008689F0 /* socket.h */,
|
||||
878587741D89D1C1008689F0 /* thread.c */,
|
||||
878587751D89D1C1008689F0 /* thread.h */,
|
||||
878587761D89D1C1008689F0 /* tss.c */,
|
||||
878587771D89D1C1008689F0 /* tss.h */,
|
||||
);
|
||||
name = idevicerestore;
|
||||
path = external/idevicerestore/src;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
878587961D89D2BA008689F0 /* tsschecker */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
878587991D89D2BA008689F0 /* download.h */,
|
||||
878587981D89D2BA008689F0 /* download.c */,
|
||||
8785879B1D89D2BA008689F0 /* jssy.h */,
|
||||
8785879A1D89D2BA008689F0 /* jssy.c */,
|
||||
878587A01D89D2BA008689F0 /* tsschecker.h */,
|
||||
8785879F1D89D2BA008689F0 /* tsschecker.c */,
|
||||
);
|
||||
name = tsschecker;
|
||||
path = external/tsschecker/tsschecker;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
87F574C21E151CDE008D5C4D /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A4C88292DF810E10010BA7E /* libfwkeyfetch.0.dylib */,
|
||||
2AF0D6322C63BFA000CDBC03 /* libirecovery-1.0.5.dylib */,
|
||||
2AC7AB912A8279A0004F21C9 /* libplist-2.0.4.dylib */,
|
||||
2A76ED872A5BFBED0074B9E4 /* libtsschecker.0.dylib */,
|
||||
2A3E770F29ACA1590079E6B4 /* libimg3tool.0.dylib */,
|
||||
2A8D85DD296D75B1004894E4 /* libpatchfinder.0.dylib */,
|
||||
2A8D85DA296D7056004894E4 /* libra1nsn0w.0.dylib */,
|
||||
2AE12634296C306A0051DB0F /* libimg4tool.0.dylib */,
|
||||
2AE12631296C278E0051DB0F /* libimobiledevice-1.0.6.dylib */,
|
||||
2AE1262E296C270B0051DB0F /* libplist-2.0.3.dylib */,
|
||||
2AE1262B296C24560051DB0F /* libimobiledevice-glue-1.0.0.dylib */,
|
||||
2AE12628296C1F9C0051DB0F /* libipatcher.0.dylib */,
|
||||
2AE12625296C1F830051DB0F /* libidevicerestore.0.dylib */,
|
||||
2AE12622296C1F760051DB0F /* libirecovery-1.0.3.dylib */,
|
||||
2AE1261F296C1F6B0051DB0F /* libgeneral.0.dylib */,
|
||||
5669111C23B3D86E00C93279 /* libbz2.a */,
|
||||
87F574C71E151DA6008D5C4D /* libcommonCrypto.tbd */,
|
||||
87F574CC1E151EF8008D5C4D /* libcorecrypto.tbd */,
|
||||
|
|
@ -354,31 +252,7 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8799B0C11D89DB38002F4D5F /* fls.c in Sources */,
|
||||
8799B0B41D89DAF6002F4D5F /* tss.c in Sources */,
|
||||
8799B0C01D89DB38002F4D5F /* fdr.c in Sources */,
|
||||
8799B0BC1D89DB27002F4D5F /* ipsw.c in Sources */,
|
||||
87B517C3236EF36B009EAB8F /* ftab.c in Sources */,
|
||||
8799B0CC1D89F7B9002F4D5F /* download.c in Sources */,
|
||||
8799B0B91D89DB0D002F4D5F /* img3.c in Sources */,
|
||||
8799B0B51D89DAFF002F4D5F /* common.c in Sources */,
|
||||
8799B0C41D89DB55002F4D5F /* mbn.c in Sources */,
|
||||
8799B0B81D89DAFF002F4D5F /* recovery.c in Sources */,
|
||||
8799B0B31D89DAE7002F4D5F /* idevicerestore.c in Sources */,
|
||||
8799B0BB1D89DB12002F4D5F /* download.c in Sources */,
|
||||
8799B0B71D89DAFF002F4D5F /* normal.c in Sources */,
|
||||
87B517C9236EF3CD009EAB8F /* jsmn.c in Sources */,
|
||||
8799B0C31D89DB4B002F4D5F /* socket.c in Sources */,
|
||||
8799B0C21D89DB46002F4D5F /* thread.c in Sources */,
|
||||
8799B0B61D89DAFF002F4D5F /* dfu.c in Sources */,
|
||||
8799B0BD1D89DB27002F4D5F /* limera1n.c in Sources */,
|
||||
8799B0C51D89DB67002F4D5F /* locking.c in Sources */,
|
||||
878587471D89CFDC008689F0 /* main.cpp in Sources */,
|
||||
87B517C6236EF3B0009EAB8F /* json_plist.c in Sources */,
|
||||
8799B0BF1D89DB38002F4D5F /* asr.c in Sources */,
|
||||
8799B0BE1D89DB27002F4D5F /* restore.c in Sources */,
|
||||
8799B0CB1D89F796002F4D5F /* tsschecker.c in Sources */,
|
||||
8799B0CA1D89E371002F4D5F /* img4.c in Sources */,
|
||||
8799B0B21D89D99D002F4D5F /* futurerestore.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
@ -493,12 +367,13 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
"IDEVICERESTORE_NOMAIN=1",
|
||||
"CUSTOM_LOGGING=1",
|
||||
"HAVE_REALPATH=1",
|
||||
XCODE,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
|
|
@ -507,6 +382,7 @@
|
|||
/usr/local/opt/openssl/lib,
|
||||
"$(SDKROOT)/usr/lib/system",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 14.6;
|
||||
OTHER_CFLAGS = "-DHAVE_LIBIPATCHER";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "/usr/local/opt/openssl/include /usr/local/include $(SRCROOT)/external/libgeneral/include $(SRCROOT)/external/tsschecker/external/jssy/jssy $(SRCROOT)/external/idevicerestore/src";
|
||||
|
|
@ -517,6 +393,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
/usr/local/lib,
|
||||
|
|
@ -524,6 +401,7 @@
|
|||
/usr/local/opt/openssl/lib,
|
||||
"$(SDKROOT)/usr/lib/system",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 14.6;
|
||||
OTHER_CFLAGS = "-DHAVE_LIBIPATCHER";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "/usr/local/opt/openssl/include /usr/local/include $(SRCROOT)/external/libgeneral/include $(SRCROOT)/external/tsschecker/external/jssy/jssy $(SRCROOT)/external/idevicerestore/src";
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
AM_CFLAGS = -I$(top_srcdir)/external/libgeneral/include -I$(top_srcdir)/external/tsschecker/external/jssy/jssy -I$(top_srcdir)/external/tsschecker/tsschecker -I$(top_srcdir)/external/idevicerestore/src $(libplist_CFLAGS) $(libzip_CFLAGS) $(libimobiledevice_CFLAGS) $(libfragmentzip_CFLAGS) $(libirecovery_CFLAGS) $(libimg4tool_CFLAGS) $(libgeneral_CFLAGS)
|
||||
AM_LDFLAGS = $(libplist_LIBS) $(libzip_LIBS) $(libimobiledevice_LIBS) $(libfragmentzip_LIBS) $(libirecovery_LIBS) $(libimg4tool_LIBS) $(libgeneral_LIBS)
|
||||
|
||||
if HAVE_LIBIPATCHER
|
||||
AM_LDFLAGS += $(libipatcher_LIBS)
|
||||
AM_CFLAGS += $(libipatcher_CFLAGS)
|
||||
endif
|
||||
AM_CFLAGS = $(libplist_CFLAGS) $(libzip_CFLAGS) $(libimobiledevice_CFLAGS) $(libfragmentzip_CFLAGS) $(libfwkeyfetch_CFLAGS) \
|
||||
$(libirecovery_CFLAGS) $(libimg4tool_CFLAGS) $(libgeneral_CFLAGS) $(libidevicerestore_CFLAGS) $(libra1nsn0w_CFLAGS)
|
||||
AM_LDFLAGS = $(libplist_LIBS) $(libzip_LIBS) $(libimobiledevice_LIBS) $(libfragmentzip_LIBS) $(libfwkeyfetch_LIBS) \
|
||||
$(libirecovery_LIBS) $(libimg4tool_LIBS) $(libgeneral_LIBS) $(libidevicerestore_LIBS) $(libra1nsn0w_LIBS)
|
||||
|
||||
bin_PROGRAMS = futurerestore
|
||||
futurerestore_CXXFLAGS = $(AM_CFLAGS)
|
||||
futurerestore_LDADD = $(top_srcdir)/external/idevicerestore/src/libidevicerestore.la $(top_srcdir)/external/tsschecker/tsschecker/libtsschecker.la $(top_srcdir)/external/tsschecker/tsschecker/libjssy.a $(AM_LDFLAGS)
|
||||
futurerestore_LDADD = $(AM_LDFLAGS)
|
||||
futurerestore_SOURCES = futurerestore.cpp main.cpp
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -19,107 +19,98 @@
|
|||
#include <stdio.h>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include "idevicerestore.h"
|
||||
#include <jssy.h>
|
||||
#include <plist/plist.h>
|
||||
#include <libgeneral/Mem.hpp>
|
||||
|
||||
using namespace std;
|
||||
#include <ra1nsn0w/ra1nsn0w.hpp>
|
||||
|
||||
template <typename T>
|
||||
class ptr_smart {
|
||||
std::function<void(T)> _ptr_free = NULL;
|
||||
public:
|
||||
T _p;
|
||||
ptr_smart(T p, function<void(T)> ptr_free){static_assert(is_pointer<T>(), "error: this is for pointers only\n"); _p = p;_ptr_free = ptr_free;}
|
||||
ptr_smart(T p){_p = p;}
|
||||
ptr_smart(){_p = NULL;}
|
||||
ptr_smart(ptr_smart &&p){ _p = p._p; _ptr_free = p._ptr_free; p._p = NULL; p._ptr_free = NULL;}
|
||||
ptr_smart& operator =(ptr_smart &&p){_p = p._p; _ptr_free = p._ptr_free; p._p = NULL; p._ptr_free = NULL; return *this;}
|
||||
T operator =(T p){ _p = p; return _p;}
|
||||
T operator =(T &p){_p = p; p = NULL; return _p;}
|
||||
T *operator&(){return &_p;}
|
||||
explicit operator const T() const {return _p;}
|
||||
operator const void*() const {return _p;}
|
||||
~ptr_smart(){if (_p) (_ptr_free) ? _ptr_free(_p) : free((void*)_p);}
|
||||
extern "C"{
|
||||
#include <idevicerestore/idevicerestore.h>
|
||||
};
|
||||
|
||||
class futurerestore {
|
||||
struct idevicerestore_client_t* _client;
|
||||
char *_ibootBuild = NULL;
|
||||
bool _didInit = false;
|
||||
vector<plist_t> _aptickets;
|
||||
vector<pair<char *, size_t>>_im4ms;
|
||||
int _foundnonce = -1;
|
||||
bool _isUpdateInstall = false;
|
||||
bool _isPwnDfu = false;
|
||||
|
||||
char *_firmwareJson = NULL;
|
||||
jssytok_t *_firmwareTokens = NULL;;
|
||||
char *__latestManifest = NULL;
|
||||
char *__latestFirmwareUrl = NULL;
|
||||
|
||||
plist_t _sepbuildmanifest = NULL;
|
||||
plist_t _basebandbuildmanifest = NULL;
|
||||
|
||||
const char *_basebandPath = NULL;;
|
||||
const char *_sepbuildmanifestPath = NULL;
|
||||
const char *_basebandbuildmanifestPath = NULL;
|
||||
|
||||
bool _enterPwnRecoveryRequested = false;
|
||||
bool _rerestoreiOS9 = false;
|
||||
//methods
|
||||
void enterPwnRecovery(plist_t build_identity, std::string bootargs = "");
|
||||
|
||||
public:
|
||||
futurerestore(bool isUpdateInstall = false, bool isPwnDfu = false);
|
||||
bool init();
|
||||
int getDeviceMode(bool reRequest);
|
||||
uint64_t getDeviceEcid();
|
||||
void putDeviceIntoRecovery();
|
||||
void setAutoboot(bool val);
|
||||
void exitRecovery();
|
||||
void waitForNonce();
|
||||
void waitForNonce(vector<const char *>nonces, size_t nonceSize);
|
||||
void loadAPTickets(const vector<const char *> &apticketPaths);
|
||||
char *getiBootBuild();
|
||||
|
||||
plist_t nonceMatchesApTickets();
|
||||
std::pair<const char *,size_t> nonceMatchesIM4Ms();
|
||||
struct idevicerestore_mode_t;
|
||||
|
||||
void loadFirmwareTokens();
|
||||
const char *getDeviceModelNoCopy();
|
||||
const char *getDeviceBoardNoCopy();
|
||||
char *getLatestManifest();
|
||||
char *getLatestFirmwareUrl();
|
||||
void loadLatestBaseband();
|
||||
void loadLatestSep();
|
||||
class futurerestore {
|
||||
idevicerestore_client_t *_client;
|
||||
|
||||
std::vector<plist_t> _aptickets;
|
||||
std::vector<tihmstar::Mem>_im4ms;
|
||||
tihmstar::Mem _donorLLB;
|
||||
std::string _donorIPSW;
|
||||
tihmstar::Mem _sep;
|
||||
std::string _latestFirmwareUrl;
|
||||
|
||||
void setSepManifestPath(const char *sepManifestPath);
|
||||
void setBasebandManifestPath(const char *basebandManifestPath);
|
||||
void loadSep(const char *sepPath);
|
||||
void setBasebandPath(const char *basebandPath);
|
||||
bool isUpdateInstall(){return _isUpdateInstall;};
|
||||
|
||||
plist_t sepManifest(){return _sepbuildmanifest;};
|
||||
plist_t basebandManifest(){return _basebandbuildmanifest;};
|
||||
const char *sepManifestPath(){return _sepbuildmanifestPath;};
|
||||
const char *basebandManifestPath(){return _basebandbuildmanifestPath;};
|
||||
bool is32bit(){return !is_image4_supported(_client);};
|
||||
|
||||
uint64_t getBasebandGoldCertIDFromDevice();
|
||||
|
||||
void doRestore(const char *ipsw);
|
||||
int doJustBoot(const char *ipsw, std::string bootargs = "");
|
||||
tihmstar::Mem _customRamdisk;
|
||||
tihmstar::Mem _sepTicket;
|
||||
plist_t _p_latestManifestCache;
|
||||
tihmstar::ra1nsn0w::launchConfig _persist_cfg;
|
||||
|
||||
bool _isUpdateInstall;
|
||||
bool _isPwnDfu;
|
||||
bool _no_ticket_needed;
|
||||
bool _restorePwnage;
|
||||
bool _restore24kpwn;
|
||||
bool _needsDecryptedRamdisk;
|
||||
|
||||
private:
|
||||
const plist_t loadBuilmanifestForLatestFirmware();
|
||||
tihmstar::Mem getComponentFromIPSW(const char *ipswPath, const char *component);
|
||||
|
||||
public:
|
||||
futurerestore(uint64_t ecid = 0, bool isUpdateInstall = false, bool isPwnDfu = true);
|
||||
~futurerestore();
|
||||
|
||||
static std::pair<const char *,size_t> getRamdiskHashFromSCAB(const char* scab, size_t scabSize);
|
||||
static std::pair<const char *,size_t> getNonceFromSCAB(const char* scab, size_t scabSize);
|
||||
static uint64_t getEcidFromSCAB(const char* scab, size_t scabSize);
|
||||
static plist_t loadPlistFromFile(const char *path);
|
||||
static void saveStringToFile(const char *str, const char *path);
|
||||
static char *getPathOfElementInManifest(const char *element, const char *manifeststr, const char *model, int isUpdateInstall);
|
||||
static std::string getGeneratorFromSHSH2(const plist_t shsh2);
|
||||
void setPersistCfg(tihmstar::ra1nsn0w::launchConfig cfg);
|
||||
void setRestorePwnage(bool restorePwnage);
|
||||
void setRestore24kpwn(bool restore24kpwn);
|
||||
void setNeedsDecryptedRamdisk(bool needsDecryptedRamdisk);
|
||||
void setNoTicketNeeded(bool ticketIsNotNeeded);
|
||||
void loadAPTickets(const std::vector<const char*> &APTicketPaths);
|
||||
|
||||
idevicerestore_mode_t *getDeviceMode();
|
||||
bool isInRestoreMode();
|
||||
void putDeviceIntoRecovery();
|
||||
|
||||
tihmstar::Mem getRamdiskForDevice(const char *ipswpath);
|
||||
|
||||
void doRestore(const char *ipswpath);
|
||||
void enterPwnRestore(const char *ipswpath, bool is32bit, const char *bootargs = NULL, tihmstar::ra1nsn0w::launchConfig = {});
|
||||
void enterRestore(const char *ipswpath);
|
||||
|
||||
void setLLBFromIPSW(const char *llbipswpath);
|
||||
|
||||
const char *getDeviceBoardNoCopy();
|
||||
const char *getDeviceModelNoCopy();
|
||||
|
||||
plist_t nonceMatchesApTickets();
|
||||
tihmstar::Mem nonceMatchesIM4Ms();
|
||||
uint64_t getDeviceEcid();
|
||||
uint32_t getDeviceCPID();
|
||||
uint32_t getDeviceBDID();
|
||||
|
||||
void requestFreshAPTicket(plist_t buildManifest, const char *variant = NULL);
|
||||
void requestFreshAPTicket(const char *ipsw, const char *variant = NULL);
|
||||
void requestFreshSEPTicket(plist_t buildManifest, const char *variant = NULL);
|
||||
void fetchLatestBaseband();
|
||||
void fetchLatestSEP();
|
||||
|
||||
void setCustomBasebandPath(const char *basebandPath);
|
||||
void setCustomSEPPath(const char *SEPPath);
|
||||
void setCustomBasebandManifest(plist_t basebandManifest);
|
||||
void setCustomSEPManifest(plist_t SEPManifest);
|
||||
|
||||
void setCustomRamdisk(const char *ramdiskPath);
|
||||
|
||||
void verifyBasebandTicketCanBeRequested();
|
||||
|
||||
#pragma mark static
|
||||
static tihmstar::Mem getRamdiskHashFromSCAB(const void* scab, size_t scabSize);
|
||||
// static std::pair<const char *,size_t> getNonceFromSCAB(const char* scab, size_t scabSize);
|
||||
static uint64_t getEcidFromSCAB(const void* scab, size_t scabSize);
|
||||
// static plist_t loadPlistFromFile(const char *path);
|
||||
// static void saveStringToFile(const char *str, const char *path);
|
||||
// static char *getPathOfElementInManifest(const char *element, const char *manifeststr, const char *model, int isUpdateInstall);
|
||||
// static std::string getGeneratorFromSHSH2(const plist_t shsh2);
|
||||
};
|
||||
|
||||
#endif /* futurerestore_hpp */
|
||||
|
|
|
|||
|
|
@ -13,16 +13,12 @@
|
|||
#include <vector>
|
||||
#include "futurerestore.hpp"
|
||||
|
||||
extern "C"{
|
||||
#include "tsschecker.h"
|
||||
#undef VERSION_COMMIT_SHA
|
||||
#undef VERSION_COMMIT_COUNT
|
||||
};
|
||||
|
||||
#include <libgeneral/macros.h>
|
||||
#ifdef HAVE_LIBIPATCHER
|
||||
#include <libipatcher/libipatcher.hpp>
|
||||
#endif
|
||||
|
||||
#include <tsschecker/TssRequest.hpp>
|
||||
#include <tsschecker/tsschecker.hpp>
|
||||
|
||||
#include <ra1nsn0w/ra1nsn0w_plugins.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
|
|
@ -31,155 +27,217 @@ extern "C"{
|
|||
#endif
|
||||
#endif
|
||||
|
||||
extern int idevicerestore_debug;
|
||||
|
||||
static struct option longopts[] = {
|
||||
{ "debug", no_argument, NULL, 'd' },
|
||||
{ "ecid", required_argument, NULL, 'e' },
|
||||
{ "ramdisk", required_argument, NULL, 'r' },
|
||||
{ "apticket", required_argument, NULL, 't' },
|
||||
{ "baseband", required_argument, NULL, 'b' },
|
||||
{ "baseband-manifest", required_argument, NULL, 'p' },
|
||||
{ "fresh-apticket", optional_argument, NULL, 'T' },
|
||||
{ "update", no_argument, NULL, 'u' },
|
||||
{ "32bit", no_argument, NULL, 0 },
|
||||
{ "decrypt-ramdisk", no_argument, NULL, 0 },
|
||||
{ "no-ticket", no_argument, NULL, 0 },
|
||||
{ "ra1nsn0warg", required_argument, NULL, 0 },
|
||||
{ "ra1nsn0warg-persist",required_argument, NULL, 0 },
|
||||
{ "restore-pwnage", no_argument, NULL, 0 },
|
||||
{ "restore-24kpwn", no_argument, NULL, 0 },
|
||||
|
||||
{ "tethered-downgrade", required_argument, NULL, 0 },
|
||||
{ "bootargs", required_argument, NULL, 'b' },
|
||||
|
||||
{ "default-sep", no_argument, NULL, 0 },
|
||||
{ "latest-sep", no_argument, NULL, 0 },
|
||||
{ "sep", required_argument, NULL, 's' },
|
||||
{ "sep-manifest", required_argument, NULL, 'm' },
|
||||
{ "wait", no_argument, NULL, 'w' },
|
||||
{ "update", no_argument, NULL, 'u' },
|
||||
{ "debug", no_argument, NULL, 'd' },
|
||||
{ "exit-recovery", no_argument, NULL, 'e' },
|
||||
{ "latest-sep", no_argument, NULL, '0' },
|
||||
{ "latest-baseband", no_argument, NULL, '1' },
|
||||
{ "no-baseband", no_argument, NULL, '2' },
|
||||
#ifdef HAVE_LIBIPATCHER
|
||||
{ "use-pwndfu", no_argument, NULL, '3' },
|
||||
{ "just-boot", optional_argument, NULL, '4' },
|
||||
#endif
|
||||
|
||||
{ "latest-baseband", no_argument, NULL, 0 },
|
||||
{ "baseband", required_argument, NULL, 'B' },
|
||||
{ "baseband-manifest", required_argument, NULL, 'M' },
|
||||
{ "no-baseband", no_argument, NULL, 0 },
|
||||
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
#define FLAG_WAIT 1 << 0
|
||||
#define FLAG_UPDATE 1 << 1
|
||||
#define FLAG_LATEST_SEP 1 << 2
|
||||
#define FLAG_LATEST_BASEBAND 1 << 3
|
||||
#define FLAG_NO_BASEBAND 1 << 4
|
||||
#define FLAG_IS_PWN_DFU 1 << 5
|
||||
|
||||
void cmd_help(){
|
||||
printf("Usage: futurerestore [OPTIONS] iPSW\n");
|
||||
printf("Allows restoring to non-matching firmware with custom SEP+baseband\n");
|
||||
printf("\nGeneral options:\n");
|
||||
printf(" -t, --apticket PATH\t\tSigning tickets used for restoring\n");
|
||||
printf(" -u, --update\t\t\tUpdate instead of erase install (requires appropriate APTicket)\n");
|
||||
printf(" \t\t\tDO NOT use this parameter, if you update from jailbroken firmware!\n");
|
||||
printf(" -w, --wait\t\t\tKeep rebooting until ApNonce matches APTicket (ApNonce collision, unreliable)\n");
|
||||
printf(" -d, --debug\t\t\tShow all code, use to save a log for debug testing\n");
|
||||
printf(" -e, --exit-recovery\t\tExit recovery mode and quit\n");
|
||||
|
||||
#ifdef HAVE_LIBIPATCHER
|
||||
printf("\nOptions for downgrading with Odysseus:\n");
|
||||
printf(" --use-pwndfu\t\tRestoring devices with Odysseus method. Device needs to be in pwned DFU mode already\n");
|
||||
printf(" --just-boot=\"-v\"\t\tTethered booting the device from pwned DFU mode. You can optionally set boot-args\n");
|
||||
#endif
|
||||
|
||||
printf("\nOptions for SEP:\n");
|
||||
printf(" --latest-sep\t\tUse latest signed SEP instead of manually specifying one (may cause bad restore)\n");
|
||||
printf(" -s, --sep PATH\t\tSEP to be flashed\n");
|
||||
printf(" -m, --sep-manifest PATH\tBuildManifest for requesting SEP ticket\n");
|
||||
|
||||
printf("\nOptions for baseband:\n");
|
||||
printf(" --latest-baseband\t\tUse latest signed baseband instead of manually specifying one (may cause bad restore)\n");
|
||||
printf(" -b, --baseband PATH\t\tBaseband to be flashed\n");
|
||||
printf(" -p, --baseband-manifest PATH\tBuildManifest for requesting baseband ticket\n");
|
||||
printf(" --no-baseband\t\tSkip checks and don't flash baseband\n");
|
||||
printf(" \t\tOnly use this for device without a baseband (eg. iPod touch or some Wi-Fi only iPads)\n\n");
|
||||
printf(
|
||||
"Usage: futurerestore [OPTIONS] IPSW\n"
|
||||
"Allows restoring to non-matching firmware with custom SEP+baseband\n"
|
||||
"\nGeneral options:\n"
|
||||
" -d, --debug\t\t\t\tShow all code, use to save a log for debug testing\n"
|
||||
" -e, --ecid\t\t\t\tSet device ECID\n"
|
||||
" -r, --ramdisk PATH\t\t\tBoot custom ramdisk\n"
|
||||
" -t, --apticket PATH\t\t\tSigning tickets used for restoring\n"
|
||||
" -T, --fresh-apticket [VARIANT]\tSigning tickets used for restoring\n"
|
||||
" -u, --update\t\t\t\tUpdate instead of erase install (requires appropriate APTicket)\n"
|
||||
" \t\t\t\tDO NOT use this parameter, if you update from jailbroken firmware!\n"
|
||||
" --32bit\t\t\t\tUse 32bit patchfinder instead of 64bit\n"
|
||||
" --decrypt-ramdisk\t\t\tDecrypt ramdisk before sending (needed for iOS 3.0 and 3.0.1 restore)\n"
|
||||
" --no-ticket\t\t\tDon't expect ticket (used for iOS 2.0 restore)\n"
|
||||
" --ra1nsn0warg <arg>\t\tPass extra arg to ra1nsn0w (can use multiple times)\n"
|
||||
" --ra1nsn0warg-persist <arg>\t\tPass extra arg to ra1nsn0w for persistent patches (for use with restore-pwnage)\n"
|
||||
" --restore-pwnage\t\tFlash jailbroken bootchain (only works for 0x8900 devices)\n"
|
||||
" --restore-24kpwn\t\tFlash jailbroken bootchain with 24kpwn exploit (only works for 0x8720 and 0x8920 devices)\n"
|
||||
|
||||
"\nOptions for downgrading with Odysseus:\n"
|
||||
" -b, --bootargs=\"-v\"\t\t\tSet bootargs\n"
|
||||
" --tethered-downgrade=<LLB IPSW>\tSkip APTicket checks when downgrading (flash donor LLB from other IPSW)\n"
|
||||
|
||||
"\nOptions for SEP:\n"
|
||||
" -s, --sep PATH\t\tSEP to be flashed\n"
|
||||
" -m, --sep-manifest PATH\tBuildManifest for requesting SEP ticket\n"
|
||||
" --latest-sep\t\tUse latest signed SEP instead of manually specifying one (may cause bad restore)\n"
|
||||
" --default-sep\t\tUse the SEP inside the IPSW\n"
|
||||
|
||||
|
||||
"\nOptions for baseband:\n"
|
||||
" -B, --baseband PATH\t\tBaseband to be flashed\n"
|
||||
" -M, --baseband-manifest PATH\tBuildManifest for requesting baseband ticket\n"
|
||||
" --latest-baseband\t\tUse latest signed baseband instead of manually specifying one (may cause bad restore)\n"
|
||||
" --no-baseband\t\tSkip baseband checks\n"
|
||||
" \t\tOnly use this for device without a baseband (eg. iPod touch or some Wi-Fi only iPads)\n\n"
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
DWORD termFlags;
|
||||
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
if (GetConsoleMode(handle, &termFlags))
|
||||
SetConsoleMode(handle, termFlags | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace tihmstar;
|
||||
|
||||
MAINFUNCTION
|
||||
int main_r(int argc, const char * argv[]) {
|
||||
int err=0;
|
||||
printf("Version: " VERSION_COMMIT_SHA " - " VERSION_COMMIT_COUNT "\n");
|
||||
#ifdef HAVE_LIBIPATCHER
|
||||
printf("%s\n",libipatcher::version());
|
||||
printf("Odysseus for 32-bit support: yes\n");
|
||||
printf("Odysseus for 64-bit support: %s\n",(libipatcher::has64bitSupport() ? "yes" : "no"));
|
||||
#else
|
||||
printf("Odysseus support: no\n");
|
||||
#endif
|
||||
info("%s", VERSION_STRING);
|
||||
|
||||
if (ra1nsn0w::loadPlugins()) {
|
||||
info("ra1nsn0w plugin support: yes");
|
||||
}else{
|
||||
info("ra1nsn0w plugin support: no");
|
||||
}
|
||||
|
||||
int optindex = 0;
|
||||
int opt = 0;
|
||||
long flags = 0;
|
||||
bool exitRecovery = false;
|
||||
|
||||
int isSepManifestSigned = 0;
|
||||
int isBasebandSigned = 0;
|
||||
|
||||
|
||||
uint64_t ecid = 0;
|
||||
|
||||
const char *ipsw = NULL;
|
||||
const char *llbipsw = NULL;
|
||||
const char *bootargs = NULL;
|
||||
const char *requestFreshAPTicketVariant = NULL;
|
||||
const char *basebandPath = NULL;
|
||||
const char *basebandManifestPath = NULL;
|
||||
const char *sepPath = NULL;
|
||||
const char *sepManifestPath = NULL;
|
||||
const char *bootargs = NULL;
|
||||
|
||||
vector<const char*> apticketPaths;
|
||||
|
||||
t_devicevals devVals = {0};
|
||||
t_iosVersion versVals = {0};
|
||||
|
||||
const char *SEPPath = NULL;
|
||||
const char *SEPManifestPath = NULL;
|
||||
const char *ramdiskPath = NULL;
|
||||
|
||||
bool is32Bit = false;
|
||||
bool isUpdateRestore = false;
|
||||
bool getLatestBaseband = false;
|
||||
bool getLatestSEP = false;
|
||||
bool useDefaultSEP = false;
|
||||
bool skipBasebandChecks = false;
|
||||
bool dontExpectAPTicket = false;
|
||||
bool doRestorePwnage = false;
|
||||
bool doRestore24kPwn = false;
|
||||
bool needsDecryptedRamdisk = false;
|
||||
|
||||
tihmstar::ra1nsn0w::launchConfig cfg = {};
|
||||
tihmstar::ra1nsn0w::launchConfig cfg_persist = {};
|
||||
|
||||
std::vector<const char*> apticketPaths;
|
||||
|
||||
if (argc == 1){
|
||||
cmd_help();
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::vector<const char*> ra1nargs;
|
||||
std::vector<const char*> ra1nargs_persist;
|
||||
ra1nargs.push_back("");
|
||||
ra1nargs_persist.push_back("");
|
||||
|
||||
while ((opt = getopt_long(argc, (char* const *)argv, "ht:b:p:s:m:wude0123", longopts, &optindex)) > 0) {
|
||||
while ((opt = getopt_long(argc, (char* const *)argv, "hb:B:de:m:M:r:s:t:T::u", longopts, &optindex)) >= 0) {
|
||||
switch (opt) {
|
||||
case 0: //long opts
|
||||
{
|
||||
std::string curopt = longopts[optindex].name;
|
||||
|
||||
if (curopt == "32bit") {
|
||||
is32Bit = true;
|
||||
}else if (curopt == "decrypt-ramdisk"){
|
||||
needsDecryptedRamdisk = true;
|
||||
}else if (curopt == "default-sep"){
|
||||
useDefaultSEP = true;
|
||||
}else if (curopt == "latest-baseband"){
|
||||
getLatestBaseband = true;
|
||||
}else if (curopt == "latest-sep"){
|
||||
getLatestSEP = true;
|
||||
}else if (curopt == "no-baseband"){
|
||||
skipBasebandChecks = true;
|
||||
}else if (curopt == "no-ticket"){
|
||||
dontExpectAPTicket = true;
|
||||
}else if (curopt == "ra1nsn0warg"){
|
||||
ra1nargs.push_back(optarg);
|
||||
}else if (curopt == "ra1nsn0warg-persist"){
|
||||
ra1nargs_persist.push_back(optarg);
|
||||
}else if (curopt == "restore-pwnage"){
|
||||
doRestorePwnage = true;
|
||||
}else if (curopt == "restore-24kpwn"){
|
||||
doRestore24kPwn = true;
|
||||
}else if (curopt == "tethered-downgrade"){
|
||||
if (optarg){
|
||||
llbipsw = optarg;
|
||||
}
|
||||
}else{
|
||||
reterror("Unknown longopt '%s'",curopt.c_str());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'b': //long option: "boot-args"
|
||||
bootargs = optarg;
|
||||
break;
|
||||
|
||||
case 'B': //long option: "baseband"
|
||||
basebandPath = optarg;
|
||||
break;
|
||||
|
||||
case 'd': // long option: "debug"; can be called as short option
|
||||
idevicerestore_debug++;
|
||||
break;
|
||||
|
||||
case 'e': // long option: "buildid"
|
||||
if (strncmp(optarg, "0x", 2) == 0) {
|
||||
ecid = strtoul_l(optarg, NULL, 16, LC_GLOBAL_LOCALE);
|
||||
}else{
|
||||
ecid = strtoul_l(optarg, NULL, 10, LC_GLOBAL_LOCALE);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm': //long option: "sep-manifest"
|
||||
SEPManifestPath = optarg;
|
||||
break;
|
||||
|
||||
case 'M': //long option: "baseband-manifest"
|
||||
basebandManifestPath = optarg;
|
||||
break;
|
||||
|
||||
case 'r': //long option: "ramdisk"
|
||||
ramdiskPath = optarg;
|
||||
break;
|
||||
|
||||
case 's': //long option: "sep"
|
||||
SEPPath = optarg;
|
||||
break;
|
||||
|
||||
case 't': // long option: "apticket"; can be called as short option
|
||||
apticketPaths.push_back(optarg);
|
||||
break;
|
||||
case 'b': // long option: "baseband"; can be called as short option
|
||||
basebandPath = optarg;
|
||||
break;
|
||||
case 'p': // long option: "baseband-manifest"; can be called as short option
|
||||
basebandManifestPath = optarg;
|
||||
break;
|
||||
case 's': // long option: "sep"; can be called as short option
|
||||
sepPath = optarg;
|
||||
break;
|
||||
case 'm': // long option: "sep-manifest"; can be called as short option
|
||||
sepManifestPath = optarg;
|
||||
break;
|
||||
case 'w': // long option: "wait"; can be called as short option
|
||||
flags |= FLAG_WAIT;
|
||||
|
||||
case 'T': // long option: "fresh-apticket"; can be called as short option
|
||||
if (!(requestFreshAPTicketVariant = optarg)) requestFreshAPTicketVariant = RESTORE_VARIANT_ERASE_INSTALL;
|
||||
break;
|
||||
|
||||
case 'u': // long option: "update"; can be called as short option
|
||||
flags |= FLAG_UPDATE;
|
||||
break;
|
||||
case '0': // long option: "latest-sep";
|
||||
flags |= FLAG_LATEST_SEP;
|
||||
break;
|
||||
case '1': // long option: "latest-baseband";
|
||||
flags |= FLAG_LATEST_BASEBAND;
|
||||
break;
|
||||
case '2': // long option: "no-baseband";
|
||||
flags |= FLAG_NO_BASEBAND;
|
||||
break;
|
||||
#ifdef HAVE_LIBIPATCHER
|
||||
case '3': // long option: "use-pwndfu";
|
||||
flags |= FLAG_IS_PWN_DFU;
|
||||
break;
|
||||
case '4': // long option: "just-boot";
|
||||
bootargs = (optarg) ? optarg : "";
|
||||
break;
|
||||
break;
|
||||
#endif
|
||||
case 'e': // long option: "exit-recovery"; can be called as short option
|
||||
exitRecovery = true;
|
||||
break;
|
||||
case 'd': // long option: "debug"; can be called as short option
|
||||
idevicerestore_debug = 1;
|
||||
isUpdateRestore = true;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
cmd_help();
|
||||
return -1;
|
||||
|
|
@ -191,141 +249,146 @@ int main_r(int argc, const char * argv[]) {
|
|||
argv += optind;
|
||||
|
||||
ipsw = argv[0];
|
||||
}else if (argc == optind && flags & FLAG_WAIT) {
|
||||
info("User requested to only wait for ApNonce to match, but not for actually restoring\n");
|
||||
}else if (exitRecovery){
|
||||
info("Exiting to recovery mode\n");
|
||||
}else{
|
||||
error("argument parsing failed! agrc=%d optind=%d\n",argc,optind);
|
||||
if (idevicerestore_debug){
|
||||
for (int i=0; i<argc; i++) {
|
||||
printf("argv[%d]=%s\n",i,argv[i]);
|
||||
}
|
||||
}
|
||||
error("argument parsing failed! agrc=%d optind=%d",argc,optind);
|
||||
return -5;
|
||||
}
|
||||
|
||||
futurerestore client(flags & FLAG_UPDATE, flags & FLAG_IS_PWN_DFU);
|
||||
retassure(client.init(),"can't init, no device found\n");
|
||||
|
||||
printf("futurerestore init done\n");
|
||||
retassure(!bootargs || (flags & FLAG_IS_PWN_DFU),"--just-boot requires --use-pwndfu\n");
|
||||
|
||||
if (exitRecovery) {
|
||||
client.exitRecovery();
|
||||
info("Done\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
try {
|
||||
if (apticketPaths.size()) client.loadAPTickets(apticketPaths);
|
||||
|
||||
if (!(
|
||||
((apticketPaths.size() && ipsw)
|
||||
&& ((basebandPath && basebandManifestPath) || ((flags & FLAG_LATEST_BASEBAND) || (flags & FLAG_NO_BASEBAND)))
|
||||
&& ((sepPath && sepManifestPath) || (flags & FLAG_LATEST_SEP) || client.is32bit())
|
||||
) || (ipsw && bootargs && (flags & FLAG_IS_PWN_DFU))
|
||||
)) {
|
||||
|
||||
if (!(flags & FLAG_WAIT) || ipsw){
|
||||
error("missing argument\n");
|
||||
cmd_help();
|
||||
err = -2;
|
||||
}else{
|
||||
client.putDeviceIntoRecovery();
|
||||
client.waitForNonce();
|
||||
info("Done\n");
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
if (bootargs){
|
||||
|
||||
}else{
|
||||
devVals.deviceModel = (char*)client.getDeviceModelNoCopy();
|
||||
devVals.deviceBoard = (char*)client.getDeviceBoardNoCopy();
|
||||
|
||||
if (flags & FLAG_LATEST_SEP){
|
||||
info("user specified to use latest signed SEP (WARNING, THIS CAN CAUSE A NON-WORKING RESTORE)\n");
|
||||
client.loadLatestSep();
|
||||
}else if (!client.is32bit()){
|
||||
client.loadSep(sepPath);
|
||||
client.setSepManifestPath(sepManifestPath);
|
||||
}
|
||||
|
||||
versVals.basebandMode = kBasebandModeWithoutBaseband;
|
||||
if (!client.is32bit() && !(isSepManifestSigned = isManifestSignedForDevice(client.sepManifestPath(), &devVals, &versVals))){
|
||||
reterror("SEP firmware doesn't signed\n");
|
||||
}
|
||||
|
||||
if (flags & FLAG_NO_BASEBAND){
|
||||
printf("\nWARNING: user specified is not to flash a baseband. This can make the restore fail if the device needs a baseband!\n");
|
||||
printf("if you added this flag by mistake, you can press CTRL-C now to cancel\n");
|
||||
int c = 10;
|
||||
printf("continuing restore in ");
|
||||
while (c) {
|
||||
printf("%d ",c--);
|
||||
fflush(stdout);
|
||||
sleep(1);
|
||||
}
|
||||
printf("\n");
|
||||
}else{
|
||||
if (flags & FLAG_LATEST_BASEBAND){
|
||||
info("user specified to use latest signed baseband (WARNING, THIS CAN CAUSE A NON-WORKING RESTORE)\n");
|
||||
client.loadLatestBaseband();
|
||||
}else{
|
||||
client.setBasebandPath(basebandPath);
|
||||
client.setBasebandManifestPath(basebandManifestPath);
|
||||
printf("Did set SEP+baseband path and firmware\n");
|
||||
}
|
||||
|
||||
versVals.basebandMode = kBasebandModeOnlyBaseband;
|
||||
if (!(devVals.bbgcid = client.getBasebandGoldCertIDFromDevice())){
|
||||
printf("[WARNING] using tsschecker's fallback to get BasebandGoldCertID. This might result in invalid baseband signing status information\n");
|
||||
}
|
||||
if (!(isBasebandSigned = isManifestSignedForDevice(client.basebandManifestPath(), &devVals, &versVals))) {
|
||||
reterror("baseband firmware doesn't signed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
client.putDeviceIntoRecovery();
|
||||
if (flags & FLAG_WAIT){
|
||||
client.waitForNonce();
|
||||
}
|
||||
} catch (int error) {
|
||||
err = error;
|
||||
printf("[Error] Fail code=%d\n",err);
|
||||
goto error;
|
||||
}
|
||||
|
||||
try {
|
||||
if (bootargs)
|
||||
client.doJustBoot(ipsw,bootargs);
|
||||
else
|
||||
client.doRestore(ipsw);
|
||||
printf("Done: restoring succeeded!\n");
|
||||
} catch (tihmstar::exception &e) {
|
||||
e.dump();
|
||||
printf("Done: restoring failed!\n");
|
||||
}
|
||||
|
||||
error:
|
||||
if (err){
|
||||
printf("Failed with error code=%d\n",err);
|
||||
}
|
||||
return err;
|
||||
#undef reterror
|
||||
}
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
#ifdef DEBUG
|
||||
return main_r(argc, argv);
|
||||
#else
|
||||
try {
|
||||
return main_r(argc, argv);
|
||||
} catch (tihmstar::exception &e) {
|
||||
printf("%s: failed with exception:\n",PACKAGE_NAME);
|
||||
e.dump();
|
||||
return e.code();
|
||||
}
|
||||
{
|
||||
optind = 0;
|
||||
optopt = 0;
|
||||
opterr = 0;
|
||||
#ifdef _OPTRESET
|
||||
optreset = 1;
|
||||
#endif
|
||||
|
||||
int ropt = 0;
|
||||
int roptindex = 0;
|
||||
const struct option *rlongopts = ra1nsn0w::getLongOpts();
|
||||
const char *rshortopts = ra1nsn0w::getShortOpts();
|
||||
ra1nargs.push_back(NULL);
|
||||
|
||||
while ((ropt = getopt_long((int)(ra1nargs.size()-1), (char * const *)ra1nargs.data(), rshortopts, rlongopts, &roptindex)) >= 0) {
|
||||
std::string curopt = rlongopts[roptindex].name;
|
||||
if (ropt) {
|
||||
for (const struct option *clo = rlongopts; clo->name; clo++) {
|
||||
if (clo->val == ropt){
|
||||
curopt = clo->name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ra1nsn0w::parseArgument(cfg, curopt, optarg)) {
|
||||
std::string orig;
|
||||
try {
|
||||
orig = ra1nargs.at(optind-1);
|
||||
} catch (...) {
|
||||
//
|
||||
}
|
||||
error("Unrecognised ra1nsn0w longopt '%s' ('%s')",curopt.c_str(),orig.c_str());
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (doRestorePwnage || doRestore24kPwn){
|
||||
optind = 0;
|
||||
optopt = 0;
|
||||
opterr = 0;
|
||||
#ifdef _OPTRESET
|
||||
optreset = 1;
|
||||
#endif
|
||||
|
||||
int ropt = 0;
|
||||
int roptindex = 0;
|
||||
const struct option *rlongopts = ra1nsn0w::getLongOpts();
|
||||
const char *rshortopts = ra1nsn0w::getShortOpts();
|
||||
ra1nargs_persist.push_back(NULL);
|
||||
|
||||
while ((ropt = getopt_long((int)(ra1nargs_persist.size()-1), (char * const *)ra1nargs_persist.data(), rshortopts, rlongopts, &roptindex)) >= 0) {
|
||||
std::string curopt = rlongopts[roptindex].name;
|
||||
if (ropt) {
|
||||
for (const struct option *clo = rlongopts; clo->name; clo++) {
|
||||
if (clo->val == ropt){
|
||||
curopt = clo->name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ra1nsn0w::parseArgument(cfg_persist, curopt, optarg)) {
|
||||
std::string orig;
|
||||
try {
|
||||
orig = ra1nargs_persist.at(optind-1);
|
||||
} catch (...) {
|
||||
//
|
||||
}
|
||||
error("Unrecognised ra1nsn0w-persist longopt '%s' ('%s')",curopt.c_str(),orig.c_str());
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
futurerestore client(ecid, isUpdateRestore);
|
||||
|
||||
if (doRestorePwnage || doRestore24kPwn) {
|
||||
client.setRestorePwnage(doRestorePwnage);
|
||||
client.setPersistCfg(cfg_persist);
|
||||
}
|
||||
if (doRestore24kPwn) client.setRestore24kpwn(doRestore24kPwn);
|
||||
if (needsDecryptedRamdisk) client.setNeedsDecryptedRamdisk(needsDecryptedRamdisk);
|
||||
if (apticketPaths.size()) client.loadAPTickets(apticketPaths);
|
||||
if (requestFreshAPTicketVariant){
|
||||
if (llbipsw) {
|
||||
client.requestFreshAPTicket(llbipsw, requestFreshAPTicketVariant);
|
||||
}else{
|
||||
client.requestFreshAPTicket(ipsw, requestFreshAPTicketVariant);
|
||||
}
|
||||
}
|
||||
if (llbipsw) client.setLLBFromIPSW(llbipsw);
|
||||
|
||||
if (ramdiskPath) client.setCustomRamdisk(ramdiskPath);
|
||||
|
||||
if (getLatestBaseband){
|
||||
client.fetchLatestBaseband();
|
||||
} else {
|
||||
if (basebandPath) client.setCustomBasebandPath(basebandPath);
|
||||
if (basebandManifestPath){
|
||||
plist_t p_BuildManifest = NULL;
|
||||
cleanup([&]{
|
||||
safeFreeCustom(p_BuildManifest, plist_free);
|
||||
});
|
||||
plist_err_t perr = PLIST_ERR_SUCCESS;
|
||||
retassure(!(perr = plist_read_from_file(basebandManifestPath, &p_BuildManifest, NULL)), "Failed to read plist from path '%s' with err=%d",basebandManifestPath,perr);
|
||||
client.setCustomBasebandManifest(p_BuildManifest);
|
||||
}
|
||||
}
|
||||
if (!skipBasebandChecks) client.verifyBasebandTicketCanBeRequested();
|
||||
|
||||
if (useDefaultSEP) {
|
||||
info("Using default SEP from IPSW");
|
||||
}else if (getLatestSEP){
|
||||
client.fetchLatestSEP();
|
||||
} else {
|
||||
if (SEPPath) client.setCustomSEPPath(SEPPath);
|
||||
if (SEPManifestPath){
|
||||
plist_t p_BuildManifest = NULL;
|
||||
cleanup([&]{
|
||||
safeFreeCustom(p_BuildManifest, plist_free);
|
||||
});
|
||||
plist_err_t perr = PLIST_ERR_SUCCESS;
|
||||
retassure(!(perr = plist_read_from_file(SEPManifestPath, &p_BuildManifest, NULL)), "Failed to read plist from path '%s' with err=%d",SEPManifestPath,perr);
|
||||
client.setCustomSEPManifest(p_BuildManifest);
|
||||
}
|
||||
}
|
||||
|
||||
client.setNoTicketNeeded(dontExpectAPTicket);
|
||||
|
||||
if (!client.isInRestoreMode()) {
|
||||
client.enterPwnRestore(ipsw, is32Bit, bootargs, cfg);
|
||||
}
|
||||
|
||||
client.doRestore(ipsw);
|
||||
info("Done: restoring succeeded!");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue