Skip to content

Commit e592139

Browse files
committed
- Windows versions of PixelFlasher are now signed (self-signed).
Hopefully this would cut down on false positive virus / trojan alerts, but it should also get rid of Unrecognized app warnings. [PixelFlasher.crt](https://github.com/badabing2005/PixelFlasher/blob/main/PixelFlasher.crt) is the certificate, and [ca_badabing2005.crt](https://github.com/badabing2005/PixelFlasher/blob/main/ca_badabing2005.crt) is the root CA. - Bugfix: #221 handle a corner case exception.
1 parent 54d66d9 commit e592139

11 files changed

+113
-15
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,27 @@ jobs:
8989
- name: Build application
9090
run: .\build.bat
9191

92+
- name: List contents of dist directory
93+
run: ls dist
94+
95+
- name: Sign Windows Executable
96+
uses: skymatic/code-sign-action@v1
97+
with:
98+
certificate: '${{ secrets.CERTIFICATE }}'
99+
password: '${{ secrets.CERT_PASSWORD }}'
100+
certificatesha1: '${{ secrets.CERTHASH }}'
101+
certificatename: '${{ secrets.CERTNAME }}'
102+
description: 'PixelFlasher'
103+
timestampUrl: 'http://timestamp.digicert.com'
104+
folder: 'dist'
105+
recursive: false
106+
92107
- name: Get sha256
93108
run: |
94109
certutil -hashfile dist/PixelFlasher.exe SHA256 > dist/PixelFlasher.exe.sha256
95110
cat dist/PixelFlasher.exe.sha256
96111
97-
- name: List contents of dist directory
112+
- name: List contents of dist directory again
98113
run: ls dist
99114

100115
# Upload artifacts Windows
@@ -151,12 +166,27 @@ jobs:
151166
- name: Rename the file
152167
run: mv dist/PixelFlasher.exe dist/PixelFlasher_Win_2019.exe
153168

169+
- name: List contents of dist directory
170+
run: ls dist
171+
172+
- name: Sign Windows Executable
173+
uses: skymatic/code-sign-action@v1
174+
with:
175+
certificate: '${{ secrets.CERTIFICATE }}'
176+
password: '${{ secrets.CERT_PASSWORD }}'
177+
certificatesha1: '${{ secrets.CERTHASH }}'
178+
certificatename: '${{ secrets.CERTNAME }}'
179+
description: 'PixelFlasher'
180+
timestampUrl: 'http://timestamp.digicert.com'
181+
folder: 'dist'
182+
recursive: false
183+
154184
- name: Get sha256
155185
run: |
156186
certutil -hashfile dist/PixelFlasher_Win_2019.exe SHA256 > dist/PixelFlasher_Win_2019.exe.sha256
157187
cat dist/PixelFlasher_Win_2019.exe.sha256
158188
159-
- name: List contents of dist directory
189+
- name: List contents of dist directory again
160190
run: ls dist
161191

162192
# Upload artifacts Windows 2019

.github/workflows/windows_2019.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,27 @@ jobs:
8989
- name: Rename the file
9090
run: mv dist/PixelFlasher.exe dist/PixelFlasher_Win_2019.exe
9191

92+
- name: List contents of dist directory
93+
run: ls dist
94+
95+
- name: Sign Windows Executable
96+
uses: skymatic/code-sign-action@v1
97+
with:
98+
certificate: '${{ secrets.CERTIFICATE }}'
99+
password: '${{ secrets.CERT_PASSWORD }}'
100+
certificatesha1: '${{ secrets.CERTHASH }}'
101+
certificatename: '${{ secrets.CERTNAME }}'
102+
description: 'PixelFlasher'
103+
timestampUrl: 'http://timestamp.digicert.com'
104+
folder: 'dist'
105+
recursive: false
106+
92107
- name: Get sha256
93108
run: |
94109
certutil -hashfile dist/PixelFlasher_Win_2019.exe SHA256 > dist/PixelFlasher_Win_2019.exe.sha256
95110
cat dist/PixelFlasher_Win_2019.exe.sha256
96111
97-
- name: List contents of dist directory
112+
- name: List contents of dist directory again
98113
run: ls dist
99114

100115
# Upload artifacts Windows to Actions

.github/workflows/windows_2022.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,30 @@ jobs:
8686
- name: Build application
8787
run: .\build.bat
8888

89+
- name: List contents of dist directory
90+
run: ls dist
91+
92+
- name: Sign Windows Executable
93+
uses: skymatic/code-sign-action@v1
94+
with:
95+
certificate: '${{ secrets.CERTIFICATE }}'
96+
password: '${{ secrets.CERT_PASSWORD }}'
97+
certificatesha1: '${{ secrets.CERTHASH }}'
98+
certificatename: '${{ secrets.CERTNAME }}'
99+
description: 'PixelFlasher'
100+
timestampUrl: 'http://timestamp.digicert.com'
101+
folder: 'dist'
102+
recursive: false
103+
89104
- name: Get sha256
90105
run: |
91106
certutil -hashfile dist/PixelFlasher.exe SHA256 > dist/PixelFlasher.exe.sha256
92107
cat dist/PixelFlasher.exe.sha256
93108
94-
- name: List contents of dist directory
109+
- name: List contents of dist directory again
95110
run: ls dist
96111

97-
# Upload artifacts Windows to Actions
112+
# Upload artifacts Windows to Actions
98113
- name: Upload Windows Artifact
99114
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} # Only run this step when running in GitHub Actions
100115
uses: actions/upload-artifact@v4

