Created
January 4, 2024 23:04
-
-
Save trippsanders/4e7cdc4972e01fe655ee84ceba3a3212 to your computer and use it in GitHub Desktop.
Filza script to patch minecraftpe binary to allow building on the nether roof
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## The search byte method doesn't work on 1.16.201 and lower. | |
| ## Verified working on 1.16.210/221, 1.17.10, 1.18.31, 1.19.83, 1.20.51, likely works 1.16.210-latest. | |
| ## Dump entitlements | |
| ldid -e $1 > ent.xml | |
| ##Backup binary | |
| cp -p "$1" "$1.bak" | |
| ## Create a hex dump with xxd, replace the first matching hex value with sed, and convert back to binary | |
| xxd -p "$1" | tr -d '\n' | sed "0,/00910310a052/s//00910320a052/" | xxd -r -p > "$1.tmp" | |
| ## Replace the original file with the modified one | |
| mv "$1.tmp" "$1" | |
| ## Resign with ldid and remove entitlements file | |
| ldid -Sent.xml minecraftpe | |
| rm ent.xml | |
| ## Fix permissions | |
| chown "_installd:_installd" "$1" | |
| chmod 755 "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xattr -c /path/to/palera1n