iOS 16 support, update submodules

This commit is contained in:
Cryptiiiic 2022-07-20 00:38:32 -07:00
parent cb39cc2dae
commit c15e30b290
No known key found for this signature in database
GPG key ID: 6027B509EFE3A76B
5 changed files with 11 additions and 12 deletions

2
.gitmodules vendored
View file

@ -5,4 +5,4 @@
[submodule "tsschecker"]
path = external/tsschecker
url = https://github.com/1Conan/tsschecker.git
branch = master
branch = iOS16

@ -1 +1 @@
Subproject commit 75092808043a67527ad94c263851324d456fe507
Subproject commit e738336c231d7a8c3d20d5967711b846a9119a7d

2
external/tsschecker vendored

@ -1 +1 @@
Subproject commit a600e296a3f2ba764e7ab1f164d10e4e7b82e127
Subproject commit 9a046508ffb7cbd62d3ff50042944237389c51b4

View file

@ -163,9 +163,7 @@ bool futurerestore::init() {
uint64_t futurerestore::getDeviceEcid() {
retassure(_didInit, "did not init\n");
uint64_t ecid;
get_ecid(_client, &ecid);
return ecid;
return _client->ecid;
}
int futurerestore::getDeviceMode(bool reRequest) {
@ -1352,7 +1350,6 @@ void futurerestore::doRestore(const char *ipsw) {
//do magic
if (_client->image4supported) get_sep_nonce(client, &client->sepnonce, &client->sepnonce_size);
get_ap_nonce(client, &client->nonce, &client->nonce_size);
get_ecid(client, &client->ecid);
if (client->mode == MODE_RECOVERY) {
retassure(client->srnm, "ERROR: could not retrieve device serial number. Can't continue.\n");
@ -1391,7 +1388,7 @@ void futurerestore::doRestore(const char *ipsw) {
#ifdef __APPLE__
// Borrowed from apple killall.c
int futurerestore::findProc(const char *procName) {
int futurerestore::findProc(const char *procName, bool load) {
struct kinfo_proc *procs = nullptr, *procs2 = nullptr;
int mib[4];
size_t mibLen, size = 0;
@ -1480,7 +1477,9 @@ int futurerestore::findProc(const char *procName) {
}
}
if (strcmp(cmd, procName) == 0) {
info("daemonManager: findProc: found %s!\n", procName);
if(!load) {
info("daemonManager: findProc: found %s!\n", procName);
}
return pid;
}
}
@ -1494,12 +1493,12 @@ void futurerestore::daemonManager(bool load) {
int pid = 0;
const char *procList[] = { "MobileDeviceUpdater", "AMPDevicesAgent", "AMPDeviceDiscoveryAgent", 0};
for(int i = 0; i < 3; i++) {
pid = findProc(procList[i]);
pid = findProc(procList[i], load);
if (pid > 1) {
info("daemonManager: killing %s.\n", procList[i]);
if (load) {
int ret = kill(pid, SIGCONT);
} else {
info("daemonManager: killing %s.\n", procList[i]);
int ret = kill(pid, SIGSTOP);
}
}

View file

@ -159,7 +159,7 @@ public:
void doRestore(const char *ipsw);
#ifdef __APPLE__
static int findProc(const char *procName);
static int findProc(const char *procName, bool load);
void daemonManager(bool load);
#endif