You have different ways of setting up your development environment:
- docker
- docker-compose
You can tweak your instance by changing some settings.
Follow instructions to get AAS token here.
Create the file exodus/exodus/settings/custom_docker.py
with the following content:
from .docker import *
GOOGLE_ACCOUNT_EMAIL = "<a valid google account>"
GOOGLE_ACCOUNT_AAS_TOKEN = "<a valid aas token>"
# Overwrite any other settings you wish to
echo uid=$(id -u) > .env
docker-compose up -d
# Once exodus started, you can check its logs
docker-compose logs -f exodus-front
When everything is up (Docker logs Exodus DB is ready.
), you may have to force a first download of the F-Droid index:
docker-compose exec exodus-worker /entrypoint.sh refresh-fdroid-index
The worker must be running to do this.
The exodus container automatically:
- Create the database
- Make migration
- Import trackers from the main instance
- Start the frontend of exodus
Don't forget to rebuild your image and refresh your container if there is any change with docker-compose up -d --build
.
You can use the command
docker-compose exec exodus-worker /entrypoint.sh "<command>"
to make actions, where <command>
can be:
compile-messages
: Compile the translation messagescreate-db
: Create the database and apply migrationscreate-user
: Create a Django usermake-messages
: Create the extracted translation messagesimport-trackers
: Import all trackers from the main exodus instancestart-frontend
: Start the web serverstart-worker
: Start the exodus workerrefresh-fdroid-index
: Refresh F-Droid index file
This setup is based on a Debian 11 (Bullseye) configuration.
- Install system dependencies
sudo apt install git virtualenv postgresql-13 rabbitmq-server build-essential libssl-dev dexdump libffi-dev python3-dev libxml2-dev libxslt1-dev libpq-dev pipenv
- Install apkeep, the tool used to download applications from the Google Play Store.
git clone https://github.com/Exodus-Privacy/exodus.git
sudo su - postgres
psql
CREATE USER exodus WITH PASSWORD 'exodus';
CREATE DATABASE exodus WITH OWNER exodus;
\c exodus
CREATE EXTENSION pg_trgm;
cd exodus
pipenv install --dev
You can tweak your instance by changing some settings.
Follow instructions to get AAS token here.
Create the file exodus/exodus/settings/custom_dev.py
with the following content:
from .dev import *
GOOGLE_ACCOUNT_EMAIL = "<a valid google account>"
GOOGLE_ACCOUNT_AAS_TOKEN = "<a valid google aas token>"
# Overwrite any other settings you wish to
echo "DJANGO_SETTINGS_MODULE=exodus.settings.custom_dev" > .env
# enter into python environment
pipenv shell
cd exodus
python manage.py migrate --fake-initial
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
Minio is in charge to store files like APK, icons, flow and pcap files.
wget https://dl.minio.io/server/minio/release/linux-amd64/minio -O $HOME/minio
chmod +x $HOME/minio
Configure Minio
mkdir -p $HOME/.minio
cat > $HOME/.minio/config.json << EOL
{
"version": "33",
"credential": {
"accessKey": "exodusexodus",
"secretKey": "exodusexodus"
},
"region": "",
"browser": "on",
"logger": {
"console": {
"enable": true
},
"file": {
"enable": false,
"filename": ""
}
},
"notify": {}
}
EOL
Create Minio storage location
mkdir -p /tmp/exodus-storage
$HOME/minio server /tmp/exodus-storage --console-address :9001
Minio API is now listening on 9000
port and the browser interface is available
at http://127.0.0.1:9001. Use exodusexodus
as both login
and password.
The εxodus handle asynchronous tasks submitted by the front-end.
You have to activate the virtual venv and cd
into the same directory as manage.py
file.
pipenv shell
cd exodus
celery -A exodus.core worker --beat -l debug -S django
Now, the εxodus worker and scheduler are waiting for tasks.
You have to activate the virtual venv and cd
into the same directory as manage.py
file.
pipenv shell
cd exodus
python manage.py runserver
Now browse http://127.0.0.1:8000
Activate the εxodus virtual venv, cd
into the same directory as manage.py
file and execute the following commands:
python manage.py import_categories
python manage.py importtrackers
Now, browse your tracker list
An initial F-droid index manual download may be required:
python manage.py refresh_fdroid_index
The following options can be configured in exodus/exodus/settings/
:
Setting | Description | Default |
---|---|---|
EX_PAGINATOR_COUNT | Number of elements per page | 25 |
TRACKERS_AUTO_UPDATE | Whether to update automatically trackers | False |
TRACKERS_AUTO_UPDATE_TIME | Trackers update frequency (in seconds) | 345600 |
TRACKERS_AUTO_UPDATE_FROM | Exodus instance to update trackers from | |
ANALYSIS_REQUESTS_AUTO_CLEANUP_TIME | Requests cleanup frequency (in seconds) | 86400 |
ANALYSIS_REQUESTS_KEEP_DURATION | Requests keep duration (in days) | 4 |
ALLOW_APK_UPLOAD | Whether to allow APK file upload | False |
DISABLE_SUBMISSIONS | Whether to disable app submissions | False |
GOOGLE_ACCOUNT_EMAIL | Email of Google account to download apps | / |
GOOGLE_ACCOUNT_AAS_TOKEN | AAS token of Google account to download apps | / |
Browse to the analysis submission page and start a new analysis (ex: fr.meteo
).
When the analysis is finished, compare the results with the same report from the official instance.