Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Merge pull request #5 from 34306/main
Browse files Browse the repository at this point in the history
add magic
  • Loading branch information
leminlimez authored Sep 3, 2024
2 parents e4909ae + c65e080 commit 347a34e
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions main_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
charge_limit_enabled = False
stage_manager_enabled = False
shutter_sound_enabled = False
always_on_display_enabled = False
apple_pencil_enabled = False
action_button_enabled = False
internal_storage_enabled = False

gestalt_path = Path.joinpath(Path.cwd(), "com.apple.MobileGestalt.plist")

Expand Down Expand Up @@ -42,7 +46,8 @@ def print_option(num: int, active: bool, message: str):
`--`-' `--`-'
""")
print("by LeminLimez")
print("v1.1\n\n")
print("v1.2\n\n")
print("\nPlease back up your device before using!")

if not passed_check and Path.exists(gestalt_path) and Path.is_file(gestalt_path):
passed_check = True
Expand All @@ -54,7 +59,11 @@ def print_option(num: int, active: bool, message: str):
print_option(4, charge_limit_enabled, "Toggle Charge Limit")
print_option(5, stage_manager_enabled, "Toggle Stage Manager Supported")
print_option(6, shutter_sound_enabled, "Disable Region Restrictions (ie. Shutter Sound)")
print("\n9. Apply")
print_option(7, always_on_display_enabled, "Always On Display (iOS 18+ only)")
print_option(8, apple_pencil_enabled, "Toggle Apple Pencil")
print_option(9, action_button_enabled, "Toggle Action Button")
print_option(10, internal_storage_enabled, "Toggle Internal Storage")
print("\n11. Apply")
print("0. Exit\n")
page = int(input("Enter a number: "))
if page == 1:
Expand All @@ -72,7 +81,15 @@ def print_option(num: int, active: bool, message: str):
stage_manager_enabled = not stage_manager_enabled
elif page == 6:
shutter_sound_enabled = not shutter_sound_enabled
elif page == 7:
always_on_display_enabled = not always_on_display_enabled
elif page == 8:
apple_pencil_enabled = not apple_pencil_enabled
elif page == 9:
action_button_enabled = not action_button_enabled
elif page == 10:
internal_storage_enabled = not internal_storage_enabled
elif page == 11:
print()
# set the tweaks and apply
# first open the file in read mode
Expand All @@ -93,6 +110,15 @@ def print_option(num: int, active: bool, message: str):
if shutter_sound_enabled:
plist["CacheExtra"]["h63QSdBCiT/z0WU6rdQv6Q"] = "US"
plist["CacheExtra"]["zHeENZu+wbg7PUprwNwBWg"] = "LL/A"
if always_on_display_enabled:
plist["CacheExtra"]["2OOJf1VhaM7NxfRok3HbWQ"] = True
plist["CacheExtra"]["j8/Omm6s1lsmTDFsXjsBfA"] = True
if apple_pencil_enabled:
plist["CacheExtra"]["yhHcB0iH0d1XzPO/CFd3ow"] = True
if action_button_enabled:
plist["CacheExtra"]["cT44WE1EohiwRzhsZ8xEsw"] = True
if internal_storage_enabled:
plist["CacheExtra"]["LBJfwOEzExRxzlAnSuI7eg"] = True

# write back to the file
with open(gestalt_path, 'wb') as out_fp:
Expand Down

0 comments on commit 347a34e

Please sign in to comment.