You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
ThomasV b009c56b9d kivy: save requests only with the save button 7 years ago
..
data Bundle QR scanner with Android app 7 years ago
nfc_scanner migrating print() to python 3 7 years ago
theming/light share icon file 7 years ago
tools use python 3.6 to build APK 7 years ago
uix kivy: save requests only with the save button 7 years ago
Makefile misc python3 updates: 7 years ago
Readme.md fix #3740 7 years ago
__init__.py misc python3 updates: 7 years ago
i18n.py fix #3941 7 years ago
main.kv new kivy gui 7 years ago
main_window.py kivy: do not open invoices, requests dialogs if list is empty 7 years ago

Readme.md

Kivy GUI

The Kivy GUI is used with Electrum on Android devices. To generate an APK file, follow these instructions.

1. Install python-for-android (p4a)

p4a is used to package Electrum, Python, SDL and a bootstrap Java app into an APK file. We patched p4a to add some functionality we need for Electrum. Until those changes are merged into p4a, you need to merge them locally (into the master branch):

  1. kivy/python-for-android#1217

Something like this should work:

cd /opt
git clone https://github.com/kivy/python-for-android
cd python-for-android
git remote add agilewalker https://github.com/agilewalker/python-for-android
git checkout a036f4442b6a23
git fetch agilewalker
git merge agilewalker/master

2. Install buildozer

2.1 Buildozer is a frontend to p4a. Luckily we don't need to patch it:

cd /opt
git clone https://github.com/kivy/buildozer
cd buildozer
sudo python3 setup.py install

2.2 Download the Crystax NDK manually. Extract into /opt/crystax-ndk-10.3.2

3. Update the Android SDK build tools

Method 1: Using the GUI

Start the Android SDK manager in GUI mode:

  ~/.buildozer/android/platform/android-sdk-20/tools/android

Check the latest SDK available and install it. Close the SDK manager. Reopen the SDK manager, scroll to the bottom and install the latest build tools (probably v27) Install "Android Support Library Repository" from the SDK manager.

Method 2: Using the command line:

Repeat the following command until there is nothing to install:

  ~/.buildozer/android/platform/android-sdk-20/tools/android update sdk -u -t tools,platform-tools

Install Build Tools, android API 19 and Android Support Library:

  ~/.buildozer/android/platform/android-sdk-20/tools/android update sdk -u -t build-tools-27.0.3,android-19,extra-android-m2repository

5. Create the UI Atlas

In the gui/kivy directory of Electrum, run make theming.

6. Download Electrum dependencies

Run contrib/make_packages.

7. Build the APK

Run contrib/make_apk.

FAQ

Why do I get errors like package me.dm7.barcodescanner.zxing does not exist while compiling?

Update your Android build tools to version 27 like described above.

Why do I get errors like (use -source 7 or higher to enable multi-catch statement) while compiling?

Make sure that your p4a installation includes commit a3cc78a6d1a107cd3b6bd28db8b80f89e3ecddd2. Also make sure you have recent SDK tools and platform-tools

I changed something but I don't see any differences on the phone. What did I do wrong?

You probably need to clear the cache: rm -rf .buildozer/android/platform/build/{build,dists}