Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.mobile.android > #154347
| 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:16 -0600 |
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <112e71c$2818$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> <navi6aFh4fgU1@mid.individual.net> |
Cross-posted to 3 groups.
Andy Burns wrote: > Maria Sophia wrote: > >> May I ask how long it took you and your team to arrive at that conclusion >> and more importantly, what server mechanism you employed, if it's a free ad >> free easily available web server, because the Termux method has issues too. > > Spent a few hours trying to create working content:// URLs, but when > that didn't work out, used AWebServer, an android build of apache httpd > with a minimal GUI ... > > <https://play.google.com/store/apps/details?id=com.sylkat.apache> > > In the end we paid the developer to produce a custom build that > 1) auto started the web server > and 2) let us set our own document root > > It looks like the latest version has included ftp, mySQL and myPHPadmin Hi Andy,\ Thank you for your kind and detailed reply, as Usenet is to not only ask questions, but to also help everyone lurking not make our same mistakes. When Android dropped POSIX, Linux again saved the day with localhost HTTP! It was a painful time-consuming lesson for me, but mainly because I had trusted that Android was Linux-like when it came to the basic POSIX paths. Your answer will help save others countless hours of debugging time. And your answer helps me determine if I should invest in testing it out. I like what the content of says about how it can help all of us carry on our mobile devices custom HTML content containing relative filespec paths. <https://play.google.com/store/apps/details?id=com.sylkat.apache> AWebServer: Apache,PHP,SQL,SSH You can explore the files with any SO or browser through wireless. AWebServer is an easy and friendly solution to publish your own web in your Android device with PHP and all the features that Apache brings. MariaDb the old Mysql sql server is also included and the MyPhpAdmin application has been installed and ready to work with. Has integrated a FTP server to upload the contents and is compatible with The Web Server is ready to use and has these features: +Apache 2, +Php 7, +MariaDb, +MyPhpAdmin, +Indexes Options, +Ftp server, +Logs viewer, +Text Editor. This app is based on the famous and stable Apache 2 server, known by its stability in Android devices. Any question or feature request, please send a mail to the developer kryzoxy@gmail.com It seems your description of how your team solved the non-POSIX problem aligns pretty much with what I observed. Unfortunately for those of us who want to use POSIX-compliant paths in documentation, Android 10+ fundamentally changed how applications are allowed to access shared storage. Anything that is not one of the four SAF-approved public collections (Download, Documents, DCIM, Pictures) is no longer exposed to WebView as a real POSIX path. Instead, WebView receives a synthetic SAF content URI such as: content://com.android.externalstorage.documents/document/primary%3A0000%2Fbook%2Fname%2Findex.html But this is not a directory. It is a virtual document handle. We learned the hard what that, because WebView never receives the actual filesystem path, it cannot perform POSIX operations such as open(), stat(), or opendir() on the underlying directory 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 attempt to resolve these links relative to the SAF URI inevitably produces invalid paths such as: content://com.android.externalstorage.documents/document/pages/2.html which, we found out the hard way, do not correspond to any file on disk. WebView then throws ERR_ACCESS_DENIED or ERR_FILE_NOT_FOUND which we have to debug is only because the browser cannot traverse the non-POSIX directory hierarchy. In effect, the browser appears to be sandboxed inside a synthetic namespace with no ability to follow POSIX-style relative paths. This hypothesis may explain why the manual opened perfectly on Windows (and would have opened on Linux too), but failed on Android 16 in any browser. The HTML book expects a normal Unix directory structure, but Android 10+ hides that structure behind SAF, much like iOS hides their file specs too. Since I only came up with the idea last night after a couple of hours of debugging, it's helpful to note that your team's solution and mine converge on the same principle, which is to bypass WebView's file:// restrictions entirely by serving the manual over HTTP. The reason this works is that HTTP requests do not go through SAF, so the browser finally sees the real directory tree. In your case, you used AWebServer (an Android build of Apache httpd). In my case, I used Termux with Python's built-in HTTP server: $ pkg install python Manually give Python storage access permissions as it doesn't ask. Then set the $DOCUMENT_ROOT by starting the server at the top level $ cd /storage/emulated/0/0000/book/name $ python3 -m http.server 8000 Then, in any privacy-based web browser, I simply set this bookmark: <http://localhost:8000> At that point everything worked exactly as intended. All relative links, images, CSS, and subpages loaded correctly because the browser was now talking to a real POSIX-backed directory via HTTP instead of a SAF virtual document tree. Comparing the two approaches, your solution is far better'n mine is: a. You have a full Apache httpd stack b. Your solution has nice GUI controls c. Your solution can auto-start d. Your solution has a customizable document root Hence, your solution works in production or institutional deployments. Compared to mine, your solution is heavyweight but robust as all hell. I can see why it's good for fire engines, kiosks & embedded deployments And your solution supports additional services (FTP, MySQL, PHP) if needed By way of stark contrast, the solution I came up with (Termux + Python): a. Is as lightweight as I could make it b. With almost zero configuration (other than the starting directory) c. Yet, like yours, it creates a pure POSIX environment d. Which is good for my Windows/Linux-style adb-scripted workflows Unfortunately, my solution has none of the GUI, auto-start & service management of your solution, but it has a minimal attack surface and it's easy to script and automate if I wish, so it's OK for ad hoc servers. The takeaway for the team to learn from our trials and tribulations is that both approaches solve the same underlying problem that Android 10+ broke direct POSIX file:// access for custom top-level directories. Luckily, our solution of localhost HTTP restores normal Unix semantics. In summary, for those wishing to learn from our investment in testing, Android browsers cannot directly open HTML manuals from custom directories anymore because SAF hides the real filesystem. Luckily, a localhost HTTP server bypasses SAF to restore POSIX behavior. Your team's experience confirms the diagnosis and validates the workaround. I appreciate you sharing the details, especially the fact that you eventually commissioned a custom build of AWebServer to auto-start and set the document root. That is extremely useful information for anyone out there who is deploying large HTML documentation sets in the field. Thanks again for the insight. This thread will save others the hours we both invested in rediscovering the same SAF limitations independently. -- POSIX paths died on Android 10+, but localhost HTTP brings them back!
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