subsurface/packaging/android
Dirk Hohndel dea1ef84d5 build-system/Android: adapt the Google maps plugin name
This appears to be needed only for Android with Qt 5.15. Which means
that this commit creates odd breakage in case someone were to try to
build for Android with an older Qt version - but given that the current
build process only works with Qt 5.14 or 5.15, I think this is an
acceptable flaw.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 18:10:11 +00:00
..
.gitignore Import subsurface-android build script 2015-03-09 12:53:01 -07:00
android-build-setup.sh Android: improve documentation and setup script 2020-12-17 09:17:54 -08:00
android-build-wrapper.sh android: add new build setup script 2020-11-19 17:18:33 -08:00
build.sh android: add qmake based build for Subsurface-mobile 2020-11-19 17:18:33 -08:00
install-qt.sh build-system/Android: add missing install-qt.sh 2020-04-27 11:04:29 -07:00
qmake-build.sh build-system/Android: adapt the Google maps plugin name 2020-12-23 18:10:11 +00:00
qt-installer-noninteractive.qs builld-system: switch Android to Qt 5.13.1 2019-10-05 08:19:31 -07:00
README Android: improve documentation and setup script 2020-12-17 09:17:54 -08:00
translations.qrc android: add qmake based build for Subsurface-mobile 2020-11-19 17:18:33 -08:00
variables.sh android: add new build setup script 2020-11-19 17:18:33 -08:00
warning-ndk18b.txt Android build: add explanation for huge hack 2018-12-30 11:20:34 -08:00

over-simplistic instructions to building the Android package from source
------------------------------------------------------------------------

The easiest way to build things is using our container:

mkdir $HOME/src
cd $HOME/src
git clone git://github.com/subsurface/subsurface
cd subsurface
git checkout version or branch you are testing
cd ..
sudo docker run -v $HOME/src/subsurface:/android/subsurface -w /android --name=android-builder-docker -d subsurface/android-build-container:5.15.1 /bin/sleep 60m
sudo docker exec -t android-builder-docker git config --global user.email "ci@subsurface-divelog.org"
sudo docker exec -t android-builder-docker git config --global user.name "Subsurface CI"
sudo docker exec -t android-builder-docker apt-get install --reinstall cpp-7 gcc-7-base libgcc-7-dev libcc1-0 gcc-7
sudo docker exec -t android-builder-docker /bin/bash -x ./subsurface/packaging/android/qmake-build.sh


alternatively you can build locally without the help of our container.

Setup your build environment on a Ubuntu 20.04 Linux box

I think these packages should be enough:
sudo apt-get update
sudo apt-get install -y \
    autoconf \
    automake \
    cmake \
    git \
    libtool-bin \
    make \
    wget \
    unzip \
    python \
    python3-pip \
    bzip2 \
    pkg-config \
    libx11-xcb1 \
    libgl1-mesa-glx \
    libglib2.0-0 \
    openjdk-8-jdk \
    curl \
    coreutils \
    p7zip-full

sudo mkdir /android
sudo chown `id -un` /android
cd /android
wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip
unzip commandlinetools-linux-*.zip

git clone git://github.com/subsurface/subsurface

# now get the SDK, NDK, Qt, everything that's needed
bash /android/subsurface/packaging/android/android-build-setup.sh

Once this has completed, you should have a working build environment.

bash -x subsurface/packaging/android/qmake-build.sh

should build a working .aab as well as a .apk that can be installed on
your attached device:

./platform-tools/adb  install ./subsurface-mobile-build/android-build/build/outputs/apk/debug/android-build-debug.apk

Note that since you don't have the same signing key that I have,
you'll have to uninstalled the 'official' Subsurface-mobile binary in
order for this to work. And likewise you have to uninstall yours
before you'll be able to install an official binary again.