Files
pallectrum/electrum/gui/kivy/Readme.md

85 lines
2.1 KiB
Markdown
Raw Normal View History

# Kivy GUI
The Kivy GUI is used with Electrum on Android devices.
To generate an APK file, follow these instructions.
2018-11-26 03:47:41 +01:00
## Android binary with Docker
2018-11-26 03:47:41 +01:00
This assumes an Ubuntu host, but it should not be too hard to adapt to another
similar system. The docker commands should be executed in the project's root
folder.
2018-05-07 17:46:13 +02:00
2018-11-26 03:47:41 +01:00
1. Install Docker
2018-05-07 17:46:13 +02:00
2018-11-26 03:47:41 +01:00
```
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ sudo apt-get update
$ sudo apt-get install -y docker-ce
```
2018-05-07 17:46:13 +02:00
2018-11-26 03:47:41 +01:00
2. Build image
2018-11-26 03:47:41 +01:00
```
$ sudo docker build -t electrum-android-builder-img electrum/gui/kivy/tools
```
3. Prepare pure python dependencies
2018-11-26 03:47:41 +01:00
```
$ sudo ./contrib/make_packages
```
4. Build binaries
```
$ sudo docker run -it --rm \
2018-11-26 03:47:41 +01:00
--name electrum-android-builder-cont \
-v $PWD:/home/user/wspace/electrum \
-v ~/.keystore:/home/user/.keystore \
2018-11-26 03:47:41 +01:00
--workdir /home/user/wspace/electrum \
electrum-android-builder-img \
./contrib/make_apk
2018-11-26 03:47:41 +01:00
```
This mounts the project dir inside the container,
and so the modifications will affect it, e.g. `.buildozer` folder
will be created.
2018-05-07 17:46:13 +02:00
5. The generated binary is in `./bin`.
2018-11-26 03:47:41 +01:00
## FAQ
2018-11-26 03:47:41 +01:00
### 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}`
2018-05-07 17:46:13 +02:00
### How do I deploy on connected phone for quick testing?
Assuming `adb` is installed:
```
$ adb -d install -r bin/Electrum-*-debug.apk
$ adb shell monkey -p org.electrum.electrum 1
```
2018-11-26 03:47:41 +01:00
### How do I get an interactive shell inside docker?
2018-05-07 17:46:13 +02:00
```
2018-11-26 03:47:41 +01:00
$ sudo docker run -it --rm \
-v $PWD:/home/user/wspace/electrum \
--workdir /home/user/wspace/electrum \
electrum-android-builder-img
2018-05-07 17:46:13 +02:00
```
### How do I get more verbose logs?
See `log_level` in `buildozer.spec`
### Kivy can be run directly on Linux Desktop. How?
Install Kivy.
Build atlas: `(cd electrum/gui/kivy/; make theming)`
Run electrum with the `-g` switch: `electrum -g kivy`