How to Install ============== prerequisite ************* You need to have on your system these packages installed: * git * python3 * python3-pip * liblzma5 * apktool * adb Asthook works with all versions of python 3. For decompiler as Jadx you will probably need openjdk 8 or above. installation ************ If you want to install from sources or have a clean development environment. I advise you to use a virtualenv_ and follow theses command: .. _virtualenv: https://python-guide-pt-br.readthedocs.io/fr/latest/dev/virtualenvs.html .. code-block:: bash git clone --recursive -j8 https://gitlab.com/MadSquirrels/mobile/asthook.git cd asthook pip3 install -r requirements.txt python3 setup.py install If you have an easy installation use install and unistall script: .. code-block:: bash git clone --recursive -j8 https://gitlab.com/MadSquirrels/mobile/asthook.git cd asthook ./install.sh Setup sdktools: *************** .. code-block:: bash wget https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip mkdir cd unzip commandlinetools-linux-6200805_latest.zip mkdir cmdline-tools mv tools/ cmdline-tools/ You should add ANDROID_SDK_ROOT environment variable with For bash: .. code-block:: bash echo 'export ANDROID_SDK_ROOT=' >> ~/.bashrc For Fish: .. code-block:: fish echo "set -x ANDROID_SDK_ROOT " >> ~/.config/fish/config.fish To use directly android command you need to update $PATH environment variable .. code-block:: bash echo 'PATH="$PATH:/cmdline-tools/tools/bin"' >> ~/.bashrc I advise you to update your sdkmanager environment and accept licenses with theses commands: .. code-block:: bash sdkmanager --update yes | sdkmanager --licenses Install the minimum with the correct version when I wrote that it looks like that: .. code-block:: bash sdkmanager "platform-tools" "platforms;android-30" "build-tools;30.0.2" "emulator" .. warning:: If an error you can check the list of package available and update it .. code-block:: bash sdkmanager --list .. asciinema:: sdkmanager.cast :preload: To create a virtual phone without android studio you can use avdmanager command. Be careful, if you wanted a rooted phone you should not use a phone with google api. Examples: .. code-block:: bash # 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: .. code-block:: bash avdmanager list avd Documentation ############# Make this documentation: .. code-block:: bash cd docs pip3 install -r requirement.txt make render