How to Install


You need to have on your system these package installed:

  • git

  • python3

  • python3-pip

  • liblzma5

  • apktool

  • adb


If you want to install from source or have a clean development environment. I advise you to use a virtualenv and follow theses command:

git clone --recursive -j8
cd asthook
pip3 install -r requirements.txt
python3 install

If you have an easy installation use install and unistall script:

git clone --recursive -j8
cd asthook

Setup sdktools:

mkdir <sdktoolspath>
cd <sdktoolspath>

You should add ANDROID_SDK_ROOT environment variable with <sdktoolspath>

For bash:

echo 'export ANDROID_SDK_ROOT=<sdktoolspath>' >> ~/.bashrc

For Fish:

echo "set -x ANDROID_SDK_ROOT <sdktoolspath>" >> ~/.config/fish/

I advise you to update your sdkmanager environment and accept licenses with theses commands:

sdkmanager --update
sdkmanager --licenses

Install the minimum with the correct version when I written that it’s look like that:

cd <sdktools>
tools/bin/sdkmanager "platform-tools" "platforms;android-30" "build-tools;30.0.2" "emulator" --sdk_root=.


If an error you can check the list of package available and update it

cd <sdktools>
tools/bin/sdkmanager --list --sdk_root=.

To create an virtual phone without android studio you can use avdmanager command. Becareful, if you wanted a rooted phone you should not use a phone with google api.


# Not rooted phone with android 25
sdkmanager 'system-images;android-25;google_apis;x86_64'
avdmanager create avd --force --name not_rooted_phone --abi google_apis/x86_64 --package 'system-images;android-25;google_apis;x86_64'

# Rooted phone with android 25
sdkmanager 'system-images;android-25;default;x86_64'
avdmanager create avd --force --name rooted_phone --abi default/x86_64 --package 'system-images;android-25;default;x86_64'

You can now list your virtual phone:

avdmanager list avd


Make this documentation:

cd docs
pip3 install -r requirement.txt
make render