Skip to content

Commit 832e6ee

Browse files
author
hackcatml
committed
fix crash when re-installing the dumped ipa using AppSync on palera1n rooltess jb
1 parent 7119e3c commit 832e6ee

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Sources/mldecrypt/Tool.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func createIpa(bundleId: String) -> Int {
105105
cleanTempDir()
106106
return 1
107107
}
108-
// Fakesigning with ldid
108+
// signing with ldid
109109
let _ = task(launchPath: command, arguments: "-S\(entitlementsPath)", "\(fileToReplace)")
110110

111111
/* Extra work */

Sources/mldecryptapp/ContentView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,19 @@ struct ContentView: View {
264264
// os_log("[hackcatml] fileToReplace: %{public}s, replacementFile: %{public}s", fileToReplace, replacementFile)
265265

266266
let command = isRootless() ? "/var/jb/usr/bin/ldid" : "/usr/bin/ldid"
267+
// extract the entitlements from the dumped binary. it's same as the original one
267268
let out = task(launchPath: command, arguments: "-e", replacementFile)
268269
let entitlementsPath = workPathURL!.path + "/ent.xml"
269270
let data = out.data(using: .utf8)
270271
fileMgr.createFile(atPath: entitlementsPath, contents: data)
271272

272-
// Replace the original binary file with a dumped one
273+
// signing the dumped binary with ldid.
273274
let _ = task(launchPath: command, arguments: "-S\(entitlementsPath)", "\(replacementFile)")
275+
// Replace the original binary file with the dumped one
274276
let copyFileSigPath = documentsPath + ".mldecrypt_copy_done"
275277
callMldecryptWithOptions(options: ["copy", replacementFile, fileToReplace, "ext"])
276278
checkFileExistenceAndThen(path: copyFileSigPath, interval: 0.01) {
277279
unlink(copyFileSigPath)
278-
// signing with ldid
279-
let _ = task(launchPath: command, arguments: "-S\(entitlementsPath)", "\(fileToReplace)")
280280
completion()
281281
}
282282
}

0 commit comments

Comments
 (0)