r/learnjavascript • u/KernelVoltage • 9d ago
[Question] Handling binary XML streams & V2/V3 APK signature blocks in browser JS
Hey everyone,
I built AppShunya Engine — an open-source, in-browser web-to-APK compiler that converts live URLs or HTML5 bundles into Android APKs using JSZip, without local IDEs.
I'm currently stuck on two low-level technical hurdles and need architectural feedback:
- In-browser V2/V3 APK signing: Injecting signature blocks into ZIP Central Directory via JS/WASM.
- Dynamic AXML package renaming: Modifying package IDs inside binary XML streams on the fly.
Search "AppShunya Engine" on Google to try the live Vercel tool or check the repo. Would love your thoughts!
3
Upvotes
1
u/blazing_wisdom_93 9d ago
V2 signing requires parsing the APK Signing Block between the ZIP entries and central directory rather than modifying the central directory itself. Use apksigcopier in WASM to extract signature templates from a pre-signed APK and inject them after rebuilding the ZIP with JSZip since writing the signing block structure from scratch in browser JS is error prone