Android backup client, using server for management and storage.
This submodule is an Android application, responsible for performing all client operations (backup, recovery, maintenance).
To get started with development AndroidStudio is needed.
Additionally, to allow for testing of the client itself using the Android Emulator, the server and
identity services need to be up and running (see deployment/dev for more info).
Finally, the client itself needs to go through the usual bootstrap process before it can be used/tested.
A script that retrieves bootstrap codes can be found in the ./dev directory.
To run linting and all tests, execute
./gradlew qa.
The client needs a connection to the identity service and to the server itself, however, those are normally
running in docker containers and by default are only available to the host machine; the Android emulator cannot
use localhost to access those because that points to its own loopback interface. Instead, the IP address
10.0.2.2 can be used to access the loopback interface of the host machine.
In order to get access to the services on the host machine you can:
- Have your local network's DNS server resolve the
serverandidentitynames to10.0.2.2 - Deploy a DNS server locally (using docker, for example) and have Android use that server to resolve the names
- Reconfigure the
deployment/dev/docker-compose.ymlfile to use the10.0.2.2address for the bootstrap parameters instead of the names
By default, server and identity have TLS enabled with self-signed certificates. Unlike in the Linux client,
the Android client has no feature that allows accepting self-signed certificates. Instead, the certificates of
the services should be imported so that the OS can validate them properly:
- Copy the .pem certificates to the device (dragging and dropping them in the emulator is possible; the files end up in
Downloads) - Search for
Encryptionin the settings (different OS versions may put these settings in slightly different locations) - Select
Install from SD cardorInstall a certificate>CA certificate - Select each certificate file (from
Downloads, if it drag-and-drop was used) - Verify that the installation worked by checking the installed certificates in
Trusted credentials>User; you should have two, one forserverand one foridentity
If the
10.0.2.2IP address is used instead of the DNS names for connecting to the services, the certificates need to be generated with a differentsubjectAltName:subjectAltName=IP:10.0.2.2instead ofsubjectAltName=DNS:<name>.