@@ -77,7 +77,7 @@ def __init__(self, *args, parent=None, config=None, **kwargs):
77
77
self .coords = Coords ()
78
78
self .enable_buttons = False
79
79
self .pif_exists = False
80
- self .pif_flavor = ''
80
+ self .pif_flavor = 'playintegrityfork_9999999 '
81
81
self .favorite_pifs = get_favorite_pifs ()
82
82
self .insync = False
83
83
self .pif_format = None
@@ -481,6 +481,7 @@ def init(self, refresh=False):
481
481
482
482
device = get_phone ()
483
483
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.\n Pif Manager features are set to limited mode." )
484
485
return
485
486
modules = device .get_magisk_detailed_modules (refresh )
486
487
@@ -496,6 +497,7 @@ def init(self, refresh=False):
496
497
self .pif_modules = []
497
498
498
499
if modules :
500
+ found_pif_module = False
499
501
for module in modules :
500
502
if module .state == 'enabled' and ((module .id == "playintegrityfix" and "Play Integrity" in module .name ) or module .id == "tricky_store" ):
501
503
self .pif_format = None
@@ -520,7 +522,7 @@ def init(self, refresh=False):
520
522
flavor = module .name .replace (" " , "" ).lower ()
521
523
self .pif_flavor = f"{ flavor } _{ module .versionCode } "
522
524
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
524
526
self .create_pif_button .Enable (True )
525
527
self .reload_pif_button .Enable (True )
526
528
self .cleanup_dg_button .Enable (True )
@@ -534,19 +536,20 @@ def init(self, refresh=False):
534
536
if self .pif_exists :
535
537
self .LoadReload (None )
536
538
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 )
547
550
548
- # Manually trigger the combo box change event
549
- self .onPifSelectionComboBox (None )
551
+ # Manually trigger the combo box change event
552
+ self .onPifSelectionComboBox (None )
550
553
551
554
# -----------------------------------------------
552
555
# check_pif_json
@@ -593,7 +596,7 @@ def onPifComboBox(self, event):
593
596
# -----------------------------------------------
594
597
def onPifSelectionComboBox (self , event ):
595
598
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 ) :
597
600
selected_module = self .pif_modules [selection_index ]
598
601
self .current_pif_module = selected_module
599
602
self .pif_format = selected_module .format
0 commit comments