Skip to content

Open a specific book from Home via app shortcuts and Kindle ASIN #13

Open

Description

@hissinger

Idea

Tapping a book on Home opens the reader app's library, not the book itself. For most apps we couldn't find a way to open a specific book (docs/READER_APPS.md). CrossPoint for Android (MIT, data/ExternalReadingRepository.kt) opens the latest Kindle and Libby book directly, in two ways we haven't tried:

  1. App shortcuts (Libby). As the default Home app, it reads Libby's shortcuts with LauncherApps.getShortcuts (dynamic + pinned + manifest). It treats a shortcut whose label isn't Library/Shelf as the current title, and opens it with LauncherApps.startShortcut.
  2. Kindle ASIN from the app folder. It lists Android/data/com.amazon.kindle/files/<ASIN> (10-character folder names), picks the folder with the newest modified time, and opens kindle://book/?action=open&asin=<ASIN>. The code comment says this only works where the ROM lets other apps read that folder (e.g. BOOX). On Android 11+ it's normally blocked, so it won't work on the Crema Pebble.

Pebble Desk doesn't read app shortcuts at all today (no LauncherApps use). We already knew the kindle://book link. The blocker was getting the ASIN (READER_APPS.md, Kindle section).

Several books in one app

CrossPoint only opens the single most recent book per app. For us, every book on the shelf should open on its own:

  • Shortcuts: this depends on what each app publishes.
    • One shortcut per recent book (label = title): match by title to our books, and each book opens directly.
    • One shortcut reused as "last book": only the most recent book opens directly. Others fall back to opening the app.
    • Saving the shortcut id doesn't help in the reused case. A launcher can't see a shortcut's intent (ShortcutInfo.getIntents() returns null for LauncherApps callers), only start it by id. If the app rewrites the same id for the next book, the old book is gone. Side note: CrossPoint's nav:title extras check reads those intents, so it probably never matches and only the label check works.
  • Kindle ASIN: there's one folder per downloaded book, so this works for several books. When the accessibility service sees a Kindle book open, attach the newest-modified ASIN at that moment to that book and save it. CrossPoint doesn't save it, so it only gets one book. This reads a known app data folder, not a storage-wide scan, so it fits the "don't scan storage for book files" rule.

To check (emulator)

  • Which installed reader apps publish shortcuts, and how many: open 2–3 books in turn, then adb shell dumpsys shortcut (Libby, Kyobo Library, Millie, Ridi, Aladin, Kindle, Kobo, Play Books…). Kyobo Library and Millie are the main apps we concluded couldn't open a book directly.
  • Does starting the shortcut land in the reader screen or only on the book's detail page?
  • Are shortcut labels exactly the book title (localized, trimmed)? Do static manifest shortcuts (Search, etc.) need filtering?
  • Kindle on a BOOX-like ROM (Android 11+ with readable Android/data): do ASIN folders exist, and does the newest modified time track the book just opened? Sent documents have no store ASIN. Check what their folders look like.

If it works

  • An app adapter (ReaderApp.open) could try the saved shortcut or ASIN first, then fall back to today's behavior.
  • Shortcuts need Pebble Desk to be the default Home app. It usually is, but the fallback must stay.

