Skip to content

Commit

Permalink
- New Feature: Download any Google device firmware or full OTA direct…
Browse files Browse the repository at this point in the history
…ly in PixelFlasher.

- Automatic detection and notification if an update is available for the selected device.
- New feature: Cancel / reset OTA update pushed by Google (need to be used prior to a reboot). Binary graciously provided by @capntrips.
- Removed outdated links from help menu.
	- kdrag0n's safetynet-fix
	- Displax's safetynet-fix
- Added new links to the help menu
	- osm0sis's PlayIntegrityFork
	- chiteroman's PlayIntegrityFix
	- TheFreeman193's Play Integrity Fix Props Collection
	- Full OTA Images for Pixel Phones / Tablets
	- Factory Images for Pixel Phones / Tablets
	- Full OTA Images for Pixel Watches
	- Factory Images for Pixel Watches
	- Full OTA Images for Pixel Beta 14
	- Factory Images for Pixel Beta 14
- Enable Magisk Kitsune patch creation using Magisk core component (previously disabled due to incompatibility and patches were only created using the manager).
- Miscellaneous improvements, bug fixes and code refactoring.
  • Loading branch information
badabing2005 committed Jan 7, 2024
1 parent 5b7e286 commit c67dadb
Show file tree
Hide file tree
Showing 24 changed files with 809 additions and 270 deletions.
593 changes: 382 additions & 211 deletions Main.py

Large diffs are not rendered by default.

