Skip to content

Commit

Permalink
- Bugfix: #194 Unintialized variable kmi_override causing patching …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
badabing2005 committed Apr 18, 2024
1 parent 4fabe44 commit 550fbb4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion advanced_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion build-on-mac.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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')
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion windows-metadata.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions windows-version-info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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])])
]
Expand Down

0 comments on commit 550fbb4

Please sign in to comment.