Skip to content

Instantly share code, notes, and snippets.

@trippsanders
trippsanders / netherpatcher.sh
Last active January 15, 2024 01:02
Bash script to patch Linux (Android X86-64 builds) to allow building on the nether roof
#!/bin/bash
# Requires xxd and tr, both are probably installed as xxd is included with vim and tr is part of the GNU coreutils
# Tested on 1.14.60, 1.16.10, 1.16.20, 1.16.40, 1.16.100, 1.17.41, 1.18.31, 1.19.41, 1.19.50, and 1.20.51.
# Thanks to Max RM (@_max_rm) and AmyGrrl (@amygrrl) for the search bytes
display_help() {
echo "Usage: $0 [--backup] [--1.14.60-1.16.10] [--1.16.20-1.16.40] [--1.16.100-1.19.41] <source_file>"
echo "Options:"
echo " --backup Create a backup of the source binary."
echo " --1.14.60-1.16.10 Patching Nether build limit for 1.14.60-1.16.10"
@trippsanders
trippsanders / NetherPatcher.script
Created January 4, 2024 23:04
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"