diff options
author | Sam Bingner <sam@bingner.com> | 2018-10-12 16:13:20 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-10-12 16:13:20 -1000 |
commit | 8d0b09ed02097b976fb1996e3f9102f3130ce16e (patch) | |
tree | 1ae54dd237862c2f6fddbcbe5b99284969f6e885 /data | |
parent | a5bb9c53c298e135a87db45105546d69a1cb51de (diff) |
Update uikittools
Diffstat (limited to 'data')
-rw-r--r-- | data/uikittools/_metadata/version | 2 | ||||
-rw-r--r-- | data/uikittools/ents.diff | 42 | ||||
-rw-r--r-- | data/uikittools/ldrestart-jbd.diff | 171 | ||||
-rw-r--r-- | data/uikittools/make.sh | 2 | ||||
-rw-r--r-- | data/uikittools/platformize.diff | 77 | ||||
-rw-r--r-- | data/uikittools/telesphoreo.diff | 27 | ||||
-rw-r--r-- | data/uikittools/uikittools-1.1.12.tgz | bin | 215040 -> 0 bytes | |||
-rw-r--r-- | data/uikittools/uikittools-1.1.13.tgz | bin | 0 -> 97966 bytes |
8 files changed, 171 insertions, 150 deletions
diff --git a/data/uikittools/_metadata/version b/data/uikittools/_metadata/version index ccad953ac..9ea63dbcc 100644 --- a/data/uikittools/_metadata/version +++ b/data/uikittools/_metadata/version @@ -1 +1 @@ -1.1.12 +1.1.13 diff --git a/data/uikittools/ents.diff b/data/uikittools/ents.diff deleted file mode 100644 index ccc8fc4df..000000000 --- a/data/uikittools/ents.diff +++ /dev/null @@ -1,42 +0,0 @@ -diff -ur uikittools/extrainst_.xml uikittools+telesphoreo/extrainst_.xml ---- uikittools/extrainst_.xml 2018-07-31 14:40:26.000000000 -1000 -+++ uikittools+telesphoreo/extrainst_.xml 2018-07-31 15:26:49.000000000 -1000 -@@ -6,5 +6,9 @@ - <array> - <string>RebuildMaps</string> - </array> -+ <key>platform-application</key> -+ <true/> -+ <key>com.apple.private.skip-library-validation</key> -+ <true/> - </dict> - </plist> -Only in uikittools+telesphoreo/: makefile.orig -diff -ur uikittools/uicache.xml uikittools+telesphoreo/uicache.xml ---- uikittools/uicache.xml 2018-07-31 14:40:26.000000000 -1000 -+++ uikittools+telesphoreo/uicache.xml 2018-07-31 15:26:56.000000000 -1000 -@@ -17,5 +17,11 @@ - - <key>com.apple.vpn.installer_events</key> - <true/> -+ -+ <key>platform-application</key> -+ <true/> -+ -+ <key>com.apple.private.skip-library-validation</key> -+ <true/> - </dict> - </plist> -diff -ur uikittools/uiopen.xml uikittools+telesphoreo/uiopen.xml ---- uikittools/uiopen.xml 2018-07-31 14:40:26.000000000 -1000 -+++ uikittools+telesphoreo/uiopen.xml 2018-07-31 15:27:00.000000000 -1000 -@@ -3,5 +3,9 @@ - <dict> - <key>com.apple.springboard.opensensitiveurl</key> - <true/> -+ <key>platform-application</key> -+ <true/> -+ <key>com.apple.private.skip-library-validation</key> -+ <true/> - </dict> - </plist> diff --git a/data/uikittools/ldrestart-jbd.diff b/data/uikittools/ldrestart-jbd.diff index 245d13eef..49b86d4b8 100644 --- a/data/uikittools/ldrestart-jbd.diff +++ b/data/uikittools/ldrestart-jbd.diff @@ -1,26 +1,157 @@ ---- uikittools+iPhone/ldrestart.cpp 2018-08-03 12:16:31.000000000 -1000 -+++ ldrestart.cpp 2018-08-03 11:54:52.000000000 -1000 -@@ -58,15 +58,18 @@ - auto integer(launch_data_dict_lookup(value, LAUNCH_JOBKEY_PID)); - if (integer == NULL || launch_data_get_type(integer) != LAUNCH_DATA_INTEGER) +diff --git a/ldrestart.cpp b/ldrestart.cpp +index a6d6cb6..c9a3b33 100644 +--- a/ldrestart.cpp ++++ b/ldrestart.cpp +@@ -34,6 +34,28 @@ + #define FLAG_PLATFORMIZE (1 << 1) + #include <dlfcn.h> + ++#include <os/log.h> ++ ++const char *first[] = { ++ NULL ++}; ++ ++const char *last[] = { ++ "com.apple.assertiond", ++ "com.apple.backboardd", ++ NULL ++}; ++ ++const char *skip[] = { ++ "jailbreakd", ++ "com.apple.MobileFileIntegrity", ++ "com.openssh.sshd.", ++ "com.apple.SpringBoard", ++ // "com.apple.logd", ++ "com.apple.diagnosticd", ++ NULL ++}; ++ + void platformizeme() { + void* handle = dlopen("/usr/lib/libjailbreak.dylib", RTLD_LAZY); + if (!handle) return; +@@ -51,6 +72,70 @@ void platformizeme() { + ptr(getpid(), FLAG_PLATFORMIZE); + } + ++bool launch_stop(const char * job) ++{ ++ launch_data_t resp; ++ launch_data_t msg; ++ ++ msg = launch_data_alloc(LAUNCH_DATA_DICTIONARY); ++ if (msg == NULL) { ++ fprintf(stderr, "out of memory"); ++ exit(-1); ++ } ++ ++ launch_data_dict_insert(msg, launch_data_new_string(job), ++ LAUNCH_KEY_STOPJOB); ++ ++ resp = launch_msg(msg); ++ launch_data_free(msg); ++ ++ if (resp == NULL) { ++ return false; ++ } ++ ++ switch (launch_data_get_type(resp)) { ++ case LAUNCH_DATA_ERRNO: ++ errno = launch_data_get_errno(resp); ++ launch_data_free(resp); ++ if (errno != 0) { ++ return false; ++ } ++ ++ return true; ++ ++ default: ++ launch_data_free(resp); ++ return false; ++ } ++} ++ ++long long launch_pid(const char * job) ++{ ++ launch_data_t msg = launch_data_alloc(LAUNCH_DATA_DICTIONARY); ++ if (msg == NULL) { ++ fprintf(stderr, "out of memory"); ++ exit(-1); ++ } ++ launch_data_dict_insert(msg, launch_data_new_string(job), LAUNCH_KEY_GETJOB); ++ ++ launch_data_t resp = launch_msg(msg); ++ launch_data_free(msg); ++ ++ if (resp == NULL) { ++ return 0; ++ } ++ auto integer(launch_data_dict_lookup(resp, LAUNCH_JOBKEY_PID)); ++ if (integer == NULL) ++ return 0; ++ if (launch_data_get_type(integer) != LAUNCH_DATA_INTEGER) { ++ launch_data_free(resp); ++ return 0; ++ } ++ long long pid = launch_data_get_integer(integer); ++ launch_data_free(resp); ++ return pid; ++} ++ + void process(launch_data_t value, const char *name, void *baton) { + if (launch_data_get_type(value) != LAUNCH_DATA_DICTIONARY) return; -- -- auto pid(launch_data_get_integer(integer)); -- if (kill(pid, 0) == -1) -- return; -- -+ - auto string(launch_data_dict_lookup(value, LAUNCH_JOBKEY_LABEL)); - if (string == NULL || launch_data_get_type(string) != LAUNCH_DATA_STRING) +@@ -68,6 +153,19 @@ void process(launch_data_t value, const char *name, void *baton) { return; auto label(launch_data_get_string(string)); -+ -+ if (strcmp(label, "jailbreakd") == 0 || strcmp(label, "com.apple.MobileFileIntegrity") == 0) -+ return; -+ -+ auto pid(launch_data_get_integer(integer)); -+ if (kill(pid, 0) == -1) -+ return; ++ for (const char **skipped = first; *skipped != NULL; skipped++) { ++ if (strcmp(label, *skipped) == 0) ++ return; ++ } ++ for (const char **skipped = skip; *skipped != NULL; skipped++) { ++ if (strncmp(label, *skipped, strlen(*skipped)) == 0) ++ return; ++ } ++ for (const char **skipped = last; *skipped != NULL; skipped++) { ++ if (strcmp(label, *skipped) == 0) ++ return; ++ } ++ auto stop(launch_data_alloc(LAUNCH_DATA_DICTIONARY)); launch_data_dict_insert(stop, string, LAUNCH_KEY_STOPJOB); + +@@ -86,6 +184,23 @@ void process(launch_data_t value, const char *name, void *baton) { + + int main(int argc, char *argv[]) { + platformizeme(); ++ for (const char **service = first; *service != NULL; service++) { ++ launch_stop(*service); ++ } ++ // long long origPid = launch_pid("com.apple.logd"); ++ // if (origPid > 0) { ++ // launch_stop("com.apple.logd"); ++ // for (int tries=0; tries<10; tries++) { ++ // long long newPid=launch_pid("com.apple.logd"); ++ // if (newPid > 0 && newPid != origPid) ++ // break; ++ // sleep(1); ++ // } ++ // // Ensure logd has finished restarting ++ // os_log(OS_LOG_DEFAULT, "ldrestart: waiting for logd to be ready to process messages"); ++ // } else { ++ // fprintf(stderr, "no logd running??\n"); ++ // } + auto request(launch_data_new_string(LAUNCH_KEY_GETJOBS)); + auto response(launch_msg(request)); + launch_data_free(request); +@@ -96,5 +212,8 @@ int main(int argc, char *argv[]) { + return EX_SOFTWARE; + + launch_data_dict_iterate(response, &process, NULL); ++ for (const char **service = last; *service != NULL; service++) { ++ launch_stop(*service); ++ } + return EX_OK; + } diff --git a/data/uikittools/make.sh b/data/uikittools/make.sh index 8fd692df4..5055e3798 100644 --- a/data/uikittools/make.sh +++ b/data/uikittools/make.sh @@ -1,3 +1,3 @@ pkg:setup -make +pkg:make pkg:install diff --git a/data/uikittools/platformize.diff b/data/uikittools/platformize.diff deleted file mode 100644 index 3365511ea..000000000 --- a/data/uikittools/platformize.diff +++ /dev/null @@ -1,77 +0,0 @@ -diff -ur uikittools/ldrestart.cpp uikittools+iPhone/ldrestart.cpp ---- uikittools/ldrestart.cpp 2018-07-31 14:40:26.000000000 -1000 -+++ uikittools+iPhone/ldrestart.cpp 2018-08-03 12:16:31.000000000 -1000 -@@ -30,6 +30,26 @@ - #include <launch.h> - - #include <sys/stat.h> -+/* Set platform binary flag */ -+#define FLAG_PLATFORMIZE (1 << 1) -+#include <dlfcn.h> -+ -+void platformizeme() { -+ void* handle = dlopen("/usr/lib/libjailbreak.dylib", RTLD_LAZY); -+ if (!handle) return; -+ -+ // Reset errors -+ dlerror(); -+ typedef void (*fix_entitle_prt_t)(pid_t pid, uint32_t what); -+ fix_entitle_prt_t ptr = (fix_entitle_prt_t)dlsym(handle, "jb_oneshot_entitle_now"); -+ -+ const char *dlsym_error = dlerror(); -+ if (dlsym_error) { -+ return; -+ } -+ -+ ptr(getpid(), FLAG_PLATFORMIZE); -+} - - void process(launch_data_t value, const char *name, void *baton) { - if (launch_data_get_type(value) != LAUNCH_DATA_DICTIONARY) -@@ -65,6 +85,7 @@ - } - - int main(int argc, char *argv[]) { -+ platformizeme(); - auto request(launch_data_new_string(LAUNCH_KEY_GETJOBS)); - auto response(launch_msg(request)); - launch_data_free(request); -diff -ur uikittools/sbreload.c uikittools+iPhone/sbreload.c ---- uikittools/sbreload.c 2018-07-31 14:40:26.000000000 -1000 -+++ uikittools+iPhone/sbreload.c 2018-08-03 12:16:13.000000000 -1000 -@@ -45,6 +45,27 @@ - - #include <CoreFoundation/CoreFoundation.h> - -+/* Set platform binary flag */ -+#define FLAG_PLATFORMIZE (1 << 1) -+#include <dlfcn.h> -+ -+void platformizeme() { -+ void* handle = dlopen("/usr/lib/libjailbreak.dylib", RTLD_LAZY); -+ if (!handle) return; -+ -+ // Reset errors -+ dlerror(); -+ typedef void (*fix_entitle_prt_t)(pid_t pid, uint32_t what); -+ fix_entitle_prt_t ptr = (fix_entitle_prt_t)dlsym(handle, "jb_oneshot_entitle_now"); -+ -+ const char *dlsym_error = dlerror(); -+ if (dlsym_error) { -+ return; -+ } -+ -+ ptr(getpid(), FLAG_PLATFORMIZE); -+} -+ - launch_data_t - CF2launch_data(CFTypeRef cfr); - -@@ -163,6 +184,7 @@ - #define SpringBoard_plist "/System/Library/LaunchDaemons/com.apple.SpringBoard.plist" - - int main(int argc, const char *argv[]) { -+ platformizeme(); - _assert(argc == 1, "usage: sbreload"); - - CFDictionaryRef plist = CreateMyPropertyListFromFile(SpringBoard_plist); diff --git a/data/uikittools/telesphoreo.diff b/data/uikittools/telesphoreo.diff index 965ebe42b..73beb99dc 100644 --- a/data/uikittools/telesphoreo.diff +++ b/data/uikittools/telesphoreo.diff @@ -1,14 +1,15 @@ -diff -ur uikittools/makefile uikittools+telesphoreo/makefile ---- uikittools/makefile 2018-07-31 14:40:26.000000000 -1000 -+++ uikittools+telesphoreo/makefile 2018-07-31 15:23:32.000000000 -1000 +diff --git a/makefile b/makefile +index 6764f73..055bbf8 100644 +--- a/makefile ++++ b/makefile @@ -1,4 +1,6 @@ - uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma ldrestart + uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma ldrestart ecidecid +CC = $(PKG_TARG)-gcc +CPP = $(PKG_TARG)-g++ all: $(uikittools) -@@ -9,11 +11,9 @@ +@@ -9,11 +11,9 @@ clean: private := -F/System/Library/PrivateFrameworks @@ -21,16 +22,24 @@ diff -ur uikittools/makefile uikittools+telesphoreo/makefile ldrestart := -std=c++11 gssc := -lobjc -@@ -28,27 +28,23 @@ +@@ -28,31 +28,29 @@ uicache: csstore.cpp extrainst_: csstore.cpp + %: %.m +- cycc -- -o $@ -x c $^ $(flags) $($@) ++ $(CC) -o $@ $^ $(flags) $($@) +- ldid -S$(wildcard $@.xml) $@ ++ @if [ ! -z "$(wildcard $@.xml)" ]; then \ ++ ldid -S$(wildcard $@.xml) $@; \ ++ fi + %: %.mm - cycc -- -o $@ $^ $(flags) $($@) - ldid -S$(wildcard $@.xml) $@ + $(CPP) -o $@ $^ $(flags) $($@) + @if [ ! -z "$(wildcard $@.xml)" ]; then \ + ldid -S$(wildcard $@.xml) $@; \ -+ fi ++ fi %: %.cpp - cycc -- -o $@ $^ $(flags) $($@) @@ -38,7 +47,7 @@ diff -ur uikittools/makefile uikittools+telesphoreo/makefile + $(CPP) -o $@ $^ $(flags) $($@) + @if [ ! -z "$(wildcard $@.xml)" ]; then \ + ldid -S$(wildcard $@.xml) $@; \ -+ fi ++ fi %: %.c - cycc -- -o $@ -x c $^ $(flags) $($@) @@ -60,7 +69,7 @@ diff -ur uikittools/makefile uikittools+telesphoreo/makefile + $(CC) -o $@ -x c $^ $(flags) $($@) + @if [ ! -z "$(wildcard $@.xml)" ]; then \ + ldid -S$(wildcard $@.xml) $@; \ -+ fi ++ fi + +install: all + mkdir -p $(DESTDIR)/usr/bin diff --git a/data/uikittools/uikittools-1.1.12.tgz b/data/uikittools/uikittools-1.1.12.tgz Binary files differdeleted file mode 100644 index 543143eb4..000000000 --- a/data/uikittools/uikittools-1.1.12.tgz +++ /dev/null diff --git a/data/uikittools/uikittools-1.1.13.tgz b/data/uikittools/uikittools-1.1.13.tgz Binary files differnew file mode 100644 index 000000000..5674a5996 --- /dev/null +++ b/data/uikittools/uikittools-1.1.13.tgz |