APK Scanner

Installation

A guide to install APK Scanner.

Prerequisites

To run APK Scanner, you need to meet the following prerequisites:

  • Platform
    • Linux
    • Windows
    • macOS (not tested)
  • Java Runtime Environment (JRE) >= 21

Download

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

Run

You can run the downloaded jar file directly using java -jar:

Usage
java -jar apk-scanner.jar

Create a wrapper

You could also create a wrapper to launch it.

Assuming you have downloaded the release to ~/apkscanner.jar:

apk-scanner
#!/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.

Command completion

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

Save the output to a file and source it with your shell to enable command completion.

Example for bash
# 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
It is recommended to generate the completion everytime you update to a new release of apk-scanner.jar to ensure your completion is up-to-date.