Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.mobile.android > #154369
| From | Nuno Silva <nunojsilva@invalid.invalid> |
|---|---|
| Newsgroups | comp.mobile.android |
| Subject | Re: How to copy & read a huge zipped book with thousands of html & jpeg files |
| Date | 2026-07-08 10:37 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <112l5p0$3dfoc$7@dont-email.me> (permalink) |
| References | <112c25r$2gt7$1@nnrp.usenet.blueworldhosting.com> <112cbas$1p57$1@nnrp.usenet.blueworldhosting.com> <112cd5q$9e5$1@nnrp.usenet.blueworldhosting.com> <112cgs7$86t$1@nnrp.usenet.blueworldhosting.com> <112ckmr$2ta8$1@nnrp.usenet.blueworldhosting.com> |
On 2026-07-05, Maria Sophia wrote: > Maria Sophia wrote: >> I finally forced Android 16 to behave like a real operating system again. >> I carved out a sane workflow inside an OS that keeps trying to turn into >> iOS, and I did it without surrendering my /0000 Unix /usr/local philosophy. > > SUMMARY (Linux users added because it was Linux to the rescue this time!) > > Windows and Linux can easily open HTML books stored in custom top-level > hierarchies, even if the books contain tens of thousands of pages & jpegs. > > Unfortunately, Android 10 through 16 cannot open HTML book stored in custom > top-level POSIX folders such as /storage/emulated/0/0000/books/book1/. > > All Android web browsers use WebView, which is restricted by Scoped Storage > and the Storage Access Framework (SAF). When you try to open index.html, > Android does not give the browser the real filesystem path. > > Instead it rewrites the path into a SAF URI like: > content://com.android.externalstorage.documents/document/primary%3A0000%2Fbooks%2Fbook1%2Findex.html > > SAF URIs are not real filesystem paths. > Because of this, all relative links inside the book1 break. > > For example: > pages/2.html > images/foo.png > css/style.css > > These links get rewritten into invalid SAF document URIs such as: > content://com.android.externalstorage.documents/document/pages/2.html > > Browsers cannot resolve these, so they fail with errors like > ERR_ACCESS_DENIED and ERR_FILE_NOT_FOUND. > > Android WebView only allows file:// access in a few public folders > (Download, Documents, DCIM, Pictures) but Linux users often use custom > folders like /usr/local so that they can back up everything they care about > easily, and so that they're not polluted by the Android system. > > Custom folders like /0000 are blocked. > > Unzipping the book1 works fine, but opening index.html directly from > the top-level /0000 fails in every browser tested. > > Solution: > Use Termux to bypass SAF entirely. Termux uses real POSIX filesystem > access. After granting Termux full file permissions in Android Settings, > you can run a local HTTP server that serves the book1 using real paths. > > Steps: > 1. Install Termux from GitHub or F-Droid. > 2. Grant Termux "All files access" in Android Settings. > 3. In Termux, install Python: > pkg install python > 4. Navigate to the book1 directory: > cd /storage/emulated/0/0000/books/book1 > 5. Start a local HTTP server: > python3 -m http.server 8000 > 6. Open any browser and go to: > http://localhost:8000 > > Because the book1 is now served over HTTP, the browser treats it as a > normal website. All relative links, images, CSS, and subpages work > correctly. This bypasses SAF and restores normal filesystem behavior. > > Result: > The entire HTML book named book1 displays perfectly on Android while > remaining in the user's own custom directory (/0000) so that it can > be copied over during backups along with the rest of the users' data. > > AFAIK, this method works reliably on all modern Android versions. BTW, I didn't try with anything complex, but a quick test with two HTML files, a link between them, and one of them using an inline image worked for file:///storage/[dirname]/path/to/html in Emacs' eww, under Android 15. As in, both documents loaded, the same-directory inline image loaded, and the same-directory relative link worked too. Might not be useful at all, or may only be useful for simpler content of some sort, but given that I tested, I thought I'd add this datapoint. Might be useful for myself in the future, too. -- Nuno Silva
Back to comp.mobile.android | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 18:40 -0400
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 21:17 -0400
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 21:48 -0400
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 22:51 -0400
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 23:57 -0400
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 23:13 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Nuno Silva <nunojsilva@invalid.invalid> - 2026-07-08 10:10 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-08 10:32 -0400
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 13:29 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Dave Royal <dave@dave123royal.com> - 2026-07-05 14:48 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 10:06 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 19:10 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Computer Nerd Kev <not@telling.you.invalid> - 2026-07-05 17:37 +0000
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Alan <nuh-uh@nope.com> - 2026-07-07 11:11 -0700
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Dave Royal <dave@dave123royal.com> - 2026-07-05 21:00 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 22:50 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 23:06 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 12:05 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 12:24 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-06 10:28 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 19:50 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-06 09:36 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 19:56 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-08 11:14 -0400
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Dave Royal <dave@dave123royal.com> - 2026-07-06 07:58 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 12:12 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 15:12 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Chris <ithinkiam@gmail.com> - 2026-07-08 17:51 +0000
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Chris <ithinkiam@gmail.com> - 2026-07-08 17:44 +0000
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Nuno Silva <nunojsilva@invalid.invalid> - 2026-07-08 10:39 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Nuno Silva <nunojsilva@invalid.invalid> - 2026-07-08 10:37 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Arno Welzel <usenet@arnowelzel.de> - 2026-07-06 17:53 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-06 10:47 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Nuno Silva <nunojsilva@invalid.invalid> - 2026-07-08 10:57 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Andy Burns <usenet@andyburns.uk> - 2026-07-05 08:35 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 10:38 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Andy Burns <usenet@andyburns.uk> - 2026-07-05 18:22 +0100
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 12:16 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 19:41 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 12:54 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 23:11 +0200
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 15:23 -0600
Re: How to copy & read a huge zipped book with thousands of html & jpeg files Arno Welzel <usenet@arnowelzel.de> - 2026-07-06 17:48 +0200
csiph-web