From 550fbb46051e94082766388a98b31e3379e0b1d3 Mon Sep 17 00:00:00 2001 From: Bing Date: Wed, 17 Apr 2024 21:08:20 -0400 Subject: [PATCH] - Bugfix: #194 Unintialized variable `kmi_override` causing patching with KernelSU LKM fail if the value is not set in preferences. - Bugfix: Preferences setting `Magisk Package Name` not saved. - Regression bugfix: Rooted Magisk patching aborting if Magisk application path is not found when hidden and not properly set in the settings. PixelFlasher should not require unhiding Magisk or setting the package name if rooted, and su access to shell is granted. --- advanced_settings.py | 2 +- build-on-mac.spec | 2 +- build.sh | 2 +- constants.py | 2 +- modules.py | 5 +---- windows-metadata.yaml | 2 +- windows-version-info.txt | 8 ++++---- 7 files changed, 10 insertions(+), 13 deletions(-) diff --git a/advanced_settings.py b/advanced_settings.py index 246e8c4..f2d6dac 100644 --- a/advanced_settings.py +++ b/advanced_settings.py @@ -464,7 +464,7 @@ def _onOk(self, e): if self.package_name.GetValue(): with contextlib.suppress(Exception): - if self.package_name.GetValue() != self.Parent.config.magisk and self.package_name.GetValue() in [MAGISK_PKG_NAME, MAGISK_ALPHA_PKG_NAME, MAGISK_DELTA_PKG_NAME]: + if self.package_name.GetValue() != self.Parent.config.magisk: print(f"Setting Magisk Package Name to: {self.package_name.GetValue()}") set_magisk_package(self.package_name.GetValue()) self.Parent.config.magisk = self.package_name.GetValue() diff --git a/build-on-mac.spec b/build-on-mac.spec index 7580275..93187cb 100644 --- a/build-on-mac.spec +++ b/build-on-mac.spec @@ -28,6 +28,6 @@ exe = EXE(pyz, icon='images/icon-dark-256.icns') app = BUNDLE(exe, name='PixelFlasher.app', - version='6.9.2.5', + version='6.9.2.6', icon='./images/icon-dark-256.icns', bundle_identifier='com.badabing.pixelflasher') diff --git a/build.sh b/build.sh index aa57966..2b47a05 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash rm -rf build dist -VERSION=6.9.2.5 +VERSION=6.9.2.6 NAME="PixelFlasher" DIST_NAME="PixelFlasher" diff --git a/constants.py b/constants.py index bfcf567..b0d83b8 100644 --- a/constants.py +++ b/constants.py @@ -2,7 +2,7 @@ APPNAME = 'PixelFlasher' CONFIG_FILE_NAME = 'PixelFlasher.json' -VERSION = '6.9.2.5' +VERSION = '6.9.2.6' SDKVERSION = '33.0.3' MAIN_WIDTH = 1400 MAIN_HEIGHT = 1040 diff --git a/modules.py b/modules.py index 7237d37..a661522 100644 --- a/modules.py +++ b/modules.py @@ -1787,10 +1787,6 @@ def patch_magisk_script(patch_method): magisk_path = f"{self.config.phone_path}/Magisk-Uploaded.apk" else: magisk_path = device.magisk_path - if not magisk_path: - print("ERROR: Magisk path is empty!\nAborting ...") - puml("#red:Magisk path is empty;\n") - return -1 data += f"MAGISK_PATH={magisk_path}\n" if patch_method in ["app", "other"]: @@ -2091,6 +2087,7 @@ def patch_kernelsu_lkm_script(): data += "echo -------------------------\n" data += "echo \"Creating a patch ...\"\n" data += "rm -f kernelsu_boot_*\n" + kmi_override = '' if self.config.override_kmi: kmi_override = f" --kmi {self.config.override_kmi}" data += "echo \"Overriding KMI ...\"\n" diff --git a/windows-metadata.yaml b/windows-metadata.yaml index 04e069b..dacb674 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.9.2.5 +Version: 6.9.2.6 FileDescription: PixelFlasher InternalName: PixelFlasher OriginalFilename: PixelFlasher.exe diff --git a/windows-version-info.txt b/windows-version-info.txt index dfd23c6..832c3ea 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,9,2,5), - prodvers=(6,9,2,5), + filevers=(6,9,2,6), + prodvers=(6,9,2,6), # 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.9.2.5'), + StringStruct(u'FileVersion', u'6.9.2.6'), 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.9.2.5')]) + StringStruct(u'ProductVersion', u'6.9.2.6')]) ]), VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) ]