1
0
Commit Graph

207 Commits

Author SHA1 Message Date
ghost43
ece52b0a4e Merge pull request #10340 from f321x/fingerprint
android: implement biometric authentication (fingerprint)
2026-01-19 15:22:17 +00:00
user
5dd3dda238 android: implement biometric authentication
Allows to unlock the android app with the android biometric api (e.g.
fingerprint). Can be enabled in the settings.
2026-01-13 18:10:00 +01: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]: 78db83223f  (which got squashed into 83e74cac0f)
2025-12-27 03:31:19 +00:00
f321x
e09794c232 android: bump barcode scanner version
Bumps the BarcodeScannerView and zxing++ version which allows us to
remove the 16kb page alignment patch as this is now done upstream.
Ref 87d82f38c5
2025-12-22 14:44:32 +01:00
SomberNight
cfa052bc86 android build: switch from "cryptography" to "pycryptodomex"
We had been using an ancient version of "cryptography" so far in our p4a fork,
however it is not compatible with OpenSSL 3.0. (Previously we were building it with OpenSSL 1.1)

Bumping "cryptography" is difficult, as building new versions of it from source requires a full rust toolchain.

Instead, this commit switches to "pycryptodomex", as a replacement, which is much easier to build from source.
2025-12-11 17:42:42 +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
SomberNight
b676c1e9d3 build: docker run: make "-it" flags conditional on tty being available
from https://stackoverflow.com/a/69088164

I am trying to run the build.sh scripts directly on a cirrus CI runner, and "docker run -it" is erroring due to lack of a tty.
2025-09-26 14:24:23 +00:00
ghost43
77eb3ff01e Merge pull request #10148 from accumulator/android_16kb_page_alignment
android: 16kb alignment updates
2025-09-01 16:12:24 +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
f321x
c365272745 android: bump target sdk to 35 2025-08-27 13:57:22 +02:00
SomberNight
d6c300ebcc deps: bump libsecp256k1 version (0.6.0->0.7.0) and electrum-ecc 2025-08-07 13:24:41 +00:00
SomberNight
a94deedc26 android build: rm blacklist.txt
this looks like broken dead code

- the "if" body is never entered as `.buildozer/` gets created by `contrib/android/build.sh`
    8eb3c43603/contrib/android/build.sh (L32)
- `blacklist.txt` is at `contrib/android/blacklist.txt` but the Makefile expects it at the root
    ref https://gitlab.com/fdroid/fdroiddata/-/merge_requests/24948#note_2643399062
- `blacklist.txt` is not referenced anywhere else
2025-07-22 18:05:46 +00:00
f321x
5298e29a36 fix: log correct var in make_barcode_scanner script
Fixes two log lines to use the correct path variable.
2025-07-21 16:28:00 +02:00
SomberNight
7e98d2fe92 follow-up prev: fix typo 2025-07-04 13:08:31 +00:00
f321x
10b75ebed7 android: build BarcodeScannerView from src
Adds a script `make_barcode_scanner.sh` which builds the
`BarcodeScannerView` library and its dependencies, `zxing-cpp` and
`CameraView` from source. Builds `zxing-cpp` architecture dependent
reducing the final apk size.
2025-06-30 17:20:01 +02:00
f321x
5ae2deb704 android: shasum pin barcode scanner
pins the barcode scanner aar used in the android build and its 2
dependencies to a sha256 hash using a script `fetch_barcode_scanner.sh`
which is called in the process of building the apk by `make_apk.sh`.
It fetches the 3 aar files if not already existing, puts them in
`/contrib/android/aars` and verifies their shasum against the hardcoded
hashes in `fetch_barcode_scanner.sh`.
2025-06-25 17:21:54 +02:00
f321x
0a05674f2f android: replace qr code scanning library
Replaces the unmaintained and unreliable
`me.dm7.barcodescanner:zxing:1.9.8` qr code scanning library used only
on android with the `com.github.markusfisch:BarcodeScannerView:1.6.0`
(https://github.com/markusfisch/BarcodeScannerView) library which seems
more actively maintained.
The `BarcodeScannerView` library is incredibly fast and scanning qr
codes is now fun again :)

