MythTV on Android
MythTV runs on Android but an official apk is not distributed, here is how to build an android package for yourself.
It uses Linux as the build platform, and opengl as the display layer.
- 1 Background & Caveats
- 2 Unofficial Android Pre-Builds
- 3 Gesture Support
- 4 Setting up the Options
- 5 Themes
- 6 Build Procedure
- 6.1 1. Clone the repos from the android fork
- 6.2 2. Get Android sdk, ndk and Qt using the online installer
- 6.3 3. Get a sufficiently suitable version of java. I used oracle-java7-jdk_7u76_amd64.deb
- 6.4 4. Get the following tarballs and put then in ./libs and extract (tar xf) them in this directory
- 6.5 5. Build all the libraries (make sure to have ruby installed on your system as building qt5extras requires it)
- 6.6 6. Build it (debug by default)
Background & Caveats
Currently it is not very well tested
Only the frontend works.
- It works the same way it does on Linux.
- The same themes (or new ones) or any downloadable ones work.
- Live TV works with program guide to change channels.
- Playback gesture key mapping is reconfigurable with phpmyadmin.
- Guide gesture mapping is (currently) Fixed and Click does not work.
- Only OpenGL Mode for rendering and playback.
- You cant return from setup screens in OpenGL mode, but it works in Qt rendering mode.
What doesn't work?
- No backend (currently)
- Builds are device specific.
- playback is a bit hiccuppy.
- not all screens have even rudimentary gesture support.
Unofficial Android Pre-Builds
Some master only builds exist on http://www.digivation.com.au/debian with various dates.
Limited gesture support has been added to various widgets so that button lists, playback and program guide are navigable.
Setting up the Options
- Select country/language
- Add DB details.
- Note: Un check ping server otherwise it wont work. There is no ping
- In Setup (you can only go back with Qt painter painter but video doesnt work with Qt theme Painter)
- select Theme first
- set key bindings for your back key and menu key
- Menu to Global.Menu
- Back to TV Playback.Back
- Finally in Appearance set painter to OpenGL
- After this, setup wont work properly, but playing video will
- if you want to do intensive setup work, switch back to Qt painter temporarily
The playback gestures are reconfigurable in the DB settings. There is a unique map for LiveTV and for recording playback.
- Settings Name : LiveTVScreenPressKeyMap
- Default: "P,Up,Z,S,Left,Return,Return,Right,A,Down,Q,F"
These are mapped onto a 4x3 grid as follows:
To change channels, access the guide (S), find the channel you want and then swipe RightThenLeft or use the menu key.
Recorded Playback Map
- Settings Name : PlaybackScreenPressKeyMap
- Default: "P,Up,Z,],Left,Return,Return,Right,A,Down,Q,["
These are mapped onto a 4x3 grid as follows:
Button List Gestures
- Press button once to focus, then again to click
Program Guide Gestures
|UpThenLeft||PageLeft or PgUp|
|DownThenRight||PageRight or PgDn|
|LeftThenUp||PgUp or PageLeft|
|RightThenDown||PgDn or PageRight|
|RightThenLeft||to change channel on highlighted channel|
Also use the menu and back buttons to access those functions.
Existing these work fine and the click sensitivity make it quite usable.
Currently there does not exist any special themes for touch screen usage.
To build MythTV for android, use the following steps.
There is currently no automated way to get all dependencies and build an apk in one step
1. Clone the repos from the android fork
mkdir workdir cd workdir git clone https://github.com/mspieth/packaging.git cd packaging/android git clone https://github.com/mspieth/mythtv.git
2. Get Android sdk, ndk and Qt using the online installer
- I used Qt 5.4.1 (http://www.qt.io/qt5-4/)
- You need the sdk version you are compiling to. I used 17 for 4.2.2 as minimum compatability level. File will be something like qt-opensource-linux-x64-1.6.0-8-online.run (https://developer.android.com/sdk/index.html#Other)
- install in ~/android as the build scripts assume its there
- also get android-ndk-r10d-linux-x86_64.bin and install it in ~/android too. (https://developer.android.com/ndk/downloads/index.html)
- also get android-cmake-master.zip and install that too in ~/android
git clone https://github.com/taka-no-me/android-cmake
- if you want to build a release apk, you need to create a key.
- modify and copy android-utilities/* to ~/android
cp android-utilities/setenv.sh ~/android
cp android-utilities/maketoolchain.sh ~/android
- For setenv.sh, you will need to edit JAVA_HOME, JDK_PATH, KEYSTORE, KEYALIAS, KEYSTOREPASSWORD, and QTBASE to match your configuration
- For maketoolchain.sh you will need to edit SDKVERSION and SDKVERSION to match your configuration
- create a toolchain for the correct version. see maketoolchain.sh for this. sdk 17 is the default
cd ~/android ./maketoolchain.sh cd ~/workdir/packages/android
You should have a dir structure like this after you are done:
~/android Qt android-cmake android-ndk -> android-ndk-r10d android-ndk-r10d android-sdk-linux android-studio yourname-release.keystore yourname.keystore maketoolchain.sh setenv.sh
3. Get a sufficiently suitable version of java. I used oracle-java7-jdk_7u76_amd64.deb
- Install it and make it the active one. Note that you can't use java8.
4. Get the following tarballs and put then in ./libs and extract (tar xf) them in this directory
- exiv2-0.24.tar.gz (http://www.exiv2.org/archive.html)
- freetype-2.5.5.tar.bz2 (http://sourceforge.net/projects/freetype/files/freetype2/2.5.3/)
- lame-3.99.5.tar.gz (http://sourceforge.net/projects/lame/files/lame/3.99/)
- libiconv-1.14.tar.gz (http://ftp.gnu.org/gnu/libiconv/)
- mariadb-connector-c-2.1.0-src.tar.gz (https://downloads.mariadb.org/connector-c/2.1.0/)
- openssl-1.0.2.tar.gz (https://www.openssl.org/source/)
- taglib-1.9.1.tar.gz (https://github.com/taglib/taglib/releases)
- qt-everywhere-opensource-src-5.4.1.tar.xz (https://download.qt.io/official_releases/qt/5.4/5.4.1/single/qt-everywhere-opensource-src-5.4.1.tar.xz.mirrorlist)
- This process will be made automatic in time using the windows mythbuild.
5. Build all the libraries (make sure to have ruby installed on your system as building qt5extras requires it)
./makelibs taglib ./makelibs freetype ./makelibs openssl ./makelibs iconv ./makelibs mariadb ./makelibs lame ./makelibs exiv2 ./makelibs qt5extras
6. Build it (debug by default)
mythfrontend.apk should now exist in the current directory