Skip to content

Commit

Permalink
- Add a new experimental feature to downgrade without a wipe and pote…
Browse files Browse the repository at this point in the history
…ntially switch from Beta to Stable without a wipe.

  Credit to @tbalden for the discovery and @capntrips for the details of the process.
- Select any img file and get additional image info.
- #190 fix, scrcpy launch improvement.
- Improved Menu to disabled advanced features when it's not enabled in the settings. (Previously only other GUI elements were hidden or disabled).
- If KernelSU or APatch is installed, report their version as part of device details.
- Improved logging.
- Improved santization.
- Other minor improvements and added stability.
  • Loading branch information
badabing2005 committed Apr 14, 2024
1 parent 361aae0 commit fe34916
Show file tree
Hide file tree
Showing 17 changed files with 5,681 additions and 170 deletions.
346 changes: 251 additions & 95 deletions Main.py

Large diffs are not rendered by default.

5,015 changes: 5,015 additions & 0 deletions avbtool.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build-on-linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ block_cipher = None
a = Analysis(['PixelFlasher.py'],
pathex=[],
binaries=[('bin/7zzs', 'bin')],
datas=[("images/icon-64.png", "images"),("images/icon-dark-64.png", "images"), ('bin/busybox_arm64-v8a', 'bin'), ('bin/busybox_armeabi-v7a', 'bin'), ('bin/busybox_x86', 'bin'), ('bin/busybox_x86_64', 'bin'), ('bin/aapt2_arm64-v8a', 'bin'), ('bin/aapt2_armeabi-v7a', 'bin'), ('bin/aapt2_x86', 'bin'), ('bin/aapt2_x86_64', 'bin'), ('bin/avbctl', 'bin'), ('bin/update_engine_client', 'bin'), ('android_versions.json', '.'), ('android_devices.json', '.')],
datas=[("images/icon-64.png", "images"),("images/icon-dark-64.png", "images"), ('bin/busybox_arm64-v8a', 'bin'), ('bin/busybox_armeabi-v7a', 'bin'), ('bin/busybox_x86', 'bin'), ('bin/busybox_x86_64', 'bin'), ('bin/aapt2_arm64-v8a', 'bin'), ('bin/aapt2_armeabi-v7a', 'bin'), ('bin/aapt2_x86', 'bin'), ('bin/aapt2_x86_64', 'bin'), ('bin/avbctl', 'bin'), ('bin/update_engine_client', 'bin'), ('android_versions.json', '.'), ('android_devices.json', '.'), ('testkey_rsa4096.pem', '.')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
Expand Down
4 changes: 2 additions & 2 deletions build-on-mac.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ block_cipher = None

a = Analysis(['PixelFlasher.py'],
binaries=[('bin/7zz', 'bin')],
datas=[("images/icon-64.png", "images"), ("images/icon-dark-64.png", "images"), ('bin/busybox_arm64-v8a', 'bin'), ('bin/busybox_armeabi-v7a', 'bin'), ('bin/busybox_x86', 'bin'), ('bin/busybox_x86_64', 'bin'), ('bin/aapt2_arm64-v8a', 'bin'), ('bin/aapt2_armeabi-v7a', 'bin'), ('bin/aapt2_x86', 'bin'), ('bin/aapt2_x86_64', 'bin'), ('bin/avbctl', 'bin'), ('bin/update_engine_client', 'bin'), ('android_versions.json', '.'), ('android_devices.json', '.')],
datas=[("images/icon-64.png", "images"), ("images/icon-dark-64.png", "images"), ('bin/busybox_arm64-v8a', 'bin'), ('bin/busybox_armeabi-v7a', 'bin'), ('bin/busybox_x86', 'bin'), ('bin/busybox_x86_64', 'bin'), ('bin/aapt2_arm64-v8a', 'bin'), ('bin/aapt2_armeabi-v7a', 'bin'), ('bin/aapt2_x86', 'bin'), ('bin/aapt2_x86_64', 'bin'), ('bin/avbctl', 'bin'), ('bin/update_engine_client', 'bin'), ('android_versions.json', '.'), ('android_devices.json', '.'), ('testkey_rsa4096.pem', '.')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
Expand All @@ -28,6 +28,6 @@ exe = EXE(pyz,
icon='images/icon-dark-256.icns')
app = BUNDLE(exe,
name='PixelFlasher.app',
version='6.9.1.3',
version='6.9.2.0',
icon='./images/icon-dark-256.icns',
bundle_identifier='com.badabing.pixelflasher')
2 changes: 1 addition & 1 deletion build-on-win.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ block_cipher = None

a = Analysis(['PixelFlasher.py'],
binaries=[('bin/7z.exe', 'bin'), ('bin/7z.dll', 'bin')],
datas=[("images/icon-64.png", "images"), ("images/icon-dark-64.png", "images"), ('bin/busybox_arm64-v8a', 'bin'), ('bin/busybox_armeabi-v7a', 'bin'), ('bin/busybox_x86', 'bin'), ('bin/busybox_x86_64', 'bin'), ('bin/aapt2_arm64-v8a', 'bin'), ('bin/aapt2_armeabi-v7a', 'bin'), ('bin/aapt2_x86', 'bin'), ('bin/aapt2_x86_64', 'bin'), ('bin/avbctl', 'bin'), ('bin/update_engine_client', 'bin'), ('android_versions.json', '.'), ('android_devices.json', '.')],
datas=[("images/icon-64.png", "images"), ("images/icon-dark-64.png", "images"), ('bin/busybox_arm64-v8a', 'bin'), ('bin/busybox_armeabi-v7a', 'bin'), ('bin/busybox_x86', 'bin'), ('bin/busybox_x86_64', 'bin'), ('bin/aapt2_arm64-v8a', 'bin'), ('bin/aapt2_armeabi-v7a', 'bin'), ('bin/aapt2_x86', 'bin'), ('bin/aapt2_x86_64', 'bin'), ('bin/avbctl', 'bin'), ('bin/update_engine_client', 'bin'), ('android_versions.json', '.'), ('android_devices.json', '.'), ('testkey_rsa4096.pem', '.')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
Expand Down
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.1.3
VERSION=6.9.2.0
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.1.3'
VERSION = '6.9.2.0'
SDKVERSION = '33.0.3'
MAIN_WIDTH = 1400
MAIN_HEIGHT = 1040
Expand Down
1 change: 1 addition & 0 deletions encode-bitmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"-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",
"-a -F -i -n downgrade-24 images/downgrade-24.png images.py",
]

if __name__ == "__main__":
Expand Down
9 changes: 9 additions & 0 deletions images.py
Original file line number Diff line number Diff line change
Expand Up @@ -6525,3 +6525,12 @@
b'V02IDBE9aAJQopDBMQ7MQwXQVhZ5vWnQVJ1OB9v/A5rmYJASfdKvTj34KcATT0TYGZdaUUAA'
b'AAAASUVORK5CYII=')

#----------------------------------------------------------------------
downgrade_24 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAA10lEQVRIS2NkoDFgpLH5DERb'
b'cL/BQECx4cIHUh1ElAW3arUTgAbXM/xlCFRru3qBFEsIWgAxnLEfaKgAEH9gZWZRJMUneC1A'
b'Mxxo/v9EtearC8j2AXI4E2P4rVqd/7gsU2u+AnY8ig+Aht5nZWY1/P33dwBSsOB0ORkWgF0E'
b'SymgMMcbLORagORr/GGObAEsSNCDDC2IkMP0/wNQcCGnGGJcTIIF4OBBsYRiCwglP7pagCvM'
b'8QYRuiQ5Lh7BFhAb5iQmU4TyUQsI5TGy5QnWaGSbDNVIcwsA0aiBGYyKH2AAAAAASUVORK5C'
b'YII=')

Binary file added images/downgrade-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions message_box_ex.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from runtime import *

class MessageBoxEx(wx.Dialog):
def __init__(self, *args, title=None, message=None, button_texts=None, default_button=None, disable_buttons=None, is_md=False, size=(800, 600), checkbox_labels=None, **kwargs):
def __init__(self, *args, title=None, message=None, button_texts=None, default_button=None, disable_buttons=None, is_md=False, size=(800, 600), checkbox_labels=None, checkbox_initial_values=None, **kwargs):
wx.Dialog.__init__(self, *args, **kwargs)
self.SetTitle(title)
self.button_texts = button_texts
Expand All @@ -19,6 +19,10 @@ def __init__(self, *args, title=None, message=None, button_texts=None, default_b
self.return_value = None
self.checkboxes = []
self.checkbox_labels = checkbox_labels
if checkbox_initial_values is not None:
self.checkbox_initial_values = checkbox_initial_values
else:
self.checkbox_initial_values = []

vSizer = wx.BoxSizer(wx.VERTICAL)
message_sizer = wx.BoxSizer(wx.HORIZONTAL)
Expand Down Expand Up @@ -56,8 +60,11 @@ def __init__(self, *args, title=None, message=None, button_texts=None, default_b

if checkbox_labels is not None:
checkbox_sizer = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY), wx.HORIZONTAL)
for checkbox_label in checkbox_labels:
for i in range(len(checkbox_labels)):
checkbox_label = checkbox_labels[i]
checkbox = wx.CheckBox(self, wx.ID_ANY, checkbox_label, wx.DefaultPosition, wx.DefaultSize, 0)
if i < len(self.checkbox_initial_values):
checkbox.SetValue(self.checkbox_initial_values[i])
self.checkboxes.append(checkbox)
checkbox_sizer.Add(checkbox, 0, wx.ALL, 5)
vSizer.Add(checkbox_sizer, 0, wx.EXPAND | wx.ALL, 10)
Expand Down
Loading

0 comments on commit fe34916

Please sign in to comment.