Sander van Grieken
29b5e1672b
p4a ref 1098be6964cfc2156959e435e81c2c50f8398586
2026-04-22 11:17:30 +02:00
Sander van Grieken
9d5b4a7cd9
android: use plain 'build' dependency (using 'venv') instead of 'build[virtualenv]',
...
remove setuptools as its use is now pinned via hostpython_prerequisites where applicable,
update depends asserts in pyqt6sip, sip, pyqt_builder
2026-04-22 10:15:30 +02:00
Sander van Grieken
c8f5798d4e
android: build pyqt_builder and sip ourselves, hash pin all hostpython_prerequisites
2026-04-22 10:15:30 +02:00
Sander van Grieken
74f3c0427d
android: pin hostpython3 PyProjectRecipe versions,
...
pin android and pyjnius recipes Cython version
2026-04-22 10:15:30 +02:00
f321x
323189874b
android: update Qt6 to 6.10.2, PyQt6 to 6.10.2
2026-04-22 10:15:30 +02:00
Sander van Grieken
dba6b751cc
android: update for rebase p4a, update qt to 6.10, ndk to 28
...
p4a rebased on spesmilo/electrum_202602, 375a05de21b538d704174b1efeb3fc85d151f94e
2026-04-22 10:15:30 +02:00
SomberNight
4da7b7f55d
build: android: use Java 17, as before debian upgrade :/
...
When building on debian 12, we were using Java 17.
On debian 13, Java 17 is not packaged anymore, instead there is Java 21 and 25.
Ideally we should upgrade to Java 21 and just install it from apt.
However old Gradle is not compatible with new Java, so we have to upgrade Gradle for that.
- see https://docs.gradle.org/current/userguide/compatibility.html
Old Gradle is giving build errors with Java 21:
```
Could not compile build file '/home/user/wspace/electrum/.buildozer_qml/android/platform/build-arm64-v8a/dists/Electrum/build.gradle'.
> startup failed:
General error during conversion: Unsupported class file major version 65
java.lang.IllegalArgumentException: Unsupported class file major version 65
```
for our p4a fork, I tried to cherry-pick stuff from upstream:
- https://github.com/kivy/python-for-android/commit/17bf5322791ec8cec85836fbe906e63664a05445
- https://github.com/kivy/python-for-android/pull/3172
https://github.com/kivy/python-for-android/commit/a8f2ca1c5b1bb6696b47fdf2c052285e116e0ebe
- see https://github.com/SomberNight/python-for-android/compare/a01269f7799587ad74ee40e0b642d917b8db7d4e...846a1094874aeb64b623fa746222a41851245271
That seems sufficient to upgrade Gradle as far as p4a is concerned.
However that still did not work yet:
- contrib/android/make_barcode_scanner.sh fails, as
markusfisch/zxing-cpp and markusfisch/CameraView
are also using too old gradle versions for Java 21
- it seems they are intentionally doing this to maintain compat with Android 4:
see https://github.com/markusfisch/zxing-cpp/commit/d98ed5d0be513c4077b4c13d1f7873f141949839
So for now maybe the path of least resistance is to downgrade to Java 17 :(
2026-01-30 16:45:13 +00:00
SomberNight
35ca9b4fff
build: android: build and use python 3.12 on host, instead of apt 3.13
...
- want to do the android build on debian 13 (stable)
- debian 13 ships python 3.13 in apt
- p4a requires Cython < 3.0
- ref https://github.com/kivy/python-for-android/issues/2919
- ref https://github.com/kivy/buildozer/issues/1526
- the newest such Cython is version 0.29.37, which predates python 3.13
- the latest python I managed to build cython 0.29.37 with is 3.12
- upstream p4a really would need some love :(
- this is not even just an issue on our p4a fork, but still unsolved upstream
- re rebasing our fork: https://github.com/spesmilo/electrum/issues/10331
2026-01-29 17:13:40 +00:00
SomberNight
4d33b6cad9
build: android: upgrade docker base img to debian 13
...
This should make the F-Droid build simpler.
ref https://gitlab.com/fdroid/fdroiddata/-/merge_requests/32358#note_3038803195
2026-01-29 15:27:49 +00:00
SomberNight
adb4f6f246
android build: bump python version (3.10.18->3.11.14)
...
Bump the python version used on Android from 3.10 to 3.11.
The substance is the backport of the corresponding commit [0] from upstream p4a.
Tested that apk is still reproducible by doing two full builds.
I also used the apk a bit and it seems to work at runtime. :)
[0]: https://github.com/kivy/python-for-android/pull/2850/commits/78db83223f4f481598343237a6b8788fb4731a00 (which got squashed into https://github.com/kivy/python-for-android/commit/83e74cac0fa230231f63b7d7e4f1e8581fd9e2ce )
2025-12-27 03:31:19 +00:00
SomberNight
2d4d4dbdc8
android build: bump openssl (1.1.1w -> 3.0.18)
2025-12-11 17:42:29 +00:00
SomberNight
447c7cf8b3
build: Dockerfile: mod "new user to avoid using root" to support UID=0
...
Extend "create new user to avoid using root" copypasta to support being run as root
(ARG UID=0).
When running build.sh directly on a cirrus CI runner, we are running as root.
2025-09-26 14:24:26 +00:00
Sander van Grieken
87d82f38c5
android: 16kb alignment updates
...
p4a ref: electrum_20240930_android_16kb_page_alignment
Dockerfile: obtain 16kb aligned NDK r23 from google CI (dl-ndk-ci.sh)
barcode, zxing-cpp: add 16kb align patch
build_tools_util.sh: add function to apply a patch
2025-08-28 09:24:40 +02:00
Sander van Grieken
1ac885ea40
qml: add android permission methods in AppController
2025-04-03 12:37:17 +02:00
SomberNight
571acf71fe
android: update p4a ref
...
- to include https://github.com/spesmilo/python-for-android/commit/0ab0d872e6c6b88ddc05b9c4ba6fcd3aa7921242
> recipes: add patches for python3 recipes, for reproducible .pyc generation
This should fix build repro of the apk.
2024-10-15 23:37:57 +00:00
SomberNight
071150f465
android: update p4a ref
...
- to include https://github.com/spesmilo/python-for-android/commit/d4432ec8d07b8521465d6daddd55046fc0413599
see https://github.com/spesmilo/electrum/issues/9215#issuecomment-2403072217
- and add a fixme to revisit apkdiff re horrors beyond my comprehension
2024-10-10 18:39:42 +00:00
SomberNight
d1de29513f
android build: use spesmilo/ fork of p4a and buildozer
...
- fdroid maintainers asked that releases use fixed forks of p4a and buildozer,
so now we use the newly created forks in the spesmilo org. I plan to keep using
my existing contributor-specific repos for development, but whatever we push
to electrum master, should use the new spesmilo/ forks.
see https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15858#note_2136345746
- Also, I added branch protection rules for branches named "electrum_*", so if
we name the branches that are actually used in releases as such, we won't
accidentally force-push them. (ref https://github.com/spesmilo/electrum/issues/8162 )
I think we can just create a new branch whenever we would want to force-push
the existing one.
- also factored out some parameters so that it is easier to programmatically
access them from the fdroid build script.
see https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15858#note_2136094409
2024-10-02 17:27:17 +00:00
SomberNight
7e532ec995
android build: add own logic to calculate versionCode
...
Use our own logic to go from ELECTRUM_VERSION to numeric android versionCode,
instead of using the default conversion done by python-for-android.
Even before this, we were already patching p4a to modify their logic (see [0]).
This commit changes that logic again, and moves it into a separate script in our repo.
- calculation change is due to the f-droid maintainers asking for the
arch code to be in the least significant digits (instead of most sig digits) (see [1])
I have pushed and changed to a new p4a branch, which is just a copy of the previous one
with 3 commits related to versionCode calc squashed.
[0]: https://github.com/SomberNight/python-for-android/commit/edb7e4fe6db9965caf887aee97605daf124502df
[1]: https://github.com/spesmilo/electrum/issues/9210#issuecomment-2380559324
2024-09-30 19:51:28 +00:00
SomberNight
2c6e768c8d
android: update p4a ref
...
to have https://github.com/SomberNight/python-for-android/commit/58d21ad89b6182c0d70289d647eb85eaa412412c
> reproducible apks: strip file path prefix from .pyc files
related: https://github.com/spesmilo/electrum/issues/9215
2024-09-26 18:27:52 +00:00
SomberNight
cfb53e4880
android build: bump python version (3.8.18->3.10.14)
...
cffi also had to be updated for this, and corresponding commit backported from upstream p4a
2024-04-18 17:17:49 +00:00
SomberNight
8677a91dce
android: update p4a ref
...
to have https://github.com/SomberNight/python-for-android/commit/04e80084ebbb9bcfdbb32e814d4a1f5826ffe4eb
> recipe: libsecp256k1: enable modules for schnorr sigs
2024-04-11 15:25:37 +00:00
Sander van Grieken
b84a7508a3
android: p4a ref https://github.com/accumulator/python-for-android/commit/0c507ead85cc603d0e4a2f5e58e9247a1fae262d
...
PythonActivity.setSecureWindow: don't redraw after clearing FLAG_SECURE
2024-02-22 10:15:51 +01:00
Sander van Grieken
6738e1e90f
p4a: python-for-android ref 4f1a1a3a41f6bf8d28984bfd1ec8af3c5d8eb362
...
> qt6: replace synchronizedList with explicit synchronize block, as we still see ConcurrentModificationExceptions
in the play store.
2024-02-07 12:08:10 +01:00
Sander van Grieken
a8dc27ef4c
android: buildozer ref 4403ecf445f10b5fbf7c74f4621bf2b922ad35b5
...
buildozer didn't pass android target_sdk_version from spec file
2024-01-13 01:15:52 +01:00
SomberNight
11764f9a79
android build: make apt less quiet, for more feedback about progress
2024-01-10 20:49:18 +00:00
SomberNight
0a6283b1ef
build: bump zbar version in win/mac/android builds
...
- new version (0.23.93) fixes a security issue
https://github.com/mchehab/zbar/blob/bb05ec54eec57f8397cb13fb9161372a281a1219/ChangeLog#L5
2024-01-10 20:46:38 +00:00
Sander van Grieken
3935e378b3
android: p4a ref d976b539dc7c808d103a7edfe6dc1fd300582a89
...
> don't keep build dir around after succesful build
2023-12-29 16:16:07 +01:00
Sander van Grieken
c1ebc42724
android: p4a ref f534fe9bcd692c4df97e644d34c5bd8acede01eb
...
> qt6: don't copy entire build tree to dist, use select set of include patterns.
2023-12-29 13:58:46 +01:00
SomberNight
bf4934bb9f
android build: update p4a fork with qt6 build repro fixes
...
related https://github.com/spesmilo/electrum/issues/8746
2023-12-16 09:05:28 +00:00
xiaolou86
00c584d557
contrib: fix typos
2023-12-04 14:15:38 +08:00
Sander van Grieken
58ff76adcf
android: correctly describe buildozer branch used
2023-11-07 10:32:09 +01:00
Sander van Grieken
32c1915de4
qml: restore Send/ScanDialog for desktop/dev, keeping qr scan Activity for android only.
...
Also use stable R package, regardless of APP_PACKAGE_DOMAIN used in build.
2023-11-07 10:17:10 +01:00
SomberNight
5c3e14d8de
qml: replace Send/ScanDialog with java bases zxing qr scan activity.
2023-11-07 10:17:10 +01:00
Sander van Grieken
b9ab0f63ef
qt6: update buildozer ref to ce4f2257249fdf4ff1f4cb8983fd7ac44174a274
2023-11-07 10:17:10 +01:00
Sander van Grieken
bf6163b4f8
android: update p4a ref to 3b3733dbf5f461e197ba83887ac0d3b6d0f1c396
...
buildozer ref to 698b48136c55b2495128207c5e98dccc128bb6c2
2023-11-07 10:09:51 +01:00
Sander van Grieken
770a32cf6a
qt6: update recipe pins, NDK, SDK, Ant, use venv for buildozer/p4a, add tomli recipe
2023-11-07 10:09:51 +01:00
Sander van Grieken
16d3db95ab
qt6: update android build container to bookworm
2023-11-07 10:09:51 +01:00
Sander van Grieken
0672ea20ab
qml: implement toggle for android SECURE_FLAG and add marker to wizard pages
...
that should be secured.
2023-05-02 15:16:51 +02:00
Sander van Grieken
2fc9ee5c51
p4a: fix for Qt5 accessibility bug
...
see https://github.com/accumulator/python-for-android/commit/087fc3c583d46bfb2dec54878ddea508afb27de6
2023-04-24 11:29:26 +02:00
Sander van Grieken
b40794014d
android: exclude more unneeded files in qml resource bundle generation
2023-04-06 11:42:06 +02:00
SomberNight
0e5464ca13
android build: enable asserts, and add sanity-check for it
...
Note that 0f541be6f1 added a warning log if asserts are disabled.
It is intentional that these two things are in separate files:
We always want to log that warning, even if someone is using electrum as a library.
However, in that latter case, I think it's fine not to sys.exit(), but leave the decision up to the library user.
Similar thinking when running from source: let's log the warning but don't sys.exit().
2023-03-31 16:24:14 +00:00
Sander van Grieken
aaff7502db
android: update P4A to 3c2750795ba93aa1a3e513a13c2ea2ac5bddba17
...
remove qt5 patch to disable avx/avx2 for x86_64 arch
2023-03-23 17:00:08 +01:00
ghost43
27bc0bb552
Merge pull request #8267 from SomberNight/202303_build_userid1000
...
build: docker scripts to work even if host user id != 1000
2023-03-21 17:54:29 +00:00
Sander van Grieken
1176552132
android: upgrade to Qt 5.15.7, PyQt5 5.15.9
2023-03-21 12:41:20 +01:00
Sander van Grieken
c9df290301
android: update P4A to 8589243afb48fdb116d791dc5b3973382e83273f
...
include Qt Virtual Keyboard libraries and associated QtQuick components
2023-03-20 13:15:03 +01:00
SomberNight
6e472efd5f
build: follow-up prev: only use host userid for local dev builds
...
reproducibility probably needs a hardcoded userid
Also, move the UID arg later in the dockerfiles, for better caching.
(if local dev build and repro build set different UIDs, the build caches
will diverge at that step)
2023-03-20 02:06:54 +00:00
Sander van Grieken
ab073827cf
build: use uid of user building the build containers
2023-03-20 02:06:50 +00:00
Sander van Grieken
a5485e5f68
android: use material dark style for splashscreen action bar
2023-03-06 12:03:25 +01:00
Sander van Grieken
d2883e19ac
android: qt5 activity inhibit screenshots
2023-03-06 11:11:08 +01:00
Sander van Grieken
65abb90049
build: update build container base image versions, update apt sources to current
2023-02-27 11:16:04 +01:00