Utilities
Check APK ZIP entry alignment
Check stored APK entry offsets and save the native alignment report.
overview
What zipalign-check does
Supply an APK FILE. The adapter runs source-built AOSP zipalign with fixed -c -P 16 -v 4 options and saves the native verification report on success. It checks alignment without rewriting the archive.
The check uses four-byte alignment for ordinary stored entries and 16 KiB alignment for stored .so entries. ZIP entry alignment does not establish ELF load-segment alignment, signature integrity or compatibility with a particular device. Compressed entries are not a substitute for an aligned stored native library.
The APK must be a nonempty local file of at most 20 MiB, with at most 5,000 ZIP entries, at most 20 MiB declared size per entry and at most 64 MiB declared total expansion. It must contain AndroidManifest.xml. The native subprocess has a 60-second timeout. Native output/logs and the combined report are checked against 4 MiB after execution; these are not peak memory or disk limits.
source hub.docker.com/r/nenadzaric/skills-android-zipalign-check
use cases
Where zipalign-check fits
Record alignment of an owned APK
Save the native entry-offset report with a file artifact. The owned fixture reports AndroidManifest.xml at offset 56 and a stored libowned.so at offset 16384, followed by Verification successful.
Catch a library that is only four-byte aligned
The four-byte-only fixture stores the same library bytes at offset 164. That offset is divisible by four but fails the fixed 16 KiB native-library check.
Keep alignment checking separate from rewriting
Use the check as a file-processing gate. It exposes no archive realignment, signing key, device connection or installation operation.
reference
zipalign-check inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| apk | FILE | --apk | Local APK ZIP within the 20 MiB file and declared ZIP bounds. |
Showing key inputs. zipalign-check exposes 1 inputs in total.
example
Run zipalign-check
zipalign-check --apk owned.apk -o alignment.txtVerifying alignment of /hive/out/zipaligncheck-ltvxf1qy/input.apk (4)...
56 AndroidManifest.xml (OK)
16384 lib/arm64-v8a/libowned.so (OK)
Verification successfulguidance
Choosing zipalign-check
Choose this node to check APK ZIP entry offsets against fixed alignment settings. Use apksigner-verify separately for APK signature integrity; neither report establishes ELF segment alignment or device compatibility.
apksigner-verify
Check cryptographic signature integrity and signer fingerprints instead of ZIP alignment.
apkeditor-info
Extract APK metadata as JSON rather than verify ZIP entry alignment.
faq
zipalign-check questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run zipalign-check yourself
Actual native report downloaded from the owned aligned-fixture platform run. The temporary task path varies between runs; compare entry offsets and verification result rather than expecting identical report hashes across hosts.
Facts on this page come from the live Trickest tool library.