From 5b7e2864e406c25396ca6cdc1021860fdab489b4 Mon Sep 17 00:00:00 2001 From: Bing Date: Sat, 30 Dec 2023 21:13:34 -0500 Subject: [PATCH] - FORCEABI="arm64-v8a,armeabi-v7a,armeabi" on newer phones. - Fix remebered PI Sleection option not properly enforced. - Revert to using monkey to launch the Play Integrity apps (more reliable). --- .gitignore | 1 + build-on-mac.spec | 2 +- build.sh | 2 +- constants.py | 2 +- pif_manager.py | 40 ++++++++++++++++++++++++++-------------- runtime.py | 2 ++ windows-metadata.yaml | 2 +- windows-version-info.txt | 8 ++++---- 8 files changed, 37 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 190a03d..9c572ad 100644 --- a/.gitignore +++ b/.gitignore @@ -144,4 +144,5 @@ images/*.psd .DS_Store /.sourcery.yaml .local/ +desktop.ini diff --git a/build-on-mac.spec b/build-on-mac.spec index 28a6178..68fc040 100644 --- a/build-on-mac.spec +++ b/build-on-mac.spec @@ -28,6 +28,6 @@ exe = EXE(pyz, icon='images/icon-256.icns') app = BUNDLE(exe, name='PixelFlasher.app', - version='6.5.3.0', + version='6.5.3.1', icon='./images/icon-256.icns', bundle_identifier='com.badabing.pixelflasher') diff --git a/build.sh b/build.sh index 24acb87..65e225d 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash rm -rf build dist -VERSION=6.5.3.0 +VERSION=6.5.3.1 NAME="PixelFlasher" DIST_NAME="PixelFlasher" diff --git a/constants.py b/constants.py index 1cdd3ca..5b324b2 100644 --- a/constants.py +++ b/constants.py @@ -2,7 +2,7 @@ APPNAME = 'PixelFlasher' CONFIG_FILE_NAME = 'PixelFlasher.json' -VERSION = '6.5.3.0' +VERSION = '6.5.3.1' SDKVERSION = '33.0.3' MAIN_WIDTH = 1400 MAIN_HEIGHT = 1040 diff --git a/pif_manager.py b/pif_manager.py index 55ef561..89dd780 100644 --- a/pif_manager.py +++ b/pif_manager.py @@ -27,7 +27,8 @@ def __init__(self, *args, parent=None, config=None, **kwargs): self.pif_json_path = PIF_JSON_PATH self.device_pif = '' self.pi_app = 'gr.nikolasspyr.integritycheck' - self.launch_method = 'launch-am' + # self.launch_method = 'launch-am' + self.launch_method = 'launch' self.coords = Coords() self.enable_buttons = False self.pif_exists = False @@ -175,10 +176,13 @@ def __init__(self, *args, parent=None, config=None, **kwargs): self.auto_check_pi_checkbox.SetValue(self.config.pif['auto_check_play_integrity']) # option button PI Selectedion - self.pi_option = wx.RadioBox(self, choices=["Play Integrity API Checker", "Simple Play Integrity Checker", "TB Checker", "Play Store", "YASNAC"], style=wx.RA_VERTICAL) + choices = ["Play Integrity API Checker", "Simple Play Integrity Checker", "TB Checker", "Play Store", "YASNAC"] + self.pi_option = wx.RadioBox(self, choices=choices, style=wx.RA_VERTICAL) if self.config.pif: with contextlib.suppress(KeyError): - self.pi_option.SetSelection(self.config.pif['test_app_index']) + selected_index = self.config.pif['test_app_index'] + self.pi_option.SetSelection(selected_index) + self.pi_selection(choices[selected_index]) # Disable UIAutomator self.disable_uiautomator_checkbox = wx.CheckBox(parent=self, id=wx.ID_ANY, label=u"Disable UIAutomator", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0) @@ -412,36 +416,44 @@ def PifComboBox(self, event): # ----------------------------------------------- def TestSelection(self, event): option = event.GetString() + self.pi_selection(option) - if option == "Play Integrity API Checker": + # ----------------------------------------------- + # pi_selection + # ----------------------------------------------- + def pi_selection(self, selected_option): + if selected_option == "Play Integrity API Checker": print("Play Integrity API Checker option selected") self.pi_app = 'gr.nikolasspyr.integritycheck' - self.launch_method = 'launch-am' + # self.launch_method = 'launch-am' + self.launch_method = 'launch' - elif option == "Simple Play Integrity Checker": + elif selected_option == "Simple Play Integrity Checker": print("Simple Play Integrity Checker option selected") self.pi_app = 'com.henrikherzig.playintegritychecker' - self.launch_method = 'launch-am' + # self.launch_method = 'launch-am' + self.launch_method = 'launch' - elif option == "TB Checker": + elif selected_option == "TB Checker": print("TB Checker option selected") self.pi_app = 'krypton.tbsafetychecker' - self.launch_method = 'launch-am-main' + # self.launch_method = 'launch-am-main' + self.launch_method = 'launch' - elif option == "Play Store": + elif selected_option == "Play Store": print("Play Store option selected") self.pi_app = 'com.android.vending' self.launch_method = 'launch' - elif option == "YASNAC": + elif selected_option == "YASNAC": print("YASNAC option selected") self.pi_app = 'rikka.safetynetchecker' - self.launch_method = 'launch-am-main' + # self.launch_method = 'launch-am-main' + self.launch_method = 'launch' - print(f"Auto Update pif.json is set to: {option}") + print(f"Auto Update pif.json is set to: {selected_option}") self.config.pif['test_app_index'] = self.pi_option.Selection - # ----------------------------------------------- # __del__ # ----------------------------------------------- diff --git a/runtime.py b/runtime.py index b82b255..09f231d 100644 --- a/runtime.py +++ b/runtime.py @@ -2715,6 +2715,8 @@ def get_freeman_pif(abi_list=None): shutil.rmtree(temp_dir) if abi_list: + if abi_list == "arm64-v8a": + abi_list = "arm64-v8a,armeabi-v7a,armeabi" print(f"Will use profile/fingerprint with ABI list '{abi_list}'") file_list = [os.path.join(root, file) for root, dirs, files in os.walk(f"{freeman_dir_full}/{abi_list}") for file in files] else: diff --git a/windows-metadata.yaml b/windows-metadata.yaml index 3fb5c77..99a34b4 100644 --- a/windows-metadata.yaml +++ b/windows-metadata.yaml @@ -1,6 +1,6 @@ # https://github.com/DudeNr33/pyinstaller-versionfile # create-version-file windows-metadata.yaml --outfile windows-version-info.txt -Version: 6.5.3.0 +Version: 6.5.3.1 FileDescription: PixelFlasher InternalName: PixelFlasher OriginalFilename: PixelFlasher.exe diff --git a/windows-version-info.txt b/windows-version-info.txt index cf01ff3..fd53e5c 100644 --- a/windows-version-info.txt +++ b/windows-version-info.txt @@ -7,8 +7,8 @@ VSVersionInfo( ffi=FixedFileInfo( # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) # Set not needed items to zero 0. Must always contain 4 elements. - filevers=(6,5,3,0), - prodvers=(6,5,3,0), + filevers=(6,5,3,1), + prodvers=(6,5,3,1), # Contains a bitmask that specifies the valid bits 'flags'r mask=0x3f, # Contains a bitmask that specifies the Boolean attributes of the file. @@ -32,12 +32,12 @@ VSVersionInfo( u'040904B0', [StringStruct(u'CompanyName', u''), StringStruct(u'FileDescription', u'PixelFlasher'), - StringStruct(u'FileVersion', u'6.5.3.0'), + StringStruct(u'FileVersion', u'6.5.3.1'), StringStruct(u'InternalName', u'PixelFlasher'), StringStruct(u'LegalCopyright', u''), StringStruct(u'OriginalFilename', u'PixelFlasher.exe'), StringStruct(u'ProductName', u'PixelFlasher'), - StringStruct(u'ProductVersion', u'6.5.3.0')]) + StringStruct(u'ProductVersion', u'6.5.3.1')]) ]), VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) ]