Activity

  1. added
    enhancement
    on Nov 5, 2026
  2. hissinger commented on Nov 5, 2026

    @hissinger
    OwnerAuthor

    Emulator findings (2026-11-05)

    Checked on CremaPebble_A11_Play (Android 11, Libby 9.5.0 and other reader apps) and CremaPebble_A11 (Android 11, root, Kindle 8.158). No code changes yet.

    Which apps publish shortcuts

    dumpsys shortcut after using the apps:

    • Libby: 3 dynamic shortcuts. 0 = 도서관/Library (shortcut=nav:library:root), 1 = 서가/Shelf (nav:shelf:root), 2 = label is the latest title (nav:title). The label changed to Pachinko as soon as I opened that sample.
    • Woojoo, Librera (free and Pro): tts and last (a file:// VIEW intent for the last book). We already open these by file.
    • EasyView: TTS start / app close only.
    • None: Kindle (even after opening 2 books), Kyobo Library, Millie (e-ink), Ridi, Aladin, YES24, Bookers. In the APKs, Kyobo Library only has requestPinShortcut and Millie e-ink has no shortcut code at all. So this approach can't open a specific book in Kyobo Library or Millie.

    Libby: only the most recent book

    • The nav:title shortcut has no book id. It's an intent extra shortcut=nav:title, and Activity_Main forwards it to the web client as "open the current title" (decompiled 9.5.0: intent.getStringExtra("shortcut") → nav:* message. widget/notification extras also map to nav:title).
    • It works as a plain explicit intent (Activity_Main is the exported launcher activity), so no LauncherApps or default-Home requirement:
      am start -f 0x10000000 -a android.intent.action.VIEW -n com.overdrive.mobile.android.libby/com.overdrive.mobile.android.nautilus.ui.Activity_Main --es shortcut nav:title
      • Libby running (reader closed, search screen in front): opens the Pachinko reader.
      • Libby force-stopped (cold start): opens the Pachinko reader.
      • Normal launch for comparison: returns to the previous screen (search).
      • When the title is no longer available (an expired loan), it just shows the Shelf.
    • With two Libby books on Home, only the one Libby opened last can use this. Using it for the other book would open the wrong one. If we add it: use nav:title only when the tapped book is Libby's last-opened book (our own book_open record, plus the shortcut label via LauncherApps when we're the default Home). Otherwise launch as today.
    • Not checked: whether Libby's app links (https://libbyapp.com/… → nav:go with the path) can open a specific title by id, and where we'd get that id.

    Kindle: ASIN link works, getting the ASIN is the problem

    • kindle://book?action=open&asin=<ASIN> opens that book's reader directly. Tested with two books in a row (B004UJAOLM Wuthering Heights → B0083ZRAJS The Wonderful Wizard of Oz). Both went through BookOpenActivity to StandAloneBookReaderActivity on the right book.
    • Android/data/com.amazon.kindle/files/ has one folder per downloaded book, named by ASIN (B001EYUUKQ, B004EHZXVQ, B004UJAOLM, B0083ZRAJS).
    • Folder mtime is not reliable (CrossPoint's "newest folder" approach would open the wrong book):
      • Opening B004UJAOLM bumped that folder's mtime.
      • Then opening B0083ZRAJS did not change B0083ZRAJS. B004UJAOLM (just closed) changed again.
      • Closing B0083ZRAJS wrote B0083ZRAJS.ticr inside the B004UJAOLM folder, bumping B004UJAOLM yet again.
      • Kindle writes on close, not on open, and not always into the book's own folder.
    • Title → ASIN without timestamps: each ASIN folder has two CR!….kfx files. The content one is encrypted (\xeaDRMION). The metadata one is a plain KFX container (CONT):
      • Header: CONT, u16 version (2), u32 header length, u32/u32 container-info offset/length. Container info is an Ion struct. $413/$414 give the index table offset/length.
      • Index entries are 24 bytes each: u32 id, u32 type, u64 offset, u64 length. Offsets are relative to the header length. Each entity is ENTY + u16 version + u32 header length + data.
      • Entity type $490 (book_metadata) has $491 categorised_metadata. The category kindle_title_metadata lists {$492 key, $307 value} pairs: ASIN, title (exact Kindle title), author (Brontë, Emily), is_sample, asset_id, …
      • Entity type $417 (raw media) in the same container is the cover JPEG at original size: 1020×1529, 1207×1811, 329×500, and 800×588 (David's Writing Journey is a front+back spread). That's much bigger than the 90×135 to 120×180 px we crop from the screen today. All 4 books had exactly one $417 in the metadata container ($164 external_resource gives its MIME/size).
      • StartActions.data.<ASIN>.asc isn't usable for titles: its title fields are recommendations, and some books only have an error message there.
    • Who can read that folder:
      • Android 9–10: readable with our existing storage permission (requestLegacyExternalStorage + READ_EXTERNAL_STORAGE). Known devices: BOOX Leaf, Poke3, RIDIPAPER 4. These devices also can't crop covers from the screen (no takeScreenshot before 11), so the original covers would help them most.
      • Android 11–12: blocked even with all-files access. The system folder picker (OPEN_DOCUMENT_TREE with EXTRA_INITIAL_URI = primary:Android/data/com.amazon.kindle/files) did show the ASIN folders with Use this folder enabled (emulator, security patch 2021-08). I didn't test whether the grant actually allows reading, or how it behaves on the real Pebble (patch 2021-06). The user would need to grant it once.
      • Android 13+: blocked, unless the ROM opens it (BOOX per CrossPoint, not verified).

    Decision for now

    Not implementing. Kyobo Library and Millie can't use this. Libby only covers its most recent book. Kindle ASIN/cover only works on Android 9–10, where we have no reports of Kindle users. If a Kindle user on Android 9–10 shows up, the KFX notes above are enough to build it: store the ASIN and replace the cover in the Kindle adapter's afterOpened, then open the stored ASIN in Kindle.open.

  3. hissinger commented on Nov 5, 2026

    @hissinger
    OwnerAuthor

    Follow-up: Kindle folder on BOOX (firmware check, 2026-11-05)

    CrossPoint's code (ExternalReadingRepository.kt) says reading Android/data/com.amazon.kindle/files works "where the ROM lets an app read Kindle's folder directly (e.g. Boox)". I checked this against two BOOX firmwares we already had (static analysis only, no real device):

    Palma Go6
    Firmware 4.0.2 (2025-06) 4.2 (2026-05)
    Android 11 (first_api_level=30) 11
    Storage FUSE (persist.fuse_sdcard=true) FUSE
    • Both devices launched on Android 11, so FUSE is mandatory. They can't use the old sdcardfs setup, where other apps' folders could be readable.
    • MediaProvider (flattened com.android.mediaprovider in /system/apex, so Play can't update it): libfuse_jni.so still has the stock owned-path check, ^/storage/[^/]+/(?:[0-9]+/)?Android/(?:data|obb|sandbox)/([^/]+)(/?.*)?. A lookup by any other app is denied with Invalid other package file access from …. The Java side isUidForPackageForFuse → isCallingIdentitySharedPackageName is stock, and there are no Onyx/BOOX changes in the decompiled MediaProvider.
    • StorageManagerService.getMountModeInternal (services.jar) is stock AOSP 11. There's no BOOX-specific mount mode that gives apps with all-files access a pass-through view.

    Conclusion: On BOOX Android 11 firmware, other apps' Android/data is blocked just like on stock Android. CrossPoint's Kindle card (and the KFX title/cover approach above) should only work on Android 9–10 BOOX devices (Leaf, Poke3, …). CrossPoint's "e.g. Boox" is probably about those older devices. Not verified on a real BOOX Android 11 device. Android 12+ BOOX firmware (Palma2 etc.) wasn't checked, but newer Android only tightens this.

    How CrossPoint does Kindle, for reference

    • It lists ^[A-Z0-9]{10}$ folders and takes the newest lastModified across each folder and its files, 2 levels deep. Only one book (the newest) is shown. Per the emulator test above, this can pick the wrong book: closing B0083ZRAJS wrote B0083ZRAJS.ticr into the B004UJAOLM folder.
    • It doesn't read the title or cover locally. It sends EBOK:<ASIN> to its own server (sync.crosspointreader.com/api/v1/connectors/kindle/lookup), which only works when signed in to CrossPoint Sync and online. Otherwise the title is Kindle book and there's no cover.
    • It opens the book with kindle://book/?action=open&asin=<ASIN>.

    Still parked: same decision as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions