mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
ai enabler
This commit is contained in:
@@ -89,4 +89,44 @@ class EligibilityTweak(Tweak):
|
||||
|
||||
# return the new files to restore
|
||||
return files_to_restore
|
||||
|
||||
|
||||
|
||||
class AITweak(Tweak):
|
||||
def __init__(self):
|
||||
super().__init__(label="Enable Apple Intelligence (for Unsupported Devices) (Eligibility)", key=None, value="", min_version=Version("18.1"))
|
||||
|
||||
def set_language_code(self, lang: str):
|
||||
self.value = lang
|
||||
|
||||
def apply_tweak(self) -> FileToRestore:
|
||||
if not self.enabled:
|
||||
return None
|
||||
langs = ["en"]
|
||||
if self.value != "":
|
||||
langs.append(self.value)
|
||||
plist = {
|
||||
"OS_ELIGIBILITY_DOMAIN_CALCIUM": {
|
||||
"os_eligibility_answer_source_t": 1,
|
||||
"os_eligibility_answer_t": 2,
|
||||
"status": {
|
||||
"OS_ELIGIBILITY_INPUT_CHINA_CELLULAR": 2
|
||||
}
|
||||
},
|
||||
"OS_ELIGIBILITY_DOMAIN_GREYMATTER": {
|
||||
"context": {
|
||||
"OS_ELIGIBILITY_CONTEXT_ELIGIBLE_DEVICE_LANGUAGES": langs
|
||||
},
|
||||
"os_eligibility_answer_source_t": 1,
|
||||
"os_eligibility_answer_t": 4,
|
||||
"status": {
|
||||
"OS_ELIGIBILITY_INPUT_DEVICE_LANGUAGE": 3,
|
||||
"OS_ELIGIBILITY_INPUT_DEVICE_REGION_CODE": 3,
|
||||
"OS_ELIGIBILITY_INPUT_EXTERNAL_BOOT_DRIVE": 3,
|
||||
"OS_ELIGIBILITY_INPUT_GENERATIVE_MODEL_SYSTEM": 3,
|
||||
"OS_ELIGIBILITY_INPUT_SHARED_IPAD": 3,
|
||||
"OS_ELIGIBILITY_INPUT_SIRI_LANGUAGE": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FileToRestore(contents=plistlib.dumps(plist), restore_path="/var/db/eligibilityd/eligibility.plist")
|
||||
@@ -1,6 +1,6 @@
|
||||
from devicemanagement.constants import Version
|
||||
from .tweak_classes import MobileGestaltTweak, MobileGestaltMultiTweak, MobileGestaltPickerTweak, FeatureFlagTweak, TweakModifyType, BasicPlistTweak
|
||||
from .eligibility_tweak import EligibilityTweak
|
||||
from .eligibility_tweak import EligibilityTweak, AITweak
|
||||
from .basic_plist_locations import FileLocation
|
||||
|
||||
|
||||
@@ -37,6 +37,11 @@ tweaks = {
|
||||
"PhotoUI": FeatureFlagTweak("Enable Old Photo UI", flag_category='Photos', flag_names=['Lemonade'], is_list=False, inverted=True, min_version=Version("18.0")),
|
||||
"AI": FeatureFlagTweak("Enable Apple Intelligence", flag_category='SpringBoard', flag_names=['Domino', 'SuperDomino'], min_version=Version("18.1"), divider_below=True),
|
||||
|
||||
## AI Enabler
|
||||
"AIEligibility": AITweak(),
|
||||
"AIGestalt": MobileGestaltTweak("Enable Apple Intelligence (for Unsupported Devices) (Gestalt)", "A62OafQ85EJAiiqKn4agtg", min_version=Version("18.1")),
|
||||
"SpoofModel": MobileGestaltTweak("Spoof Device Model", "h9jDsbgj7xIVeIQ8S3/X3Q", value="iPhone17,3", min_version=Version("18.1"), divider_below=True),
|
||||
|
||||
## Springboard Tweaks
|
||||
"LockScreenFootnote": BasicPlistTweak(
|
||||
"Set Lock Screen Footnote Text",
|
||||
|
||||
Reference in New Issue
Block a user