Skip to content

electrum_202609: rebase on upstream - #2

Draft
f321x wants to merge 327 commits into
spesmilo:developfrom
f321x:electrum_202609
Draft

electrum_202609: rebase on upstream#2
f321x wants to merge 327 commits into
spesmilo:developfrom
f321x:electrum_202609

Conversation

@f321x

@f321x f321x commented Sep 10, 2026

Copy link
Copy Markdown
Member

This is a full rebase on upstream p4a develop.
Requires the android_p4a_202609 client branch.
Works fine on my pixel, but haven't cleaned it up yet, might look into this after the next release.
Opening this now to prevent someone from doing duplicate work.

1b271a9 also enables QtMultimedia for the qr scanner

kuzeyron and others added 30 commits July 11, 2025 11:32
)

* More tools for the developer + minor changes
[Display-Cutout] Added missing features due to limitations
…3` + update default API target to `35` in tests (kivy#3172)

* 🔧 build: upgrade Gradle wrapper to `8.14.3`

* `distributionUrl` now points to `gradle‑8.14.3‑all.zip`

* 🔧 build: bump AGP to `8.11.0`, replace `jcenter()` with `mavenCentral()`

* Update `android-api` to 35 in `testapps/on_device_unit_tests/setup.py`

* Update target android.api to 35 in buildozer.spec

* Update `ANDROID_API_LEVEL` to 35 in `android.mk`

* Set `APP_PLATFORM` in `Application.mk` to use `NDK_API`

* Add `Application.mk` with `APP_PLATFORM` for service_library bootstrap

Hopefully [this](https://github.com/kivy/python-for-android/actions/runs/16309986846/job/46063689527?pr=3172) will pass

* Define `APP_ABI` variable in `Application.mk` for arch targeting
* fix md5sum

* use lowercase
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.4.2 to 1.13.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.4.2...v1.13.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.13.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…github/workflows/pypa/gh-action-pypi-publish-1.13.0

Bump pypa/gh-action-pypi-publish from 1.4.2 to 1.13.0 in /.github/workflows
…kivy#3076)

* GitHub Actions: Add Python 3.12 and 3.13 to the testing

* fail-fast: false

* Re-add the EOL Python 3.8

* Add Python 3.14 release candidate 3

* Add free threaded Python 3.14t to workflow matrix

* macos-13 --> macos-15-intel

Updated macOS version references in the workflow to reflect changes in the GitHub Actions environment.
f321x and others added 30 commits September 9, 2026 15:11
disable qt6 accessibility feature via env var, fixes crash.
remove QT_ANDROID_DISABLE_ACCESSIBILITY env var, it doesn't work on qt6.10.
Instead, disable via compile flag.
The list of prerequisites can be hash pinned by using HashPinnedDependency objects in the
hostpython_prerequisites list. If any hash pinned dependency is declared, the pip command to
prepare the hostpython site-packages will explicitly include --require-hashes option. This will
enforce that all packages need to be hash pinned, also the pulled in dependencies.

Additionally, the hostpython3 recipe now has a `pyproject_base_dependencies` property, which
replaces the previously hardcoded list of dependencies for PyProjectRecipe recipies. This allows
overriding this list with hash pinned versions.
remove packaging dep from pyqt_builder, as it is implied from PyProjectRecipe
move setuptools from depends to hostpython_prerequisite for PyQt6Sip recipe
move setuptools,packaging from depends to hostpython_prerequisite for sip recipe
otherwise they install arbitrary latest build-time dependencies...
and we want to pin everything.
…ild falls back to

targetSdk, which might not be supported for the NDK used.
…s restores back navigation.

(enableOnBackInvokedCallback was introduced in API34, initially opt-in, since API36 it became
opt-out)

This is documented as a 'temporary' opt-out (not sure how long android SDK will support this).
To opt-in, we will need Qt to support predictive back navigation API.
This inhibits auto-download latest platform-tools (pulled in as dependency of platforms;android-${API}).
We don't need it.
Note: only updates qt6 bootstrap for easier rebasing onto upstream.

notable change: AGP 9 no longer honours aapt's --custom-package/--java additionalParameters,
so R.java was generated on he wrong package. Pin namespace to the package the java sources expect and move the real,
domain-dependent package to applicationId. The --custom-package hack is then unnecessary
…ype)

Upstream replaced the `service_names` template variable with
`service_data` (name, foregroundServiceType) pairs in all bootstrap
manifests. The qt6 manifest still iterated `service_names`, which jinja
silently renders as empty, so declared services would have been dropped
from the manifest.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream removed the six recipe together with the move to Python 3.14,
but left 'six' in pyjnius' depends, so it ends up as an unpinned pip
install. pyjnius 1.7.0 has no runtime dependency on six (its only
requires_dist entries are dev/ci extras).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
These were added for the qt5-era sip build. sip 6.15 only depends on
packaging and setuptools on Python 3.11 (tomli is only pulled in for
Python < 3.11, ply and toml were dropped by sip 6), PyQt-builder only on
packaging and sip, and packaging >= 22 no longer depends on pyparsing.
No recipe depends on any of them anymore, and the tomli recipe still
drove `setup.py install`, which the upstream PythonRecipe no longer does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- android/src/setup.py: the 'qt5' lib_dict entry was dead since the qt6
  port; upstream's default (ANDROID_MAIN_LIB, falling back to 'main')
  already covers qt6.
- jni/application/src/Android.mk: LOCAL_SHARED_LIBRARIES named a
  never-defined 'python3.8' module (only tolerated because of
  APP_ALLOW_MISSING_DEPS); libpython is linked via EXTRA_LDLIBS. Use the
  same placeholder as upstream's qt bootstrap.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Unused imports and blank-line/indentation issues; `tox -e pep8` (which
upstream CI runs) is clean again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream's PyProjectRecipe now looks for prebuilt Android wheels on the
package index before building from source. Such wheels cannot be
hash-pinned and would silently replace the pinned source build, so
default `--skip-prebuilt` to on and add `--allow-prebuilt` to opt back
in.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- the qt6 bootstrap is part of the bootstrap list
- targetSdkVersion is decoupled from android_api
- python modules are compiled without -OO and with the build path
  stripped from the .pyc files

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream consolidated assemble_distribution() into the Bootstrap base
class: it now rmdir's the dist, `cp -r`s the whole bootstrap build dir
into it and runs the per-arch assembly itself. The qt6 override ended in
super().assemble_distribution(), which after the rebase would have
discarded the rsync-allowlisted dist and copied the entire Qt tree
(jni/qt6) into it. Do only the base class' final steps ourselves and
reuse its per-arch helper.

Also drop the aidl plumbing (distribute_aidl, Context.aidl_dir and the
extra copy in the qt6 recipe): it was written for Qt 5's .aidl files,
but Qt 6.10.2's src/android/java tree only contains the three bindings
.java files, so nothing ever landed in src/main/aidl that AGP would use.

Mark the bootstrap as never chosen automatically, like upstream's qt
bootstrap, and add a test for the assembly.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The qt6 bootstrap was copied from the sdl2 one and still carried its
project-chooser "launcher" mode: launcher/Project.java, the
org.kivy.LAUNCH branch in PythonActivityInit, the chooser layouts and
icons, and `{% if args.launcher %}` blocks in the manifest. `--launcher`
only exists for the SDL bootstraps (and qt6 never shipped
ProjectChooser), so all of it was unreachable. The billing blocks refer
to an option that no longer exists in build.py at all.

Qt 6.10 stopped reading android.app.static_init_classes (which is why
PythonActivity.onCreate() drives PythonActivityInit explicitly), so the
string resource is dead too, as is urlScheme (only rendered for SDL).

While there, remove the unused imports and the SDL-era
mLayout/mBrokenLibraries/ResourceManager vestiges from PythonActivity.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream's new src/pyproject.toml requires "Cython>=0.29,<3.1". Since
the fork builds with `python -m build --no-isolation`, that requirement
is checked against the Cython installed in hostpython, which pyjnius
(bound "<3.2") and android share. Electrum pins Cython 3.1.x for both,
so align the android bound with pyjnius'.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream deduplicates `patches` and `configure_args` with list(set()),
whose order depends on PYTHONHASHSEED. CONFIG_ARGS ends up in the
shipped _sysconfigdata module, so use an order-preserving dedup to keep
the bundle reproducible regardless of the host's hash seed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A partially pinned list passed the `any()` check and only failed later
inside pip's --require-hashes. Fail early with the offending entries
instead, always pass --require-hashes/--no-build-isolation, and cover
the gate with tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hostpython is now installed under its own prefix (root/usr/local), so
prepending the CPython native-build tree to PYTHONPATH/PATH when running
sip-install is meaningless; local_bin and site-packages are what it
needs. Remove the commented-out remains of the old sip-install driver.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The fork flipped the default (no -OO, so asserts and docstrings survive)
but the help text regressed to talking about ".pyo files".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…blacklist lines

- blacklist.txt: same content as upstream's qt bootstrap (adds *.aab and
  *.apks, drops the kivy/* entries copied from the webview bootstrap).
- qt6 recipe: libplugins_platforms_qtforandroid was listed twice; the
  `configure --help` / `-list-features` runs only produced log noise.
- hostqt6 recipe: commented-out make invocations and questions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Preload Qt6Multimedia and its Android media plugin so their JNI_OnLoad entry points initialize the Java context and register native callbacks. Without the plugin preload, camera activation hits a null orientation listener and the first frame fails in QtSurfaceTextureListener.notifyFrameAvailable.

Load MultimediaQuick with the other Qt libraries and remove its duplicate commented entry from the plugin preload list.
The buildFeatures block existed only so Electrum could read
BuildConfig.DEBUG. Electrum now checks ApplicationInfo.FLAG_DEBUGGABLE
instead, and nothing in the bootstraps, in Electrum's Java sources or in
the Qt jars references the class, so drop the fork-only lines: AGP 8+ does
not generate BuildConfig by default and upstream's template has no
buildFeatures block either.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.