Skip to content

Commit 10b0614

Browse files
committed
- Set a default PIF format to json to allow displaying the print when Processing Image in PIF Manager.
- When PIF Manager is used with an unrooted device or one without granting su permissions to shell, display a message to inform the user about the reduced PIF Manager functionality.
1 parent d6a144a commit 10b0614

File tree

6 files changed

+26
-23
lines changed

6 files changed

+26
-23
lines changed

build-on-mac.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ exe = EXE(pyz,
2828
icon='images/icon-dark-256.icns')
2929
app = BUNDLE(exe,
3030
name='PixelFlasher.app',
31-
version='7.2.0.0',
31+
version='7.2.0.1',
3232
icon='./images/icon-dark-256.icns',
3333
bundle_identifier='com.badabing.pixelflasher')

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# <https://www.gnu.org/licenses/>.
3232

3333
rm -rf build dist
34-
VERSION=7.2.0.0
34+
VERSION=7.2.0.1
3535
NAME="PixelFlasher"
3636
DIST_NAME="PixelFlasher"
3737

constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
APPNAME = 'PixelFlasher'
3636
CONFIG_FILE_NAME = 'PixelFlasher.json'
37-
VERSION = '7.2.0.0'
37+
VERSION = '7.2.0.1'
3838
SDKVERSION = '33.0.3'
3939
MAIN_WIDTH = 1400
4040
MAIN_HEIGHT = 1040

pif_manager.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, *args, parent=None, config=None, **kwargs):
7777
self.coords = Coords()
7878
self.enable_buttons = False
7979
self.pif_exists = False
80-
self.pif_flavor = ''
80+
self.pif_flavor = 'playintegrityfork_9999999'
8181
self.favorite_pifs = get_favorite_pifs()
8282
self.insync = False
8383
self.pif_format = None
@@ -481,6 +481,7 @@ def init(self, refresh=False):
481481

482482
device = get_phone()
483483
if not device or not device.rooted:
484+
self.console_stc.SetText("Device is not rooted or SU permissions to adb shell is not granted.\nPif Manager features are set to limited mode.")
484485
return
485486
modules = device.get_magisk_detailed_modules(refresh)
486487

@@ -496,6 +497,7 @@ def init(self, refresh=False):
496497
self.pif_modules = []
497498

498499
if modules:
500+
found_pif_module = False
499501
for module in modules:
500502
if module.state == 'enabled' and ((module.id == "playintegrityfix" and "Play Integrity" in module.name) or module.id == "tricky_store"):
501503
self.pif_format = None
@@ -520,7 +522,7 @@ def init(self, refresh=False):
520522
flavor = module.name.replace(" ", "").lower()
521523
self.pif_flavor = f"{flavor}_{module.versionCode}"
522524
self.pif_modules.append(PifModule(module.id, module.name, module.version, module.versionCode, self.pif_format, self.pif_path, self.pif_flavor))
523-
525+
found_pif_module = True
524526
self.create_pif_button.Enable(True)
525527
self.reload_pif_button.Enable(True)
526528
self.cleanup_dg_button.Enable(True)
@@ -534,19 +536,20 @@ def init(self, refresh=False):
534536
if self.pif_exists:
535537
self.LoadReload(None)
536538

537-
# Make the selection in priority order: Trickystore, Play Integrity
538-
for i in range(self.pif_selection_combo.GetCount()):
539-
if "Tricky" in self.pif_selection_combo.GetString(i):
540-
self.pif_selection_combo.SetSelection(i)
541-
break
542-
elif "Play Integrity" in self.pif_selection_combo.GetString(i):
543-
self.pif_selection_combo.SetSelection(i)
544-
# If nothing is selected and there are items, select the first item
545-
if self.pif_selection_combo.GetSelection() == wx.NOT_FOUND and self.pif_selection_combo.GetCount() > 0:
546-
self.pif_selection_combo.SetSelection(0)
539+
if found_pif_module:
540+
# Make the selection in priority order: Trickystore, Play Integrity
541+
for i in range(self.pif_selection_combo.GetCount()):
542+
if "Tricky" in self.pif_selection_combo.GetString(i):
543+
self.pif_selection_combo.SetSelection(i)
544+
break
545+
elif "Play Integrity" in self.pif_selection_combo.GetString(i):
546+
self.pif_selection_combo.SetSelection(i)
547+
# If nothing is selected and there are items, select the first item
548+
if self.pif_selection_combo.GetSelection() == wx.NOT_FOUND and self.pif_selection_combo.GetCount() > 0:
549+
self.pif_selection_combo.SetSelection(0)
547550

548-
# Manually trigger the combo box change event
549-
self.onPifSelectionComboBox(None)
551+
# Manually trigger the combo box change event
552+
self.onPifSelectionComboBox(None)
550553

551554
# -----------------------------------------------
552555
# check_pif_json
@@ -593,7 +596,7 @@ def onPifComboBox(self, event):
593596
# -----------------------------------------------
594597
def onPifSelectionComboBox(self, event):
595598
selection_index = self.pif_selection_combo.GetSelection()
596-
if selection_index != wx.NOT_FOUND:
599+
if selection_index != wx.NOT_FOUND and self.pif_modules and selection_index < len(self.pif_modules):
597600
selected_module = self.pif_modules[selection_index]
598601
self.current_pif_module = selected_module
599602
self.pif_format = selected_module.format

windows-metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://github.com/DudeNr33/pyinstaller-versionfile
22
# create-version-file windows-metadata.yaml --outfile windows-version-info.txt
3-
Version: 7.2.0.0
3+
Version: 7.2.0.1
44
FileDescription: PixelFlasher
55
InternalName: PixelFlasher
66
OriginalFilename: PixelFlasher.exe

windows-version-info.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ VSVersionInfo(
77
ffi=FixedFileInfo(
88
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
99
# Set not needed items to zero 0. Must always contain 4 elements.
10-
filevers=(7,2,0,0),
11-
prodvers=(7,2,0,0),
10+
filevers=(7,2,0,1),
11+
prodvers=(7,2,0,1),
1212
# Contains a bitmask that specifies the valid bits 'flags'r
1313
mask=0x3f,
1414
# Contains a bitmask that specifies the Boolean attributes of the file.
@@ -32,12 +32,12 @@ VSVersionInfo(
3232
u'040904B0',
3333
[StringStruct(u'CompanyName', u''),
3434
StringStruct(u'FileDescription', u'PixelFlasher'),
35-
StringStruct(u'FileVersion', u'7.2.0.0'),
35+
StringStruct(u'FileVersion', u'7.2.0.1'),
3636
StringStruct(u'InternalName', u'PixelFlasher'),
3737
StringStruct(u'LegalCopyright', u''),
3838
StringStruct(u'OriginalFilename', u'PixelFlasher.exe'),
3939
StringStruct(u'ProductName', u'PixelFlasher'),
40-
StringStruct(u'ProductVersion', u'7.2.0.0')])
40+
StringStruct(u'ProductVersion', u'7.2.0.1')])
4141
]),
4242
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
4343
]

0 commit comments

Comments
 (0)