Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.mobile.android > #154348

Re: How to copy & read a huge zipped book with thousands of html & jpeg files

From Maria Sophia <mariasophia@comprehension.com>
Newsgroups comp.mobile.android, alt.os.linux, alt.comp.os.windows-10
Subject Re: How to copy & read a huge zipped book with thousands of html & jpeg files
Date 2026-07-05 12:54 -0600
Organization BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID <112e98e$25jj$1@nnrp.usenet.blueworldhosting.com> (permalink)
References (1 earlier) <112cbas$1p57$1@nnrp.usenet.blueworldhosting.com> <112cd5q$9e5$1@nnrp.usenet.blueworldhosting.com> <naufojFbt7iU1@mid.individual.net> <112e1ad$ed8$1@nnrp.usenet.blueworldhosting.com> <navja6FgthuU2@mid.individual.net>

Cross-posted to 3 groups.

Show all headers | View raw


Carlos E. R. wrote:
>> In terms of WebView, Android 10+ is apparently only POXIX compliant in
>>    a. /storage/emulated/0/Download/
>>    b. /storage/emulated/0/Documents/
>>    c. /storage/emulated/0/DCIM/
>>    d. /storage/emulated/0/Pictures/
>> 
>> I "could" have solved the problem by putting the repair manual in one of
>> those directories, but they're thoroughly polluted much like similar
>> directories are on Windows, so my linux-learned rule is to use /usr/local
>> instead (e.g., on Windows it's c:\data & on Android it's /0000 or /0001).
> 
> 
> Why not /storage/emulated/0/Documents/Books ?
> 
> I have {external card}/Movies to store movies in my new tablet and it 
> works fine with VLC. I also have {external card}/eBooks, but I need yet 
> a reader (Calibre is not available that I can find).
> 
> I just installed "Librera" from F-droid. It doesn't see the books in 
> that folder, even though it asked for permission to see all files. It sees:
> 
> /storage/emulated/0/Android
> /storage/emulated/0/Download
> /storage/emulated/0/Librera
> 
> However, if I browse to:
> /storage/emulated/0/eBooks using cX file exprorer, and tap on a book, it 
> offers me to upload to "Play Libros" (maybe Play Books?) or use "Librera 
> FD", and the later works.
> 
> It seems that browsing and opening with CX, apps inherits the permission 
> in runtime to open that file.
> I don't like storing a multithousand file thing in a card that is 
> possibly FAT or eFAT. Too many writes to the FAT area.

Hi Carlos,

Thanks for asking as I would agree 9999 out of 10K people would just do
whatever the mothership tells them to do, in terms of storing files.

Microsoft tells us to put everything in the polluted directories too.

