EhViewer-NekoInverter/EhViewer: The Android Client That Turns a Messy Website Into a Native Library

A deep look at the hybrid parsers, native archive pipeline, and session-handling tricks that let a legacy fork behave like a high-performance gallery app.

9 min read • View on GitHub • More from EhViewer-NekoInverter

An Android phone sits on a desk like a catalog terminal while tangled paper gallery pages, cookie slips, and thumbnail strips are sorted into archive boxes by precise mechanical hands. The scene explains how the app turns unstable web pages into a local, native-feeling library.
EhViewer’s core trick is translation: it makes a hostile web source behave like a fast offline catalog.
Key Takeaways

EhViewer is not really an app about galleries. It is an app about transformation: taking unstable web content and turning it into something that behaves like a native library. That is why it feels less like a browser wrapper and more like a product with its own backend, even though the source of truth is someone else’s HTML.

The app that acts like a backend

The first surprise is the illusion of stability. Open a gallery, search, or resume a download, and the app behaves as if it owns the catalog. Underneath, it is constantly reconciling session state, parsing brittle pages, and translating failures into domain-specific errors.

A fork of EhViewer, feature requests are not accepted. Forked from https://gitlab.com/NekoInverter/EhViewer

EhViewer-NekoInverter, Project Repository · EhViewer-NekoInverter/EhViewer

One request can travel through JSON, HTML, or local archive paths, but the UI only sees one consistent gallery model.

How EhViewer manufactures stability from unstable HTML

The core path runs through EhClient and EhEngine. The client behaves like a command router, while the engine executes requests, parses responses, and turns service quirks into typed exceptions instead of vague failures.

// Conceptual flow, simplified from the repo
val result = ehClient.execute("openGallery", galleryUrl)

when (result) {
  is GalleryResult.Success -> render(result.gallery)
  is GalleryResult.Error -> showTypedError(result.exception)
}

// The important part is the translation boundary:
// network response -> parser -> domain object -> typed exception

That translation boundary matters. A raw HTML error page is useless to the UI, but a typed exception can drive a retry, a login prompt, or a specific failure state. This is what makes the app feel intentional instead of brittle.

Why hybrid parsing matters

EhViewer does not bet on one source format. When the service exposes structured data, the app uses it. When it does not, it falls back to DOM parsing with Jsoup. That mix is the real resilience layer.

Source pathWhat it readsWhy it exists
JSON parserStructured API responsesFast, compact, and stable when available
HTML parserGallery pages and listing DOMNecessary when the site only exposes markup
Error translationRaw failures and service pagesTurns ambiguous breakage into actionable states
A close-up pipeline shows one gallery request splitting into two lanes, one through brittle HTML fragments and one through a compact JSON adapter, before both lanes merge into the same gallery card tray. A small native press stamps image strips from a compressed archive off to the side, showing how online and offline paths converge.
Hybrid parsing is the app’s stability trick. Different sources, one finished gallery model.

The repo even treats parse failures as something to preserve. When the layout changes, the code can dump the broken body for debugging, which is a practical admission: the website will drift, so the parser needs a memory of the moment it broke.

The native performance play hidden under the UI

The presence of app/src/main/cpp is the tell. This is not native code for novelty. It exists because archive handling and image-related work are good candidates for a faster, lower-overhead path than pure Kotlin on every device, especially when files are large or compressed.

That choice pairs with a custom Coil pipeline. Local thumbnails, downloads, and interceptors are arranged so the app can move smoothly between online browsing and offline reading without making the user think about the boundary.

What the native layer buys

In other words, the native layer is not an optimization footnote. It is part of the product contract: galleries should open quickly, even when the source file is awkward.

Why this fork still has a constituency

The fork’s appeal is easy to miss if you only look at feature counts. It keeps the older Android-native feel, the Material 2 identity, and a maintenance posture that privileges stability over reinvention. For many users, that is exactly the point.

ProjectUI philosophyPlatform scopeBest fit
EhViewer-NekoInverterMaterial 2, legacy Android-nativeAndroidUsers who want a familiar, fast, proven client
EhViewer-OverhauledMaterial 3 and ComposeAndroidUsers who want a modern UI rewrite
JHenTaiFlutter cross-platformAndroid, iOS, DesktopUsers who want one codebase across devices
Ehviewer_CN_SXJLocalized legacy stabilityAndroidUsers who value long-running familiarity
UjuiUjuMandan/EhViewerCircumvention-focused forkAndroidUsers who need stronger regional workarounds

That comparison makes the niche clear. NekoInverter’s branch is not the newest or the broadest. It is the most legible expression of the original Android-native idea.

Project is no longer actively maintained. Please move to general manga reader like Tachiyomi.

NekoInverter, Author/Maintainer · NekoInverter / EhViewer · GitLab

What the alternatives optimized for instead

The broader ecosystem splits along a few obvious lines. Some forks chase a cleaner modern UI. Some chase cross-platform reach. Some specialize in censorship circumvention or regional convenience. EhViewer-NekoInverter sits in the narrow middle, where Android performance and web-service adaptation still matter most.

AlternativePrimary optimizationTradeoff versus NekoInverter
MD3 Compose forksModern UI and fresh architectureMore change, more surface area, less of the old feel
Flutter appsCross-platform consistencyA less native Android experience
iOS clientsApple ecosystem supportNot a comparable Android-native path
Circumvention forksAccess and regional routingNarrower product identity

That is why the fork persists. It does one hard thing well: it makes a hostile website feel like a dependable local library, and it does it with a stack that still makes sense to Android users who value speed over novelty.