From 3a486da9871be56d809f6564bfffe663746ed293 Mon Sep 17 00:00:00 2001 From: Bing Date: Tue, 19 Mar 2024 22:28:07 -0400 Subject: [PATCH] - When patching with KernelSu on devices that have init_boot partition, patch boot partition, not init_boot. - Added Dev Tools | keybox.xml validity checker (credit to @hldr4) - `Extra Img Extraction` setting now additionally extracts `dtbo`, `vendor_boot`, `vendor_kernel_boot`, `super_empty` (useful for some ROMs). - When custom patching, `Paste` button will automatically paste the path to the (extra) image type selected. - Improved logging. --- .github/workflows/codeql-analysis.yml | 8 +- Main.py | 227 +++++++++------ README.md | 2 +- advanced_settings.py | 2 +- backup_manager.py | 4 +- build-on-mac.spec | 2 +- build.sh | 2 +- config.py | 2 +- constants.py | 3 +- encode-bitmaps.py | 1 + images.py | 10 + images/cert-24.png | Bin 0 -> 335 bytes magisk_modules.py | 12 +- modules.py | 304 ++++++++++---------- package_manager.py | 8 +- partition_manager.py | 8 +- phone.py | 386 +++++++++++++------------- pif_manager.py | 6 +- runtime.py | 92 +++--- wifi.py | 10 +- windows-metadata.yaml | 2 +- windows-version-info.txt | 8 +- 22 files changed, 585 insertions(+), 514 deletions(-) create mode 100644 images/cert-24.png diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index dee72df..e159f30 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,11 +39,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/Main.py b/Main.py index e4763e3..c3cb617 100644 --- a/Main.py +++ b/Main.py @@ -126,7 +126,7 @@ def __init__(self, parent, dialog_title="Select a file", wildcard="All files (*. self.history = json.load(f) self.combo_box.SetItems(self.history) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: encountered an exception during device_images_history_file loading.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: encountered an exception during device_images_history_file loading.") print(f"Exception: {e}") print("Deleting the device_images_history_file to recover ...") os.remove(self.history_file) @@ -409,7 +409,7 @@ def __init__(self, parent): self.parent.firmware_button.SetBitmap(images.open_link_red_24.GetBitmap()) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while building Google Images Menu.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while building Google Images Menu.") traceback.print_exc() # ============================================================================ @@ -460,7 +460,7 @@ def __init__(self, parent, device=None, date_filter=None): factory_menu_item.SetBitmap(images.factory_24.GetBitmap()) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while building Google Images Popup Menu.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while building Google Images Popup Menu.") traceback.print_exc() # ============================================================================ @@ -1089,7 +1089,7 @@ def _on_device_info(self, event): device = get_phone() print(f"Device Info:\n------------\n{device.device_info}") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting device info") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting device info") traceback.print_exc() self._on_spin('stop') @@ -1103,7 +1103,7 @@ def _on_pif_info(self, event): device = get_phone() print(f"Current device's Print:\n------------\n{device.current_device_print}\n------------\n") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting current device print") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting current device print") traceback.print_exc() self._on_spin('stop') @@ -1117,7 +1117,7 @@ def _on_props_as_json(self, event): device = get_phone() print(f"Current device's properties as json :\n------------\n{device.current_device_props_as_json}\n------------\n") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting current device properties as json") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting current device properties as json") traceback.print_exc() self._on_spin('stop') @@ -1137,7 +1137,7 @@ def _on_props_as_json(self, event): # if verification != -1: # print(f"\n{verification}") # except Exception as e: - # print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while checking verity") + # print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while checking verity") # traceback.print_exc() # self._on_spin('stop') @@ -1157,6 +1157,9 @@ def _build_menu_bar(self): # Create the Toolbar menu tb_menu = wx.Menu() + # Create the Tools menu + tools_menu = wx.Menu() + # Create the Help menu help_menu = wx.Menu() @@ -1298,6 +1301,13 @@ def _build_menu_bar(self): self.bootloader_unlock_menu.SetBitmap(images.unlock_24.GetBitmap()) self.Bind(wx.EVT_MENU, self._on_unlock_bootloader, self.bootloader_unlock_menu) + # Tools Menu Items + # ---------------- + # check keybox.xml + self.check_keybox = tools_menu.Append(wx.ID_ANY, "Check keybox.xml", "Check keybox.xml") + self.check_keybox.SetBitmap(images.cert_24.GetBitmap()) + self.Bind(wx.EVT_MENU, self._on_check_keybox, self.check_keybox) + # Toolbar Menu Items # ------------------ # Top @@ -1491,10 +1501,12 @@ def _build_menu_bar(self): self.menuBar.Append(file_menu, "&File") # Add the Device menu to the menu bar self.menuBar.Append(device_menu, "&Device") + # Add the Tools menu to the menu bar + self.menuBar.Append(tools_menu, "Dev Tools") # Create an instance of GoogleImagesMenu self.google_images_menu = GoogleImagesMenu(self) # Append GoogleImagesMenu to the menu bar - self.menuBar.Append(self.google_images_menu, "Google Images") + self.menuBar.Append(self.google_images_menu, "&Google Images") # Add the Toolbar menu to the menu bar self.menuBar.Append(tb_menu, "&Toolbar") # Add the Help menu to the menu bar @@ -1762,7 +1774,7 @@ def _on_install_apk(self, event): device.install_apk(pathname, fastboot_included=True, owner_playstore=checkbox_values[0], bypass_low_target=checkbox_values[1]) except IOError: traceback.print_exc() - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Cannot install file '{pathname}'") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Cannot install file '{pathname}'") except Exception: traceback.print_exc() self._on_spin('stop') @@ -1833,10 +1845,10 @@ def _on_link_clicked(self, event): print(f"Open Link {description} {url}") puml(f":Open Link;\nnote right\n=== {description}\n[[{url}]]\nend note\n", True) else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Unknown menu item clicked") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Unknown menu item clicked") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening a link") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening a link") traceback.print_exc() self._on_spin('stop') @@ -1849,7 +1861,7 @@ def _on_open_config_folder(self, event): self._on_spin('start') open_folder(self, get_sys_config_path()) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening configuration folder") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening configuration folder") traceback.print_exc() self._on_spin('stop') @@ -1861,7 +1873,7 @@ def _on_open_pf_home(self, event): self._on_spin('start') open_folder(self, get_config_path()) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening PixelFlasher working directory") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening PixelFlasher working directory") traceback.print_exc() self._on_spin('stop') @@ -1962,6 +1974,11 @@ def _on_cancel_ota(self, event): # ----------------------------------------------- def Test(self, event): print("Entrering Test function (used during development only) ...") + # print("Error: ❌ (U+274C, Cross Mark)") + # print("Warning: ⚠️ (U+26A0, Warning)") + # print("Info: ℹ️ (U+2139, Information Source)") + # print("Fatal: ☠️ (U+2620, Skull and Crossbones)") + # device = get_phone() # device.dump_props() @@ -2179,7 +2196,7 @@ def get_vbmeta(self, device, message=''): self.toast("vbmeta Warning!", alert) return message except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered while getting vbmeta data.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered while getting vbmeta data.") traceback.print_exc() # ----------------------------------------------- @@ -2249,7 +2266,7 @@ def _update_custom_flash_options(self): self.flash_radio_button.Enable(True) self.flash_button.Enable(True) else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Selected file is not of type .img") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Selected file is not of type .img") elif image_mode in ['image', 'SIDELOAD']: if extension == '.zip': self.live_boot_radio_button.Enable(False) @@ -2257,14 +2274,14 @@ def _update_custom_flash_options(self): self.flash_button.Enable(True) self.flash_radio_button.SetValue(True) else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Selected file is not of type .zip") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Selected file is not of type .zip") elif extension == '.img': self.live_boot_radio_button.Enable(False) self.flash_radio_button.Enable(True) self.flash_button.Enable(True) self.flash_radio_button.SetValue(True) else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Selected file is not of type .img") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Selected file is not of type .img") # ----------------------------------------------- # _select_configured_device @@ -2306,7 +2323,7 @@ def _select_configured_device(self): self._reflect_slots() self.update_widget_states() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error in function _select_configured_device") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error in function _select_configured_device") traceback.print_exc() # ----------------------------------------------- @@ -2448,7 +2465,7 @@ def evaluate_condition(self, condition): boot = get_boot() if boot: return True - elif image_mode in ["vbmeta", "bootloader", "radio", "image"]: + elif image_mode in ["vbmeta", "bootloader", "radio", "image", 'dtbo', 'vendor_boot', 'vendor_kernel_boot', 'super_empty']: return True return False @@ -2494,7 +2511,7 @@ def evaluate_condition(self, condition): return False except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while evaluating a rule") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while evaluating a rule") traceback.print_exc() #----------------------------------------------------------------------------- @@ -2611,7 +2628,7 @@ def update_widget_states(self): widget.Enable(enable_widget) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while updating widgets.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while updating widgets.") traceback.print_exc() # ----------------------------------------------- @@ -2637,7 +2654,7 @@ def _on_select_device(self, event): self._reflect_slots() self.update_widget_states() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting a device") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting a device") traceback.print_exc() self._on_spin('stop') @@ -2674,7 +2691,7 @@ def _on_scan(self, event): else: print("Please set Android Platform Tools Path first.") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while scanning") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while scanning") traceback.print_exc() self._on_spin('stop') @@ -2692,7 +2709,7 @@ def _on_select_platform_tools(self, event): self.platform_tools_label.SetLabel("Android Platform Tools") self.update_widget_states() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting platform tools") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting platform tools") traceback.print_exc() self._on_spin('stop') @@ -2702,7 +2719,7 @@ def _on_select_platform_tools(self, event): def update_firmware_selection(self, path): try: if not os.path.exists(path): - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: file {path} does not exist") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: file {path} does not exist") return -1 self.config.firmware_path = path.replace("'", "") checksum = select_firmware(self) @@ -2713,7 +2730,7 @@ def update_firmware_selection(self, path): self.firmware_picker.SetToolTip(f"SHA-256: {checksum}") self.update_widget_states() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting firmware") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting firmware") traceback.print_exc() # ----------------------------------------------- @@ -2742,7 +2759,7 @@ def _on_process_firmware(self, event): process_file(self, 'firmware') self.update_widget_states() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while processing firmware") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while processing firmware") traceback.print_exc() self._on_spin('stop') @@ -2759,7 +2776,7 @@ def _on_process_rom(self, event): process_file(self, 'rom') self.update_widget_states() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while processing rom") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while processing rom") traceback.print_exc() self._on_spin('stop') @@ -2774,7 +2791,7 @@ def _on_image_choice(self, event): self._update_custom_flash_options() self.update_widget_states() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while choosing an image") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while choosing an image") traceback.print_exc() self._on_spin('stop') @@ -2790,12 +2807,12 @@ def _on_image_select(self, event): if extension in ['.zip', '.img']: set_image_path(image_path) self._update_custom_flash_options() - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} Custom image file {image_path} is selected.") + print(f"\nℹ️ {datetime.now():%Y-%m-%d %H:%M:%S} Custom image file {image_path} is selected.") else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: The selected file {image_path} is not img or zip file.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: The selected file {image_path} is not img or zip file.") self.image_file_picker.SetPath('') except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting an image") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting an image") traceback.print_exc() self._on_spin('stop') @@ -2825,11 +2842,11 @@ def _on_select_custom_rom(self, event): populate_boot_list(self) self.update_widget_states() else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: The selected file {custom_rom_path} is not a valid archive.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: The selected file {custom_rom_path} is not a valid archive.") puml("#red:The selected ROM file is not valid;\n") self.custom_rom.SetPath('') except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting rom") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while selecting rom") traceback.print_exc() self._on_spin('stop') @@ -2922,7 +2939,7 @@ def vbmeta_alert(self, show_alert=False): result = dlg.ShowModal() dlg.Destroy() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") traceback.print_exc() print(alert) @@ -3007,9 +3024,9 @@ def _on_reboot_recovery(self, event): if device: res = device.reboot_recovery() if res != 0: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to recovery") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to recovery") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to recovery") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to recovery") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3028,9 +3045,9 @@ def _on_reboot_download(self, event): if device: res = device.reboot_download() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to download") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to download") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to download") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to download") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3049,9 +3066,9 @@ def _on_reboot_sideload(self, event): if device: res = device.reboot_sideload() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to sideload") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to sideload") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to sideload") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to sideload") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3070,9 +3087,9 @@ def _on_reboot_safemode(self, event): if device: res = device.reboot_safemode() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to safe mode") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to safe mode") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to safe mode") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to safe mode") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3101,7 +3118,7 @@ def select_file_and_push(self, destination): self.SetCursor(wx.Cursor(wx.CURSOR_ARROW)) return -1 except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") traceback.print_exc() self._on_spin('stop') @@ -3131,9 +3148,9 @@ def _on_reboot_system(self, event): if device: res = device.reboot_system() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3152,9 +3169,9 @@ def _on_reboot_bootloader(self, event): if device: res = device.reboot_bootloader(fastboot_included = True) if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to bootloader") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to bootloader") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to bootloader") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to bootloader") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3173,9 +3190,9 @@ def _on_reboot_fastbootd(self, event): if device: res = device.reboot_fastboot() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to fastbootd") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to fastbootd") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to fatsbootd") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to fatsbootd") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3250,16 +3267,16 @@ def _on_lock_bootloader(self, event): if device: res = device.lock_bootloader() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while locking bootloader") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while locking bootloader") # only reboot if no_reboot is not selected if not self.config.no_reboot: print("echo rebooting to system ...\n") if device: res = device.reboot_system() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while locking bootloader") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while locking bootloader") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3306,15 +3323,15 @@ def _on_unlock_bootloader(self, event): if device: res = device.unlock_bootloader() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while unlocking bootloader") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while unlocking bootloader") if not self.config.no_reboot: print("echo rebooting to system ...\n") if device: res = device.reboot_system() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while unlocking bootloader") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while unlocking bootloader") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3374,7 +3391,7 @@ def _on_adb_shell(self, event): device = get_phone() device.open_shell() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting adb shell") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while getting adb shell") traceback.print_exc() self._on_spin('stop') @@ -3392,7 +3409,7 @@ def _on_scrcpy(self, event): if device: device.scrcpy() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while launching scrcpy") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while launching scrcpy") traceback.print_exc() self._on_spin('stop') @@ -3518,7 +3535,7 @@ def _on_switch_slot(self, event): device = get_phone() self._on_spin('start') if device.active_slot not in ['a', 'b']: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Unknown slot, is your device dual slot?") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Unknown slot, is your device dual slot?") self._on_spin('stop') return print(f"User clicked on Switch Slot: Current Slot: [{device.active_slot}]") @@ -3527,13 +3544,13 @@ def _on_switch_slot(self, event): if device: res = device.switch_slot() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while switching slot") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while switching slot") if not self.config.no_reboot and device: res = device.reboot_system() if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while rebooting to system") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while switching slot") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while switching slot") traceback.print_exc() self.refresh_device() self._on_spin('stop') @@ -3548,7 +3565,7 @@ def _open_sdk_link(self, event): webbrowser.open_new('https://developer.android.com/studio/releases/platform-tools.html') puml(f":Open SDK Link;\nnote right\n=== Android Platform Tools\n[[https://developer.android.com/studio/releases/platform-tools.html]]\nend note\n", True) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening skd link") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening skd link") traceback.print_exc() self._on_spin('stop') @@ -3561,7 +3578,7 @@ def _on_wifi_manager(self, event): print("Opening Wireless Manager ...\n") dlg = Wireless(self) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while loading wifi screen.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while loading wifi screen.") traceback.print_exc() self._on_spin('stop') return @@ -3593,7 +3610,7 @@ def _on_adb_kill_server(self, event): self._on_spin('start') adb_kill_server(self) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while killing adb server") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while killing adb server") traceback.print_exc() self._on_spin('stop') @@ -3613,6 +3630,25 @@ def _on_custom_rom(self, event): populate_boot_list(self) self.update_widget_states() + # ----------------------------------------------- + # _on_check_keybox + # ----------------------------------------------- + def _on_check_keybox(self, event): + try: + with wx.FileDialog(self, "Select keybox to test", '', '', wildcard="All files (*.xml)|*.xml", style=wx.FD_OPEN) as fileDialog: + if fileDialog.ShowModal() == wx.ID_CANCEL: + print("User cancelled file push.") + return + selected_file = fileDialog.GetPath() + + self._on_spin('start') + res = check_kb(selected_file) + debug(f"Result: {res}") + except Exception as e: + print(f"Error: {e}") + traceback.print_exc() + self._on_spin('stop') + # ----------------------------------------------- # _on_show_all_boot # ----------------------------------------------- @@ -3717,7 +3753,12 @@ def _on_boot_selected(self, event): message += f" Patched Method: {boot.patch_method}\n" if boot.patch_source_sha1: message += f" Patch Source SHA1: {boot.patch_source_sha1}\n" - message += f" Patched With Magisk: {boot.magisk_version}\n" + if boot.patch_method == "kernelsu": + message += f" Patched With KernelSU: {boot.magisk_version}\n" + elif boot.patch_method == "apatch": + message += f" Patched With Apatch: {boot.magisk_version}\n" + else: + message += f" Patched With Magisk: {boot.magisk_version}\n" message += f" Patched on Device: {boot.hardware}\n" else: patched = False @@ -3779,7 +3820,7 @@ def _on_delete_boot(self, event): data = con.execute(sql, (boot.boot_id, boot.package_id)) con.commit() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") puml("#red:Encountered an error;\n", True) traceback.print_exc() print("Aborting ...") @@ -3817,7 +3858,7 @@ def _on_delete_boot(self, event): else: print(f"Warning: Boot file: {boot.boot_path} does not exist") except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") puml("#red:Encountered an error;\n", True) traceback.print_exc() print("Aborting ...") @@ -3826,7 +3867,7 @@ def _on_delete_boot(self, event): self._on_spin('stop') return except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") puml("#red:Encountered an error;\n", True) traceback.print_exc() print("Aborting ...") @@ -3867,7 +3908,7 @@ def _on_delete_boot(self, event): print(f"Deleting Firmware cache for: {package_path} ...") delete_all(package_path) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error.") puml("#red:Encountered an error;\n", True) traceback.print_exc() print("Aborting ...") @@ -3890,7 +3931,7 @@ def _on_boot_folder(self, event): if boot: open_folder(self, boot.boot_path, True) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening boot folder") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening boot folder") traceback.print_exc() self._on_spin('stop') @@ -3906,7 +3947,7 @@ def _on_firmware_folder(self, event): working_dir = os.path.join(config_path, 'factory_images', boot.package_sig) open_folder(self, working_dir, False) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening firmware folder") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening firmware folder") traceback.print_exc() self._on_spin('stop') @@ -3921,7 +3962,7 @@ def _on_live_boot(self, event): self._on_spin('start') live_flash_boot_phone(self, 'Live') except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while live booting") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while live booting") traceback.print_exc() self._on_spin('stop') @@ -3936,7 +3977,7 @@ def _on_flash_boot(self, event): self._on_spin('start') live_flash_boot_phone(self, 'Flash') except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while flashing boot") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while flashing boot") traceback.print_exc() self._on_spin('stop') @@ -3960,12 +4001,22 @@ def _on_paste_selection(self, event): pasted_filename = find_file_by_prefix(package_dir_full, "bootloader-") elif image_mode == "radio": pasted_filename = find_file_by_prefix(package_dir_full, "radio-") - elif image_mode == "image": - pasted_filename = find_file_by_prefix(package_dir_full, "image-") + elif image_mode == "dtbo": + pasted_filename = find_file_by_prefix(package_dir_full, "dtbo.img") + elif image_mode == "vendor_boot": + pasted_filename = find_file_by_prefix(package_dir_full, "vendor_boot.img") + elif image_mode == "vendor_kernel_boot": + pasted_filename = find_file_by_prefix(package_dir_full, "vendor_kernel_boot.img") + elif image_mode == "super_empty": + pasted_filename = find_file_by_prefix(package_dir_full, "super_empty.img") else: print("Nothing to paste!") flag = False return + if pasted_filename is None: + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: file Not Found in {package_dir_full}") + flag = False + return if flag and os.path.exists(pasted_filename): print(f"Pasted {pasted_filename} to custom flash") puml(f":Paste boot path;\nnote right:{pasted_filename};\n", True) @@ -3974,7 +4025,7 @@ def _on_paste_selection(self, event): self._update_custom_flash_options() set_flash_button_state(self) else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: file: {pasted_filename} Not Found.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: file: {pasted_filename} Not Found in {package_dir_full}") # ----------------------------------------------- # _on_magisk_patch_boot @@ -3987,7 +4038,7 @@ def _on_magisk_patch_boot(self, event): self._on_spin('start') patch_boot_img(self, 'Magisk') except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while patching boot") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while patching boot") traceback.print_exc() self._on_spin('stop') @@ -4002,7 +4053,7 @@ def _on_kernelsu_patch_boot(self, event): self._on_spin('start') patch_boot_img(self, 'KernelSU') except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while patching boot") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while patching boot") traceback.print_exc() self._on_spin('stop') @@ -4017,7 +4068,7 @@ def _on_patch_custom_boot(self, event): self._on_spin('start') patch_boot_img(self, 'Custom') except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while patching custom boot") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while patching custom boot") traceback.print_exc() self._on_spin('stop') @@ -4034,7 +4085,7 @@ def _on_flash(self, event): self.flash_button.Enable(False) res = flash_phone(self) if res == -1: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} INFO: Flashing was aborted.") + print(f"\nℹ️ {datetime.now():%Y-%m-%d %H:%M:%S} INFO: Flashing was aborted.") print("This could be user initiated or a problem encountered during flashing.") device = get_phone() if device: @@ -4047,7 +4098,7 @@ def _on_flash(self, event): self.update_widget_states() self.spinner_label.Label = "Please be patient ..." except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while flashing") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while flashing") traceback.print_exc() self._on_spin('stop') @@ -4081,7 +4132,7 @@ def update_slot_image(self, slot): if slot_image_height == 0 and rooted_image_height == 0 and slot != 'none': self._refresh_ui() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while updating slot image") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while updating slot image") traceback.print_exc() # ----------------------------------------------- @@ -4105,7 +4156,7 @@ def update_rooted_image(self, is_rooted=False): if rooted_image_height == 0 and slot_image_height == 0 and is_rooted: self._refresh_ui() except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while updating root image") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while updating root image") traceback.print_exc() # ----------------------------------------------- @@ -4253,7 +4304,7 @@ def _add_mode_radio_button(sizer, index, flash_mode, label, tooltip): self.list.InsertColumn(0, 'SHA1 ', wx.LIST_FORMAT_LEFT, width=-1) self.list.InsertColumn(1, 'Source SHA1 ', wx.LIST_FORMAT_LEFT, width=-1) self.list.InsertColumn(2, 'Package Fingerprint ', wx.LIST_FORMAT_LEFT, width=-1) - self.list.InsertColumn(3, 'Patched with Magisk ', wx.LIST_FORMAT_LEFT, -1) + self.list.InsertColumn(3, 'Patched with version ', wx.LIST_FORMAT_LEFT, -1) self.list.InsertColumn(4, 'Patch Method ', wx.LIST_FORMAT_LEFT, -1) self.list.InsertColumn(5, 'Patched on Device ', wx.LIST_FORMAT_LEFT, -1) self.list.InsertColumn(6, 'Date ', wx.LIST_FORMAT_LEFT, -1) @@ -4415,7 +4466,9 @@ def _add_mode_radio_button(sizer, index, flash_mode, label, tooltip): set_console_widget(self.console_ctrl) if not self.config.customize_font: self.spinner_label.SetFont(wx.Font(wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False, wx.EmptyString)) - self.console_ctrl.SetFont(wx.Font(9, wx.FONTFAMILY_TELETYPE, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) + # self.console_ctrl.SetFont(wx.Font(9, wx.FONTFAMILY_TELETYPE, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) + font = wx.Font(9, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, faceName="Courier New") + self.console_ctrl.SetFont(font) if darkdetect.isLight(): self.console_ctrl.SetBackgroundColour(wx.WHITE) self.console_ctrl.SetForegroundColour(wx.BLUE) @@ -4625,7 +4678,7 @@ def open_device_image_download_link(url): webbrowser.open_new(f"{url}#{hardware}") puml(f":Open Link;\nnote right\n=== {hardware} Firmware Link\n[[{url}#{hardware}]]\nend note\n", True) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening firmware link") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening firmware link") traceback.print_exc() # ============================================================================ diff --git a/README.md b/README.md index 0971c48..f82f792 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ The following details are listed. - **SHA1** is (shortened for display only) sha1 of `boot.img` (or `init_boot.img` for Pixel 7 or newer devices) - **Source SHA1** (shortened for display only) SHA1 of source `boot.img` extracted from the image (This should be the same as SHA1 of an unpatched `boot.img`) - **Package Fingerprint** is just the filename portion of the image (without the extension). - - **Patched with Magisk** indicates the version of Magisk used to patch the image (if applicable). + - **Patched with Version** indicates the version of Magisk / KernelSU / Apatch used to patch the image (if applicable). - **Patched Method** indicates what method PixelFlasher used to create a patch (possible options: `root`, `app`, `uiautomator`, `manual`) - **Patched on Device** indicates the device model that performed the patching. You should always use patched images that match the model of the device that it will be flashed on. - **Date** is the either the date the `boot.img` was extracted, or the date it was patched. diff --git a/advanced_settings.py b/advanced_settings.py index 08f8cfa..377f0db 100644 --- a/advanced_settings.py +++ b/advanced_settings.py @@ -388,7 +388,7 @@ def _open_scrcpy_link(self, event): webbrowser.open_new(SCRCPYURL) puml(f":Open scrcpy Link;\nnote right\n=== scrcpy\n[[{SCRCPYURL}]]\nend note\n", True) except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening skd link") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Encountered an error while opening skd link") traceback.print_exc() def _onResetMagiskPkg(self, e): diff --git a/backup_manager.py b/backup_manager.py index 1b9e71b..c3c0fb8 100644 --- a/backup_manager.py +++ b/backup_manager.py @@ -34,7 +34,7 @@ def __init__(self, *args, **kwargs): self.all_cb_clicked = False self.device = get_phone() if not self.device: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: You must first select a valid device.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: You must first select a valid device.") return -1 self.sha1 = self.device.magisk_sha1 @@ -454,7 +454,7 @@ def OnAutoBackup(self, e): self._on_spin('stop') return else: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: The dumped partition does not contain source boot's SHA1") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: The dumped partition does not contain source boot's SHA1") print("This is normal for older devices, but newer deviced should have it.") print("Cannot create automatic backup file, you can still manually select and create one.") print("Aborting ...") diff --git a/build-on-mac.spec b/build-on-mac.spec index 40ce617..1674def 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.8.3.0', + version='6.8.4.0', icon='./images/icon-dark-256.icns', bundle_identifier='com.badabing.pixelflasher') diff --git a/build.sh b/build.sh index da56bbe..4f314d1 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash rm -rf build dist -VERSION=6.8.3.0 +VERSION=6.8.4.0 NAME="PixelFlasher" DIST_NAME="PixelFlasher" diff --git a/config.py b/config.py index 19d00f3..6efb2f3 100644 --- a/config.py +++ b/config.py @@ -363,7 +363,7 @@ def load(cls, file_path): conf.first_run = True conf.first_run_date = f"{datetime.now():%Y-%m-%d %H:%M:%S}" except Exception as e: - print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: encountered an exception during configuartion file loading.") + print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: encountered an exception during configuartion file loading.") print(f"Exception: {e}") print("Deleting the configuration file to recover ...") os.remove(file_path) diff --git a/constants.py b/constants.py index cdde1aa..dd135e0 100644 --- a/constants.py +++ b/constants.py @@ -2,7 +2,7 @@ APPNAME = 'PixelFlasher' CONFIG_FILE_NAME = 'PixelFlasher.json' -VERSION = '6.8.3.0' +VERSION = '6.8.4.0' SDKVERSION = '33.0.3' MAIN_WIDTH = 1400 MAIN_HEIGHT = 1040 @@ -41,6 +41,7 @@ '-ElementalX', '-Elite', '-franco', + '-hadesKernel', '-Lineage-', '-lineage-', '-LineageOS', diff --git a/encode-bitmaps.py b/encode-bitmaps.py index 10cc51c..cb5f6e8 100644 --- a/encode-bitmaps.py +++ b/encode-bitmaps.py @@ -131,6 +131,7 @@ "-a -F -i -n save-24 images/save-24.png images.py", "-a -F -i -n kernelsu-24 images/kernelsu-24.png images.py", "-a -F -i -n apatch-24 images/apatch-24.png images.py", + "-a -F -i -n cert-24 images/cert-24.png images.py", ] if __name__ == "__main__": diff --git a/images.py b/images.py index 68fb367..1a3ae11 100644 --- a/images.py +++ b/images.py @@ -6515,3 +6515,13 @@ b'ahIogQqCASNzc0trW3tHTGcXWoR0S9X1VNb2Wgj2QQVgoJ9ZJW3CxLSQSf1QATjol5g8Zeo0' b'ielQLhLoB1pagqEeHTAwAAAEn0WcBB+K8QAAAABJRU5ErkJggg==') +#---------------------------------------------------------------------- +cert_24 = PyEmbeddedImage( + b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABFklEQVRIS9WUzRGCMBCFd8UC' + b'bEBGOsAO8CacLAUqcKwAOlAr0BN6kxLsAIY+MGYPwZARiPw4ygkIvC9v920QRr5wZH34HsAL' + b'Uxtwugdgdh9XDCBhrNhdAyshndKBG+U3/uD0EZf+zWLftCoAL8o5HIAv9CqbqlOKyQviXnWj' + b'Ax8EwEVOD1YEfAMLRGN78c2V2IwWoK0PqkPZmRagTmAdpg7t+E0YzuSIJyfrBXDDfIMIIZVG' + b'dilHUwvw9RIJoKg1zQwNE4IxI0ci8/SdloPRYzpWiVK1eXWDVpey13u8x/58WTkqKIITNPhh' + b'V02IDBE9aAJQopDBMQ7MQwXQVhZ5vWnQVJ1OB9v/A5rmYJASfdKvTj34KcATT0TYGZdaUUAA' + b'AAAASUVORK5CYII=') + diff --git a/images/cert-24.png b/images/cert-24.png new file mode 100644 index 0000000000000000000000000000000000000000..72decc665f35bde701fe95ea3cda7d2a397b0d48 GIT binary patch literal 335 zcmV-V0kHmwP);Q&7FlG9>5Dz8*sV@V0Ir@3?N~w*j)oFA)V5J8|63t;Perf{>@_Fv?>5E$~hc> zFZ3##s#A)|3*ugNqXQoVz(r0ERs?(l3q)gk@y(Ukj257+52{1inHHc&9o?f6X? z&g6(EC+h`p!+e7XA(cjUDMwQa@bwZ2pr|#?3=I>4F(XGJ^YopTgVAF;R*6!zd3A$U zm$KJ;yvP20Sve{wf)h0OVOLFv3=utO0#Krm!7&cZLj}-Q7J0pC&{UmH2iyMxn&x1T h5`EIIPCfW3z!OhI*cq2vQ9u9y002ovPDHLkV1f