Skip to content

Commit f052e6a

Browse files
authored
Release v0.5.4-beta.1 (#688)
This release v0.5.4-beta.1 adds: - tracking of device codes of installation attempts in plausible.io. New devices: - none yet Chores: - fix flatpak creation - update flet to version 0.26.0 - fix a bunch of bugs from the flet update
2 parents 0b779b1 + 2a68f35 commit f052e6a

28 files changed

+865
-2061
lines changed

.github/workflows/manual-build.yml

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,69 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: ['ubuntu-20.04', 'ubuntu-latest', 'macos-latest', 'windows-latest']
13+
os: ['ubuntu-20.04', 'ubuntu-latest', 'macos-latest']
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.11
19+
- run: pip install -r requirements.txt
20+
- run: python scripts/download-tools.py
21+
- run: python scripts/build.py
22+
- uses: actions/upload-artifact@v4
23+
with:
24+
name: openandroidinstaller-${{ github.ref_name }}-${{ matrix.os }}
25+
path: dist/
1426

27+
build-windows:
28+
runs-on: 'windows-latest'
1529
steps:
1630
- uses: actions/checkout@v4
1731
- uses: actions/setup-python@v4
1832
with:
19-
python-version: 3.9
33+
python-version: 3.11
2034
- run: pip install -r requirements.txt
2135
- run: python scripts/download-tools.py
2236
- run: python scripts/build.py
23-
# Optionally verify that it works (provided that it does not need user interaction)
24-
#- run: ./dist/your-code/your-code
25-
- uses: actions/upload-artifact@v3
37+
- uses: actions/upload-artifact@v4
2638
with:
27-
name: openandroidinstaller-${{ github.sha }}-${{ matrix.os }}
39+
name: openandroidinstaller-${{ github.ref_name }}-windows-latest
2840
path: dist/
41+
42+
create-release:
43+
needs:
44+
- build
45+
- build-windows
46+
runs-on: 'ubuntu-latest'
47+
steps:
48+
- uses: actions/checkout@v4
49+
- name: Download artifact
50+
uses: actions/download-artifact@v4
51+
- name: Display structure of downloaded files
52+
run: ls -R
53+
- uses: montudor/action-zip@v1
54+
with:
55+
args: zip -qq -r openandroidinstaller-${{ github.ref_name }}-macos-latest.zip openandroidinstaller-${{ github.ref_name }}-macos-latest
56+
- uses: montudor/action-zip@v1
57+
with:
58+
args: zip -qq -r openandroidinstaller-${{ github.ref_name }}-ubuntu-20.04.zip openandroidinstaller-${{ github.ref_name }}-ubuntu-20.04
59+
- uses: montudor/action-zip@v1
60+
with:
61+
args: zip -qq -r openandroidinstaller-${{ github.ref_name }}-ubuntu-latest.zip openandroidinstaller-${{ github.ref_name }}-ubuntu-latest
62+
- uses: montudor/action-zip@v1
63+
with:
64+
args: zip -qq -r openandroidinstaller-${{ github.ref_name }}-windows-latest.zip openandroidinstaller-${{ github.ref_name }}-windows-latest
65+
- name: Display structure of downloaded files
66+
run: ls -R
67+
- name: Create release
68+
uses: dciborow/[email protected]
69+
if: startsWith(github.ref, 'refs/tags/')
70+
with:
71+
repo_token: ${{ secrets.GITHUB_TOKEN }}
72+
prerelease: false
73+
title: Release ${{ github.ref_name }}
74+
files: |
75+
openandroidinstaller-${{ github.ref_name }}-macos-latest.zip
76+
openandroidinstaller-${{ github.ref_name }}-ubuntu-20.04.zip
77+
openandroidinstaller-${{ github.ref_name }}-ubuntu-latest.zip
78+
openandroidinstaller-${{ github.ref_name }}-windows-latest.zip

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ format:
2929
poetry run black .
3030

3131
lint:
32-
poetry run ruff openandroidinstaller/ --ignore E501
32+
poetry run ruff check openandroidinstaller/ --ignore E501
3333

3434
typing:
3535
poetry run mypy openandroidinstaller/. --ignore-missing-imports

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ Make sure to check if your issue or PR has already been fixed or implemented **b
261261
- Details on how to contribute: [`CONTRIBUTING.md`](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/main/CONTRIBUTING.md)
262262
- More ways to contribute: [openandroidinstaller.org/#contribute](https://openandroidinstaller.org/#contribute)
263263

264+
## Collection of anonymous usage data
265+
266+
The OpenAndroidInstaller application collects anonymous usage data to help us improve the application. This data is collected using [Plausible Analytics](https://plausible.io) and is stored on their servers.
267+
We do not collect any personal data, and we do not track individual users. We only collect the device code when the installation process is started and finished to see which devices are most commonly used with the application.
268+
The code is available in the function `send_tracking_info` in the `openandroidinstaller/utils.py` file.
269+
264270
## Acknowledgements
265271

266272
The project is supported by the following organizations and companies:

flatpak/generated-poetry-sources.json

Lines changed: 0 additions & 334 deletions
This file was deleted.

flatpak/org.openandroidinstaller.OpenAndroidInstaller.appdata.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

flatpak/org.openandroidinstaller.OpenAndroidInstaller.desktop

Lines changed: 0 additions & 11 deletions
This file was deleted.
-22.9 KB
Binary file not shown.

openandroidinstaller/assets/configs/ocean.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,3 @@ steps:
5555
In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick.
5656
We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue.
5757
command: adb_twrp_copy_partitions
58-
- type: call_button
59-
img: twrp-start.jpeg
60-
content: >
61-
Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue.
62-
command: fastboot_boot_recovery

openandroidinstaller/openandroidinstaller.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
Image,
3131
Page,
3232
TextButton,
33-
UserControl,
34-
colors,
35-
icons,
33+
Colors,
34+
Icons,
3635
)
3736
from loguru import logger
3837
from styles import Text
@@ -50,7 +49,7 @@
5049
)
5150

5251
# VERSION number
53-
VERSION = "0.5.4-beta"
52+
VERSION = "0.5.5-beta"
5453

5554
# detect platform
5655
PLATFORM = sys.platform
@@ -61,7 +60,7 @@
6160
BIN_PATH = Path(__file__).parent.joinpath(Path("bin")).resolve()
6261

6362

64-
class MainView(UserControl):
63+
class MainView(Column):
6564
def __init__(self, state: AppState):
6665
super().__init__()
6766
self.state = state
@@ -73,6 +72,8 @@ def __init__(self, state: AppState):
7372
on_confirm=self.to_next_view,
7473
state=self.state,
7574
)
75+
# self.state.page.add(welcome_view)
76+
7677
start_view = StartView(
7778
on_confirm=self.to_next_view,
7879
on_back=self.to_previous_view,
@@ -221,7 +222,6 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"):
221222

222223
# configure the page
223224
configure(page)
224-
225225
# header
226226
page.appbar = AppBar(
227227
leading=Image(src="/logo-192x192.png", height=40, width=40, border_radius=40),
@@ -236,7 +236,7 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"):
236236
actions=[
237237
Container(
238238
content=ElevatedButton(
239-
icon=icons.QUESTION_MARK_ROUNDED,
239+
icon=Icons.QUESTION_MARK_ROUNDED,
240240
text="FAQ",
241241
on_click=lambda _: webbrowser.open(
242242
"https://openandroidinstaller.org/faq.html"
@@ -247,7 +247,7 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"):
247247
),
248248
Container(
249249
content=ElevatedButton(
250-
icon=icons.FEEDBACK_OUTLINED,
250+
icon=Icons.FEEDBACK_OUTLINED,
251251
text="Give feedback",
252252
on_click=lambda _: webbrowser.open(
253253
"https://openandroidinstaller.org/feedback.html"
@@ -258,7 +258,7 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"):
258258
),
259259
Container(
260260
content=ElevatedButton(
261-
icon=icons.BUG_REPORT_OUTLINED,
261+
icon=Icons.BUG_REPORT_OUTLINED,
262262
text="Report a bug",
263263
on_click=lambda _: webbrowser.open(
264264
"https://github.com/openandroidinstaller-dev/openandroidinstaller/issues"
@@ -276,8 +276,8 @@ def close_banner(e):
276276
page.update()
277277

278278
banner = Banner(
279-
bgcolor=colors.AMBER_100,
280-
leading=Icon(icons.WARNING_AMBER_ROUNDED, color=colors.AMBER, size=40),
279+
bgcolor=Colors.AMBER_100,
280+
leading=Icon(Icons.WARNING_AMBER_ROUNDED, color=Colors.AMBER, size=40),
281281
content=Text(
282282
"These instructions only work if you follow every section and step precisely. Do not continue after something fails!"
283283
),
@@ -287,7 +287,6 @@ def close_banner(e):
287287
)
288288
page.overlay.append(banner)
289289
banner.open = True
290-
page.update()
291290

292291
# create the State object
293292
state = AppState(
@@ -300,7 +299,6 @@ def close_banner(e):
300299
state.page = page
301300
# create application instance
302301
app = MainView(state=state)
303-
304302
# add application's root control to the page
305303
page.add(app)
306304

openandroidinstaller/utils.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,25 @@ def recovery_works_with_device(
188188
CompatibilityStatus.INCOMPATIBLE,
189189
f"Recovery file {recovery_file_name} is not supported by device code in file name.",
190190
)
191+
192+
193+
def send_tracking_info(device_code: str, event: str):
194+
# Plausible API endpoint for tracking events
195+
url = "https://plausible.io/api/event"
196+
197+
# Prepare the JSON payload.
198+
data = {
199+
"name": event,
200+
"url": "app://openandroidinstaller",
201+
"domain": "openandroidinstaller.org",
202+
"props": {"device_code": device_code},
203+
}
204+
205+
headers = {
206+
"Content-Type": "application/json",
207+
"User-Agent": "Desktop-App",
208+
}
209+
210+
# Send the POST request
211+
_ = requests.post(url, json=data, headers=headers)
212+
logger.info(f"Sent tracking event '{event}' for device '{device_code}'.")

0 commit comments

Comments
 (0)