PTGBastion

Download

BASTION for Android

Download APK · 1.2.0151 MB · Android 9.0+ · direct install (sideload)

BASTION 1.2.0 — tool modules and a new reader

Released: 2026‑11‑22 · Version: 1.2.0 (build 10200) · Requires: Android 9 (API 28) or newer

BASTION 1.2 lets separate apps — tool modules — work with BASTION: they link their own data to your waypoints, documents and tools, and share text through BASTION, under permissions you set. It also brings a new reader for EPUB, MOBI and text books, search inside every book, and BASTION's own PDF engine on every tablet.

Download

  • File: BASTION-1.2.0.apk (~151 MB)
  • SHA‑256: 81ae35875d8bf81ab97a2cd3b1bfdc47db7d9f036d915a666ff7441f2a94a7b7
  • Signed with the PTG release key. Verify the checksum before installing:
    • Windows: certutil -hashfile BASTION-1.2.0.apk SHA256
    • macOS/Linux: shasum -a 256 BASTION-1.2.0.apk
Installing outside the Play Store: enable "Install unknown apps" for your browser or file manager when prompted, then open the APK. It installs in place over BASTION 1.1 — your library, maps, and settings are kept.

EXCHECK 1.0.0, the first tool module, is released at the same time as a separate download (BASTION-excheck-1.0.0.apk, with its own notes). It needs BASTION 1.2.0 or newer. BASTION works without it.

What's new in 1.2

Tool modules

  • Modules. A module is a separate app with its own data that is built to work with BASTION.

No module ships with BASTION. The first one, EXCHECK, is released separately.

  • Modules in Tools. Add a module to Tools like any app — and a module you let in is added to

