Skip to content

Instantly share code, notes, and snippets.

@34306
Created March 2, 2025 05:52
Show Gist options
  • Save 34306/bc1ebb3de4b52ed175ed29b672fb9bb8 to your computer and use it in GitHub Desktop.
Save 34306/bc1ebb3de4b52ed175ed29b672fb9bb8 to your computer and use it in GitHub Desktop.
fortnite auto update patch
import os
import re
print("=== Auto Patch Fortnite ARM64 ===")
print("Method by @khanhduytran0, script patch by @34306")
input_path = input("Please paste the path to Fortnite binary (FortniteClient-IOS-Shipping): ").strip()
output_default = os.path.expanduser('~/Desktop/FortniteClient-IOS-Shipping')
output_path = input(f"Please paste the path for the patched Fortnite binary [default {output_default}]: ").strip()
if not output_path:
output_path = output_default
pattern = re.compile(
b'\xF5\x03\x00\xAA.{8}\xC8\x02\x40\xB9.{4}\xC8\x82\x5F\xF8',
re.DOTALL
)
replace_from = bytes.fromhex("F50300AA")
replace_to = bytes.fromhex("350080D2")
with open(input_path, 'rb') as file:
binary_data = file.read()
match = pattern.search(binary_data)
if match:
patch_addr = match.start()
print(f"Pattern found at address: 0x{patch_addr:X}")
# Verify before patching
if binary_data[patch_addr:patch_addr+4] == replace_from:
patched_data = binary_data[:patch_addr] + replace_to + binary_data[patch_addr+4:]
with open(output_path, 'wb') as file:
file.write(patched_data)
print(f"Patch successful! File saved at: {output_path}")
print("Replace it with original one and then enjoy it with sideload")
else:
print("Error: Data at found address does not match the expected pattern to patch!")
else:
print("Pattern not found in this file!")
@Dababylesgobob
Copy link

Is it possible to remove the memory limit in the same way?

@Am1nCmd
Copy link

Am1nCmd commented Mar 4, 2025

is there any way to do the same thing (bypass Increased Memory Limit &
Increased Debugging Memory Limit entitlement)?

but for other apps like https://git.743378673.xyz/MeloNX/MeloNX

@34306
Copy link
Author

34306 commented Mar 4, 2025

is there any way to do the same thing (bypass Increased Memory Limit & Increased Debugging Memory Limit entitlement)?

but for other apps like https://git.743378673.xyz/MeloNX/MeloNX

Sadly no, or at least there's a way but Duy and I haven't figure it out

@khanhduytran0
Copy link

@Am1nCmd the only thing I found is: if you go to Xcode Debugging and select View debugging, you will get this in the console:
Memory limit for ProcessName[PID] has been deactivated by the View debugger and will remain deactivated until the process is restarted..
This was the original intent. However, Fortnite added entitlement checks during initialization which is why this script existed.

@dotA1610
Copy link

hi i used this file and im getting an error

image

@34306
Copy link
Author

34306 commented Mar 13, 2025

hi i used this file and im getting an error

image

You need to put the main executable, not .app
Or just /Shipping-.... and you're good to go

@dotA1610
Copy link

hi i used this file and im getting an error
image

You need to put the main executable, not .app Or just /Shipping-.... and you're good to go

it works now thank you

@dotA1610
Copy link

hi i used this file and im getting an error
image

You need to put the main executable, not .app Or just /Shipping-.... and you're good to go

now idk how to repack the app lol

@Am1nCmd
Copy link

Am1nCmd commented Mar 13, 2025

@Am1nCmd the only thing I found is: if you go to Xcode Debugging and select View debugging, you will get this in the console: Memory limit for ProcessName[PID] has been deactivated by the View debugger and will remain deactivated until the process is restarted.. This was the original intent. However, Fortnite added entitlement checks during initialization which is why this script existed.

Ah ok. Understand that. Thank you btw.

@khanhduytran0
Copy link

pymobiledevice3/go-ios have a command option to disable memory limit for process, but this still doesn’t bypass memory entitlement checks.

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