@njweber/store-check
v0.1.2
Published
Check an Android App Bundle (.aab) or APK for the Google Play 16 KB page-size requirement — dependency-free.
Maintainers
Readme
store-check
Check an Android App Bundle (.aab) or APK for the Google Play 16 KB page-size requirement —
without opening Android Studio.
Google Play now rejects apps targeting Android 15+ whose native libraries aren’t built with 16 KB
page alignment. store-check reads the native .so files straight out of your .aab/.apk and
tells you which ones (if any) will get your upload rejected.
- Zero dependencies (pure Node: a small ELF parser + ZIP reader)
- Exits non-zero on failure → drop it into CI
- Works on
.aaband.apk
Usage
npx @njweber/store-check ./app-release.aabstore-check — 16 KB page-size audit
artifact: ./app-release.aab
arm64-v8a
✓ libhermes.so (p_align 0x4000)
✗ libfoo.so NOT 16 KB aligned (p_align 0x1000)
FAIL — a 64-bit native lib is not 16 KB aligned. Google Play will reject this on Android 15+.Exit codes: 0 aligned · 1 not aligned · 2 bad input.
In CI
- run: npx @njweber/store-check ./android/app/build/outputs/bundle/release/app-release.aabWhat it checks
For each lib/<abi>/*.so it parses the ELF program headers and reports the p_align of every
PT_LOAD segment. A lib is “16 KB aligned” when p_align >= 0x4000 (16384). Only the 64-bit ABIs
(arm64-v8a, x86_64) gate the Play requirement; 32-bit ABIs are reported but don’t fail.
If it fails
You can’t fix this by patching the ELF — the alignment has to come from the build. Upgrade your
toolchain: React Native 0.79+ / Expo SDK 53+ ship 16 KB-aligned prebuilts.
More notes: https://booleanbuild.com/posts/16kb-page-size.html
GitHub Action
- uses: nwebersoftware/store-check@main
with:
path: android/app/build/outputs/bundle/release/app-release.aabComposite action — no npm install, no setup. Fails the job if a 64-bit lib isn't 16 KB aligned.
AAB vs APK
.aab— checksPT_LOADalignment. Zip alignment isn't applicable: Google Play repackages the bundle, so it's not your problem..apk— checksPT_LOADalignment and that stored (uncompressed)lib/**/*.soentries land on a 16 KB boundary in the zip — thezipalign -P 16requirement. A 16 KB device can'tmmapa misaligned library, which matters for sideloaded/enterprise APKs. Compressed.soentries are reported as a note (they get extracted at load) rather than a failure.
ZIP ALIGNMENT — 1 stored .so entry not 16 KB aligned:
arm64-v8a/libreanimated.so (data offset 0x1a4c8)
Fix: run `zipalign -P 16` on the APK (or build with useLegacyPackaging=false).The --relro flag (and a known nuance)
Google's documented requirement — and what Play actually checks — is PT_LOAD alignment, which is
what this tool enforces. Separately, some reports tie Play rejections to the end of PT_GNU_RELRO
not being 16 KB aligned (p_vaddr + p_memsz, congruent to 0 mod 0x4000) even when every LOAD
segment passes — which is why the official scripts can print "ELF Verification Successful" and the
upload still fails.
--relro reports those. It's off by default, deliberately: in practice nearly every real-world
library has an unaligned RELRO end — including libc++_shared.so inside apps Google Play has already
approved — so it's not a useful default signal, and a tool that cries wolf is worse than no tool. It's
here for the specific case where Play rejects a bundle whose LOAD segments all pass. The vendor fix
is a rebuild with -Wl,-z,max-page-size=16384.
npx @njweber/store-check ./app-release.aab --relroLicense
MIT.