Tools by itself, also when you opened it from its own icon. Its card says MODULE (signed by PTG), OUTSIDE MODULE (signed by someone else) or REFUSED (not compatible with BASTION's module interface; BASTION does not talk to it, and tells you why when you tap it).

  • A refused module can still be opened as a separate app. Opened this way it gets nothing

from BASTION — only what you hand it yourself through Android, like any app.

  • You decide what a module may do. The first time a module is opened, BASTION lists what it

asks for — your role, callsign and team; linking its records to items you pick; opening the share sheet — each with its own switch. Module details (hold the module's card) shows the same switches at any time, and a change takes effect at once.

  • Modules not signed by PTG are allowed, behind a warning that names the module and shows

the fingerprint of its signing key. BASTION remembers the key you accepted and refuses the module if it later comes back signed with another one. When such a module can use the network on its own, BASTION says so: the Network Gate cannot shut that module off.

  • What you decide belongs to the module's key. BASTION remembers the signing key of every

module when you answer its access screen — a PTG module's too. A module that comes back signed with a different key is refused, whichever of the two keys is PTG's: a module you let in as a PTG module and that returns signed by someone else holds none of its permissions, and neither does an outside module that returns signed by PTG.

  • A changed signing key is yours to judge. Makers change keys, and so does an app that poses

as a module. Module details shows the key you let it in with beside the key the module has now and tells you to find out why first. Remove the remembered key, behind a confirmation, makes BASTION forget the old key and everything the module was allowed; the module then starts again as one BASTION has never seen — the warning with its new key, unless PTG signed it, and the access screen. The removal is written to the module's record.

  • A module asks, BASTION does. To link a record, the module asks and BASTION shows its own

list; the module is told the one item you pick — its name, nothing else. It never sees your lists, coordinates or document contents. A linked waypoint opens on the map, a document in the reader, a tool as an app.

  • Deleting what a tool links to, BASTION asks. Deleting a waypoint or a document that a tool

links to — one, or several at once in the Library — BASTION says which tools link it and how many records, and offers "Delete, keep the links" (the default), "Delete and remove the links" or Cancel. Kept links show the item as not on this device and work again if it comes back. Removing asks each tool to take the links off only what you can edit there; links in data you received from others stay. A recall from your unit is never asked about and removes the links, as before. An app uninstalled in Android keeps its links.

  • One screen for a missing link. A tool that shows a link to something not on this device

opens BASTION's own screen: "… isn't on this device. It may arrive with the next sync." with Keep and, for records you can edit, Remove link — or Open, when it is here after all.

  • For tool makers: module contract level 2. The link lifecycle — the reason on

link_removed (recalled or removed by the user), missingItemScreen and forgetLinks (a tool that lost its data drops all its links at once). The sample module shows each.

  • Sharing goes through BASTION. A module's text leaves the device only through Android's

share sheet, opened by BASTION. BASTION records the module, the module's label for the share, the app you chose and the time — never the text. The record is in Module details.

  • A module's screen inside BASTION. One of PTG's own modules can show its main screen

between BASTION's top bar and bottom bar instead of opening as a separate app — on Android 14 or newer, when you allow *Show its screen inside BASTION*. The top bar then shows the module's name with a small MODULE marker, so you can tell what is the module's and what is BASTION's. Back first closes what the module has open, then returns to BASTION. When BASTION locks, the module's screen goes with it. Its limits: - only modules signed by PTG; a module signed by someone else always opens as its own app; - not on Android 13 or older — there the module opens as its own app; - a module's screens that need paste, a pop-up or long typing open in the module's own app; - the Emergency button is not shown over a module's screen; - a module that gives BASTION no screen, or stops while it is shown, is offered as its own app.

  • App Lock covers modules. Opened from Tools, a module stays open while it is on screen and

locks after your Auto-Lock time once you leave it. Opened from its own icon, it shows only "Unlock BASTION" until you enter your PIN. Time spent in a PTG module also keeps BASTION itself unlocked; time in any other module does not.

  • Forget this module (in Module details) makes BASTION treat the module as one it has never

seen. It does not uninstall the module or delete its links and its record.

  • The Field SOP has a new part, *Tool modules*, under Tools.

Sharing a tool's data

  • A module's data travels with BASTION's own sharing. A module that allows it — EXCHECK's

code table, for one — is a Tool data item: a team lead publishes the team's in *Publish to my team*, gold the unit's in *Publish to gold*, and any device can hand it to another over Peer-to-Peer. Only your own data is published to the server; over Peer-to-Peer the tool also lets you pass on a copy you received. The module decides whether its data may be shared and by which roles; BASTION carries the module's file as it is and never reads inside it.

  • What arrives by itself: a member gets gold's and the team's release, a team lead gets gold's

(and the team's when another lead published it), gold gets gold's. Gold takes a team's release by loading it in *Review unit's shares*, with its own button "Load into <tool> for review" beside "Publish to gold"; it goes to gold's own copy of the tool, never into gold, and sends no settings. A release gold already took stays listed, marked "taken" with the time, and can be picked again to go back to it. A personal server's tool data arrives as it is. BASTION never hands a device back its own data, and never hands over the same release twice by itself.

  • Linked content goes with it. When a tool's data links to your waypoints, documents or tools,

the picker lists them under the tool's row — "Links to 3 waypoints, 1 document, 1 tool" — ticked over Peer-to-Peer, and on a server publish ticked only where the place does not hold them yet ("already there"). Ticked items are shared like any waypoint or document, so the tool's links work on the other device. Tools (apps) are listed but not sent; an item this device no longer holds is shown as not on this device. The picker's button counts both — "Publish 1 + 4 linked", or "Publish 2 linked" when only linked items are ticked.

  • The tool keeps one copy per source and lets you switch between them; your own data is never

overwritten. A release that would overwrite changes you made is held in the tool for you to review.

  • Withdrawing: unticking tool data in *Currently published* withdraws it; every device that

received it is told, and the tool keeps that copy marked withdrawn with the date.

  • A "Tool updates" notification says what changed — "EXCHECK gold table updated" — and below it

where from — "From gold" — never the content; on the lock screen only "BASTION: a tool's data was updated". Tapping it opens the tool through BASTION and its lock.

  • Two switches for notices. Settings → Notifications → BASTION notices turns BASTION's

own sync-finished notices (auto-sync finished, "Sync complete") on and off; Tool notices does the same for the notices tools post through BASTION, such as an EXCHECK table update. Turning one on asks Android when Android has not allowed them, or opens BASTION's page in Android's settings when Android blocks them, and the line under the switch says so. "Sync in progress" (which Android requires while a background sync runs) and "Network gate closed" always show. A device that had the one earlier switch turned off has both turned off.

  • Allowing the notices. On Android 13 and newer BASTION asks for permission to show them — with

a short explanation first — when a tool's data arrives in a sync you started or when you let in a tool that can share its data. Until now the notices were dropped silently on a device where notifications had never been allowed. "Not now" asks again on a later day; "Don't ask me again" stops it; after a refusal BASTION says where to turn them back on.

  • Published tool data says so. Tool data that is already at the destination shows as

"published, no changes", unticked — and under it only the linked items the destination does not have yet, ticked, so you can send just those (or a line saying they are all there already). It is also listed under "Currently published", and shows "changed since it was published" once it changes.

  • When the tool cannot take it yet — not installed, not let in, not answering — BASTION keeps

the file in its own storage and hands it over after the next sync or as soon as you let the tool in. Sync history lists every hand-over, hold, wait and withdrawal.

  • A tool's data is limited to 32 MB. A BASTION server carries it once the server supports it; on

your own SFTP server it lives in tools/<module>/ beside library/ and maps/.

Category names

  • One category however its folders are spelled. Flora_and_Fauna, flora and fauna and

FLORA AND_FAUNA (and _flora_and_fauna_) are now one category — on folder import, server sync, Wi-Fi Direct and settings from your unit alike. Until now only capitals were ignored, so _ and spaces made two.

  • Tidy names. A new category made from a folder is named in Title Case — First Aid,

Flora and Fauna, NATO Docs, iPhone Guides — by the same rule the server uses, so the device and the website show the same name. A category made from a folder before this update (first_aid, its books in a first_aid folder) is tidied once too; one you typed keeps its name. A book under first_aid/First Aid/ has one category, First Aid. Folders are not renamed or moved, on the device or the server.

  • A name needs a letter or a number. --- or ___ is refused when typed; a book in such a

folder is Uncategorized, and the folder keeps its name.

  • Books stay where they are on the server. A book imported without a folder goes up under its

category's name once; renaming or changing its category on the device later does not upload a second copy or move it.

  • What you type stays as you typed it, and a later sync does not rename it. Typing a name

that already exists in another spelling finds the existing category instead of making a second.

  • Duplicates merged once. After updating, categories made twice under different spellings

are merged (Library and Tools). Every book and tool keeps its place; one that was in both ends up in one, its primary winning; the merged category keeps its color and takes the tidy name. No book or tool is removed.

Big files and server space

  • When a unit's hosting ends, BASTION says so. For a unit hosted by PTG, gold and team-lead

devices show, from 60 days before the end date, a line on the Sync screen with the date and the server's own sentence; during the 30 days of grace after it, until when sync still works. Once the unit is read-only a sync stops at its first step on every device, members included, saying why in the server's words — it does not try again, and it deletes nothing: the pickers keep showing what they last read. Renewing puts the unit straight back.

  • Big files go up in pieces. On a BASTION server a file bigger than 1 MB —

a map pack, a large PDF — is sent in pieces (up to 8 MB on the hosted server), so it gets through the server's front door (which takes about 100 MB at a time). A dropped connection is retried by itself for about two minutes. Cut off for longer — the gate closed, Go Dark, the auto-sync window ended, the app closed — the next sync carries on where the server stopped, for up to 48 hours. A file that changed on the device meanwhile starts over.

  • Pieces that fit the link. On a slow phone hotspot an 8 MB piece never got through: its

answer took longer than BASTION waited, so it was sent again from the start, over and over. Pieces now start at 1 MB, grow while they arrive quickly and shrink on a slow or unsteady link, and BASTION waits for a piece's answer as long as a slow link needs (up to 10 minutes). A piece that is cut or slow is tried again from where the server is; one never runs beside another.

  • The right words for a slow link. A slow answer now says "The server is taking too long to

answer; the upload continues at the next sync." (for a download "…the download continues at the next sync.", for a list or the like "…try again at the next sync.") and a cut link "The connection dropped; …" in the same way; "Could not reach the server" is kept for no connection at all, and a slow answer is never reported as that again.

  • Sync diagnostics (Settings → Diagnostics). BASTION keeps a small log on the device of each

sync's steps — connect, each file and piece with its size and time, the server's answers, retries, how the sync ended — never file contents, passwords or tokens. Share sync diagnostics sends it through Android's share sheet; Clear deletes it. About 1 MB at most.

  • Space on the server. The Sync screen shows the default server's space from the last sync:

members what is free, gold, leads and personal accounts also what is used. The share and publish pickers count only what would travel, start an item that cannot fit unticked and highlighted (the list's key says "Too big for the space left (1.2 GB free)"; a group's box never ticks it), and when the selection is more than the free space say so and offer Fit to space, which unticks the largest of BASTION's own suggestions — never what you ticked yourself. Auto-sync leaves out what doesn't fit and logs it.

  • Clearer refusals. "Not enough space on the server" for a full server; "Too large for the

server to take in one piece" when an older server's front door refuses a big file.

Pickers show only what they know

  • A place that can't be read is never shown as empty. Over a phone hotspot, gold's picker once

listed 25 items for 29: two reads failed on the way and counted as "nothing there". BASTION now tries again for a few seconds; if a place still can't be read, the picker shows what it held at this device's last reading, greyed with its time ("as of 16:44"), and a key at the top of the list says so. Where it was never read, the key says Not checked yet and your items of that kind are greyed and can't be picked. Check again reads it now.

  • Unsharing a greyed item reads that place again first, then says what happened: removed,

already gone, or "couldn't reach the server's list … — nothing changed". Nothing is removed on an old reading.

  • Gold's cleanup and a recall skip a folder they can't read and say so ("couldn't check

alpha/library — any copies there were left") instead of quietly missing its copies.

  • The time on a published item is when it landed. It was the time the publish began — on a

slow link, minutes too early. A publish that couldn't read the list at its start no longer takes the original sharer's name off items already there.

  • Every read of a server folder's list is now in Sync diagnostics, with why one failed.
  • Every picker opens with nothing ticked — also *Share to my team* and *Review my team's

shares*, which used to open with everything ticked. Select all ticks everything that can be picked and fits the server (an item too big, or greyed, is ticked by hand); Clear all starts again. What is already there still opens ticked, and Keep all undoes an untick. Fit to space may take back what Select all ticked, never a box you ticked yourself.

Server folders take only what belongs there

  • A sync downloads only what each server folder is for: map packs, GeoTIFFs and overlays in

maps/, installers in apps/, settings bundles in config/, BASTION's own layers and waypoints in annotations/ and waypoints/. Other files and hidden files (a Mac's .DS_Store, a sync tool's markers) stay on the server; Sync history says once, under NOTES, "Skipped 3 files that don't belong in maps/". This is not an error: the sync still reads as successful.

  • A layer or waypoint file BASTION did not write is refused once, also when it was only

renamed: BASTION names each one by its id. It is not kept on the device and not downloaded again unless it changes on the server.

  • The server layout documents now list every file the app and the server keep beside content.

Reader

  • PDFs open with BASTION's own PDF engine (PDFium, the open-source engine Chrome uses, built

in — no scripts in a PDF are ever run): on every Android version, the same on every tablet. Android's engine is kept for a device PDFium is not built for.

  • A PDF's own Contents. A PDF that carries its contents (the clickable list a computer's PDF

viewer shows) gets the Contents button: nested lines, the part being read marked, a line to its page with Back to page n; a web line asks first.

  • A PDF with only a printed contents page gets Contents too, read from that page ("Title …… 23"

or a column of page numbers): nested by its indents, each line to its page — printed page numbers matched to the PDF's own by finding the titles in the pages after — and the printed lines become links. Headed "Generated contents — best effort" (with the page it was made from); a PDF's own contents carry no note.

  • Scanned books' contents, too. The contents of a scanned book are read with the scan's

mistakes allowed for: two columns side by side read as two, stray dots ignored, a page number on its own line or a title over two lines put back together, a digit read as a letter ("i5o", "T83") read as the number that fits between its neighbours, and a number far out of step left out. A list of plates before the contents no longer takes its place — the list headed "Contents" is used. The Book of the Farm (1889) now has 116 lines of Contents; PDFs whose printed contents already worked read exactly as before.

  • Links in a PDF work: a tap on a link in the page — a contents line, a cross-reference —

turns there with Back to page n; a web link asks first. At any zoom.

  • Read aloud in PDFs, with the same read-aloud as EPUB books: from the page shown, sentence by

sentence across the printed lines, the sentence marked on the page, the pages turned with the voice; jumps take the voice along; offline voices only; the voice under the PDF's Reading settings.

  • Scanned books read in the right order. Where a scan stored its text straight across two

columns, read-aloud reads it as printed — down the left column, then the right, part by part around pictures that span the page. Running headings ("STORING ROOTS. 167"), figure captions, figure keys and the letters on drawings are skipped — two switches for each book in the PDF's Reading settings. Words a scan broke at a line's end are said whole. A page with little readable text says so on the read-aloud bar while it is read. Books made on a computer read as before.

  • One way with highlights, in every book. Tap a highlight on the page — words, a picture,

an area of a PDF page — to see what it is and where it is, give it a name, or remove it. The list says where each one is: a PDF's page and chapter; a book's chapter, its printed page (when the book has page numbers) and how far in. In EPUB and MOBI books, press and hold a picture to highlight it.

  • Select words in a PDF — word by word, in any PDF with text, scanned books' text too: press and hold a word, drag to take in

more, move the ends by their handles (tapered to the line, the same size at any zoom, and an end dragged past the other swaps with it, as in a book). Highlight marks the words in gold on their lines (listed with their page and words), Copy, Read from here starts read-aloud at that sentence, Search looks for them in the book. Hold where there are no words and BASTION says so, with Highlight an area for the box highlighter, which stays for pictures and anything else.

  • Buttons that look like buttons. Save in the highlight dialogs and Go in the bookmark and

highlight lists were in the dark gold that read as disabled; they are in the bright gold now, and so are the map viewer's Layers button and its GPS button while GPS is off.

  • Go to a page in a PDF. Tap the page number in the page bar ("45 / 112") and type the page;

one outside the book is refused. After going to a page, a bookmark, a highlight or a search match, Back to page n returns to the page you left, for half a minute (paging by the arrows or a swipe offers nothing).

  • Search in a PDF. The magnifier in the reader's top bar opens a find bar: type a word and

BASTION finds it through the book — "3 of 12", previous and next (round from the last match to the first), and each match turns to its page. Matches are boxed on the page, the current one in orange, and stay in place through zoom, turning the device, night mode and the highlighter. The search starts at the page you are reading, shows its progress in a long book ("Searching page 40 of 300") and shows matches as it finds them. Capitals do not matter. A scanned book — pictures of pages, no text — says "This book has no searchable text"; BASTION decides that from up to 20 pages spread through the whole book (the first, the last and the one you are on among them), so a book that opens with picture plates is still searched. Matches are not saved and are not highlights.

  • Search in EPUB, MOBI and text books too. The same magnifier and find bar — "3 of 12",

previous and next, the matches painted in the text (the current one in orange) — on every Android version: BASTION holds these books' text itself, so no account, network or Android module is needed. A book that is only pictures says "This book has no searchable text". Find, the arrows and a book opened from a Library match all bring the match's own line into view, a third of the way down the screen, even in a very long paragraph.

  • Search by a pattern. A .* button beside the find bar's box — in every reader, PDFs,

EPUB, MOBI and text books — searches by a pattern: ^Houses.*built$ finds a line that starts with "Houses" and ends with "built" (a printed line in a PDF, a paragraph in a book). Capitals do not matter; the switch stays as you left it. A mistake says "Not a valid pattern"; at most 10,000 matches are kept. The Field SOP lists the signs. Patterns are run by RE2/J (Google, BSD licence), whose time grows only with the text, so no pattern can keep the tablet busy.

  • The find bar's arrows put the keyboard away, as a tap on the book does, so the page is in

full view; tap the box to type again.

  • Known before you type. BASTION checks whether a PDF has text when it opens: a scanned

book's magnifier is greyed, and tapping it says "This book has no searchable text".

  • A PDF page fits the screen. With the bars showing, a tall page used to fill the width and be

cut at the top and bottom — and the search boxes (and highlighted areas) slid off the words. The page now fits whole; full screen still makes it larger, and the boxes sit on the text either way.

  • On the device only, on every tablet. BASTION reads the PDF's own text with its PDF engine:

no account, no cloud, no network — on Android 10 to 16 alike. A device the engine is not built for uses Android's own PDF search where it has one (Android 15 or newer, or 12–14 with an up-to-date PDF system module).

  • Library search: titles, contents or both. Two chips under the Library's search box choose

what it looks in (remembered). Each result says why it matched — "In title", or a short extract of the text with the matched word in bold — and a book found by its contents opens at the first match with in-book search filled in. A book found by its title opens where you left it. The magnifier on a book's row now means its words can be searched, in the Library and inside the book.

  • PDFs in the Library search, on every tablet (BASTION's PDF engine reads the text): a PDF you add is read into the Library search in the

background after it is imported — from a file, a folder, Open with or a sync. PDFs already in the Library are read when you choose Make PDFs searchable… in the import menu: it says how many first, shows its progress, can be cancelled, carries on next time, and ends with a summary. Scanned PDFs are found and left alone; a PDF with a companion file is skipped, and a companion always wins. Remove extracted PDF text… takes that text out again. About 1 MB per 300-page book, in BASTION's encrypted database; a few seconds each.

EPUB and MOBI books as their authors laid them out (new reader)

  • A new reader for EPUB and MOBI books. It draws a book the way it is made — its own tables,

boxed notes, fonts, line breaks and pictures at their sizes — like reading it on a computer.

  • The old reader is kept only as a fallback (there is no switch): a Kindle

book in the newer KF8 (AZW3) layout only shows as its text, as before, and a book the new reader cannot lay out opens in the old one by itself, with a line at the top saying so. A bookmark or highlight made before 1.2 opens the book in the old reader at that place (saying so); opening the book again from the Library returns to the new reader.

  • Every EPUB the reader can show goes into the Library. A fixed-layout book (a comic or a

picture book, one page at a time, fitted to the screen), a book whose fonts are only obfuscated, and a book whose text BASTION can't pull out for search were turned away at import by the old reader's rules; they are taken now. Only a copy-protected EPUB, or a file that is no EPUB, is refused.

  • The printed page shown is the one you are on. A book that hides its page marks (as most do)

showed the chapter's last page from its start. Project Gutenberg's EPUB 3 books, whose page numbers sit in an older part of the file, show them too ("12", not "[Pg 12]").

  • A copy-protected (DRM) EPUB says so ("This EPUB is DRM-protected — use a DRM-free copy")

rather than opening. A DRM-free book whose fonts are only obfuscated — which the old reader refused as DRM — now opens.

  • Nothing runs off the side. The text keeps its size; a long line of code or terminal output

wraps (a wrapped line is set in a little), a long word or address breaks, a wide table wraps in its cells, and only a picture wider than the screen is drawn smaller to fit.

  • Chapters change only when you ask. A sideways swipe does nothing. The chapter bar (with the

reader's bar) names the chapter and goes to the one before or after; a chapter you go back to opens where you left it. At a chapter's end a Next button names the next chapter, and scrolled back up to a chapter's top a Previous button names the one before.

  • Contents. A button in the top bar lists the book's contents, nested as the book nests them;

a line goes there. A MOBI book's contents are its own headings.

  • Search in the same find bar as PDFs: from the place you are reading through the whole book,

the count growing as it goes ("Searching…"); matches marked in blue, the current one in orange; capitals and accents do not matter, and a printed ligature ("fi") counts as its letters.

  • Where you are. Under the chapter: the printed page for a book that carries its paper

edition's page numbers, else the location and the percentage.

  • A scrollbar for the whole book. It shows while you scroll; drag it anywhere in the book — a

label names the chapter and the percentage — and the book goes there when you let go.

  • Code in a panel, as in a chat: a light panel with rounded corners, also for a MOBI book's

terminal output — unless the book styles its own code.

  • Footnotes over the page, with Go to note (a MOBI book's raised note numbers too), and a

Back to where you were button after any jump — a link in the book, the Contents, a bookmark, a highlight, a search, the scrollbar or a long fling by finger (back to where the scrolling started); pictures full screen, to pinch-zoom.

  • Highlights: select text for Highlight, Copy or Search in book (BASTION's own menu);

highlights are drawn in gold, listed with the bookmarks, and removed by tapping them.

  • A book of hundreds of chapters opens at once (a MOBI that starts a new part at every page

break froze an early test build).

  • Turning the tablet keeps the page where it was — only its width changes (it showed "Webpage

not available" in an early test build). Coming back to BASTION after Android closed it in the background opens the book at its place (an early test build crashed there).

  • Reading settings: margins, a dyslexia-friendly font (everywhere in the text, MOBI books

included), and Plain layout for a badly made book (with line spacing), and Smart text selection — off unless turned on, so a long press selects just the word pressed. Bookmarks name the chapter and the place, and return there.

  • Read aloud in the tablet's own voice, from the top of the page you are on: the sentence being

read marked in green and always whole on the page (it is moved up before it reaches the bar under the page), the page following it into the next chapter; sentence before / after, pause, speed 0.75×–2× (in quarter steps); Read aloud from here on a pressed word. A jump (chapter, Contents, bookmark, search, scrollbar, link) takes the voice along; scrolled away by hand, the page stays put and a tap on the bar goes back to the sentence being read. Offline voices only — never online for a voice; the voice is picked in the reading settings, which list only voices that work offline, and a tablet without one is told so. Power: the screen stays on only while it speaks; reading pauses when the screen turns off or BASTION is left, when headphones are pulled out and when a call takes the sound. BASTION's lock stops it.

  • Built from a copy kept in BASTION (the open-source Readium toolkit, BSD licence), trimmed to

what the reader uses: it adds about 6 MB to the app and depends on no outside service.

  • Never online. The reader does not use the network: a book's scripts are not run, and

anything a page asks for from off the device is refused. A web link in a book asks first, names the address, says whether the tablet is dark, and then opens it in the browser, copies it or does nothing.

Text files in the new reader

  • A text file opens as a book: Contents, search with patterns, read-aloud,

highlights, bookmarks and the reading settings, as in an EPUB. It is prepared the first time it is opened and kept on the tablet.

  • Its letters right: UTF-8, UTF-16, and the older Windows encoding many text files are in

(curly quotes and accents no longer show as boxes).

  • Paragraphs as written: lines cut at one width are joined back into paragraphs; a file with a

paragraph on each line keeps them. Tables, code and text laid out with spaces keep their lines.

  • Chapters found: "Chapter 4", "PART II", "Preface", numbers counting up, or a manual's

section titles in capitals; a chapter's name on the next line joins it ("Chapter 2 — Urban Eden"); a file's own contents page stays a page; numbered list items keep their own lines. The Contents say "Generated contents — best effort". A long file with no chapters is listed in parts.

  • Bookmarks and highlights made in the old reader's TXT view open the file in the old reader, at

their place.

MOBI books

  • MOBI books show their formatting and pictures. Until now a MOBI book was shown as plain

extracted text. Now it reads like an EPUB: headings, bold, italic and underlined text, code in a fixed-width font (preformatted code keeps its lines and indents), line breaks, lists, quotes, alignment, page breaks (drawn as a short line) and the book's pictures (JPEG, PNG, GIF, BMP). Links in the table of contents jump to their place in the book. Highlights, bookmarks, the reading position, font size and night mode work as in an EPUB. This covers classic MOBI files, and the classic part of files that carry both formats.

  • Books compressed with HUFF/CDIC — the compression some MOBI publishers use — now open too;

before, they were refused.

  • Books you read before open at the same place. Their bookmarks and highlights move to the

new layout; a place that can't be found again starts at the beginning, and a highlight whose text can't be found stays in the bookmarks list without being drawn.

  • Copy-protected books are still refused, now in plain words: "This book is copy-protected

(DRM). BASTION can't open protected books; use a DRM-free copy." — at import and in the reader.

  • Kindle KF8 (AZW3-layout) books without a classic part are still shown as extracted text,

with a note saying so.

  • Library search finds what the reader shows. The text a MOBI book gives to search is now

the reader's own text, with accented letters right and no stray characters at record ends. Books already in the library are read again once, in the background, after the update; a copy-protected or unreadable book is left as it was. A Kindle KF8 book that has a saved place, bookmark or highlight keeps the text it is shown with, so those stay where they were.

Smaller fixes

  • Nothing typed is lost to one Back. A form or editor with a Save now asks Discard changes?

— Keep editing, Discard or Save — before it closes with something unsaved, by Back, a swipe, a tap beside a sheet or its Cancel; with nothing changed it closes at once, as before. That is the server, profile, blood chit, Enterprise callsign, waypoint, pin and drawing editors and the assistance report (whose sixteen fields used to go with one Back). A box asking for a name, a reason or a code is no longer closed by a tap beside it. A profile, the blood chit and the assistance report keep what is typed when the tablet is turned.

  • Searches behave the same everywhere. Back leaves the screen whether a search is typed or not

(a module's search used to take one Back of its own); the new ✕ at the end of every search field clears it. A search is gone the next time you come back to the Library, Maps, Tools or a module, and kept when you open something from it and return. A category filter no longer keeps filtering after its field is hidden.

  • Text files from Windows show their paragraphs. A text book saved with Windows line endings

was read as one long block, cut every 4,000 characters, sometimes inside a word, so a word cut in two could not be found. Its paragraphs now show as written, and a very long paragraph is cut at the end of a line. In such a book a saved place or highlight from before may now sit a little off.

  • The lock screen's buttons. Unlock is now a gold button, like the app's other buttons,

with Use biometric under it; the Emergency button moved to the bottom of the screen, well apart from Unlock, so one is not tapped for the other. The same on the screens that set a PIN.

  • Settings are applied once. After Apply — in the "New settings" question or on the NEW

SETTINGS card — every Apply for those settings reads "Applying update…" and is disabled until they are applied; tapping again no longer applies them twice.

  • Picker sheets stay put. Scrolling a long list in a share, publish or review sheet (and the

unit roster) no longer collapses the sheet. It closes by Cancel, Back, or its handle and title.

About and licenses

  • "What's changed" is shorter. Settings → About → Version opens on the newest version in

full; the earlier ones are folded under Earlier versions, and a tap on a version's line opens its changes.

  • Every open-source license in full, in the app. Settings → About → Licenses lists every

component BASTION is built from — now with the new reader, the PDF engine and the libraries inside it, the pattern search and the reader's fonts — and a tap on one shows its license text in full (tap again to close it). Before, only the names and license types were listed.

Security

  • BASTION's screens are kept out of the recent-apps picture and out of screenshots. Until

now the recent-apps list could still show the last screen that was open — a document page, the map, a list — after App Lock had locked BASTION. Now every BASTION screen is blank there, and a screenshot or a screen recording of BASTION shows nothing: the PIN screen, dialogs and menus, the QR scanner, BASTION's screens for a module and a module's screen inside BASTION included. This holds with or without App Lock. (Android's own screens that BASTION opens — the share sheet, a file picker — are Android's and are not covered.)

  • Allow Screenshots (Settings → Security), off by default. Switch it on to take a screenshot

or a recording of BASTION — a map, a page. On Android 13 and newer BASTION still stays out of the recent-apps picture while it is on; on Android 9 to 12 that is not possible, and BASTION's last screen shows in the recent-apps list again until you switch it off.

  • The PIN is checked without freezing the screen. Checking a PIN is slow on purpose. It now

runs in the background while the screen says "Checking…"; before, a slow device could show Android's "isn't responding" message right after a correct PIN. Setting and changing the PIN work the same way.

Under the hood

  • MOBI books are re-indexed once after updating (MobiReindex, flag mobi_reindex_v1_done, carried

by a backup like the category merge's).

  • The database gains two tables: the links between a module's records and your items, and the

record of what modules handed off. Updating keeps all data.

Tested before release

On the three test tablets (Samsung Galaxy Tab Active5 on Android 14 and 16, a Lenovo on Android 10), with the signed release build and the hosted server:

  • the new reader with real EPUB, MOBI and text books — fixed-layout, font-obfuscated and

Japanese (vertical) EPUBs, books with printed page numbers, HUFF/CDIC and dual MOBI/KF8 files; read aloud, by ear;

  • search in PDFs with real books, on Android 10 and 16; the category merge with a real library;
  • EXCHECK's screen inside BASTION on Android 14 and 16; App Lock bringing a module back, also

with Auto-Lock set to Immediately; screenshots and the recent-apps picture blocked;

  • sharing EXCHECK's table by role — team publish, member hand-over, gold's review load and its

notice, withdrawal — and the pickers' Select all and Clear all;

  • big files in pieces against the hosted server, over a phone hotspot (150 MB in 7 min 50 s)

and over home Wi-Fi (20 min 41 s).

On the emulators (Android 14 and 16): every unit test and the whole instrumented suite, failure paths included.

Still to check on a tablet after the release: the notice for a unit whose hosting is ending, against a hosted test unit (it is covered by tests against the server's contract), and the pickers' greyed rows (they need a server list that cannot be read; covered on the emulators).

Notes

  • Modules are not tied to an enterprise licence: any BASTION user can run them.
  • BASTION still connects only to a server you point it at, when you arm the Network Gate. A PTG

module has no network access of its own.

Back to home