[q] epub rendering fails when the data connection is on - Android Q&A, Help & Troubleshooting

Hi everybody. This is my problem:
I’m trying to read some epub3 ebooks using the Astri-Bee reader on an Android phone (an LG L4II with Android 4.1.2). As soon as I open any of these books I get a message like this:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
If I turn off the data connection (the data connection thorough the mobile network), the error changes to:
Pagina web no disponible.
Es posible que la página web htp://0.0.0.0:49346/OEBPS/Text/1.xhtml se encuentre temporalmente fuera de servicio o se haya trasladado a otra dirección web de forma permanente.
(Sorry for the Spanish, I have this device in Spanish. Basically, it says a web page cannot be reached in the place addressed by the url htp://0.0.0.0:49346/OEBPS/Text/1.xhtml)
If I turn on the WiFi (keeping the data connection off) the problem solves magically and the epubs render fine.
If I turn off the WiFi (without turning de data on) the books still display fine.
If I turn back on the mobile data connection the rendering may be ok for a while, but, in the end will fail.
Some of these books I’m trying to read with Astri-Bee are examples created for the IDPF to help developers to test their readers (and designers to understand the epub standard). They are expected to have no design errors. In addition, I’ve tested them with the Kobo epub reader (in the same device) and (with Kobo) they display without any errors.
It seems to me that Astri-Bee is using some functions provided by Android (to extract the epubs' contents) and that they fail in certain conditions (when the mobile data connection is on, mainly). Unhappily, I have no idea on how the guts of Android work. It might be even something completely different, like a software conflict or so. This looks like a mystery to me.
Thanks in advance for any help you may provide.

Mmmmm… No answers yet. May be I didn't post this appropriately; may be nobody knows how to help me out of this thing. Let's try to move a little beyond and set down some plausible reading of these weird symptoms. They are gonna be plain speculation, but may be a speculation leading someone to have an idea on how to help.
An epub is a simple "linear" web site packed with some metadata (by mean of using zip compression). An epub reader basically is a web browser layout engine wrapped in a particular interface (with some specific-purpose functionalities). I haven't been able to find in a quick search any information about the guts of Astri-Bee, but I guess it's probably implemented by mean of reusing a named web browser layout engine. That seems to me the most sensible. Being so (and given the symptoms described, above, in the first post), Astri-Bee probably works this way:
- It recovers the metadata and builds the ebook internal structure, index an so on.
- It calls the web-browser-engine to lay out the first html inside the book. Being this engine for web browsing, its call probably requires as parameters an IP address, a port and a path. Astri-Bee passes them all.
- In order to make the book html reachable to the engine, Astri-Bee serves it in the localhost 49346 port (being ../OEBPS/Text/1.xhtml a normal path inside an epub).
- Finally Astre-Bee shows the engine-laid-out html being the first element of the book.
I can add here (to the symptoms described in my first post) that, when the data connection has just been turned off, and Astree-Bee is showing the web-page-cannot-be-reached message, the Astri-Bee page up/down functionality perfectly works and makes it browse the same message for further pages:
A web page cannot be reached in the place addressed by the url htp://0.0.0.0:49346/OEBPS/Text/2.xhtml.
This seems a hint leading to think Astri-Bee is properly unzipping and decoding the metadata, and only fails at browsing the htmls contained inside the book (when the data is on). Which reinforces the idea under the working-steps described above.
As already stated, all this may look like plain speculation. In fact, it is. But seems sensible and looks by now like the most probable explanation to me. It means Astri-Bee is probably using functions provided by Android to manage the network connections it needs for (self) serving and reading the epub htmls. So a crash in the way Android manages or provides these services when de data connection is on will lead to such symptoms as the described above in the first post.
I don't know how to test this thesis I've set up in this seccond post, and what’s more important, I can't even hint how to solve the rendering problem I described in my first post. I'm qualified but not at all an operative system authority and Android is way far from my expertise. Still need some help.
Anyone out there with some ideas?

Come on. I can't believe there's no one in this forum with a useful idea. Not one asking to make sure the software versions are the last ones. I've already checked that. One, I mean, that brings light to this problem. That helps me out of it.
I'm willing to check and try any sensible suggestions. :fingers-crossed: One of those ebooks is a demo of a functionally advanced epub and Astri-Bee has proved itself as the best epub renderer out there. It would be great to have that pair working in this phone of mine, as I already have them working all right in my tablet. :cyclops:
I look forward to your comments, guys, if there're any.

Related

Barcode data transfer idea

Hello XDA-Developers!
I had an idea this morning.
Current Transfer Tech:
Bluetooth - Requires the user of both devices to enable their bluetooth devices, then they have to go about pairing the devices to allow file tansfer (this is not always the case though). then the, shall we call him "sender" has to select a file and attempt to bluetooth the file to the, shall we say "reciever", who in turn has to accept the data and then the transfer starts.
Wifi - not used very often but files can be transferred through an app or through an ftp server etc from one device to another. this however requires a little, if not more, skill to complete and can be fustrating looking for ip addresses etc.
NFC - this is an emerging technology that is being implemented in more and more devices such as the Galaxy Nexus. This is a very efficient and fast way to transfer data from one NFC enabled device to another NFC enabled device, however like most of the android community, my phone does not have this capability.
My Idea:
This is just an idea and you may say what you like about it but i thought i would write it down here, the first place that came into my mind where i thought that someone could take this idea further.
Now my friend uses a blackberry, and i know that that word is almost taboo on this forum but hear me out. He uses his blackberry for a service called BBM (Blackberry Messenger), i am sure you are all familiar, and to add a friend of his so that he can contact them using the service, he simply uses his blackberrys camera to scan a 2D Barcode on his friends device and all his BBM Pin and other data is transfered through the phones camera so that they can communicate on the service.
I though that this could be used more on android devices. This could be used to transfer small files from one device to another such as contact information, websites (already a reality), even larger files such as word documents and other reletavely small documents. Now i know that these files cannot be displayed on a single 2D barcode but maybe they can be send using not one barode but a series, the barcodes could be in an animation on the device screen, showing one barcode after another all and the "reciever" could simply hold his device's camera over the animation and it could read the series of barcodes and then compile all of the data to create a single document.
Now i realise that this could be a silly idea as the ammount of data that can be transferred through a 2D barcode is not huge, al lot of barcodes would be needed to transfer a larger file than someones contact details.
Let me know what you think, and you are free to do what you want with my idea, i wont hold it against you
hazzahex
Hello
I know it's a little late (only 3 years lol), but I just wanted you to know that I've implemented a system similar to the one you describe
It was my college's final project
hazzahex said:
Hello XDA-Developers!
I had an idea this morning.
Current Transfer Tech:
Bluetooth - Requires the user of both devices to enable their bluetooth devices, then they have to go about pairing the devices to allow file tansfer (this is not always the case though). then the, shall we call him "sender" has to select a file and attempt to bluetooth the file to the, shall we say "reciever", who in turn has to accept the data and then the transfer starts.
Wifi - not used very often but files can be transferred through an app or through an ftp server etc from one device to another. this however requires a little, if not more, skill to complete and can be fustrating looking for ip addresses etc.
NFC - this is an emerging technology that is being implemented in more and more devices such as the Galaxy Nexus. This is a very efficient and fast way to transfer data from one NFC enabled device to another NFC enabled device, however like most of the android community, my phone does not have this capability.
My Idea:
This is just an idea and you may say what you like about it but i thought i would write it down here, the first place that came into my mind where i thought that someone could take this idea further.
Now my friend uses a blackberry, and i know that that word is almost taboo on this forum but hear me out. He uses his blackberry for a service called BBM (Blackberry Messenger), i am sure you are all familiar, and to add a friend of his so that he can contact them using the service, he simply uses his blackberrys camera to scan a 2D Barcode on his friends device and all his BBM Pin and other data is transfered through the phones camera so that they can communicate on the service.
I though that this could be used more on android devices. This could be used to transfer small files from one device to another such as contact information, websites (already a reality), even larger files such as word documents and other reletavely small documents. Now i know that these files cannot be displayed on a single 2D barcode but maybe they can be send using not one barode but a series, the barcodes could be in an animation on the device screen, showing one barcode after another all and the "reciever" could simply hold his device's camera over the animation and it could read the series of barcodes and then compile all of the data to create a single document.
Now i realise that this could be a silly idea as the ammount of data that can be transferred through a 2D barcode is not huge, al lot of barcodes would be needed to transfer a larger file than someones contact details.
Let me know what you think, and you are free to do what you want with my idea, i wont hold it against you
hazzahex
Click to expand...
Click to collapse

Extracting Android geolocation cache from NAND memory dump / vizualization

Hello all,
I am a newbie to Android just like I am a newbie to that forum. I'd just like to share something I did recently, it might be interesting to some of you.
To start with, I am not at all a mobile guy. My hobbies are related to big and noisy machines, password security and GPU cracking.
I have an old HTC Wildfire though and I recently had to analyze an Android application (LastPass) so that I can perform offline GPU password recovery against its local database. Which in turn made my life more interesting
Until that point I never bothered to play with my phone as I only used it for calls, messaging and occasional browsing. My job is related to embedded development (mostly infotainment systems) so that at least I have some knowledge about that stuff...not exactly Android though, more like linux-based systems.
So while playing with LastPass, I quickly get accustomed to adb then it turned out LastPass stores its database on /data/data which apparently I had no access too. Reading some stuff about rooting my phone lead me to the impression it is going to be a problematic thing to do (disabling S-ON, updating bootloader, flashing other images and I have no experience with this). Well, I quickly found out there is a local exploit for Android <2.3 which had a funny starcraft name, so I tried it. To my surprise it worked and I was able to acquire the needed data.
Then after some time I decided to look at that /data filesystem again and I was surprised to find out quite a lot of stuff (contacts, messages, browsing history, all in sqlite3 databases). But I was really like struck when I discovered cache.wifi and cache.cell. I couldn't believe my eyes, then I googled it and it turned out this is all old news. But basically it's quite nice way to know where the phone owner was located some time ago. Then of course, Android limits that to last 200 wifi access points and last 50 GSM BTS'es.
Then suddenly I remembered the fact that this data is kept on NAND memory with a filesystem (yaffs2) that does software wear-leveling. Which means, we are likely to have several versions of the logical block split over several physical blocks.
So out of curiousity, I quickly coded some quick'n'dirty scripts to nanddump the device, then some ugly C code to carve the dump, looking for geocache data. Using the data recovered that way, we create a simple HTML file with some javascript to display all the GPS poistions over google maps. The end result was fun, I was able to remember where I was say one year ago (and my memory is bad).
The PoC code is attached. It's rather ugly and coarse, but it works (for me ). It runs on linux only (sorry). Feel free to experiment with it.
Regards,
Milen

Torque Pro OBD app and data logging

So i got myself an OBD bluetooth scanner and the Torque app...bloody brilliant.
So much information!
anyway, i cant seem to get it to upload data logs to the web viewer?
i have my account created and setup correctly but nothing in the web viewer when i log in.
Does anyone use the app and have any ideas on how to get this to work?
Secondary i have e-mailed myself some data logs and cant get them to open properly?
I cant seem to get Track Recorder to work with Torque Sync software, it stucks at Searching for Torque
Valiceemo said:
So i got myself an OBD bluetooth scanner and the Torque app...bloody brilliant.
So much information!
anyway, i cant seem to get it to upload data logs to the web viewer?
i have my account created and setup correctly but nothing in the web viewer when i log in.
Does anyone use the app and have any ideas on how to get this to work?
Secondary i have e-mailed myself some data logs and cant get them to open properly?
Click to expand...
Click to collapse
I imagine the particular posters have found answers to their problems seeing as this thread
dates from 2014 but I thought it might be worthwhile answering all the same as I ran in to the same niggles when I began using this app so if anyone searching these issues subsequently may find some worth from my reply.
First of all as a far as experience and knowledge is concerned. Firstly with cars;fixing,modifying, engine management tuning, obd2, diagnostics. Basically my auto knowledge is extremely wide and extensive from approx 35 years of obsession and getting stuck in an the deep end whereas my knowledge and experience of computers and smart phone tech is on much, much shakier ground
In fact, for those of my vintage. i.e late 30s,early 40s remember when we were kids. and programmable VCRs were the height of cutting edga technology. Well I'm like the way our parents and grand parents were then. i.e pretty much baffled by it and even following the instructions it was hit and miss whether you actually managed to record that film rhat was on at 4am lol.
So for the second issue brought up by the OP it doesn't matter whether you email yourself the log file or not (I found the few times i tried it that the file wouldn't attach and when it did the problem was the same anyway) you need Microsoft Office or any other type of office suite to view the files. On the pc i have Microsoft office but had to download an app to my phone to view. csv files. Again an office suite that not only displays. csv files but puts them into a spreadsheet format is required.
As for the first issue it's preferable in every way to view the site. on a pc because on the phone display the actual box to sign into is off screen and takes a little bit of zooming out and seaching to find, the same goes after you have signed in when another box appears with a list of the logs files recorded and the tab to choose it. This is where my lack of fundamental computer/web knowledge comes in. I can't tell you why it doesn't sit nicely inti an easily accessible mobile format but it doesn't. Once you've found the first sign in box/pop up it becomes simple, annoying but simple.
As for there being nothing after signing into the webview site successfully all I can assume is either you've no log files to view which you should have if it's all been set up correctly, including choosing which PIDs to send to logfile or the pop up/window where you click on your logfiles is right off screen and has to be looked for. Of course you don't get that problem if accessed using your desktop.

Finding packets and IP from decompiled APK?

So I'm working on a project on making an online android game work on PC from packet sending / receiving. Limited graphics.
Basically all packets are sent in a very unencrypted way, using very easy text and integers.
Easily picked up from packet sniffing, IP, Data etc. However, return results seems to be encrypted according to some packetscanning application for android. Unsure as packetscanning for android seems a bit meh. As I cannot get the game to launch thru bluestacks as hardware is listed as "Unsupported", I cannot find out for sure. Else I could have gotten more data and from that and could just have made the entire game based on the scanned sent/recieved packets coming from bluestacks. However the game also sends login info with each packet similar to
SendPacket(RetrieveResources,xxx,yyy,date,time,username,authid)
Username and authid is based of android hardware ID, which could easily be recoded into the java application.
But then I cannot find how it bases the authid and username of hardare id. Or how the application tells the server to create a new user.
Now, Myself I am an Java developer, however as I've never worked on Android applications previously this stuff is zzzz compared to real Java. I've managed to get about 99% source code from decompiling, deobfuscating and extracting the .dex file inside the application.
However, here's where things just go into full wtf-mode. I've extracted over 200 .class files into their correct folders and such, however, as confusing as this is. I simply cannot find how the game functions, or where it stores the IP and such, is it stored in an offsite .xml file? Storage file? Database? Resource file? Browsing through unlimited lines of scrap code, that seems irrelevant to the game, Facebook connections, Amazon, Google play purchase, Crittercism, GooglePlay classes etc. But noone of them actually seem to hold any useful data and alot of stuff actually just seems to be "Drag and Drop this into your application then call functions from it" like, "Authenticate to Facebook". I've managed to find alot of things loading .obb files, that doesnt seem to exist at all, tho the game pretty much goes "!blabla.obb" "CreateObb();" The game does not exist on facebook at all, just uses it to recieve ProfilID as an Login ID.
The game also uses UnityPlayer which seems to be the "Launch" class, which I've browsed thru but found nothing relevant. I found alot of .classes that seems similar to each other aswell containing the same stuff. I've also found alot of stuff that actually seems to be packet sends and connections, however, there is nothing that points that it is towards the game, but rather connections for i.e google play services.
Biggest .class>.java file is about ~40kb. Which for mee seems small, as projects I usually work with is well about 10mb inside the main.class then calls for unnecessary stuff from side classes.
Anyone mind pointing out on how android applications handles connections?
Is the files really no bigger than 40kb and just scrambled into tons of subclasses?
Feels like I'm missing obvious stuff that should be right there declared as a variable, but I can't find it.

Chrome on Android - enable website to access location data

This is a general question. I'm having trouble "forcing" a website to utilize my location. There's a site we use at work. It is built on a Google Maps layer. We can log work completed and other information for units that appear as features/layers on the map. That all works just fine. The trouble is with the "auto-follow" function on the map. The guys who have IOS devices are not having any problems. If I use the generic "internet" browser or the browser in LastPass, auto-follow works as expected. It pans/zooms the map to my current location and puts a blue dot wherever I am. The issue is that auto-follow does not function in Chrome browser.
I have tried many things so far, from the very basic like this: https://support.google.com/chrome/answer/142065?hl=en
To this: http://superuser.com/questions/591758/how-do-i-make-chrome-forget-a-no-to-geolocation-on-a-site
to this: http://stackoverflow.com/questions/...r-a-website-for-which-i-previously-refused-it
and this: https://buddypunch.freshdesk.com/su...tion-services-on-my-mobile-device-or-browser-
So far, nothing has worked. I'm beginning to wonder if there is something within the app/site that is not requesting location data in a way that Chrome either understands or wants to comply with. I have a line to the "developers" and if I can give them specific information, they can probably make some changes.
Yes, I could use other browsers. But Chrome is my default and is integrated with everything else on my phone (T-Mo Galaxy S7 with most current versions of everything) But I am not the only person experiencing this. I'd like to help out those guys (most of which are not very tech savvy) by cracking this nut.
Anyone have any thoughts or ideas?
I found the cause:
https://developers.google.com/web/fundamentals/native-hardware/user-location/obtain-location?le=en
Google went and changed things on EVERYONE without notice. They aren't evil, just not always real nice.

Categories

Resources