Packaging Udderance2025-06-26

Today I spent a few hours packaging Udderance as an Android app for true/reliable offline usage with all assets bundled. I had some small issues encountered during the process and noted them below.

  • My assets directory was getting clobbered in the URI to load. This was annoying but easy to workaround by intercepting and rewriting it.
  • The Android WebView does not support using the speechSynthesis API for TTS. Fine, whatever. I'll just strictly enable Sherpa.
  • Sherpa wasn't loading, but then I remembered I had the JIT disabled by default for apps on GrapheneOS. Toggling that and Sherpa works.
  • When Udderance detects it is running as a PWA, it hides the header & footer. I adjusted that to handle running from Android app assets to match. But strangely then the page was getting cropped off by the status and nav bar. I worked around this by replacing them with line breaks instead.
  • I then remembered that I'd have to compile Sherpa from source to meet the F-Droid inclusion criteria. So I did. However the fdroidserver instance fails to compile it with the Emscripten toolchain available in Debian repositories and generated a corrupted binary when using Emscripten from git. So I instead dropped Sherpa for this and manually proxy the TTS requests from the page to the system.
  • Then fdroidserver was failing to run the scripts to assemble everything. Turns out Debian's default dash shell does not support arrays or &> redirection and bash doesn't run aliases by default when non-interactive.

I've submitted it to F-Droid for inclusion, and it should hopefully land soon!

Comment on this: Fediverse

Back to blog index