-
-
Notifications
You must be signed in to change notification settings - Fork 39
Install Termux on Android
You can run UniqueBible.app via Termux on Android.
This wiki page briefly describe how to install and set up Termux on Android device, to prepare for running Unique Bible App.
The play store version of Termux no longer work on latest Android versions.
We managed to install Termux with the method described below.
(Remarks: Termux community also suggests installing Termux via F-droid, but unfortunately we haven't been able to install Termux via F-droid. That's why we use the following method.)
We will describe how to install the Termux apk file via Chrome app, but first you need to enable your Chrome app to install unknown app.
-
Go to "Settings > Apps and notifications > Special app access > Install unknown apps"
-
Select Chrome
-
Enable "Allow from this source"
Remarks: You may disable this feature after you install Termux app.
-
Launch Chrome on your Android device.
-
Go to official Termux GitHub release page: https://github.com/termux/termux-app/releases
-
Download the "universal" version from the list under "Assets"
-
After the file is downloaded, select it from Chrome download list
-
Select "Install"
Launch Termux and run,
pkg install root-repo
pkg install x11-repo
-
Launch the newly installed Termux app
-
Run "apt update && apt full-upgrade"
-
Answer "Y" in all prompts until finish
Run termux-setup-storage and grant permissions when the dialog pops up. This will create a $HOME/storage directory with symlinks to respective paths of sdcard(s).
Read more at https://wiki.termux.com/wiki/Sharing_Data
Installing Termux:API & termux-api enables uba to interact more with mobile device api, e.g. sms bible verse, use google text-to-speech engine directly on Android phone without using a separate Google API key.
Termux:API app and termux-api package are two different elements that needed to be installed separately.
-
To install Termux:API app, read: https://github.com/termux/termux-api
-
To install termux-api package, run in termux:
pkg install termux-api
Read more at https://wiki.termux.com/wiki/Termux:API
To install packages, required for setting up UBA, launch Termux and run:
pkg install python git binutils libxslt libjpeg-turbo libpng build-essential clang make pkg-config curl wget lynx w3m elinks vlc xclip xsel vim libxml2 libxslt python-apsw which
Please note that we install the official python-apsw package created by Termux team, rather than using pip3, in order to work with regular expression searches. For details, read https://github.com/termux/termux-packages/issues/12340
Read more at: https://wiki.termux.com/wiki/Python#Python_module_installation_tips_and_tricks
To generate charts on bible references with UBA terminal mode, users need to have matplotlib installed.
On Termux, do not use pip3 to install matplotlib, we manage to install matplotlib on Termux by running:
pip3 install 'kiwisolver<1.4.0,>=1.0.1' --force-reinstall
pip3 install cycler
pip3 install fonttools
pip3 install python-dateutil
pkg install python-numpy
pkg install matplotlib
To download:
To set up for the first time:
cd UniqueBible
touch use_system_site_packages
python3 uba.py terminal
Remarks:
-
When you run 'python3 uba.py terminal' for the first time, it takes some time for UBA to start as there is a script helping you to download all essential packages automatically. The startup would be much quicker after the first setup.
-
The second step above 'touch use_system_site_packages' tells UBA to use official packages (e.g. as mentioned above, python-apsw, python-numpy, matplotlib). This step should be executed before the first run or setup of virtual environment resource folder that starts with 'venv_*' in UBA directory.
To run UBA thereafter:
python3 uba.py terminal
UBA terminal mode integrates some useful Termux API features.
To enable it, run in UBA command prompt:
_setconfig:::terminalEnableTermuxAPI:::True
There are several running mode that UBA supports. You may read for more information at https://github.com/eliranwong/UniqueBible/wiki/UBA-Run-Modes
Currently, we support running UBA in the following modes on Termux:
-
HTTP/Web mode - UBA acts as a web server and can be accessed by browsers.
python uba.py http-server
-
Terminal mode - A command line mode, running locally, where all input and output is text based, without Qt library.
python uba.py terminal
-
Telnet mode - UBA acts as a telnet server and can be accessed by telnet clients.
python uba.py telnet-server
Our recommendation:
We recommend users to run mainly terminal mode on Termux. Most features available on GUI mode are available in terminal mode. In addition, you can start or stop http-server mode via terminal when you need it.
You may place the following line in file '/data/data/com.termux/files/home/.bashrc':
python /data/data/com.termux/files/home/UniqueBible/uba.py http-server & disown
alias uba="python /data/data/com.termux/files/home/UniqueBible/uba.py terminal"
With these two lines in place, http-server automatically starts when you start a Termux session.
In addition, you can simply run commands like below to launch terminal mode:
uba
uba John 3
"... text size can be adjusted by pinch zooming ..."