Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contrib/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ RUN cd /opt \
&& /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies -e .

# install python-for-android
ENV P4A_CHECKOUT_COMMIT="003451604321deb1f10d879b63450ec76db4a758"
# ^ from branch electrum_20240930_android_16kb_page_alignment (note: careful with force-pushing! see #8162)
ENV P4A_CHECKOUT_COMMIT="e91310fbf88857b2fbd9f9a5f591300ae5da90b5"
# ^ from branch TODO xxxxx FIX git remote (note: careful with force-pushing! see #8162)
RUN cd /opt \
&& git clone https://github.com/spesmilo/python-for-android \
&& git clone https://github.com/sombernight/python-for-android \
&& cd python-for-android \
&& git checkout "${P4A_CHECKOUT_COMMIT}^{commit}" \
&& /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies -e .
Expand Down
2 changes: 1 addition & 1 deletion contrib/android/buildozer_qml.spec
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ requirements =
plyer,
libffi,
libsecp256k1,
cryptography,
pycryptodomex,
pyqt6sip,
pyqt6,
libzbar
Expand Down
6 changes: 3 additions & 3 deletions contrib/android/p4a_recipes/openssl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))


assert OpenSSLRecipe._version == "1.1"
assert OpenSSLRecipe._version == "3.0.18"
assert OpenSSLRecipe.depends == []
assert OpenSSLRecipe.python_depends == []


class OpenSSLRecipePinned(util.InheritedRecipeMixin, OpenSSLRecipe):
url_version = "1.1.1w"
sha512sum = "b4c625fe56a4e690b57b6a011a225ad0cb3af54bd8fb67af77b5eceac55cc7191291d96a660c5b568a08a2fbf62b4612818e7cca1bb95b2b6b4fc649b0552b6d"
version = "3.0.18"
sha512sum = "6bdd16f33b83ae2a12777230c4ff00d0595bbc00253ac8c3ac31e1375e818fc74d7f491bd2e507ff33cab9f0498cfb28fa8690f75a98663568d40901523cdf3c"


recipe = OpenSSLRecipePinned()
15 changes: 15 additions & 0 deletions contrib/android/p4a_recipes/pycryptodomex/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from pythonforandroid.recipe import PythonRecipe


assert PythonRecipe.depends == ['python3']
assert PythonRecipe.python_depends == []


class PycryptodomexRecipe(PythonRecipe):
version = "3.23.0"
sha512sum = "951cebaad2e19b9f9d04fe85c73ab1ff8b515069c1e0e8e3cd6845ec9ccd5ef3e5737259e0934ed4a6536e289dee6aabac58e1c822a5a6393e86b482c60afc89"
url = "https://github.com/Legrandin/pycryptodome/archive/v{version}x.tar.gz"
depends = ["setuptools", "cffi"]


recipe = PycryptodomexRecipe()
7 changes: 7 additions & 0 deletions run_electrum
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ if not is_android:
check_imports()


if is_android:
# hack to make pycryptodomex work on Android
# from https://github.com/kivy/python-for-android/issues/1866#issuecomment-927157780
import ctypes
ctypes.pythonapi = ctypes.PyDLL("libpython%d.%d.so" % sys.version_info[:2]) # replaces ctypes.PyDLL(None)


sys._ELECTRUM_RUNNING_VIA_RUNELECTRUM = True # used by logging.py

from electrum.logging import get_logger, configure_logging # import logging submodule first
Expand Down