Skip to content

Commit

Permalink
- Regression bug fix during download of Magiskboot when patching with…
Browse files Browse the repository at this point in the history
… APatch.

- Few additional debug messages.
  • Loading branch information
badabing2005 committed Jan 15, 2025
1 parent c809050 commit 21b3b96
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,7 @@ def _on_install_apk(self, event):
dialog = wx.FileDialog(self, "Select one or multiple APK file(s) to install", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_MULTIPLE)

if dialog.ShowModal() == wx.ID_CANCEL:
print("⚠️ User cancelled the file(s) selection operation")
return # the user changed their mind
paths = dialog.GetPaths()
dialog.Destroy()
Expand Down
2 changes: 1 addition & 1 deletion build-on-mac.spec
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ exe = EXE(pyz,
icon='images/icon-dark-256.icns')
app = BUNDLE(exe,
name='PixelFlasher.app',
version='7.9.0.2',
version='7.9.0.3',
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
Expand Up @@ -31,7 +31,7 @@
# <https://www.gnu.org/licenses/>.

rm -rf build dist
VERSION=7.9.0.2
VERSION=7.9.0.3
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 @@ -34,7 +34,7 @@

APPNAME = 'PixelFlasher'
CONFIG_FILE_NAME = 'PixelFlasher.json'
VERSION = '7.9.0.2'
VERSION = '7.9.0.3'
SDKVERSION = '33.0.3'
MAIN_WIDTH = 1400
MAIN_HEIGHT = 1040
Expand Down
8 changes: 5 additions & 3 deletions modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ def patch_magisk_script(patch_method):
with wx.FileDialog(self, "Select Magisk Application", '', '', wildcard="Images (*.*.apk)|*.apk", style=wx.FD_OPEN) as fileDialog:
puml(":Other Magisk Application for patch use ;\n")
if fileDialog.ShowModal() == wx.ID_CANCEL:
print("User cancelled.")
print("⚠️ User cancelled.")
puml("#pink:User Cancelled;\n")
return -1
other_magisk = fileDialog.GetPath()
Expand Down Expand Up @@ -1984,6 +1984,8 @@ def patch_magisk_script(patch_method):
data += "elif [[ -f \"/data/local/tmp/pf/assets.magisk64\" ]]; then\n"
data += " PATCHING_MAGISK_VERSION=$(/data/local/tmp/pf/assets/magisk64 -c)\n"
data += " echo \"PATCHING_MAGISK_VERSION: $PATCHING_MAGISK_VERSION\"\n"
data += "else\n"
data += " echo \"❌ ERROR: Magisk binary not found in /data/local/tmp/pf/assets/ \"\n"
data += "fi\n"

data += "SYSTEM_ROOT=false\n"
Expand Down Expand Up @@ -2946,7 +2948,7 @@ def magisk_not_found():

if not magiskboot_created:
# Find latest Magisk to download
apk = device.get_magisk_apk_details('Magisk Stable')
apk = get_magisk_apk_details('Magisk Stable')
if apk is None:
print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Could not find Magisk Stable version.")
puml("#red:Could not find Magisk Stable version;\n")
Expand Down Expand Up @@ -3165,7 +3167,7 @@ def magisk_not_found():

if not magiskboot_created:
# Find latest Magisk to download
apk = device.get_magisk_apk_details('Magisk Stable')
apk = get_magisk_apk_details('Magisk Stable')
filename = f"magisk_{apk.version}_{apk.versionCode}.apk"
download_file(apk.link, filename)
magisk_apk = os.path.join(tmp_path, filename)
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: 7.9.0.2
Version: 7.9.0.3
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=(7,9,0,2),
prodvers=(7,9,0,2),
filevers=(7,9,0,3),
prodvers=(7,9,0,3),
# 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'7.9.0.2'),
StringStruct(u'FileVersion', u'7.9.0.3'),
StringStruct(u'InternalName', u'PixelFlasher'),
StringStruct(u'LegalCopyright', u''),
StringStruct(u'OriginalFilename', u'PixelFlasher.exe'),
StringStruct(u'ProductName', u'PixelFlasher'),
StringStruct(u'ProductVersion', u'7.9.0.2')])
StringStruct(u'ProductVersion', u'7.9.0.3')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down

0 comments on commit 21b3b96

Please sign in to comment.