Adobe doesn't know how to zip EPUBs - Nook Touch General

I've been running into strange problems.
All of the e-books that I borrow from my public library have problems.
(This problem also occurs downloading EPUBs from Adobe's demo site.)
Sometimes my Library.apk can't find the e-book's metadata.
It usually works fine on the Nook, but the JellyBeans have problems.
This has to do with the unzipper in Android.
The older unzipper was more resilient to failures.
The newer unzipper bombs on errors.
Quite simply, the EPUBs coming out of Adobe Digital Editions (versions 2.0 or 3.0 for Windows) zip EPUBs incorrectly.
META-INF/container.xml and OEBPS/content.opf have zeroes in the Local Header for the fields of crc, size1 and size2.
Additionally, some EPUBs have garbaged filenames in the Central Directory.
To fix, you can unzip and zip the files without changing the DRM.
Has anybody else noticed this?

Related

Did a wipe and want to reinstall some apps

I had (and have again) everything on my SD cardbut some of the programs that I had downloaded from the Market (which I cant find on there now btw) were downloaded and installed from being a ZIP file. The one I am most interested in is the WordPlayer. At some point in the past I installed the player for reading books and would use that to open the individual ebooks. Now the only way I can go read books is through The Art of War and switching in the Library.
So - how do I install a zip file? I have attached the one I am specifically questioning.
Thanks
Install AndroZip (free) and extract the contents of the zip and run the apk.
Im assuming you do have some sort of file manager

File Location

Help!!!
I have a dual boot setup with 7.2.0-RC3-Kang on eMMc normal and 1.4.2.keep-CWM on eMMc alternate.
This is by far the most satisfying iteration (of many) I have used on my original NC.
However, I cannot for the life of me find the path to the folders where my Kindle and Nook books are kept for their respective apps on the Normal/7.2.0-RC3 side.
I have used both the Root Explorer and File manager apps to no avail.
The files for my 1.4.2 Nook books are clearly on the sdcard.
In the eMMC sections I can examine, both the Nook and Kindle folders are empty even though I clearly have books in both.
Uploading to BN and then d/l to the app is not an option for several titles I want on the "apps" side.
Thanks in advance.
Also: Is there a 1.4.3-keep-CWM in the offing???
Unless you have moved the files on your nook color for your books, the native location for your book files is in the /mnt/emmc/My Files/Books.
Also check in the /mnt/emmc/B&N downloads/ for any books you downloaded from B&N.
You should not need root to find these files. So unless you deleted those files or moved them that is the correct path for them. I have not moved mine on the nook color since I had it.
~~~~~~~~~~~~~
To find lost files on your nook color since you now have it rooted just download a file manager app called ES file explorer, make sure in the options of that app you have 'root explorer' enabled, and type in the file or book you want to find in its search bar you want to find in that app.

Newly Rooted NST - Cannot Install Anything!

I have a newly rooted Nook Simple Touch (NST) that was updated to firmware 1.2.1 before NookManager worked its magic.
The problem is that now I cannot take advantage of the Kindle App, ES File Explorer, or NGAppsAttack because I have no way to install anything.
Here is what I am running into.
1. I cannot install from the browser that came installed when NookManager did it's thing because it appears to have a problem with the certificate for any site except the default Barnes & Noble page, rendering my browser useless.
2. I cannot use a file explorer, such as ES File Explorer, to install a new version of the certificates or a new browser because one didn't come with NookManager's install and I have only ADB Konnect, Contacts, Device Registrator, Gallery, Library, Music, Nook Friends, Nook Touch Mod Manager, Nook HW Test, Settings, Shop, Social (doesn't work), SuperUser, and TestCenterService. I uninstalled Amazon AppStore because it didn't work and I read elsewhere that it was no longer working.
3. I cannot use the market app because there are no versions already installed, begging the question - now how do I install stuff without a browser, market, or file explorer?
I tried using NookManager to install things by following the directions elsewhere and extracting apps from their zip folders directly to the root directory of the NookManager MicroSD card. That failed on every app I tried because when I booted the NST off the NookManager card, there was no option for Custom under More! I even tried modifying the menu text file using Notepad++ to add the Custom -> menu item under button 4, but when the Custom menu came up there was no button response. Evidently, it couldn't find the APK files extracted to the root (in this case E:\) when I tried the extraction method.
Does anyone have a better idea? I mean, I'm not a programmer - so although there is probably a way to do it through ADB Konnect, I would need someone to explain it in baby steps.
Maybe I could image the SD card with an image that just installs apps?
Thanks!
-Nate
natetheblade said:
I have a newly rooted Nook Simple Touch (NST) that was updated to firmware 1.2.1 before NookManager worked its magic.
The problem is that now I cannot take advantage of the Kindle App, ES File Explorer, or NGAppsAttack because I have no way to install anything.
Here is what I am running into.
1. I cannot install from the browser that came installed when NookManager did it's thing because it appears to have a problem with the certificate for any site except the default Barnes & Noble page, rendering my browser useless.
2. I cannot use a file explorer, such as ES File Explorer, to install a new version of the certificates or a new browser because one didn't come with NookManager's install and I have only ADB Konnect, Contacts, Device Registrator, Gallery, Library, Music, Nook Friends, Nook Touch Mod Manager, Nook HW Test, Settings, Shop, Social (doesn't work), SuperUser, and TestCenterService. I uninstalled Amazon AppStore because it didn't work and I read elsewhere that it was no longer working.
3. I cannot use the any market app because there are no versions already installed, begging the question - now how do I install stuff without a browser, market, or file explorer?
I tried using NookManager to install things by following the directions elsewhere and extracting apps from their zip folders directly to the root directory of the NookManager MicroSD card. That failed on every app I tried because when I booted the NST off the NookManager card, there was no option for Custom under More! I even tried modifying the menu text file using Notepad++ to add the Custom -> menu item under button 4, but when the Custom menu came up there was no button response. Evidently, it couldn't find the APK files extracted to the root (in this case E:\) when I tried the extraction method.
Does anyone have a better idea? I mean, I'm not a programmer - so although there is probably a way to do it through ADB Konnect, I would need someone to explain it in baby steps.
Maybe I could image the SD card with an image that just installs apps?
Thanks!
-Nate
Click to expand...
Click to collapse
You should be able to copy an apk file to the SD card and use the folder browser of Relaunch (which was installed during root) to install the package. Just open the folder where you copied the apk from your PC to the SD card and touch on the apk file.
If you need some apk files like ES, a browser, etc., check out my post here which includes a link to a zip file of potentially useful apps.
The certificates issue has recently been addressed. Look here and read a little further in the thread for some simplifications. But the resident browser is worthless and can be uninstalled.
nmyshkin said:
You should be able to copy an apk file to the SD card and use the folder browser of Relaunch (which was installed during root) to install the package. Just open the folder where you copied the apk from your PC to the SD card and touch on the apk file.
If you need some apk files like ES, a browser, etc., check out my post here which includes a link to a zip file of potentially useful apps.
The certificates issue has recently been addressed. Look here and read a little further in the thread for some simplifications. But the resident browser is worthless and can be uninstalled.
Click to expand...
Click to collapse
I appreciate the advice. I will try that out when I have some time later today and let you know if it worked.
I just didn't realize that I could use Re-Launch to browse for a folder.
-Nathan

NSTG won't open epub files (central directory entry problem)

I have a rooted, second hand NSTG (registered to the previous owner) that was rooted and worked just fine. Unfortunately, I decided to play around with gparted and change the size of partitions, and since I did it, it refuses to open epub files. BN reader says "Sorry, can't open this book" (after restoring pre-root backup it opens previous owner's books from the BN ecosystem, but if I sideload any epub it won't open it), FBReader says "Error 2 in native code while reading '/file/path/book.epub'", MoonReader and PageTurner say "Central Directory Entry not found" and CoolReader just plain fails to open the epub file. (Edit: Another version of MoonReader says "spanned archives not supported". It clearly seems to be a problem with archive files, but I have no idea what's wrong)
The problem persists even after I imaged another ROM onto the NSTG and after restoring NookManager backup from before rooting. It survives firmware changes and restores. I have normal file system access and .RTF files and .TXT files open normally. Browser works, terminal works, everything works, except for the core function of reading EPUB format books. They don't have any DRM and yet there's something which prevents their opening. Anyone ever encountered this?

[SOLVED][NST/G] Double-tap in B&N Library not working with FW 1.2.2?

Has anyone else experienced this? I only have side-loaded books and was thinking of applying @Renate NST's mod for showing metadata for all books when I found that I couldn't get anything with a double-tap. I just get a black screen for a moment and then I'm back where I started. I'm going to have to download a B&N freebie to see if the function is working at all, I guess....
Edit: I can confirm. Even with a B&N book I get a black screen flash on double-tap in the Library. So...either the rooting process in NookManager is not quite right for this FW or something else I've done has rendered this function inoperable Now the "fun" begins.
some additional info and maybe a cause
It turns out there are small discrepancies in the file sizes of three jars often modified, two for NTMM, and one for USB audio microphone recording (and maybe other stuff). The MD5 checksums are different in all three cases between FW 1.2.1 and FW 1.2.2. These are:
android.policy.jar
services.jar
framework.jar
The differences must not be great since the device continues to function in the main, but the issue with needing to resign Opera Mobile and Tasker, along with this new failure of the Library double-tap function suggests all is not quite right "under the hood".
Once upon a time I patched framework.jar myself using files supplied by @Renate NST. I'm guessing I might be able to do that again with the file from the FW 1.2.2. The other two jars would require patching from whatever information can be gathered on the GitHub site where NTMM is documented. Not so sure about that {scratches head and looks woeful}.
The "good" news is that the devices are largely functional and if/when the FW 1.2.2 jars are correctly patched, they can just be copied over without restoring the device to out-of-the-box state and building up (again) from there.
Um... (scratches head).
Is it my Library app that we're talking about?
I don't remember anything else for getting metadata.
I did notice one bug, it will (rarely) not get metadata if the zip is corrupted with different info on the zip global and local headers.
The problem is with the underlying Android zip libraries.
If it's only a single book you can desktop unzip and rezip.
If something is flashing or crashing a logcat will tell us something.
---------- Post added at 07:24 PM ---------- Previous post was at 06:57 PM ----------
I put the latest version Library-1.13.apk up (in the signature).
I made it so that you could dismiss the details with a click (handy if you're using a Glow2 without any soft keys).
Renate NST said:
Um... (scratches head).
Is it my Library app that we're talking about?
I don't remember anything else for getting metadata.
Click to expand...
Click to collapse
No, and so if the patch you have in the 1.2.1 patches zip applies only to meta data showing in your Library app, then at least part of the issue is moot.
I'm in the process of running a back-up even as I type so I can swap out the patched jars for the originals from FW 1.2.2 (one-by-one) to see if that restores the double-tap function in the B&N Library. Probably all three jars should be repatched anyway, but at least this will tell me if I am on the right track.
As for the patching, it's clear what needs to be done with the framework.jar and the audio recording patch you supplied. I've been looking at the patches for NTMM at the GitHub site and those are pretty impenetrable for me. So far.
nmyshkin said:
I've been looking at the patches for NTMM at the GitHub site...
Click to expand...
Click to collapse
Link, please. I've never used or looked at this.
To compare jars, just apktool d them into separate directories and diff them.
You can easily see which classes are different and by looking at the smali exactly what the differences are.
Renate NST said:
Link, please. I've never used or looked at this.
Click to expand...
Click to collapse
https://github.com/doozan/NookTouchPatches
Renate NST said:
To compare jars, just apktool d them into separate directories and diff them.
You can easily see which classes are different and by looking at the smali exactly what the differences are.
Click to expand...
Click to collapse
Yes, I've done this with android.policy.jar from FW 1.2.1 and FW 1.2.2, but I don't see an immediate way to compare them. I come up empty on the "diff" command(?). If I could see the connection between the smali and the info at the NTMM GitHub I guess I might be able to text edit the smali by hand(?) and then recompile the jars? Is that too simple?
windiff is MS's graphical version of the Unix diff command.
You can get it here: https://www.microsoft.com/en-us/download/details.aspx?id=18546
It works on directories or files.
Code:
C:\>windiff thisdir thatdir
Renate NST said:
windiff is MS's graphical version of the Unix diff command.
You can get it here: https://www.microsoft.com/en-us/download/details.aspx?id=18546
It works on directories or files.
Code:
C:\>windiff thisdir thatdir
Click to expand...
Click to collapse
OK, got that. So a quick look at a few smali files from the two firmwares shows only a line number difference. I'm sure there's more as there are about 80 smali files in just android.policy.jar
There are probably more proficient approaches but it seems to me that if I were to compare the original 1.2.1 jars to the patched jars distributed with NookManager I would see the patches pretty clearly. Next, I would have to examine the same smali files in the 1.2.2 jars to find the correct insertion points for the patches. Maybe? Then using something like Notepad++, I do a cut and paste. When all the smali files from the 1.2.2 jars have been patched in the same way as those from 1.2.1, then I baksmali the lot and recompile the jar.
Yes?
It sounds tedious, but I can do tedious and there are only two jars to work on.
Edit: OK, so back at the GitHub for NTMM I examined the patches and made a list of the smali files mentioned in each. Presumably these are the only ones actually patched. That narrows it down a lot! There are only 4 files patched in android.policy.jar and 6 in services.jar
Oh, I'm finally beginning to get what this is all about.
I hadn't ever seen that doozan stuff.
Those patches are difficult because they are diff generated.
There are only two java source files.
The rest of the patches were manually done on smali files which don't seem to be on that GitHub.
It's silly that ModUtils is installed with a patch, you could just copy it over.
My 1.2.1 patches a bunch of stuff which could easily conflict with the doozan patches or even not conflict but make their patches not patch correctly.
They might even conflict with some changes in FW 1.2.2
Renate NST said:
Oh, I'm finally beginning to get what this is all about.
I hadn't ever seen that doozan stuff.
Those patches are difficult because they are diff generated.
There are only two java source files.
The rest of the patches were manually done on smali files which don't seem to be on that GitHub.
It's silly that ModUtils is installed with a patch, you could just copy it over.
My 1.2.1 patches a bunch of stuff which could easily conflict with the doozan patches or even not conflict but make their patches not patch correctly.
They might even conflict with some changes in FW 1.2.2
Click to expand...
Click to collapse
You've given me some good tools (hopefully used correctly) to help see what is going on. Here's what I think I've learned:
I compared the two jars (android.policy.jar and services.jar) from FW 1.2.1 and 1.2.2. They are not completely identical, but the smali files which are to be patched are identical. Next, just to be sure I was correctly interpreting what info I could glean from the GitHub, I compared the original 1.2.1 jars with the patched jars. The only differences were in the smali files I had anticipated.
Unless the situation is more complicated than I think (is that even possible?!), this leads me to conclude that the patched smali files from the 1.2.1 firmware could be copied/added to the 1.2.2 firmware and the lot recompiled (apktool b) to provide patched jars for the 1.2.2 installation of NTMM (from NookManager).
Does that sound right?
nmyshkin said:
Does that sound right?
Click to expand...
Click to collapse
That should do the job.
You still might have to dig down to fix your original problem.
Renate NST said:
That should do the job.
You still might have to dig down to fix your original problem.
Click to expand...
Click to collapse
As usual, you are so right.
I patched the 1.2.2 jars so that NTMM would run and that all seems to have gone OK. But after a hot swap, clearing cache and rebooting (which took an agonizingly long time!), I found no change in the behavior that got me started on this in the first place. Nor was there any difference in the ability to install the few apps that needed resigning before they would install. But...I learned something, and whatever other subtle differences there were in the jars, that is now moot as things are now all updated to 1.2.2
Except framework.jar was not, because I had been lazy and didn't want to repatch for AudioRecord, so I had used the jar from 1.2.1. Since my other work had "no effect" I decided to bite the bullet and patch the framework.jar from 1.2.2 for AudioRecord (your patch). That was, um, fun. And when all that was accomplished and I swapped out that jar and rebooted (another loooooong wait) I still did not have the "fix" for the original issue.
Isn't that interesting? Ugh. Maybe it's a kernal issue. I'm not going there because there are no kernals developed for 1.2.2 and none for even 1.2.1 that have what I want. So I'll keep my kernal for 1.1.5 which does everything I want and hope nothing else shows up wonky. Maybe someday I'll return to an old backup of 1.2.2 before the kernal change and see if that is the issue.
Meanwhile I have a set of patched jars for 1.2.2. Now I need to look at the patches for NTGAppsAttack and try to get those updated, just because.
Thanks for the lesson
Well, you say that a double tap causes action, but not the right action.
(Double tap is kind of unusual, it's usually short vs. long tap.)
If something is dying, it's there in the logcat.
Is an Intent being generated?
B&N uses com.bn.nook.shop.action.show.details
My Library app also covers that. You can try temporarily installing it.
B&N uses a truly goofy Intent style.
This would make it difficult to troubleshoot from the command line with am start -a
It could be that the B&N database is screwed up.
The Intent only tells you to query B&N for the metadata.
Renate NST said:
It could be that the B&N database is screwed up.
The Intent only tells you to query B&N for the metadata.
Click to expand...
Click to collapse
...or, it could be that what's left of my little grey cells are out to lunch
I'm sure if I were to search diligently in this forum I would find myself reminding people about the Law of Unintended Consequences and pointing out exactly this issue IF Shop.apk is disabled. I can now remember that clearly. But I didn't when I started on this wild goose chase
Still, a few new skills, some newly patched jars. Not a bad result overall
Just to clarify:
I meant that it queries on the device the B&N content provider, not over the network to B&N.
Still, you should have seen something on logcat.
Renate NST said:
Just to clarify:
I meant that it queries on the device the B&N content provider, not over the network to B&N.
Still, you should have seen something on logcat.
Click to expand...
Click to collapse
And I did. Something about a missing intent. I think that's what finally nudged my stuck memory loose. BTW, I did do a quick install of your Library prior to remembering about Shop.apk. It cured the "flash to black screen and back" for a double-tap in the B&N Library, resulting in only a suggestion of a screen flicker, but not the desired behavior. Thanks again for all your help.

Categories

Resources