Skip to content

Commit

Permalink
android: update p4a ref
Browse files Browse the repository at this point in the history
- to include spesmilo/python-for-android@d4432ec
    see #9215 (comment)
- and add a fixme to revisit apkdiff re horrors beyond my comprehension
  • Loading branch information
SomberNight committed Oct 14, 2024
1 parent 5da46e9 commit af18df1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ RUN cd /opt \
&& /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies -e .

# install python-for-android
ENV P4A_CHECKOUT_COMMIT="7197c1c28409fbeebd8494093349a2bfd770526a"
ENV P4A_CHECKOUT_COMMIT="d4432ec8d07b8521465d6daddd55046fc0413599"
# ^ from branch electrum_20240930 (note: careful with force-pushing! see #8162)
RUN cd /opt \
&& git clone https://github.com/spesmilo/python-for-android \
Expand Down
8 changes: 8 additions & 0 deletions contrib/android/apkdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
import sys
from zipfile import ZipFile


# FIXME it is possible to hide data in the apk signing block - and then the application
# can introspect itself at runtime and access that, even execute it as code... :/
# see https://source.android.com/docs/security/features/apksigning/v2#apk-signing-block
# https://android.izzysoft.de/articles/named/iod-scan-apkchecks
# https://github.com/obfusk/sigblock-code-poc
# I think if the app did this kind of introspection, that should be caught by code review,
# but still, note that with this current diff script it is possible to smuggle data in the apk.
class ApkDiff:
IGNORE_FILES = ["META-INF/MANIFEST.MF", "META-INF/CERT.RSA", "META-INF/CERT.SF"]

Expand Down

0 comments on commit af18df1

Please sign in to comment.