mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-27 19:49:48 +01:00
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:
1 parent
ad21f9e8e7
commit
93a771d89b
2 files changed
+11
-4
No files matched your search
+10
-3
@@ -21,16 +21,23 @@ if __name__ == "__main__":
|
|||||||
p = open(patched, "rb").read()
|
p = open(patched, "rb").read()
|
||||||
o = open(original, "rb").read()
|
o = open(original, "rb").read()
|
||||||
|
|
||||||
|
a = 0
|
||||||
diff = []
|
diff = []
|
||||||
|
diffFile = open(args[3], 'w+')
|
||||||
|
diffFile.write('#AMFI\n\n')
|
||||||
for i in range(sizeO):
|
for i in range(sizeO):
|
||||||
originalByte = o[i]
|
originalByte = o[i]
|
||||||
patchedByte = p[i]
|
patchedByte = p[i]
|
||||||
if originalByte != patchedByte:
|
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)])
|
diff.append([hex(i), hex(originalByte), hex(patchedByte)])
|
||||||
|
a += 1
|
||||||
|
|
||||||
diffFile = open(args[3], 'w+')
|
|
||||||
diffFile.write('#AMFI\n\n')
|
|
||||||
for d in diff:
|
for d in diff:
|
||||||
data = str(d[0]) + " " + (str(d[1])) + " " + (str(d[2]))
|
data = str(d[0]) + " " + (str(d[1])) + " " + (str(d[2]))
|
||||||
diffFile.write(data + '\n')
|
diffFile.write(data + '\n')
|
||||||
print(data)
|
|
||||||
+1
-1
@@ -222,7 +222,7 @@ if [ ! -e boot ]; then
|
|||||||
if [ "$os" = 'Darwin' ]; 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
|
$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
|
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
|
fi
|
||||||
|
|
||||||
#if [[ "$@" == *"install"* ]]; then
|
#if [[ "$@" == *"install"* ]]; then
|
||||||
|
|||||||
Reference in new issue
Block a user