PixelFlasher.crt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIDKzCCAhOgAwIBAgIUYIRGzv8e03vx107/JWQp/MI+GwAwDQYJKoZIhvcNAQEL
3+
BQAwFzEVMBMGA1UEAwwMQmFkYWJpbmcyMDA1MB4XDTI0MDcxNDEzMjMwMVoXDTI1
4+
MTEyNjEzMjMwMVowFzEVMBMGA1UEAwwMUGl4ZWxGbGFzaGVyMIIBIjANBgkqhkiG
5+
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmxbQHvRwgER0TJDEtPurapZS5/r7pCudJNqr
6+
kv54C+FaVK0TVnLefjfwxeR1ILu6kjis8/OMWAE5lvoLlXrnXrC3buipiESwZE4q
7+
DtA8aUS0kKn6DbJaYcNrsYSglq3xNJ1SskX6uH5R3WHeJ0PJJcXystnE1e+GOsBh
8+
qbJOoJy1VpacHnVXg1tMM8Un92X1aYDMj6HOBNhRQicHkhWHx+7WvOHqDM9j6wpR
9+
39dyov3Hd+R0cs+zAaXKdBLCBqD3N9/UAKd+S/b+BA08tsdmq+ud1EG3oZYLa7Ze
10+
f9MhwlW/ba3MRHBnqylV1dmtYFFzsCjOCNIQeHFic7sjNn9NawIDAQABo28wbTAf
11+
BgNVHSMEGDAWgBTOCWAMovsa2+SS21Sog9rk7liIWzAJBgNVHRMEAjAAMAsGA1Ud
12+
DwQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUzDaSWtxu3qIh
13+
DRSnUMONx2aX2XUwDQYJKoZIhvcNAQELBQADggEBAClrh6pMNSmcGERatopjH6sQ
14+
32E6nEZuQkCX+x48JoaDUWSHVfCteCy4KraJ/ina3UyLWXNW6qvuYUraY98KI+eY
15+
DzNzRETY3g/cRMxvswbm81ZPki282J9LxlunFaOvwQnbtLJsIg+8Tj/aD/YBvs2h
16+
E06+/VzoDZ8aQaIth8TPZ1e3HrzDn4oNsG0CnfnZ3QtdcpSKgi/sFdMui8NAmIjd
17+
zsCoRfYw5hPeZem11KJ2+dv3bDIC0AKy6Opd0YE164lHUGL46Y15uzm536rHjiZA
18+
sQArmuwWNAKs0gvYYGEBoYCgkPOmh8LUtCrNCKC3dAN7neUmlwjpsVic1K8RbFE=
19+
-----END CERTIFICATE-----

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.1.0.0',
31+
version='7.1.1.0',
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.1.0.0
34+
VERSION=7.1.1.0
3535
NAME="PixelFlasher"
3636
DIST_NAME="PixelFlasher"
3737

ca_badabing2005.crt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIDDTCCAfWgAwIBAgIUG8IsWabGyCjhtULTwryY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A9mgMI=
19+
-----END CERTIFICATE-----

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.1.0.0'
37+
VERSION = '7.1.1.0'
3838
SDKVERSION = '33.0.3'
3939
MAIN_WIDTH = 1400
4040
MAIN_HEIGHT = 1040

modules.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def identify_sdk_version(self):
354354
if parse(sdkver) < parse(SDKVERSION) or (sdkver in ('34.0.0', '34.0.1', '34.0.2', '34.0.3', '34.0.4')):
355355
print(f"\n{datetime.now():%Y-%m-%d %H:%M:%S} ERROR: Detected old or problematic Android Platform Tools version {sdk_version}")
356356
# confirm if you want to use older version
357-
dlg = wx.MessageDialog(None, f"You have an old or problematic Android platform Tools version {sdk_version}\nYou are strongly advised to update to the latest known good version to avoid any issues.\n(Android Platform-Tools version 33.0.3 is known to be good).\n\nAre you sure want to continue?",'Bad Android Platform Tools',wx.YES_NO | wx.NO_DEFAULT | wx.ICON_EXCLAMATION)
357+
dlg = wx.MessageDialog(None, f"You have an old or problematic Android platform Tools version {sdk_version}\nYou are strongly advised to if (boot.is_init_boot or (device.hardware is not None and device.hardware in KNOWN_INIT_BOOT_DEVICES)) and boot.patch_method not in ['kernelsu', 'apatch']:hod not in ['kernelsu', 'apatch']:hod not in ['kernelsu', 'apatch']:re want to continue?",'Bad Android Platform Tools',wx.YES_NO | wx.NO_DEFAULT | wx.ICON_EXCLAMATION)
358358
result = dlg.ShowModal()
359359
puml(f"#red:Selected Platform Tools;\nnote left: {self.config.platform_tools_path}\nnote right:ERROR: Detected old or problematic Android Platform Tools version {sdk_version}\n")
360360
if result == wx.ID_YES:
@@ -4231,7 +4231,7 @@ def apply_patch_if_needed():
42314231
# flash the patch
42324232
flash = "flash"
42334233

4234-
if (boot.is_init_boot or device.hardware in KNOWN_INIT_BOOT_DEVICES) and boot.patch_method not in ['kernelsu', 'apatch']:
4234+
if (boot.is_init_boot or (device.hardware is not None and device.hardware in KNOWN_INIT_BOOT_DEVICES)) and boot.patch_method not in ['kernelsu', 'apatch']:
42354235
print("Flashing patched init_boot ...")
42364236
theCmd = f"\"{get_fastboot()}\" -s {device_id} {fastboot_options} {flash} init_boot \"{boot.boot_path}\"\n"
42374237
is_init_boot = True

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.1.0.0
3+
Version: 7.1.1.0
44
FileDescription: PixelFlasher
55
InternalName: PixelFlasher
66
OriginalFilename: PixelFlasher.exe

0 commit comments

Comments
 (0)