Binary file added bin/update_engine_client
Binary file not shown.
4 changes: 2 additions & 2 deletions build-on-linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ block_cipher = None
a = Analysis(['PixelFlasher.py'],
pathex=[],
binaries=[('bin/7zzs', 'bin')],
datas=[("images/icon-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')],
datas=[("images/icon-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')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['bin/busybox_arm64-v8a', 'bin/busybox_armeabi-v7a', 'bin/busybox_x86', 'bin/busybox_x86_64', 'bin/aapt2_arm64-v8a', 'bin/aapt2_armeabi-v7a', 'bin/aapt2_x86', 'bin/aapt2_x86_64', 'bin/avbctl'],
excludes=['bin/busybox_arm64-v8a', 'bin/busybox_armeabi-v7a', 'bin/busybox_x86', 'bin/busybox_x86_64', 'bin/aapt2_arm64-v8a', 'bin/aapt2_armeabi-v7a', 'bin/aapt2_x86', 'bin/aapt2_x86_64', 'bin/avbctl', 'bin/update_engine_client'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
Expand Down
6 changes: 3 additions & 3 deletions build-on-mac.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ block_cipher = None

a = Analysis(['PixelFlasher.py'],
binaries=[('bin/7zz', 'bin')],
datas=[("images/icon-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')],
datas=[("images/icon-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')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['bin/busybox_arm64-v8a', 'bin/busybox_armeabi-v7a', 'bin/busybox_x86', 'bin/busybox_x86_64', 'bin/aapt2_arm64-v8a', 'bin/aapt2_armeabi-v7a', 'bin/aapt2_x86', 'bin/aapt2_x86_64', 'bin/avbctl'],
excludes=['bin/busybox_arm64-v8a', 'bin/busybox_armeabi-v7a', 'bin/busybox_x86', 'bin/busybox_x86_64', 'bin/aapt2_arm64-v8a', 'bin/aapt2_armeabi-v7a', 'bin/aapt2_x86', 'bin/aapt2_x86_64', 'bin/avbctl', 'bin/update_engine_client'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
Expand All @@ -28,6 +28,6 @@ exe = EXE(pyz,
icon='images/icon-256.icns')
app = BUNDLE(exe,
name='PixelFlasher.app',
version='6.5.3.1',
version='6.6.0.0',
icon='./images/icon-256.icns',
bundle_identifier='com.badabing.pixelflasher')
4 changes: 2 additions & 2 deletions build-on-win.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ block_cipher = None

a = Analysis(['PixelFlasher.py'],
binaries=[('bin/7z.exe', 'bin'), ('bin/7z.dll', 'bin')],
datas=[("images/icon-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')],
datas=[("images/icon-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')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['bin/busybox_arm64-v8a', 'bin/busybox_armeabi-v7a', 'bin/busybox_x86', 'bin/busybox_x86_64', 'bin/aapt2_arm64-v8a', 'bin/aapt2_armeabi-v7a', 'bin/aapt2_x86', 'bin/aapt2_x86_64', 'bin/avbctl'],
excludes=['bin/busybox_arm64-v8a', 'bin/busybox_armeabi-v7a', 'bin/busybox_x86', 'bin/busybox_x86_64', 'bin/aapt2_arm64-v8a', 'bin/aapt2_armeabi-v7a', 'bin/aapt2_x86', 'bin/aapt2_x86_64', 'bin/avbctl', 'bin/update_engine_client'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
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.5.3.1
VERSION=6.6.0.0
NAME="PixelFlasher"
DIST_NAME="PixelFlasher"

Expand Down
9 changes: 9 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def __init__(self):
self.check_for_disk_space = True
self.check_for_bootloader_unlocked = True
self.check_for_firmware_hash_validity = True
self.google_images_update_frequency = 1
self.google_images_last_checked = None

self.toolbar = {
'tb_position': 'top',
Expand Down Expand Up @@ -246,6 +248,11 @@ def load(cls, file_path):
conf.check_for_bootloader_unlocked = data['check_for_bootloader_unlocked']
with contextlib.suppress(KeyError):
conf.check_for_firmware_hash_validity = data['check_for_firmware_hash_validity']
with contextlib.suppress(KeyError):
conf.google_images_update_frequency = data['google_images_update_frequency']
with contextlib.suppress(KeyError):
conf.google_images_last_checked = data['google_images_last_checked']

# read the toolbar section
with contextlib.suppress(KeyError):
toolbar_data = data['toolbar']
Expand Down Expand Up @@ -410,6 +417,8 @@ def save(self, file_path):
'check_for_disk_space': self.check_for_disk_space,
'check_for_bootloader_unlocked': self.check_for_bootloader_unlocked,
'check_for_firmware_hash_validity': self.check_for_firmware_hash_validity,
'google_images_update_frequency': self.google_images_update_frequency,
'google_images_last_checked': self.google_images_last_checked,
'toolbar': self.toolbar, # Save the toolbar settings as well
'pif': self.pif, # Save the pif settings as well
'scrcpy': self.scrcpy # Save the scrcpy settings as well
Expand Down
4 changes: 3 additions & 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.5.3.1'
VERSION = '6.6.0.0'
SDKVERSION = '33.0.3'
MAIN_WIDTH = 1400
MAIN_HEIGHT = 1040
Expand All @@ -18,6 +18,8 @@
FULL_OTA_IMAGES_FOR_PIXEL_DEVICES = 'https://developers.google.com/android/ota'
FACTORY_IMAGES_FOR_WATCH_DEVICES = 'https://developers.google.com/android/images-watch'
FULL_OTA_IMAGES_FOR_WATCH_DEVICES = 'https://developers.google.com/android/ota-watch'
FACTORY_IMAGES_FOR_BETA = 'https://developer.android.com/about/versions/14/download'
FULL_OTA_IMAGES_FOR_BETA = 'https://developer.android.com/about/versions/14/download-ota'
PIF_UPDATE_URL = 'https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json'
OSM0SIS_PIF_UPDATE_URL = 'https://raw.githubusercontent.com/osm0sis/PlayIntegrityFork/main/update.json'
PIF_JSON_PATH = '/data/adb/pif.json'
Expand Down
5 changes: 5 additions & 0 deletions encode-bitmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"-a -F -i -n official-16 images/official-16.png images.py",
"-a -F -i -n official-24 images/official-24.png images.py",
"-a -F -i -n open-link-24 images/open-link-24.png images.py",
"-a -F -i -n open-link-red-24 images/open-link-red-24.png images.py",
"-a -F -i -n packages-24 images/packages-24.png images.py",
"-a -F -i -n packages-64 images/packages-64.png images.py",
"-a -F -i -n partition-24 images/partition-24.png images.py",
Expand Down Expand Up @@ -121,6 +122,10 @@
"-a -F -i -n heart-red-24 images/heart-red-24.png images.py",
"-a -F -i -n heart-gray-24 images/heart-gray-24.png images.py",
"-a -F -i -n import-24 images/import-24.png images.py",
"-a -F -i -n cancel-ota-24 images/cancel-ota-24.png images.py",
"-a -F -i -n factory-24 images/factory-24.png images.py",
"-a -F -i -n cloud-24 images/cloud-24.png images.py",
"-a -F -i -n star-green-24 images/star-green-24.png images.py",
]

if __name__ == "__main__":
Expand Down
58 changes: 58 additions & 0 deletions images.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,18 @@
b'J1iISqZAvggQ/yU5zEmwgA2Ib0AtKSUxE24gNohAloiQUYRsoGppOmgsoKjCQTKcFWoWyVUm'
b'sfgWeo22j4RKn1S8D9b8oIUlIDNlAFg+9jMs6bgeAAAAAElFTkSuQmCC')

#----------------------------------------------------------------------
open_link_red_24 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1B'
b'AACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAFtSURBVEhLrZaxSgNBEIb3AiGdlZAi'
b'plCwOUELOyvzBqKFgpC3UC5PoJDHEEELwScwnbU2aQJaBDsrOyMkfpOdHIZkL7vrfTCZmb3b'
b'/9/bPZIkk+bWhjHm5vXj+5BcyF6jdp8M386k1nnPzGtK76JCeIkrxwgnWu+vEheSl0pjorWs'
b'cEDq226BMfHAE9xKg1GNdE1sSq+0MF3TekpuoOI7CPxIHwqGGeJX2ubIFs3olyXOYr+0nDOI'
b'Yol4h9Sz3T8NlomzC3IuOdEGPuJClIGH+Lt8MD4MNvBcecb4EfnAyGsqwcRHe82NiM/u1zmZ'
b'XnLi/QSeK1/AyyBUnPvPiRFxt9IgcuUnzKkSp4UGiF/EbAvkuk4DxNdJuViA+BxFTyDfJwOE'
b'x8RljLjgNEBwRNol6tTd6WAEhWcgJsSntlEUGpTBX4OUg61qHY1qpLYL+8n0JeXV3tbayL+K'
b'JwZa2pcKC+7JFrWlsEPlYTVN+xcs9sPXJJYAdgAAAABJRU5ErkJggg==')

#----------------------------------------------------------------------
packages_24 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAACOUlEQVRIS7VVTVbiQBCupuPg'
Expand Down Expand Up @@ -6163,3 +6175,49 @@
b'BVf/QvArp6V5i3xzsMhMlceH3cql8kpMu8jFhlwP8bUMlstKJ7l6ksrGxhttoteBQhgRIIub'
b'XjZyhFsnWWbEVslpr0wXbtpijt7BH6Rh/RkdlLcrAAAAAElFTkSuQmCC')

#----------------------------------------------------------------------
cancel_ota_24 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAACNElEQVRIS+WV31HbQBDGd8+j'
b'd3jLIB6UCnLXgakguAKcCoAKgArsVBBTAXRgd3CigugBMXlDz0l8m937k5GxLGtgeOJmPGNb'
b'd/vb/b7dE8I7L3zn+PABABaKA6V+nxPhmOstvKSEJaIrv7inm30S90pkR0enSDjjICHw9mrI'
b'4cTA42oXaCfAQq5RwZIPHgDBiivgbKkBWDcwUprBV/xM+4IcnuyCdAJEFlR/fkpw3jB3Lrsx'
b'UHHwzfWg8hkBXPC/jXb1YVcV3QCVX/CDWcg8Ywm2g6dgJeZL9maMQNddnmwALHwqlFJnBDgV'
b'3QlpYtZP931GRp/u2Ph7TY+Tl3v/AzY0j7vIrT8b+FX1AoKcz7tk8oC25kEWuATIqj5p2tBS'
b'5WyFuA0rROD2rfl8WB7woI6uWJbrIZp3VSPVS0IAfzWMqECHX5NcHpCMGqJ5n1ztZ+KnyBsA'
b'KpeWLMhlh0NlScHsKJ8iwbmcZ6NZos0JTwDLGzQ5MAbqcmiWJR7fAdKpFwG8d1paVn7zXJiW'
b'B3Fg2CRN9ckQgE2zEoycJ2MtHI9R0ZJdvzSunm93EcCCK/m+r5KYfSHZ8mfahkRPtUx3aw4C'
b'eV/2fCjJ+sxfFpI5e/ijDUldKXtfTLIfGrk9RUfJbmul4eOgltu6SZK2IXwxFuxNIT68+o2W'
b'siSEb2ZdL2I3+kqCueFuejUgBvTdJ/cQIlVsrFQuV3jJLc9XeNW8CSCQ2E1nUVKB3ILLFmme'
b'3gzY1xT/ABkkFyhU6ypQAAAAAElFTkSuQmCC')

#----------------------------------------------------------------------
factory_24 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABH0lEQVRIS82VzQ3CMAyFbYlI'
b'XLsBI8AGhAlgAzaAShRxgzNFoht0BJigZAPYgBV6DygkiJTwUxIgRfTWFzefHT83CBU/WPH+'
b'4A1AIyJ0soLzgCWQq3cvgPak3sDjcV8AAFos5jt/gIg0ZabbAiAEZYsD8wnoS0B6BUDIFjzx'
b'BxiRISIsKwTUpog40wAJS7I5D28q6IzJUos60FmLSCot1C8AINZZfOjdAC4220mLUW0xV60T'
b'1VYCsGvMFNvEnD4DKC2X2VBlM8PbNk1ZtGEAcgkIygDnOCEgNBtn0QZvA779hcgKzkNcTLI5'
b'6t9urr4vBegFG0QndB9/rz9UUDnAlrnr+v/0wPWsdWVv98A7wPWMbXG/74Eto0/XvdzJr+An'
b'1jHTGaDILiwAAAAASUVORK5CYII=')

#----------------------------------------------------------------------
cloud_24 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABWElEQVRIS+WVwU3DMBSGn1GM'
b'OJYNMkLZwGGCdgLYgFRKK26UK63UjgATwAStNyAbwAi5O8L8TnBQK7txID313aK89z77e3bC'
b'6MjBjtyfTgAgUhpQFN0xxgR0xkYpI51/acrlsnxsU3xQkZidj5jWK9vY0azQWo8Bkj6QFyCy'
b'SGDVrygctK0SkMQHcQKMFsb5R0jzH3ixXahL10LcgIynjJFRExzYxdw1kx2AuL+IqSxvoOb2'
b'gHcnFIN/2yzK8f7LBiCmfIiHbQct+72cmirAH5z71EmozTdPamITakAWPUDLPFh4e2KOoV/V'
b'dwaRTLlRI9rrwjO0polcqrUFmCMZh5cHZVYzsYB3lAyDyjokAYCRIK5nfIUtpR1qQ1KrOfR9'
b'ihqwvXi/96D+9phh9xG5ViqRayp2bzK+QWccuup5dJ1JgZpPqH6hUj2b5s0x7WPJvh4n8Mv8'
b'r75vimB0GVWdah0AAAAASUVORK5CYII=')

#----------------------------------------------------------------------
star_green_24 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABE0lEQVRIS8WV3w2CMBDGr4n4'
b'7ga6AWxQN3AFRzAR33nGRDcQJzBOQEdgAxmB95LUO7UmIH/aGoAnEnr3+772vsJg4IcN3B/G'
b'BfDQ85F4QVe+ozOhlIrEsRS6vuJgHXopfuCOzXVZnsZy1QZQfzZ/lSPgK7zuYHJA9nHYeUbO'
b'DtDeFhgrmFK3rq10BeRKykCcocBheCBg2QZxAeSoPhKxTKgp3884Y4zGuRFiA8C5hjuUMiHl'
b'dcX8MN/gdp3qIDsAwFUr/wG8nRCgcug2AN0zw4TudEL7Eu8CIFCBhQt66Uu8KwCGHlMST0Gj'
b'w+68r5wdmN5TkwI6E2roIEMHQeN13ZdQA4DAQajkZtxfpoFC6yWDO3gCC9GPGUIPuKoAAAAA'
b'SUVORK5CYII=')

Binary file added images/cancel-ota-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cloud-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cloud-download-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/factory-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/google_images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/open-link-red-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/star-green-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1914,8 +1914,7 @@ def patch_script(patch_method):
print(f" Magisk Version: {m_version}")
puml(f"note right\nMagisk Manager Version: {m_app_version}\nMagisk Version: {m_version}\nend note\n")

# Temporary workaround for rooted Magisk Delta, don't ever recommend it.
if is_rooted and self.config.magisk != 'io.github.huskydg.magisk':
if is_rooted:
method = 1 # rooted
# disable app method if app is not found or is hidden.
if not magisk_app_version or ( self.config.magisk not in ['', 'com.topjohnwu.magisk', 'io.github.vvb2060.magisk', 'io.github.huskydg.magisk'] ):
Expand Down Expand Up @@ -2026,8 +2025,8 @@ def patch_script(patch_method):
PixelFlasher will offer available choices and recommend the best method to utilize for patching.
Unless you know what you're doing, it is recommended that you take the default suggested selection.
'''
message += f"<pre>Core Magisk Version: {m_version}\n"
message += f"Magisk Application Version: {m_app_version}\n"
message += f"<pre>Core Magisk Version: {magisk_version}\n"
message += f"Magisk Application Version: {magisk_app_version}\n"
message += f"Recommended Patch method: Method {method}</pre>\n"
clean_message = message.replace("<br/>", "").replace("</pre>", "").replace("<pre>", "")
print(f"\n*** Dialog ***\n{clean_message}\n______________\n")
Expand Down
Loading

0 comments on commit c67dadb

Please sign in to comment.