Discord bot which is capable to manage android-devices which are connected via ADB.
You can create one at: https://discordapp.com/developers/applications/me
There you get your so called BOT_TOKEN
, which is your token to login to discord.
cp kraken/config.py.dist kraken/config.py
a config typically look like this:
# Directory where the log file of the bot shall be stored
LOG_PATH = '.'
"""
Discord Section.
"""
# The Token of your botuser.
BOT_TOKEN = 'aasdasdasdasdasdasds'
# Discord Status
PLAYING = 'ADBKraken'
# Command prefix
PREFIX = '!'
DEVICES = {
'DEVICE1' : '192.168.178.77:5555',
'DEVICE2' : '192.168.178.95:5555',
}
"""
MAD Section.
"""
mitm_server = 'http://example.com'
mitm_port = 8000
origin = 'DEVICE1'
deviceauthuser = 'user'
deviceauthpass = 'pass'
- python 3.7
- pip3
- adb
We recommend to use a virtual environment.
python3 -m venv adbkraken-venv
source adbkraken-venv/bin/activate
Then install the requirements.
pip3 install -U -r requirements.txt
Call:
python3 start_bot.py
First of all, you have to install Docker CE and docker-compose on your system.
- Docker CE: just execute this script https://get.docker.com/ - or read through https://docs.docker.com/install/
- Docker-compose: https://docs.docker.com/compose/install/
These sites are well documented and if you follow the install instructions, you are good to go.
You can either use the docker-image: https://cloud.docker.com/repository/docker/breedocker/adbkraken This image is automatically build on each push to github.
Alternatively you build it locally.
A docker-compose using the image file looks like this:
version: '2.4'
services:
kraken:
image: breedocker/adbkraken
volumes:
- ./kraken/:/usr/src/app/
restart: always
A docker-compose which builds the image locally:
version: '2.4'
services:
kraken:
build:
context: .
volumes:
- ./kraken/:/usr/src/app/
restart: always
Just execute:
docker-compose up -d kraken
this will pull/build if the docker-image, the image is not present, and then start the service.
To examine the logs:
docker-compose logs -f kraken
Take the service down:
docker-compose down
To force a full rebuild:
docker-compose build --no-cache kraken