APKiD: YARA rules for packers, three versions quoted in one file, and a Docker build that loses its dependency floor
Android Application Identifier for Packers, Protectors, Obfuscators and Oddities - PEiD for Android
At a glance
- What is it?
- A packer and obfuscator fingerprinting tool for APKs, installable from pip or as a non root container image, where the help output, the Docker sample and the newest tag report three different versions and the image build line passes a version constraint through an unquoted shell redirect.
- Who is it for?
- APKiD is a mature rules collection with a clear job, and its contributor path is unusually well specified: a file hash, an issue, and a script to recompile the rules. Two things deserve a second look before you build on it.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 34 days ago.
- What is it written in?
- Mainly YARA, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- rednaga/APKiD2,641 ★ · +69
| Repository | 2026-09-11 | 2026-11-24 |
|---|---|---|
| rednaga/APKiD | 2.6k | 2.6k |
69 Stars in the last 74 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Three different version numbers appear in the same file
The Docker section shows sample output that identifies itself:
git clone https://github.com/rednaga/APKiD
cd APKiD/
docker build . -t rednaga:apkid
docker/apkid.sh ~/reverse/targets/android/example/example.apk
[+] APKiD 2.1.0 :: from RedNaga :: rednaga.io
[*] example.apk!classes.dex
|-> compiler : dxThat says 2.1.0. The usage block further down says `APKiD - Android Application Identifier v2.1.2`. The newest tag on the repository is v3.1.0, published 2026-04-09, and before it v3.0.0 from 2025-04-24, with v2.1.5 from 2023-07-30 in between the two and the 2.1.x line.
So the sample output is a major version behind, the help text is a major version behind that, and neither matches the current tag. The tags themselves are named after conference editions and individuals rather than after changes, which makes them no use as a changelog on their own.
For a tool whose whole output is a fingerprint line, the banner version is the first thing anyone comparing two results will look at.
The image build line hands its version constraint to a shell redirect
One line in the Dockerfile installs the single runtime dependency:
RUN python -m pip install yara-python-dex>=1.0.5 \
&& python prep-release.py \
&& python -m pip install .The constraint is not quoted. Inside a RUN line the command goes through a shell, and in shell syntax an unquoted `>` is an output redirection, so the words split into a package name with no version at all and a redirect target. The constraint never reaches pip, and a file named `=1.0.5` is created in the working directory instead.
So the image builds, then installs whatever yara-python-dex resolves to that day, while the packaging metadata declares a floor of its own:
install_requires = [
'yara-python-dex>=1.0.1',
]Two different floors, 1.0.5 and 1.0.1, for the same dependency in the same repository, and the stricter of the two is the one being dropped. Since yara-python-dex is the whole engine behind the rules, a build that works on one day and fails to compile on another is the failure mode to expect here.
The help output names its option group optional arguments
The usage block is an argparse dump, and it stops in the middle of a line:
usage: apkid [-h] [-v] [-t TIMEOUT] [-r] [--scan-depth SCAN_DEPTH]
[--entry-max-scan-size ENTRY_MAX_SCAN_SIZE] [--typing {magic,filename,none}] [-j]
[-o DIR]
[FILE [FILE ...]]The visible options are worth reading as a description of what the tool does. `--scan-depth` bounds how deep it descends into an archive, `--entry-max-scan-size` bounds the size of a single entry it will look at, `--typing` chooses between `magic`, `filename` and `none`, `-j` switches to machine readable output, `-o DIR` sets an output directory, and `-t` sets the Yara scan timeout in seconds. The positional argument takes an apk, a dex or a directory, so a folder of samples can be handed over in one call.
The truncated line is `-t TIMEOUT, --timeout TIMEOUT Yara scan timeout (in sec`, with no closing parenthesis. The section header above the flags reads `optional arguments`, a label that the container image, built `FROM python:3.11-slim`, would not produce, which puts this block some Python versions behind the shipped image.
Four badges point at the same PyPI page
The header is five links. One goes to a Travis CI build page. The other four are identical, each pointing at the same PyPI project page for apkid, with no distinguishing label between them.
It reads as a badge block that was copied and re-pasted without editing, leaving four copies of the PyPI link where one would do. It is a cosmetic problem, but it is the first thing on the page and it makes the project look like it has four distribution channels when it has one package index.
The rest of the header is where the substance is. Five references are given for what the tool is and what it has been used for: a compiler fingerprinting talk from HITCON in 2016, a writeup on detecting pirated and malicious apps, an identification of app shielding products from Connect19, and two BlackHat Arsenal decks covering RASP SDK identification and the earlier identification work. The framing line itself is that APKiD tells you how an APK was made, and that it is PEiD for Android.
Two README files and a script argument named readme
The tree carries both `README.md` and `README.rst`, and the packaging script picks the reStructuredText one:
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()So the long description on PyPI comes from the `.rst` file while the `.md` file is what people read on GitHub, and something has to keep them in step. The maintainer instructions include that step as an argument to the release script:
./prep-release.py readmeThe development instructions call the same script with no arguments, `python prep-release.py`, to compile the rules, and the contributing section repeats that any rule change has to be followed by another run of it. So one script, invoked three ways in one file, handles compiled rules and the readme.
The tree also holds `apkid.iml`, an IDE module descriptor, which is committed alongside the packaging files, and a `setup.cfg` next to a `setup.py` that still takes its version from the package itself rather than from setup.cfg.
The image compiles the rules at build time and drops to a system user
The Dockerfile is short and does four things in order. It starts from `python:3.11-slim`, creates a group and a user both numbered 999, copies the repository into `/apkid`, and builds a virtual environment at `/opt/venv` with `--copies`, putting that environment first on `PATH`.
Then it runs `prep-release.py`, which means the compiled YARA rules are baked into the image at build time rather than compiled by the container at run time. After the install, the working directory moves to `/input`, described in a comment as the place to bind a mount point to for scratch pad work, both directories are handed to the unprivileged user, and `USER appuser` takes effect before `ENTRYPOINT ["apkid"]`.
The README's Docker example does not use the entry point directly. It calls a wrapper inside the repository, `docker/apkid.sh`, with a host path as the argument. Since the image declares `/input` as the mount point, the wrapper is what turns a path on the host into that directory, but the script's contents are not shown, so how it builds the mount is not documented.
A test dependency list with a Flask plugin in it
The test requirements are declared in the packaging script:
test_requires = [
'delayed-assert',
'factory_boy',
'mock',
'pytest',
'pytest-cov',
'pytest-factoryboy',
'pytest-flask',
'pytest-runner',
'tox',
]A Flask testing plugin is in a command line tool's test requirements, and nothing in the visible file explains why. The standalone `mock` backport sits next to pytest, which has its own mocking support, and both `tox` and `pytest-runner` are present, so tests can be driven three ways.
The development requirements are mypy for types, twine for uploading, and pypandoc, which fits with the `.rst` readme being produced from the markdown one. Documentation for running the tests points at `.travis.yml`, which is still in the tree even though `.github/` sits beside it, and the badge row at the top of the file points at a hosted Travis build page.
Windows support means building Yara from a git URL at a fixed version
Contributors on Windows get a four step detour, because the prebuilt Yara packages do not cover that combination:
pip uninstall -y yara-python yara-python-dex
pip install yara-python==3.11.0 wheel
pip wheel --wheel-dir=yara-python-dex git+https://github.com/MobSF/yara-python-dex.git
pip install --no-index --find-links=yara-python-dex yara-python-dexThe Yara engine is pinned to exactly 3.11.0 and installed in the same command as `wheel`, then `yara-python-dex` is built as a wheel straight from a git URL belonging to another project, MobSF, and installed with `--no-index` so nothing else is fetched.
That pin is the oldest instruction in the file and it applies only to this platform path, so a Windows contributor and a Linux contributor can end up on different Yara versions while both are following the same document. The ordinary install path remains `pip install apkid`, which pulls `yara-python-dex` and nothing else, since that is the only entry in the runtime requirements.
Editorial conclusion
APKiD is a mature rules collection with a clear job, and its contributor path is unusually well specified: a file hash, an issue, and a script to recompile the rules. Two things deserve a second look before you build on it. The container image is the version most people will use, and its dependency constraint is not reaching pip, so what you get is whatever yara-python-dex resolves to on the day of the build. And the licensing is deliberately dual, with a commercial arm for closed source work and GPL for open source, so a team with a closed source product has to pick one before the first commit rather than after. The help text and sample output in the README are older than the current tag, so treat the documentation as one minor version behind.
Frequently asked questions
What does APKiD identify in an APK?
It reports how the APK was made, identifying compilers, packers, obfuscators and other oddities using YARA rules. The positional argument accepts an apk, a dex or a directory, and the output includes the entry it matched and the verdict, for example a compiler reported as dx.
How do I install APKiD?
With pip install apkid, which pulls yara-python-dex as the only runtime dependency. A container route also exists and needs git and Docker: clone the repository, run docker build . -t rednaga:apkid, then invoke the repository's docker/apkid.sh wrapper with the path to a sample.
What license does APKiD use?
A dual license: a commercial one for closed source projects and GPL for open source software, and you choose one and follow its terms. The details are in LICENSE.COMMERCIAL and LICENSE.GPL, the license field on the repository is recorded as NOASSERTION, and the docstring at the top of setup.py carries both license headers.
How do I submit a new packer or obfuscator rule to APKiD?
Open an issue saying what you think the file is and giving the hash as MD5, SHA1 or SHA256, and include a hash with any pull request that adds a rule. The project asks to be told about anti disassembler, anti VM and similar tricks too, not only about packers.
Does APKiD build on Windows?
There is a documented path. Uninstall yara-python and yara-python-dex, install yara-python==3.11.0 together with wheel, build a wheel for yara-python-dex from the MobSF git URL, then install it with --no-index and --find-links. The file says this is needed before compiling the rules on Windows.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rednaga-apkid)Star history chart for your README
[](https://hysenlabs.com/projects/rednaga-apkid)Was this useful?