Skip to content

Repository files navigation

English · 简体中文

Torto app icon

Torto for Android

A local-first mobile ebook reader powered by a native Dart reading pipeline.
No WebView, no platform PDF renderer, and direct sync through your own WebDAV storage.

Android Built with Flutter Dart reading core

About • Features • Installation • Privacy • Development • Project status

About

Torto for Android is the mobile companion to the Torto desktop reader. It brings the same format-neutral reading model to Flutter while keeping parsing, layout, pagination, and rendering in Dart instead of embedding a browser or delegating PDF pages to Android's native renderer.

The app imports books into a cover-first local library, restores reading progress, exposes a hierarchical table of contents, and supports tap or swipe page turns. Readers can choose a consistent Unified layout or preserve the typography authored by each book with Follow book.

Its core pipeline mirrors the desktop architecture:

formats → Reading IR → layout → renderer

The implementation is written independently in Dart. Shared concepts and the WebDAV wire protocol remain compatible with desktop Torto, while the mobile renderer is built on dart:ui, Flutter Canvas, and CustomPaint.

Features

✅ Implemented
Feature Description Status
Multi-format support Read DRM-free EPUB, MOBI, AZW, AZW3/KF8, FB2, FBZ, CBZ, CHM, and PDF files. ✅
Native Dart rendering Parse, lay out, paginate, and paint book content without a WebView. ✅
Pure-Dart PDF stack Parse PDF metadata and page objects in Dart, then render fixed-layout pages through Flutter Canvas without Android PdfRenderer. ✅
Semantic book layout Preserve headings, paragraphs, quotations, nested lists, tables, images, figures, captions, links, citations, and compact footnotes. ✅
Unified or authored typography Use a consistent reader-controlled layout or follow the book's font sizes, spacing, indentation, alignment, and colors. ✅
Cover-first local library Import supported files, extract metadata and covers, resume recently used books first, and remove books with a long press. ✅
Reading navigation Turn pages by tap or swipe, browse a hierarchical table of contents, follow the active chapter, and restore durable reading progress. ✅
Subsection Focus Mode Swipe between subsections, scroll long ones, activate complete body units, and keep headings normally displayed. ✅
AI layout and translation Choose from multiple AI providers, recognize formulas and citations, and optionally remember book terminology with expert translation. ✅ Optional
Reading assistant Discuss the active passage or search within the book, with streamed answers and optional web search with clickable sources. ✅ Optional
PDF discovery Inspect pages on demand, retain drafts, and verify AI-discovered contents destinations before applying metadata. ✅ Optional
Direct WebDAV sync Sync books and reading state directly with Jianguoyun, InfiniCLOUD, Koofr, HiDrive, Yandex Disk, or a custom WebDAV server. ✅ Optional

Installation

Configure AI providers under Settings → AI providers and choose the chat/PDF model under Settings → Reading assistant. Web search is off initially. Focus Mode and the 0.7.1 implementation record describe the behavior and verification limits.

See the desktop prompt and search synchronization record for request compatibility, search routing, assistant tools, PDF discovery, tests, and remaining OCR/update limitations.

The preview and cached-book performance record covers the updated overlays, reference markers, and before/after EPUB parsing measurements on the phone.

Signed APKs are published on GitHub Releases. Most Android phones should use the arm64-v8a build; the release also includes armeabi-v7a and x86_64 variants.

For development builds, clone the repository and build with the current Flutter stable toolchain:

flutter pub get
flutter build apk --debug

The APK is written to build/app/outputs/flutter-apk/app-debug.apk. The current Android build requires API 24 (Android 7.0) or later.

Privacy

  • Imported books, covers, metadata, and reading progress are stored in the app's local data directory.
  • Cloud sync is disabled until you configure and enable it.
  • WebDAV traffic goes directly from the device to the provider you choose; there is no Torto-operated relay.
  • The WebDAV app password is stored with Android-backed secure storage rather than ordinary preferences.
  • Optional AI requests send the relevant book text or PDF page previews to your selected provider. Enabled third-party search sends search queries to the configured service; AI and search API keys use secure storage.
  • Torto does not contain advertising or analytics code.

Development

The format and rendering core lives under lib/core/ and does not depend on Flutter widgets. layout and render use only dart:ui, keeping the pipeline suitable for further isolate work. The user interface under lib/app/ is a thin Flutter shell around the library, reader, progress, and sync services.

lib/core/
  formats/   EPUB, FB2/FBZ, CBZ, MOBI/AZW/AZW3, CHM, and PDF adapters
  html_ir/   XHTML to Reading IR conversion and the supported CSS subset
  ir/        format-neutral blocks, inlines, styles, and source locators
  layout/    paragraph shaping and single-column pagination
  render/    page display lists and CustomPaint rendering
lib/app/     library, reader, preferences, progress, and WebDAV sync UI

Quality checks:

flutter analyze
flutter test
flutter test test/perf/epub_open_benchmark_test.dart

Integration and performance tests can use DRM-free fixtures from a sibling ../torto/test-data/ checkout. Missing local fixtures are skipped rather than copied into this repository.

See the desktop project's native rendering architecture decision and WebDAV sync protocol for the shared design contracts.

Project status

Torto for Android is Android-first and under active development. DRM-protected books are not supported. The native renderer intentionally implements an ebook-focused HTML/CSS subset rather than browser-level compatibility, so complex fixed-layout publications, vertical writing, Ruby annotations, embedded scripts, and interactive book content may not render completely yet.

Please report reproducible problems in Issues. Include the book format, screenshots, and reproduction steps, but do not upload complete copyrighted books.

About

Torto mobile reader (Android first) - pure-Dart port of the torto rendering pipeline

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages