Band 77 patcher for the OnePlus 9 and 9 Pro.
OnePlus has band 77 disabled on the OnePlus 9 and 9 Pro. The original way to enable band 77 used QPST. QPST only seems to work on OxygenOS, and requires Windows. If you don't use OOS, or don't use Windows, this script can patch the modem file with the necessary changes.
Warning Bootloop risk!! On the latest version of LineageOS, my device bootloops after flashing the custom modem. It will only be fixed after erasing the device (flashing stock modem will not fix)! Please be careful, and always have a backup on hand.
First, we need to dump our modem file. Boot into bootloader (adb reboot bootloader
), and run fastboot getvar current-slot
. Take note of this.
If not rooted, temporarily boot TWRP (fastboot boot TWRP.img
in bootloader). Commands are the same in TWRP, or not. We need to find what partition the modem is on.
Run adb shell
(su
after if not using TWRP), then run ls -lath /dev/block/by-name
. Find the modem for your current slot, and take note of it.
Run these commands in order (replace sde9 with the partition if it's different):
/tmp
to /storage/emulated/0
if you're having issues.
dd if=/dev/block/sde9 of=/tmp/modem.bin bs=2048
exit
adb pull /tmp/modem.bin
adb pull /tmp/modem.bin modem.bin.bak
We can now patch the modem.bin with the script. Run git clone https://github.com/itsnebulalol/modempatcher
To go into the directory, run cd modempatcher
Now, we can run python3 main.py -p /path/to/modem.bin
Boot into bootloader, and fastboot flash --slot=all modem modem.bin
This script may not be perfect, and may not work on every device. Before, we pulled the modem image a second time so we have a backup. You can run fastboot flash --slot=all modem modem.bin.bak
in bootloader to flash the backup.
Lost the backup? Add the -u
flag to the script to unpatch the modem.bin, and you can flash it again.