Having cut my teeth in the 60s, 70's, 80's and 90's days of computers... 
 a. I put my menus in C:\data\menus (which is not polluted by installers).
 b. I put my temp files in C:\tmp (again, which isn't polluted by others).
 c. And I put my data in C:\data (which is not polluted by any programs).
    etc.
I never need to use search because I know where all my files reside.
And I can back up all that I care about by backing up one directory.

On Windows or Linux, programs like Calibre (which, I agree, is one of the
finest document conversion utilities on the planet), find all the files.

But, on Android 10+, the mothership decided to ditch POSIX paths in part.

Given all that, I understand why you suggested that I jut put my data in
/storage/emulated/0/Documents/Books, but the reason I do not use that (and
hopefully I never will) comes directly from my decades of Unix system
administration. On every Unix I have ever worked with, whether that's
SunOS, Solaris, Ultrix, DEC, VAX, AIX, HP-UX, IRIX, BSD, and even IBM
mainframe Unix subsystems, we always kept a strict separation between
 a. system-managed directories
 b. user-managed directories

In fact, as I see it, the entire point of usr/local was to give the
administrator a clean, unpolluted, non-system-owned hierarchy where nothing
is ever overwritten, reorganized, or repurposed by the OS. Like /opt, it is
one place where you can put your own tools, your own data, your own
archives, and know that the operating system will likely never touch it.

Much like anything in Window's public menu & data folders, Android's
"Documents", "Download", "DCIM", "Pictures", etc., are the exact opposite. 

They are system-owned, system-polluted, and system-repurposed. 

As a result of being public refuse garbage pails, they accumulate all sorts
of junk from apps, thumbnails, metadata, temporary files, cloud sync
artifacts and anything else the OS or apps decide to dump there. They are
not stable, not predictable and not safe for long-term archival storage.

To back up completely everything I care about on Android, is this simple:
 adb pull /storage/emulated/0/0000 C:\data\datedbackup\0000 (internal sd)
 adb pull /storage/XXXX-XXXX/0001 C:\data\datedbackup\0001 (external sd)

If I start putting files willy nilly all over Android, I'll be just like
the average hoi polloi proletariat who can't find anything on their
devices, and worse, who complain like hell when the system needs a backup.

I know you're well meaning, but in effect your suggestion is equivalent to
me as it would be for me to tell a Unix admin to store their personal tools
and archives inside /usr/bin or /var/tmp simply because "the OS can see
it." I know you're a Linux owner, but that's just not how I do things.

To back up completely everything I care about on Windows, is this simple:
 robocopy C:\data D:\data-backup /MIR /R:1 /W:1 /XJ

My directory philosophy is simple:
 I always create one top-level directory that is mine and only mine, 
 and I put everything I care about inside it (if at all possible).
 a. On Linux, that is /usr/local.
 b. On Windows, that is c:\data.
 c. On Android, that is /0000 (internal) and /0001 (external).

This gives me:
 a. a single hierarchy to back up
 b. a single hierarchy to restore
 c. a single hierarchy that never gets polluted
 d. a single hierarchy that never changes names or semantics
 e. a single hierarchy that is not touched by the OS
 f. a single hierarchy that behaves like a real Unix directory tree
Unfortunately, Android's SAF filespecs do not meet any of those criteria.

Your own example actually seems to aptly demonstrates the problem where
Librera cannot even see your eBooks directory unless you open files through
CX File Explorer. That is because SAF grants per-file access tokens, not
directory access. CX hands Librera a one-file token, so Librera can open
that single file but still cannot enumerate the directory. 

This is exactly the same SAF behavior that broke my HTML manuals.

Regarding your FAT/exFAT concern, you are absolutely correct that FAT-based
SD cards can suffer from excessive FAT table rewrites when storing large
directory trees. A directory containing tens of thousands of HTML pages and
JPEGs will hammer the FAT metadata area. Fortunately, my Android 16 tablet
has no SD card as it was a return to me of a gift I gave an iOS user to try
to convince them that their religion was wrong, so, my files in /0000 are
in ext4-backed internal storage with journaling & proper metadata handling. 

So I fit your concern as it's safe for large POSIX-style directory trees.

This brings us back to the core issue Andy and I both hit, which is that
Android 10+ no longer exposes real POSIX filesystem paths to WebView-based
browsers outside the SAF-approved yet highly polluted public collections. 

Anything else is rewritten into a synthetic SAF URI such as:
 content://com.android.externalstorage.documents/document/primary%3A0000%2Fbook%2Fname%2Findex.html
This is not a directory. It is a virtual document reference. 

Because WebView never receives the actual filesystem path, it cannot
perform POSIX operations such as open(), stat(), or opendir() on the
underlying tree. As a result, any HTML manual that relies on normal
relative links (pages/2.html, images/foo.png, css/style.css) immediately
breaks. Every browser that I tried last night tried to resolve those links
relative to the SAF URI, producing invalid paths like:
 content://com.android.externalstorage.documents/document/pages/2.html
which do not correspond to any real file on disk. WebView then throws
ERR_ACCESS_DENIED or ERR_FILE_NOT_FOUND because it cannot traverse the
directory hierarchy.

This explains why the manual opens perfectly on Linux and Windows, but
fails on Android. The HTML book expects a normal Unix directory structure,
but Android 10+ hides that structure behind SAF, much like iOS does.

Andy's team and I independently arrived at the same workaround, which was
to explicitly bypass WebView's file:// restrictions entirely by serving the
manual over HTTP since HTTP requests do not go through SAF, so the browser
finally sees the real directory tree.

Andy used AWebServer (Apache httpd for Android).
I used Termux + Python but accomplished, essentially, the same effect.

So the summary for everyone on Usenet is:

Android browsers cannot open HTML manuals from custom directories because
SAF hides the real filesystem. A localhost HTTP server bypasses SAF and
restores normal POSIX behavior.

And the summary for your kind and quite naturally normal question is:

I do not use Documents/Books for the same reason I do not use /usr/bin on
Linux, as it is not my directory, it is not clean, and it is not stable.

And, I appreciate your FAT/exFAT concern, which is valid for SD cards, but
my internal storage is ext4, so /0000 happens to be in internal storage. 

You are hitting the *same* problem Andy and I hit, which is that Librera
cannot see /storage/emulated/0/eBooks, but if CX File Explorer opens a
file, Librera can read that one file. These are all SAF behaviors, and not
Librera behaviors, not Calibre behaviors, nor EPUB behaviors.

So, to solve your problem, even though HTTP bypasses SAF completely, the
question of whether it solves your specific workflow depends on whether the
apps in your specific workflow can open HTTP URLs. Can they?
-- 
Unfortunately SAF blocks file:// but luckily, HTTP bypasses it completely.  

Back to comp.mobile.android | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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 "Carlos E. R." <robin_listas@es.invalid> - 2026-07-08 21:49 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Chris <ithinkiam@gmail.com> - 2026-07-09 07:05 +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 Dave Royal <dave@dave123royal.com> - 2026-07-09 06:09 +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: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