Process kernelcache in 1mb blocks to prevent freezing on Linux (#6)

* Update kerneldiff.py

* Update kerneldiff.py

* Update kerneldiff.py

* Update kerneldiff.py

* hopefully this works

* Update palera1n.sh
This commit is contained in:
Tom E authored and GitHub committed 2022-09-18 09:02:03 -04:00
1 parent ad21f9e8e7
commit 93a771d89b
2 files changed
+11 -4

No files matched your search

+10 -3
View File
@@ -21,16 +21,23 @@ if __name__ == "__main__":
p = open(patched, "rb").read()
o = open(original, "rb").read()
a = 0
diff = []
diffFile = open(args[3], 'w+')
diffFile.write('#AMFI\n\n')
for i in range(sizeO):
originalByte = o[i]
patchedByte = p[i]
if originalByte != patchedByte:
if a == 1e6:
for d in diff:
data = str(d[0]) + " " + (str(d[1])) + " " + (str(d[2]))
diffFile.write(data + '\n')
diff = []
a = 0
diff.append([hex(i), hex(originalByte), hex(patchedByte)])
a += 1
diffFile = open(args[3], 'w+')
diffFile.write('#AMFI\n\n')
for d in diff:
data = str(d[0]) + " " + (str(d[1])) + " " + (str(d[2]))
diffFile.write(data + '\n')
print(data)
+1 -1
View File
@@ -222,7 +222,7 @@ if [ ! -e boot ]; then
if [ "$os" = 'Darwin' ]; then
$dir/img4 -i work/"$(/usr/bin/plutil -extract "BuildIdentities".0."Manifest"."StaticTrustCache"."Info"."Path" xml1 -o - work/BuildManifest.plist | grep '<string>' | cut -d\> -f2 | cut -d\< -f1 | head -1 | sed 's/Firmware\///')" -o boot/trustcache.img4 -M work/IM4M -T rtsc > /dev/null
else
$dir/img4 -i work/"$(Linux/PlistBuddy work/BuildManifest.plist -c "Print BuildIdentities:0:Manifest:StaticTrustCache:Info:Path" | sed 's/"//g'| sed 's/Firmware\///')" -o boot/trustcache.img4 -M work/IM4M -T rtsc > /dev/null
$dir/img4 -i work/"$($dir/PlistBuddy work/BuildManifest.plist -c "Print BuildIdentities:0:Manifest:StaticTrustCache:Info:Path" | sed 's/"//g'| sed 's/Firmware\///')" -o boot/trustcache.img4 -M work/IM4M -T rtsc > /dev/null
fi
#if [[ "$@" == *"install"* ]]; then