wip: still looking into ways to pin the library.
2025-06-24 17:38:03 +02:00
SomberNight
51dfb1ee3d android/get_apk_versioncode.py: add support for beta/alpha releases 2025-06-12 18:15:49 +00:00
ThomasV
1d7a5cbe16 android/build.sh: do not log password 2025-06-11 15:03:17 +02:00
SomberNight
fa271e3958 build: bump python versions in binaries
note: 3.12 just transitioned to security-only status,
so can't bump win/mac binaries without switching to 3.13
(as we don't compile our own cpython for those)
2025-06-05 16:51:56 +00:00
SomberNight
04a0d30176 android build: update pinned versions in p4a recipes
note: some files have two versions in them, e.g.:
```
assert CffiRecipe._version == "1.15.1"
class CffiRecipePinned(util.InheritedRecipeMixin, CffiRecipe):
    version = "1.17.1"
```
The assert is left there as I think it might be useful to get a failure if we rebase p4a
and the upstream recipe version changes. There might be substantial changes in the upstream
recipe that we need to adapt to. In the happy case, if we rebase p4a, we just have to manually
update these asserts to the new versions at that time.
2025-06-05 16:51:43 +00:00
SomberNight
70aeaccaf8 android build: rm "certifi" recipe
I don't think this was ever needed(?). certifi is pure python
and it already gets pulled in from the main requirements.txt
2025-06-05 16:51:39 +00:00
SomberNight
13cd7a6af0 build: bump libsecp256k1 version (0.5.1->0.6.0) 2025-06-05 16:50:42 +00:00
SomberNight
bf0ad20c60 build: bump python versions in binaries 2025-06-05 16:50:35 +00:00
SomberNight
37ca5f7eff build: appimage: bump base from debian buster(2019) to bullseye(2021) 2025-06-05 16:50:31 +00:00
Sander van Grieken
960e4ba583 android: update plugin exclude list 2025-04-23 14:50:22 +02:00
SomberNight
31b176169a contrib: mv locale-related scripts to contrib/locale/ 2025-04-14 17:18:37 +00:00
SomberNight
1144d9b8ea build: add script build_cleanlocale.sh 2025-04-14 17:18:34 +00:00
SomberNight
3567a4cfb0 mv git submodule electrum-locale from contrib to electrum/locale
- this merges `contrib/deterministic-build/locale` and `electrum/locale`
- it is now once again possible have translations when running from a local git clone
    - which was already possible in the past before crowdin removed their unauthenticated APIs
        - see https://github.com/spesmilo/electrum/issues/9531
    - however, the translations available are the often-old frozen strings from electrum-locale
        - while previously one could just download the latest strings from crowdin
2025-04-14 17:18:30 +00:00
Sander van Grieken
1ac885ea40 qml: add android permission methods in AppController 2025-04-03 12:37:17 +02:00
Sander van Grieken
4a072a45b1 android: add POST_NOTIFICATIONS permission 2025-03-28 15:53:13 +01:00
SomberNight
a3fc43cc2d qml: remove dependency "Pillow" (and its transitive deps)
closes https://github.com/spesmilo/electrum/issues/9572
2025-02-20 18:53:08 +00:00
Sander van Grieken
f89fd96e22 android: exclude unused plugins 2024-10-23 16:08:55 +02:00
SomberNight
fdc8430d40 bump libsecp256k1 version (0.5.0->0.5.1) 2024-10-18 14:47:15 +00:00
SomberNight
4bc63384d6 android readme: expand "how to debug repro failure" section 2024-10-15 23:42:44 +00:00
SomberNight
571acf71fe android: update p4a ref
- to include 0ab0d872e6
  > 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 d4432ec8d0
    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
a947b6ae10 contrib/release_www.sh: put android versionCode in "version" file
This can be used by the F-Droid buildserver to detect new versions
and release updates automatically.

ref:
https://github.com/spesmilo/electrum/pull/9221#issuecomment-2386549086
https://f-droid.org/en/docs/Build_Metadata_Reference/#UpdateCheckMode
2024-10-07 14:46:41 +00:00
SomberNight
6b713676fb android build: exclude fastlane/ from apk
related:
7fb7ac919c
https://github.com/spesmilo/electrum/issues/9215#issuecomment-2395249194
2024-10-07 13:57:56 +00:00
SomberNight
276488e3d0 binaries: document min requirements for target systems 2024-10-04 14:02:51 +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
eb3b288337 android readme: extend "access datadir on Android from desktop"
- add commands to restrict unix permissions for pushed files
- add notes for "multiple user profiles" case
2024-10-02 15:14:10 +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]: edb7e4fe6d
[1]: https://github.com/spesmilo/electrum/issues/9210#issuecomment-2380559324
2024-09-30 19:51:28 +00:00
SomberNight
c96ac892c3 version.py: rm APK_VERSION
related: https://github.com/spesmilo/electrum/issues/9210#issuecomment-2376572832
2024-09-30 16:08:18 +00:00
SomberNight
2c6e768c8d android: update p4a ref
to have 58d21ad89b
> 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
9a5edfdd74 android: set target_sdk_version to 34
To comply with new google play store requirement:

> Starting August 31 2024:
> - New apps and app updates must target Android 14 (API level 34) or higher to be submitted to Google Play

AFAICS, we do not need to adapt to any of the changes.
https://developer.android.com/about/versions/14/behavior-changes-14
2024-09-19 16:51:08 +00:00
SomberNight
2eee98b493 bump libsecp256k1 version (0.4.1->0.5.0) 2024-05-28 17:09:44 +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
fuyangpengqi
91de8e70e5 chore: fix some typos in comments (#9014)
Signed-off-by: fuyangpengqi <995764973@qq.com>
2024-04-18 13:59:39 +00:00