To run APK Scanner, you need to meet the following prerequisites:
To get the latest version of APK Scanner, check the release page at Codeberg.
Assuming you want to download v0.0.5:
wcurl https://codeberg.org/Katastima/apkscanner/releases/download/v0.0.5/apk-scanner_v0.0.5.jar
# (optional) verify signature
wcurl https://codeberg.org/Katastima/apkscanner/releases/download/v0.0.5/apk-scanner_v0.0.5.jar.asc
gpg --verify apk-scanner_v0.0.5.jar.asc
wget https://codeberg.org/Katastima/apkscanner/releases/download/v0.0.5/apk-scanner_v0.0.5.jar
# (optional) verify signature
wget https://codeberg.org/Katastima/apkscanner/releases/download/v0.0.5/apk-scanner_v0.0.5.jar.asc
gpg --verify apk-scanner_v0.0.5.jar.asc
You can run the downloaded jar file directly using java -jar:
java -jar apk-scanner.jar
You could also create a wrapper to launch it.
Assuming you have downloaded the release to ~/apkscanner.jar:
#!/bin/bash
#
# SPDX-FileCopyrightText: Katastima Authors
# SPDX-License-Identifier: EUPL-1.2
#
### The path to the downloaded apk-scanner_vX.Y.Z.jar.
APKSCANNER_CLI_FILE="~/apkscanner.jar"
### In case you want to specify additional java options.
JAVA_OPTS=""
## For example, use a custom logback logger config:
#JAVA_OPTS="-Dlogback.configurationFile=sampledata/logback.xml"
if [ -n "$JAVA_OPTS" ]; then
java "${JAVA_OPTS}" -jar "${APKSCANNER_CLI_FILE}" "$@"
else
java -jar "${APKSCANNER_CLI_FILE}" "$@"
fi
Place above wrapper into your path as apk-scanner and make it executable
to be able to use it.
APK Scanner supports generating command completion for the following shells:
You need to create a wrapper and place it in your path to make use of it.
To create command completion files for your shell:
apk-scanner --generate-completion=bash
apk-scanner --generate-completion=fish
apk-scanner --generate-completion=zsh
Save the output to a file and source it with your shell to enable command completion.
# Create ~/.bashrc.d if it does not exist.
mkdir -p ~/.bashrc.d
# Generate command completion and place it inside ~/.bashrc.d to automagically
# pick it up everytime you log in.
apk-scanner --generate-completion=bash > ~/.bashrc.d/apk-scanner-completion.sh
# (optional) source after initial generation without having to relaunch your shell.
source ~/.bashrc.d/apk-scanner-completion.sh