Skip to content

Instantly share code, notes, and snippets.

@trippsanders
Created January 4, 2024 23:04
Show Gist options
  • Select an option

  • Save trippsanders/4e7cdc4972e01fe655ee84ceba3a3212 to your computer and use it in GitHub Desktop.

Select an option

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
#!/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"
@Sasa554
Copy link

Sasa554 commented Aug 21, 2024

xattr -c /path/to/palera1n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment