Disabling pdf file from Nook simple touch(glowlight) Library app - Nook Touch General

Hello,
The default 'Library' app on a NST & NST(G) ... is equipped to read pdf and epub files by default and list them out inside it.
As we already know the pdf files are not viewed best in the device's default reader app. The default library launches a pdf book into the default reader app.
I would like to know if somehow we can disable the library app from populating(picking-up) pdf files/books inside its library. This way i hope to get rid of pdf book entries from my default library.
is there some setting file for the default library app where we can uncheck pdf file format from its compatibility list ?
wouldn't it be nice to have a library full of only epub books ? would surely make our default library sparkling clean.
All Credit to @Renate NST ... for successfully accomplishing this idea to lighten up the default library app in our NST&G's ... to anybody who is interested in this ... can follow the steps found HERE
thanks for looking.

aiamuzz said:
Hello,
The default 'Library' app on a NST & NST(G) ... is equipped to read pdf and epub files by default and list them out inside it.
As we already know the pdf files are not viewed best in the device's default reader app. The default library launches a pdf book into the default reader app.
I would like to know if somehow we can disable the library app from populating(picking-up) pdf files/books inside its library. This way i hope to get read of pdf book entries from my default library.
is there some setting file for the default library app where we can uncheck pdf file format from its compatibility list ?
wouldn't it be nice to have a library full of only epub books ? would surely make our default library sparkling clean.
thanks for looking.
Click to expand...
Click to collapse
Not entirely sure about the Glowlight interface, but on the Library screen for the NST there is a drop-down menu option for displaying "all" or "books" or "shelves", etc. If you choose either "books" or "shelves" you will not see PDF files (unless you've included them in a shelf). That may be the easiest thing to do.
Installing a dedicated PDF reader will still give you access to any PDFs you may have via that app's user interface.

nmyshkin said:
Not entirely sure about the Glowlight interface, but on the Library screen for the NST there is a drop-down menu option for displaying "all" or "books" or "shelves", etc. If you choose either "books" or "shelves" you will not see PDF files (unless you've included them in a shelf). That may be the easiest thing to do.
Installing a dedicated PDF reader will still give you access to any PDFs you may have via that app's user interface.
Click to expand...
Click to collapse
@nmyshkin ... good work man ... you've kept our dinosaur of a device alive by your participation and chatter(enthusiasm) ... the community owes you among ... the many others who have from time to time kept the activity around our devices alive this far.
Yeah i am aware of the "all", "books" or "shelves" categorizations ... currently i use the shelves to minimize the cluttered library with the pdf's littered around without much use there as the nook reader is not the best reader for pdf's.
The reason i hope the PDF's do not show up even in the "All" category is because i have a lot of PDF's on my memory card, they all get populated in the default library app and unnecessarily increase the painful number of pages one has to flip through to get to a particular epub ebook burried under it.
If this could be achieved then ... preferred app per format would be ...
mobi format : Kindle
epub format : nook reader (without the clutter of the PDF files in its library)
pdf format :
ebookdroid - for a clean page flip reading experience of a fixed width PDF layout.
AVP pdf reader - for a magazine(multi-column) layout
... where double tapping a particular column in both, zooms in on the content to a readable size.
just hoping the PDF format could be unchecked from the default library app all together.
PS : i remember having the 'reboot' and 'recovery' options besides the 'power off' option before i reconfigured my NSTG lately, i just forgot how to enable the same back, Would appreciate if somebody could jog my memory on how to re-enable it back.

Power menu mod: https://forum.xda-developers.com/showthread.php?t=2171818
Can you tell me the version number for AVP PDF reader?

There are two different things here:
The first is the preferred activity for .pdf (or .epub or anything).
That's a question of whether you have another app to support it and whether you selected it in the picker.
The second thing is whether the Nook library notices and records .pdf items.
It's been a long time since I used any of the stock Nook library or reader.
In the NST, you could modify com.bn.nook.util.ReaderUtils.isSupportedFormat() to report false for pdf.
I believe that you would have to resign your whole system as the old Nook used sharedIds instead of priv-app
In the latest Nook (Glow3), you could modify com.nook.scanner.ScannerService.isNookSupported() to report false for pdf.
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.

Renate NST said:
There are two different things here:
The second thing is whether the Nook library notices and records .pdf items.
It's been a long time since I used any of the stock Nook library or reader.
In the NST, you could modify com.bn.nook.util.ReaderUtils.isSupportedFormat() to report false for pdf.
I believe that you would have to resign your whole system as the old Nook used sharedIds instead of priv-app
'
'
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Click to expand...
Click to collapse
thanks @Renate NST ...
Yup i am looking at the second option where the library does not notice pdf files ...
will reporting 'com.bn.nook.util.ReaderUtils.isSupportedFormat()' as false, render the library unable to record pdf files ?
If so ... a noob instruction set ... on how one could go about reporting the ...isSupportFormat to false ?
and about hacking the database to delete all the pdf's ... we will have carry out the deleting exercise everytime one adds new pdf files or reboots the nook ... that would be cumbersome.
look forward to the sought instruction set to report supported format as false ...
thanks.

nmyshkin said:
Power menu mod: https://forum.xda-developers.com/showthread.php?t=2171818
Can you tell me the version number for AVP PDF reader?
Click to expand...
Click to collapse
thanks for the link ... @nmyshkin ...
I am using version 2 versions ...
APV PDF Viewer 0.4.1.0 (41001)

found the following entries in 'LibraryPreferences.xml'
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="view_type_2" value="4" />
<int name="view_type_0" value="0" />
<int name="media_type" value="5" />
<int name="sort_type_4" value="0" />
<int name="sort_type_5" value="0" />
<int name="view_type_7" value="0" />
<int name="view_type_5" value="0" />
<int name="view_type_4" value="2" />
</map>
any values to be modified here to disable PDF file type ?

aiamuzz said:
found the following entries in 'LibraryPreferences.xml'
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="view_type_2" value="4" />
<int name="view_type_0" value="0" />
<int name="media_type" value="5" />
<int name="sort_type_4" value="0" />
<int name="sort_type_5" value="0" />
<int name="view_type_7" value="0" />
<int name="view_type_5" value="0" />
<int name="view_type_4" value="2" />
</map>
any values to be modified here to disable PDF file type ?
Click to expand...
Click to collapse
My guess is no. The values in my file are slightly different and I'd hazard a guess that these apply to the current state of the drop-down menus in the library.

aiamuzz said:
... everytime one adds new pdf files or reboots the nook ... that would be cumbersome.
Click to expand...
Click to collapse
No, a trigger would act on the insert automatically and delete or disable it immediately.
The other approach to modify the code, try using apktool.
I know that it's a bit cumbersome to rebuild apk's, but you might find it a useful skill to learn.
Code:
apktool d whatever.apk
<modify something>
apktool b whatever.apk
<sign using jarsigner and your signature>
Unfortunately, you have an NST which requires resigning *everything*.

Renate NST said:
No, a trigger would act on the insert automatically and delete or disable it immediately.
The other approach to modify the code, try using apktool.
I know that it's a bit cumbersome to rebuild apk's, but you might find it a useful skill to learn.
Code:
apktool d whatever.apk
<modify something>
apktool b whatever.apk
<sign using jarsigner and your signature>
Unfortunately, you have an NST which requires resigning *everything*.
Click to expand...
Click to collapse
hmmmm ... looks way above my pay grade currently ... reverse engineering an apk that is !!!
PS : I have decompiled the library app and extracted the java source codes ... i tried to read the smali files and java files ... shortlisted two files that could possibly hold the key to accomplish the desired functionality ... but that's about it ... i currently do not possess the skill to modify and rebuild the Library apk. I can post the smali files if anybody wants to help modify the relevant parts of code.

Renate NST said:
There are two different things here:
'
'
'
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Click to expand...
Click to collapse
Could a more detail instruction on how to attempt the database hack ... possible ?
thanks

Well, let's try an easy test first.
I fired up my old NST to take a look.
I don't have the B&N reader or library on it, so I don't know if this will do the job.
Try this:
Code:
# cd /data/data/com.bn.nook.reader.activities/databases
# ls
...
readerlocal.db
...
# sqlite3 readerlocal.db
sqlite> select ean from readerlocal where ean like '%.pdf';
... <bunches of pdf files>
sqlite> delete from readerlocal where ean like '%.pdf';
sqlite> .q
#
Then do a restart and see if the stuff is missing from the library and how long it takes B&N to put it all back.
If this clears it out of the library, fine, we can work on the automatic trigger.

Renate NST said:
Well, let's try an easy test first.
I fired up my old NST to take a look.
I don't have the B&N reader or library on it, so I don't know if this will do the job.
Try this:
Code:
# cd /data/data/com.bn.nook.reader.activities/databases
# ls
...
readerlocal.db
...
# sqlite3 readerlocal.db
sqlite> select ean from readerlocal where ean like '%.pdf';
... <bunches of pdf files>
sqlite> delete from readerlocal where ean like '%.pdf';
sqlite> .q
#
Then do a restart and see if the stuff is missing from the library and how long it takes B&N to put it all back.
If this clears it out of the library, fine, we can work on the automatic trigger.
Click to expand...
Click to collapse
This seemed to be working at the time of execution (although there is no feedback when files are "deleted"?), but it did not list all PDF files. I recently downloaded a copy of the newspaper in PDF form and that is in the Library. This was not listed by sqlite. Instead, long gone items were listed.
In any case, when I exited and rebooted, the newspaper was still in the Library (or "back"). When I was writing the book cover "screensaver" app, there was another db besides readerlocal which seemed to contain similar info but I've forgotten what it was.

nmyshkin said:
Instead, long gone items were listed.
Click to expand...
Click to collapse
Well, then it's just using the regular MediaScanner.
If you hack that then a PDF viewer that relies on it may not enumerate PDF's.
Of course you can still select a PDF in a file manager and open it in your viewer.
As I said, I have neither a B&N Reader nor B&N assets on any of my devices.
Ok, try this one:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> select _data from docs;
...
sqlite> select _data from docs where _data like '%.pdf';
...
sqlite> update docs set valid=0 where _data like '%.pdf';
sqlite> .q
#

Renate NST said:
Well, then it's just using the regular MediaScanner.
If you hack that then a PDF viewer that relies on it may not enumerate PDF's.
Of course you can still select a PDF in a file manager and open it in your viewer.
As I said, I have neither a B&N Reader nor B&N assets on any of my devices.
Ok, try this one:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> select _data from docs;
...
sqlite> select _data from docs where _data like '%.pdf';
...
sqlite> update docs set valid=0 where _data like '%.pdf';
sqlite> .q
#
Click to expand...
Click to collapse
OK, so this listed the entire library contents, including the one current PDF file. I guess it also accepted the final command (no feedback), but when I rebooted, the PDF was still (or back) in the Library. I also checked the Library just before rebooting and the PDF was still there.

nmyshkin said:
... the PDF was still there.
Click to expand...
Click to collapse
Yeah, I was just trying to see if the B&N stuff paid attention to the "valid" column, apparently not.
OTOH, if you only have one PDF, why is this such an issue???
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> delete from docs where _data like '%.pdf';
sqlite> .q
#

Renate NST said:
Yeah, I was just trying to see if the B&N stuff paid attention to the "valid" column, apparently not.
OTOH, if you only have one PDF, why is this such an issue???
Click to expand...
Click to collapse
LOL, actually, I'm not the OP! But I was curious to see if such a manipulation was possible. I still think it is simplest to just choose the display "Books" or "Shelves" in the Library. That way you don't see PDFs unless you specifically put them on a shelf. Meanwhile your dedicated PDF app can be directed to the PDF files.

Renate NST said:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> delete from docs where _data like '%.pdf';
sqlite> .q
#
Click to expand...
Click to collapse
This instruction removes the PDF file from the Library immediately, or as fast as I can get there after closing the terminal window.
The PDF file reappears in the Library on reboot, as you might expect. Like I said, I think it's just simpler to choose a Library display option that excludes PDF files. Something by Emerson regarding a foolish consistency

nmyshkin said:
Something by Emerson regarding a foolish consistency
Click to expand...
Click to collapse
Well, the (artifical) constraints on this were to do it without modifying the apk.
Code:
CREATE TRIGGER no_pdfs AFTER INSERT ON docs BEGIN DELETE FROM docs WHERE _data LIKE '%.pdf'; END;
That's it, put it in your database.

Related

[Q] How to export Notes and Highlights on Touch? Cppy and Paste?

Hello,
Thanks in advance. I searched the forum and elsewhere for these answers.
Can one export Notes and Highlights with a rooted Nook Touch. If so, how and which app should one download? Which are best?
If one puts Kindle app on a Nook Touch, does one get the functionality of exporting notes that I believe the Kindle app has?
Is there an a reader app that allows for Copying/Pasting/exporting? There is this unanswered thread that I think covers the same topic or similar:
http://forum.xda-developers.com/showthread.php?t=1180368
Much to my dismay, I just discovered that I can not export or backup Notes and Highlights that I create on a Nook Touch. I wonder what % don't realize this when they buy the device.
I do not think that "Nook For PC" does any of this as it only syncs bookmarks across devices:
http://www.barnesandnoble.com/u/nook-for-pc/379002322/
Once again thank you
I've been able to export from moon reader plus on my nook color - if this app works on nook touch it's the best solution I've found.
any solution found?
I want to root my nook, but I don't want to lose my highlights...!!!
I have been on the same quest for a few days now. I have not found a particularly good solution, but I do have a way to preserve highlighting.
When you use the kindle app on android and sideload a book in .mobi format (i.e. you place the .mobi file in /sdcard/kindle folder), and then make highlights or notes, it creates a .mbp file in the same directory. You can then move the .mobi and .mbp file into other kindle apps (other device, pc, etc), and your notes and highlights are preserved.
If I could find a way to get the .mbp file in /sdcard/kindle to automatically sync to the appropriate PC folder, it would be nearly perfect.
The advantage of .mobi files have over .epub is that .epub standard does not seem to include annotations. At the moment, you are somewhat confined to the Amazon ecosystem, but for now, this seems the best solution I've found so far.
---------- Post added at 10:18 AM ---------- Previous post was at 10:04 AM ----------
I have been on the same quest for a few days now. I have not found a particularly good solution, but I do have a way to preserve highlighting.
When you use the kindle app on android and sideload a book in .mobi format (i.e. you place the .mobi file in /sdcard/kindle folder), and then make highlights or notes, it creates a .mbp file in the same directory. You can then move the .mobi and .mbp file into other kindle apps (other device, pc, etc), and your notes and highlights are preserved.
If I could find a way to get the .mbp file in /sdcard/kindle to automatically sync to the appropriate PC folder, it would be nearly perfect.
The advantage of .mobi files have over .epub is that .epub standard does not seem to include annotations. At the moment, you are somewhat confined to the Amazon ecosystem, but for now, this seems the best solution I've found so far.
Any updates
Does anybody have any updates on this? I've been looking at how to save my highlights and notes because I want to update to 1.1.
I noticed that Calibre is testing saving notes from the Kobo reader. I think this would be the best way if they ever do it for the NST. However, that would be a long term solution because I don't see them doing it within the next month or so.
Any help on this would be greatly appreciated. Thanks,
The first post in this thread shows how to backup highlights and annotations. http://forum.xda-developers.com/showthread.php?t=1346748 I haven't tried it yet but I will check back when I do it.
this is a a feature really needed...anybody working on it??
Here's a direct link to the post referenced above. Highlights and notes are stored in databases.
http://forum.xda-developers.com/showpost.php?p=20069243&postcount=5
I haven't tested it yet.
Anyone interested in exploring -- you may want to look into some of the apps in the Android Market that allow for viewing and editing databases on a rooted device:
https://market.android.com/search?q=root+database+viewer&c=apps
Please post any findings!
MJ
mjj777 said:
Please post any findings!
Click to expand...
Click to collapse
It’s easy to write SQL script, but it’ll be few manual steps - not for everybody.
I’m not good enough yet to write GUI app, but it looks like nice and easy one to start with.
The problem is B&N doesn’t provide any API to work with nook specific features, like display book thumbnail, get books in library, get books on shelf, etc.
Once this framework is available, “assembling” apps should be piece of cake.
Manual Solution...
Besides backing up highlights and annotations (mentioned above) http://forum.xda-developers.com/showpost.php?p=20069243&postcount=5
I am following this thread that just started on somebody asking a possible way to do this automatically to dropbox or something similar. Which I think would be awesome! http://forum.xda-developers.com/showthread.php?t=1676579. However, this really doesn't solve the issue of easily reviewing highlights and annotations or exporting them to excel or word for a more pleasant viewing experience.
In the meantime as I am reading I have my iPhone open and I am writing down comments and passages and then marking the page number. I am doing this in the Onenote app which can be synced to my computer.
It makes reading not as fun when you have to go to a different device and type something in. However, I am guaranteed not to loose it, and it stays organized in a onenote folder I named "books" and section is the books title. Putting the page number also allows me to later go back and go to that specific page for further details and it is my understanding it should also match with the paper-bound version page number.
I find it amazing there is not an easier way. However, I have heard rumors the backing up a annotations and highlights might/could happen in Calibre. I think they began trying it with the Kobo reader. I think this would be ideal.
CoolReader can highlight, take notes and export.
The only problem is that it doesnt have DRM so it cannot read
books with DRM (purchased or rented books).
--
Is there any news on this side?
to me would be enough to having the possibility to share via mail.
does anyone knows if an app for android would work for this and if it feasible ?
Ok
i've just create a very basic app that export the highlithed text to an txt file inside the sd card.
source code is here (i started yesterday with android, so it's crappy).
https://github.com/esseti/NookTouchExporter
here the apk https://github.com/esseti/NookTouchExporter/tree/master/bin
it requires root permission.
feedbacks/collaborations anything is welcomed.
Off-hand, you might want to use a constructor for Annotation instead of setting things:
Code:
public class Annotation
{
private String book;
private String hltext;
public Annotation(String book, String htltext)
{
this.book = book;
this.hltext = hltext;
}
}
question
Hi, first, thanks for placing the apk and second, how do I use it?
I already install, I gave root permission, but nothing happens when you touch the icon
thanks
I forgot to subscribe to the thread. i made some changes, now it should have a button.
apk is here https://github.com/esseti/NookTouchExporter/tree/master/out/production/NookExporter
esseti said:
I forgot to subscribe to the thread. i made some changes, now it should have a button.
apk is here https://github.com/esseti/NookTouchExporter/tree/master/out/production/NookExporter
Click to expand...
Click to collapse
I've just tried this (md5sum: fc31f1bd16a95ebd5c41823cb9bbc57d) on my 1.2.1 UK Nook rooted with NookManager, and it has some problems.
When I start it, it asks for root via SuperUser and I grant it root permissions permanently. However, the attempt to copy annotations.db fails:
Code:
I/ActivityManager( 788): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x14000000 cmp=it.stefanotranquillini.nookexporter/.TestDatabaseActivity }
I/System.out(24021): books 1here we are
W/System.err(24021): io ex
W/System.err(24021): java.io.FileNotFoundException: /data/data/com.bn.nook.reader.activities/databases/annotations.db
E/TC ( 1035): KPICollector: 1368871897842 ActivityManager background {"component":"com.harasoft.relaunch/.AllApplications"}
E/TC ( 1035): KPICollector: 1368871897875 ActivityManager foreground {"component":"it.stefanotranquillini.nookexporter/.TestDatabaseActivity"}
Needless to say, the file does exist:
# ls -l /data/data/com.bn.nook.reader.activities/databases/annotations.db
-rw-rw---- app_0 app_0 11264 2013-05-07 15:57 annotations.db
Click to expand...
Click to collapse
I think you probably need to build a command line (e.g. su /system/xbin/cp /data/data/com.bn.nook.reader.activities/databases/annotations.db blahblah/databases.db) then exec() it. exec()ing su doesn't, AFAICS, give your app the power to do anything it likes as root. Chainfire wrote a nice doc: http://su.chainfire.eu/.
If I use an adb shell to manually copy the file over, it seems to export OK. I'd suggest, though, dumping all the columns so that adding import functionality later is possible.
cowbutt said:
I've just tried this (md5sum: fc31f1bd16a95ebd5c41823cb9bbc57d) on my 1.2.1 UK Nook rooted with NookManager, and it has some problems.
When I start it, it asks for root via SuperUser and I grant it root permissions permanently. However, the attempt to copy annotations.db fails:
Code:
I/ActivityManager( 788): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x14000000 cmp=it.stefanotranquillini.nookexporter/.TestDatabaseActivity }
I/System.out(24021): books 1here we are
W/System.err(24021): io ex
W/System.err(24021): java.io.FileNotFoundException: /data/data/com.bn.nook.reader.activities/databases/annotations.db
E/TC ( 1035): KPICollector: 1368871897842 ActivityManager background {"component":"com.harasoft.relaunch/.AllApplications"}
E/TC ( 1035): KPICollector: 1368871897875 ActivityManager foreground {"component":"it.stefanotranquillini.nookexporter/.TestDatabaseActivity"}
Needless to say, the file does exist:
I think you probably need to build a command line (e.g. su /system/xbin/cp /data/data/com.bn.nook.reader.activities/databases/annotations.db blahblah/databases.db) then exec() it. exec()ing su doesn't, AFAICS, give your app the power to do anything it likes as root. Chainfire wrote a nice doc: http://su.chainfire.eu/.
If I use an adb shell to manually copy the file over, it seems to export OK. I'd suggest, though, dumping all the columns so that adding import functionality later is possible.
Click to expand...
Click to collapse
i've no idea why it fails .
anyway i'll take a look later on. if you want code is on github and you can change it and submit as a patch (or whatever they called it), then i'll merge it.
Hello,
I haven't found a solution to the original question posted on this forum but I would like to share something that I think most Kindle users will benefit from.
Amazon has made it possible for Kindle users to make notes and highlights on their favorite passages or selection and these can be accessed again on their site. However, it can take up time and be difficult to obtain sometimes.
There is an iOS app that will be released this November 2013 called Snippefy that will make it easier for Kindle users to read and share their notes and highlights all in one place. They will also be able to export these to Evernote, Dropbox and email. I'm not able to post the link to the site here but basically it's at "snippefy dot com"
I just wanted to share this with all of you as you might find it useful.
Thanks!
Two ereaders I've found that do a good job of allowing for annotations, and have good export options are Moon+ Reader (version 1.6.5b) and Mantano Reader (version 2.2.12).
They are no longer being developed in a way that supports the Android 2.1 platform, which is what the Nook runs on, so the versions I listed above are the most recent versions that will work on the Nook, you'll have to get the old APKs and sideload them if you want to use that. Their controls and interface are amazing in my opinion, perhaps Moon+Reader 1.6.5b > Mantano Reader 2.2.13, however, the display is in my opinion quite low quality and unacceptable for extended reading.
A better option to keep your eye on is Page Turner (https://play.google.com/store/apps/details?id=net.nightwhistler.pageturner.ads&hl=en]). The developer is very active and mindful that a large portion of the user base uses the Nook ST, and so continues to have features support the Android 2.1 platform. The current beta version which will be released in the next weeks has just added support for highlighting, annotating and bookmarks. The plan for the next version is to allow for simple export process of these additions, so keep an eye on it.

[Solved] On the problem of broken bookmarks

I have added detailed instructions at the end of this post for those willing to try this solution
Hi,
this post is meant to be as a place to discuss the "missing bookmark" problem, spread the findings on its causes and, if possible, find a solution.
As many of you have noticed, the stock reader app seems to behave differently WRT to bookmarks if launched from the library or from the "Last Book" icon on the status bar: often you open the last book only to find that it has lost the bookmark and it starts again from the first page.
I noticed that this behaviour also includes the hilights and annotations: for a given book I have two different sets of hilights and bookmarks which are used if I open the book from the library or from the "Last Book" icon respectively.
The DBs involved with this "feature" of the Reading app are (at least):
Code:
/data/data/com.android.providers.media/databases/internal.db
/data/data/com.bn.nook.reader.activities/databases/bookmarks.db
/data/data/com.bn.nook.reader.activities/databases/annotations.db
/data/data/com.bn.nook.reader.activities/databases/readerlocal.db
/data/data/com.bn.nook.reader.activities/databases/lastreadingpoint.db
/data/data/com.bn.nook.home/files/home.db
As far as I can understand, internal.db holds the books info (in the docs table) and the others hold the info on annotations, bookmarks and last reading point. The last reading point seems to be stored in two different table: readerlocal.db and lastreadingpoint.db.
The home.db apparently holds the "now reading" history.
(Note that since I don't live in the States, all my findings relate to sideloaded books, mostly edited with Sigil.)
In the internal.db there are two fields which are of interest in this discussion: the 'ean' field and the 'data' field.
The 'ean' field is populated with info from the <identifier> tag in the content.opf manifet of each book (if there are more tags, ean is the concatenation of these fields).
The 'data' is the path to book's file.
The problem with the reader app seems related to the identifier used to, ehm, identify a book: when you open a book from the Library, it seems to use the 'data' filed, while when you open from the "Last Book" icon, it seems to use the 'ean' fields.
In both cases, this identifier is stored in a 'ean' field in bookmarks and/or annotations db/table, which lead to the two sets problem: if you open from the Library, the file name is used and gives access to one set of bookmarks/annotations; when you open from the incon, the ean used and the other set is accessed.
lastreadingpoint.db and readerlocal.db use a more uniform approach: they have the same fields (actually lastreadingpoint has a 'sync_status' which is not present in 'readerlocal') but lastreadingpoint always uses the 'ean' id, while readerlocal uses the file name. The point is when the Reading app uses info from one db or the other
I don't see any real solution to this problem, but we could come up with some workaround to minimize it, eventually with some SQL trick.
This is the info I gathered up to now, feel free to correct me or integrate with your findings...
EDIT (28.1.2012)
I have some more info to share.
After a backup I tried to delete the above mentioned DBs and reboot: the NOOK recreates the DBs and start populating them from scratch.
The "reader" related DBs are created as soon as you open the first book.
The internal.db is repopulated from the epubs found in the internal flash and in the sdcard, BUT the 'ean' field is left empty.
Now, if you delete an epub file and copy it back in place (I usually sync my books from dropbox...), the internal.db is updated with the 'ean'!
EDIT (31.1.2012)
I addedd to internal.db the triggers in post #5, and manually deleted references to eans in the other DBs (using something like "delete from xxx where ean not like 'file:%';") and it seems to have solved the problem.
I won't post detailed, step by step instructions as long as I am not confident that this solution don't have any side-effect.
If you know how to edit SQLite files and feel like giving it a try, post here your results...
EDIT (15.2.2012)
Here you will find a detailed, step by step procedure to create the triggers and try to fix the problem. The usual caveats apply.
PLEASE NOTE THAT THIS PROCEDURE WILL DELETE SOME OF YOUR BOOKMARKS AND ANNOTATIONS (namely those created while reading a book opened from "Now Reading" icon).
You will need a working ADB connection with your Nook Simple Touch (NST), a copy of sqlite3 for Android and some command line skills. I will use a command prompt window under Windows, you will need to make some adjustment for OSX and Linux.
In the following, ">" stands for the command prompt on your PC, "# " stands for the remote shell on your NST and "sqlite> " stands for the SQLite3 shell on your NST.
1. Start connecting your NST with the USB cable and verify that you can reach it via ADB. From the command prompt do:
Code:
>adb devices
You should se something like this:
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
1112223334445556 device
Now, if you have a working copy of sqlite3 installed in your NST, skip to step 3.
2. Download "sqlite3 (push to n2e).zip" from here and extract "sqlite3" in (e.g.) C:\temp.
Now, from command prompt, do the following (you will be remounting /system partition with rw access, copy sqlite3 in /system/bin, make it executable and change back /system to ro):
Code:
>adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
>adb push C:\temp\sqlite3 /system/bin
>adb shell chmod 755 /system/bin/sqlite3
>adb shell mount -o remount,ro /dev/block/mmcblk0p5 /system
3. From command prompt, make a backup of each file that we are going to modify:
Code:
>adb pull /data/data/com.android.providers.media/databases/internal.db C:\temp\internal.db
>adb pull /data/data/com.bn.nook.reader.activities/databases/lastreadingpoint.db C:\temp\lastreadingpoint.db
>adb pull /data/data/com.bn.nook.reader.activities/databases/readerlocal.db C:\temp\readerlocal.db
>adb pull /data/data/com.bn.nook.reader.activities/databases/annotations.db C:\temp\annotations.db
>adb pull /data/data/com.bn.nook.reader.activities/databases/bookmarks.db C:\temp\bookmarks.db
4. From the command prompt connect to a remote shell on your NST:
Code:
>adb shell
You should get the shell prompt:
Code:
#
5. From the remote shell prompt delete the bookmarks, annotations and reading points that use the 'ean' field:
Code:
# sqlite3 /data/data/com.bn.nook.reader.activities/databases/lastreadingpoint.db "DELETE FROM lastreadingpoint WHERE ean NOT LIKE 'file:%';"
# sqlite3 /data/data/com.bn.nook.reader.activities/databases/readerlocal.db "DELETE FROM readerlocal WHERE ean NOT LIKE 'file:%';"
# sqlite3 /data/data/com.bn.nook.reader.activities/databases/annotations.db "DELETE FROM annotations WHERE ean NOT LIKE 'file:%';"
# sqlite3 /data/data/com.bn.nook.reader.activities/databases/bookmarks.db "DELETE FROM bookmarks WHERE ean NOT LIKE 'file:%';"
6. Now connect to the library DB to erase existing eans and create the triggers:
Code:
# sqlite3 /data/data/com.android.providers.media/databases/internal.db
You sholud get the sqlite prompt:
Code:
sqlite>
From here do: (some lines are quite long, be sure to copy them exactly...)
Code:
sqlite> UPDATE docs SET ean = NULL;
sqlite> DROP TRIGGER IF EXISTS erase_ean_update_docs;
sqlite> CREATE TRIGGER IF NOT EXISTS erase_ean_update_docs AFTER UPDATE OF ean ON docs FOR EACH ROW WHEN new.ean IS NOT NULL BEGIN UPDATE docs SET ean = NULL WHERE _id = new._id; END;
sqlite> DROP TRIGGER IF EXISTS erase_ean_insert_docs;
sqlite> CREATE TRIGGER IF NOT EXISTS erase_ean_insert_docs AFTER INSERT ON docs FOR EACH ROW WHEN new.ean IS NOT NULL BEGIN UPDATE docs SET ean = NULL WHERE _id = new._id; END;
7. Close all the connections and reboot
Code:
sqlite> .q
# exit
>adb reboot
From now on, each time the Nook sets an EAN for a book, the trigger will immediatly erase it and the Reader application will always use the filename as an identifier.
/met
Well, that explains why it keeps going back to the first page all the time.
Updated OP...
I was wondering about same thing!
Not sure, if it was introduced first in 1.1.0, I do not recall such behavior in early versions.
As for solution, it shouldn’t be a problem to write a app/script to duplicate rows.
I.e. if there is a row with 'ean' field, but there is no one 'data' field with same content -> duplicate.
And vice-versa.
Also interesting, is there a way to find command line arguments used to lunch reader app from
Library and "Last Book" icon (com.bn.nook.reader.activities)
If nook sources are all available, it could be possible to recompile broken component.
And the last:
Anyway to get in touch with developers and submit a bug?
You have pretty much nailed it down already - it should be piece of cake to fix.
ApokrifX said:
I was wondering about same thing!
Not sure, if it was introduced first in 1.1.0, I do not recall such behavior in early versions.
As for solution, it shouldn’t be a problem to write a app/script to duplicate rows.
I.e. if there is a row with 'ean' field, but there is no one 'data' field with same content -> duplicate.
And vice-versa.
Also interesting, is there a way to find command line arguments used to lunch reader app from
Library and "Last Book" icon (com.bn.nook.reader.activities)
If nook sources are all available, it could be possible to recompile broken component.
And the last:
Anyway to get in touch with developers and submit a bug?
You have pretty much nailed it down already - it should be piece of cake to fix.
Click to expand...
Click to collapse
I was thinking of a more drastic approach: during my tests, I found that as long as I had no 'ean' in my internal.db/docs, everything worked fine (or at least it did seem to, maybe I didn't test it long enough), so I was thinking of adding a trigger to internal.db that systematically erase 'ean' on each update
I don't know how this would interfere with books purchased in B&N shop, though.
As for B&N, I don't think they are much interested in making the life easier for people who sideload book instead of buying from their shop
Moreover, I am not sure that this behaviour is not a side effect of rooting and using a different home from stock's
EDIT:
I was thinking to something like this:
Code:
UPDATE docs SET ean = NULL;
DROP TRIGGER IF EXISTS erase_ean_update_docs;
CREATE TRIGGER IF NOT EXISTS erase_ean_update_docs
AFTER UPDATE OF ean ON docs
FOR EACH ROW
WHEN new.ean IS NOT NULL
BEGIN
UPDATE docs
SET ean = NULL
WHERE _id = new._id;
END;
DROP TRIGGER IF EXISTS erase_ean_insert_docs;
CREATE TRIGGER IF NOT EXISTS erase_ean_insert_docs
AFTER INSERT ON docs
FOR EACH ROW
WHEN new.ean IS NOT NULL
BEGIN
UPDATE docs
SET ean = NULL
WHERE _id = new._id;
END;
I guess I'll have to somehow reset the others DBs, also.
I cant' test it now, I'll try it and report...
Hah!
Nice and easy!
met67 said:
I don't know how this would interfere with books purchased in B&N shop, though.
Click to expand...
Click to collapse
You can get a free book from B&N shop and test, right?
met67 said:
As for B&N, I don't think they are much interested in making the life easier for people who sideload book instead of buying from their shop
Moreover, I am not sure that this behavior is not a side effect of rooting and using a different home from stock's
Click to expand...
Click to collapse
I don’t think so. (i.e. it’s not rooting).
Just tested with free B&N and side-loaded books.
The former keeps bookmarks, the later doesn’t…
---------- Post added at 02:17 AM ---------- Previous post was at 02:11 AM ----------
I’d use new.rowid instead of new._id in “WHERE _id = new._id;”
But that’s me
ApokrifX said:
Hah!
Nice and easy!
You can get a free book from B&N shop and test, right?
I don’t think so. (i.e. it’s not rooting).
Just tested with free B&N and side-loaded books.
The former keeps bookmarks, the later doesn’t…
---------- Post added at 02:17 AM ---------- Previous post was at 02:11 AM ----------
I’d use new.rowid instead of new._id in “WHERE _id = new._id;”
But that’s me
Click to expand...
Click to collapse
Last time I tried, the shop wouldn't let me download free books without a valid credit card in my account
As for the id, that's the way B&N uses to address rows in other triggers, so I tend to use the same approach...
I just added the triggers, and it seems to works fine...
If someone brave enough does try this solution, please report here: if it works fine for other people, I'll prepare a step by step guide.
/met
I think a better long term fix would be posting your findings in the Barnes and Noble Support forums, a B&N admin and/or dev may actually see it there and they could incorporate this into whatever next update comes out making it available to all users not just those of us who have rooted.
met67 said:
Last time I tried, the shop wouldn't let me download free books without a valid credit card in my account
Click to expand...
Click to collapse
I use virtual CC from CITI with $1 limit…
met67 said:
As for the id, that's the way B&N uses to address rows in other triggers, so I tend to use the same approach...
Click to expand...
Click to collapse
rowid supposed to be a little faster. Doesn’t matter in this case of course.
And a little bit clearer (for me).
Asked in another thread, will ask here again:
BTW: How do you fiddle with databases such as internal.db?
Use adb to pull/push and fiddle on PC, or use adb shell to do it on nook?
---------- Post added at 02:57 AM ---------- Previous post was at 02:53 AM ----------
GabrialDestruir said:
I think a better long term fix would be posting your findings in the Barnes and Noble Support forums, a B&N admin and/or dev may actually see it there and they could incorporate this into whatever next update comes out making it available to all users not just those of us who have rooted.
Click to expand...
Click to collapse
I suggested very same thing early.
And I have very same feeling met67 has: they don’t care about side-loaded books, might be even make thing harder on purpose.
ApokrifX said:
I use virtual CC from CITI with $1 limit…
I suggested very same thing early.
And I have very same feeling met67 has: they don’t care about side-loaded books, might be even make thing harder on purpose.
Click to expand...
Click to collapse
It still might be worth a try to see if we can get them to fix it.
GabrialDestruir said:
It still might be worth a try to see if we can get them to fix it.
Click to expand...
Click to collapse
I'm not against it
BTW: Wanna throw in an idea:
It was/is a thread about "Automating shelving" http://forum.xda-developers.com/showthread.php?t=1378510
It’s piece of cake to with very same insert trigger, the shelves are in same internal.db
---------- Post added at 04:43 AM ---------- Previous post was at 04:14 AM ----------
Started working on it and realized, met67 was talking about bookmarks, but I meant annotations. (annotations.db)
I have tons of annotations, plagued by same bug: some have ean, some filepath…
And I kept wondering, I did put a note here, where the heck did it go?
And then they showed up all of the sudden and then disappeared same way.
Crap…
So fix script should be smth. like this:
Update bookmarks.db and annotations.db - replace ean with filepath (lookup in internal.db)
Than clear ean in internal.db.
Any comments?
ApokrifX said:
...
BTW: How do you fiddle with databases such as internal.db?
Use adb to pull/push and fiddle on PC, or use adb shell to do it on nook?
...
Click to expand...
Click to collapse
Both, actually.
I use SQLiteStudio to browse data and definitions, and a copy of sqllite3 found on this forum to modify the DB on the device via adb shell
ApokrifX said:
...
BTW: Wanna throw in an idea:
It was/is a thread about "Automating shelving" http://forum.xda-developers.com/showthread.php?t=1378510
It’s piece of cake to with very same insert trigger, the shelves are in same internal.db
...
Click to expand...
Click to collapse
Yes, I also thought about this, but having tried the "Automatic shelving" (with a script) for a while, I found that shelves tend to be too much slow and I am not sure it is worth the effort (IMO, of course).
ApokrifX said:
So fix script should be smth. like this:
Update bookmarks.db and annotations.db - replace ean with filepath (lookup in internal.db)
Than clear ean in internal.db.
Any comments?
Click to expand...
Click to collapse
Yes, I think this should work. I just erased bookmarks and annotation related to ean, since I don't have much of them.
met67 said:
Both, actually.
I use SQLiteStudio to browse data and definitions, and a copy of sqllite3 found on this forum to modify the DB on the device via adb shell
Click to expand...
Click to collapse
I.e. you don't have sqllite apk installed on Nook.
I thought, it'll be a bit easier...
---------- Post added at 07:35 PM ---------- Previous post was at 07:31 PM ----------
met67 said:
Yes, I also thought about this, but having tried the "Automatic shelving" (with a script) for a while, I found that shelves tend to be too much slow and I am not sure it is worth the effort (IMO, of course).
Click to expand...
Click to collapse
If you have many books, it’s real PiA to scroll to find the one you need. Or it’s just me?
met67 said:
Yes, I think this should work. I just erased bookmarks and annotation related to ean, since I don't have much of them.
Click to expand...
Click to collapse
Ok. I’ll work on scripts and post them here.
Tried to submit bug report to B&N - apparently it’s was done 09-15-2011 05:10 PM already.
http://bookclubs.barnesandnoble.com...y-Manager/Nook-Touch-bug-reports/td-p/1081244
If you follow thread – only first bug was forwarded by Admin to developers.
Read last post: “I can't begin to describe my frustration that this was not fixed in the last update…“
That’s about it - thread looks abandoned - there is no use to post there.
I can add - for a developer it should take from 15 min to 1 hour to fix such a bug.
IMO, of course...
BTW: Anybody seen a NST firmware release report with all fixed and not bugs, as other companies do (Cisco, Juniper, etc.)?
Although, it’s probably done for different market segments, definitely not for “personal customer” one.
ApokrifX said:
I.e. you don't have sqllite apk installed on Nook.
I thought, it'll be a bit easier...
Click to expand...
Click to collapse
If you mean SQLite Editor, yes, I have it on the Nook, but is a bit hard to use (scrolling tends to behave errantly).
ApokrifX said:
If you have many books, it’s real PiA to scroll to find the one you need. Or it’s just me?
Click to expand...
Click to collapse
Yes, but, at least for me, having a shelf for each author is an even worst PiA.
ATM I have 326 book in My Library in 55 pages.
If I use a shelf for each author, I have 139 shelves in 70 pages!
Reading through this the issue seems to be something somewhere is applying ean in some places and filepath in another. While an initial script to change it all to one or another would be beneficial we really need to find where it's assigning either or both of those values so that we can try and modify the code to remove either ean or filepath from being assigned.
The second thing and more related to automatic shelving than to broken bookmarks is if we could find and disable the code that for some reasons says when new books get added, shelves get emptied out and/or deleted.
---------- Post added at 08:45 AM ---------- Previous post was at 08:40 AM ----------
met67 said:
If you mean SQLite Editor, yes, I have it on the Nook, but is a bit hard to use (scrolling tends to behave errantly).
Yes, but, at least for me, having a shelf for each author is an even worst PiA.
ATM I have 326 book in My Library in 55 pages.
If I use a shelf for each author, I have 139 shelves in 70 pages!
Click to expand...
Click to collapse
I personally think that arranging books by series (not author or some other method) would make it easier, or at the very least by Read/Unread/Reading then you could collapse a shelf you're not looking through and have less books.
GabrialDestruir said:
Reading through this the issue seems to be something somewhere is applying ean in some places and filepath in another. While an initial script to change it all to one or another would be beneficial we really need to find where it's assigning either or both of those values so that we can try and modify the code to remove either ean or filepath from being assigned.
Click to expand...
Click to collapse
Since it is very same reader app, I’d guess, it is started with different arguments from “last book” and from library.
“ps -ef”, “ps -x” supposed to show full command line (i.e. app + arguments), but it doesn’t...
Anyway to see full command line to prove?
---------- Post added at 04:21 AM ---------- Previous post was at 04:11 AM ----------
GabrialDestruir said:
>ATM I have 326 book in My Library in 55 pages.
>If I use a shelf for each author, I have 139 shelves in 70 pages!
I personally think that arranging books by series (not author or some other method) would make it easier, or at the very least by Read/Unread/Reading then you could collapse a shelf you're not looking through and have less books.
Click to expand...
Click to collapse
I didn’t think about that many books…
I’d say, multi-level shelves might be the way to go - first by series, than by author, etc.
Although, if I think a little bit, anyway I organize it, won’t be necessarily good for somebody else.
It shouldn’t be shelves, but some sort of filtering/drill-down built in into library:
I select 1st criteria (any metadata field, like series, [optionally, with wildcard]), then filter by 2nd (author), etc.
…Sorry, got carried away
---------- Post added at 04:26 AM ---------- Previous post was at 04:21 AM ----------
met67 said:
If you mean SQLite Editor, yes, I have it on the Nook, but is a bit hard to use (scrolling tends to behave errantly).
Click to expand...
Click to collapse
I meant command line only (on nook).
To use GUI on PC to develop/debug scripts, then exec on nook via command line sqlite.
ApokrifX said:
I meant command line only (on nook).
To use GUI on PC to develop/debug scripts, then exec on nook via command line sqlite.
Click to expand...
Click to collapse
As I was saying, I use a copy of sqlite3 found on this forum to exec SQL commands on nook. It is not an apk, just a simple executable: place it in a suitable place (e.g. /bin), chmod +x it and have fun

Stock Reader page turn refresh rate

Some people might want to change how often a page turn in the stock Reader app does a full refresh.
This is neither documented or given a user setting, but it can be changed.
Edit the file /data/data/com.bn.nook.reader.activities/shared_prefs/ReaderPreferences.xml
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<float name="font_size" value="8.5" />
<string name="font_style">Caecilia</string>
<int name="periodical_margin_size" value="1" />
<int name="margin_size" value="1" />
<int name="bgcolor" value="1" />
<int name="line_spacing" value="150" />
<int name="page_forward_mapping" value="1" />
[b]<int name="fullscreen_refresh_count" value="6" />[/b]
</map>
The default without a setting is 6.
I'd love to make that one because of the odd ghosting issue with mine. Can I edit that while it's running?
Yes, you can edit that at any time.
It may not notice it immediately, certainly rebooting will work though.
This no longer works with Glowlight. There is no "fullscreen_refresh_count" tag anymore and if you add one, it just gets wiped out.
The file on NST with 1.1.2 firmware don't contains this strucutre of xml.
Edit refresh count is not possible from this file.
dxcore35 said:
The file on NST with 1.1.2 firmware don't contains this structure of xml.
Edit refresh count is not possible from this file.
Click to expand...
Click to collapse
No, the entry is not in the XML file by default.
Yes, you can put it in there and it gets read.
@GlowWorm owners, the exact same code is in 1.1.5
Hmm, this parameter works when it's in there, but the Nook wipes it any time you change any user reader preference.
Renate NST said:
No, the entry is not in the XML file by default.
Yes, you can put it in there and it gets read.
@GlowWorm owners, the exact same code is in 1.1.5
Hmm, this parameter works when it's in there, but the Nook wipes it any time you change any user reader preference.
Click to expand...
Click to collapse
I was not able to get it to register at all on my GlowLight. I still had a 6 page refresh. I did not update any settings. I also made sure the app was killed before I edited the XML file.
What can I say?
The Reader app has so much broken stuff in it.
I'm getting sick of patching things.
Renate NST said:
What can I say?
The Reader app has so much broken stuff in it.
I'm getting sick of patching things.
Click to expand...
Click to collapse
You can report a bug on B&N forums.
Admin might forward it to dev. team.
They don't even have any web pages for users to enter suggestions/bugs and track progress...
Looking at how they deal with other bugs, like lost bookmarks, I doubt anything will be fixed.
IMO, is B&N makes source available, community will help them.
But again, looks like they are not interested in bug fixing at all...
Could someone please give a quick explanation of how to get to the ReaderPreferences file and how to edit it?
The inability to do a page refresh, and the ghosting on the screen because of that, is what caused me to return my Simple Touch. If I could just get it to refresh every page turn I'd be happy. I do't want to root the device and turn it into a Android tablet, I just want a more frequent page refresh.
Renate NST said:
What can I say?
The Reader app has so much broken stuff in it.
I'm getting sick of patching things.
Click to expand...
Click to collapse
Renate. Somebody on the B&N forums is looking for this fix. I'd think a startup script could re-insert that line into the file on each boot. Is there an equivalent to an init script on a stock NST that could be tweaked?
Just realized you're in Boston. I'm flying out of Logan today!
bobstro said:
Is there an equivalent to an init script on a stock NST that could be tweaked?
Click to expand...
Click to collapse
There are init.rc & init.goldfish.rc in uRamdisk. The instructions on how to [un]pack are in "Nook Touch Android Development" forums.
bobstro said:
Renate. Somebody on the B&N forums is looking for this fix. I'd think a startup script could re-insert that line into the file on each boot. Is there an equivalent to an init script on a stock NST that could be tweaked?
Just realized you're in Boston. I'm flying out of Logan today!
Click to expand...
Click to collapse
You can always make the file read-only. (i.e. take away write permissions.) That kept the line from being eliminated.
Unfortunately, it does not help me and my 1.1.5 woes. The read-only file would not parse, and I was not able to get a refresh rate faster than 6 pages.
IBNobody said:
You can always make the file read-only. (i.e. take away write permissions.) That kept the line from being eliminated.
Unfortunately, it does not help me and my 1.1.5 woes. The read-only file would not parse, and I was not able to get a refresh rate faster than 6 pages.
Click to expand...
Click to collapse
I'm sure they program to open file in read-write more and it throws. :good:
Take a look on ddms messages.
I'm mostly almost finished with my smali patcher and I'll be getting around to stuff like this.
Using the patcher will allow people to get a subset of whichever patches they want.
For instance, I don't need the Last Read Page to be uplinked to the (B&N) cloud.
Some people might want that. Tastes differ.
Renate NST said:
I'm mostly almost finished with my smali patcher and I'll be getting around to stuff like this.
Using the patcher will allow people to get a subset of whichever patches they want.
For instance, I don't need the Last Read Page to be uplinked to the (B&N) cloud.
Some people might want that. Tastes differ.
Click to expand...
Click to collapse
Renate,
Could you open new “Patching Reader”, “Patching stuff” or something thread, so it won’t get buried into another one.
Will be interesting to see whole approach.
How to patch, un-patch (to apply new B&N update)
And how to deal with installation errors (certificate errors, etc.)
You know this stuff better than anyone else, anyway.
I know it's been a month since anyone said anything in this thread, but is there an easy way to do this? I just got a refurb NST and the leftover image when it doesn't do a full page refresh is annoying, it messes up text and in bright light I can still read the characters in the empty space that wasn't empty in the page before. It doesn't make reading hard or impossible, just annoying.
I really need something easy or at least well explained. It took me hours and searching to get adb to work with my NST last night and even rooting wasn't all that easy as the first program for flashing the boot img to the sd card didn't work for me, and then I completely failed at getting gapps to work with it because of poor instructions. I've rooted and rommed plenty of phones, so I'm comfortable with android. There just doesn't seem to be enough popularity for this device to get easy hacks, and I don't know how to do technical stuff like editing an xml.
Thinking about it, if there isn't an easy fix, can I just sideload a root browser app and manually navigate to and edit that xml file?
EDIT: Tried manually editing the xml file, the reader app just rewrites it every time I try to read something, and deletes root browser's .bak backup file. Quite annoying.
I looked into this stuff a bit.
It's spread all over the place.
B&N has a section that deletes a bunch of preferences before writing.
Personally, I've never noticed shadowing.
The contrast seems to get to be a little bit less each time though.
The dictionary stuff was a higher priority last month.
Realize that on any Nook mod only a handful of people will ever use it.
Renate NST said:
I looked into this stuff a bit.
It's spread all over the place.
B&N has a section that deletes a bunch of preferences before writing.
Personally, I've never noticed shadowing.
The contrast seems to get to be a little bit less each time though.
The dictionary stuff was a higher priority last month.
Realize that on any Nook mod only a handful of people will ever use it.
Click to expand...
Click to collapse
True, I'm sure that most people are just using a different app. After realizing from this thread that just editing the xml won't work and making it read only just makes things worse, I decided to try cool reader 3. It isn't as elegant as the nook software by any means, but at least it does a page refresh every page. It does make me wonder if it would be hard to make a universal ereader app that works well on all android based e-ink devices though.
Either way if someone is working on any sort of patch, I still think that would be great. Today was my first full day with the nook and reading definitely got annoying from time to time when I was a couple pages from the full refresh and the letters looked dull in spots and stuff. Since mine is a refurb it is possible it is a bit worse than others on refreshing the screen, and maybe was returned for that. It's not unusable, just annoying to a perfectionist like me.
I went back to look at this again.
I modified /data/data/com.bn.nook.reader.activities/shared_prefs/ReaderPreferences.xml
I added in:
Code:
<int name="fullscreen_refresh_count" value="1" />
I did everything that I could think of and it never disappeared.
I switched books, changed fonts, changed page buttons, it's still there.
(And it was refreshing every page.)
Could somebody tell me under what circumstance it disappears?

Question: How to set an intent to launch Temblast Reader in Relaunch?

Hey guys, I have a question. I'm sure somebody out there has done this. I am making Rooted NST's for my friends as gifts, and I think it would be really easy for them to be able to use relaunch to open the .epub format books I have included for them. The best reader app I have found is @Renate NST's temblast reader app. It works with the page turning buttons, and in conjunction with @nmyshkin's NoIR app that he made, it makes for a seriously long battery life while reading. I gave my best friend a rooted NST for his birthday (beginning of August). He has read an entire book, and still hasn't charged it. Thanks for that, guys.
Anyway, what I'm trying to do is be able to use Relaunch to open .epub books. I've included a screenshot of the menu that has the ability to set intentions or even to open an application based on the filetype of the file selected. However, temblast reader does not show on the list of possible apps to launch. I tried using Titanium Backup to move temblast reader to system, but still to no avail. Anyone who knows better how to set an intent, and perhaps knows the language needed to do this would probably be much better suited to helping.
Thank you so much in advanced.
PS: That intent that is typed in the line for .epub files is my own feeble attempt at trying to get temblast reader to run as a system app. Please ignore that. :cyclops:
I'm not sure about Relaunch, but this should work fine:
Code:
# am start -a android.intent.action.VIEW -d file:///sdcard/Books/progit.epub
I typed it in like you said, and it didn't work. Maybe it's just not meant to be done on Relaunch.
Here's what it looked like when I tried to launch an .epub file.
Black screen.
I also thought maybe it was because my epub files are in My Files/Books so I added that in, and it didn't change anything.
I really appreciate your help and effort in this. Perhaps you know of an intent simply for "Reading Now"? I could use that in a different application.
Do you actually have that book "Pro Git"?
If you don't, there's no chance that it will be opened.
"Last Book" was actually a broadcast originally. Try:
Code:
# am broadcast -a com.bn.nook.launch.LAST_BOOK

NST library files

Anyone knows where the files/databases are for the library to use, e.g., sorting files for recent, author and title, as well as for shelves. It seems the library module from time to time doesn't sort correctly, after adding new books. Sometimes, a book from search is not placed in the 1st in the library ( for most recent order ). So I guess there must be something wrong in related files. Any tips are appreciated.
smjohn1 said:
Anyone knows where the files/databases are for the library to use, e.g., sorting files for recent, author and title, as well as for shelves. It seems the library module from time to time doesn't sort correctly, after adding new books. Sometimes, a book from search is not placed in the 1st in the library ( for most recent order ). So I guess there must be something wrong in related files. Any tips are appreciated.
Click to expand...
Click to collapse
AFAIK there is nothing specifically for the Library app other than an xml file (/data/data/com.bn.nook.library/shared_prefs.xml) which I imagine is supposed to control how the various library options display when the library is accessed. I've never had any luck with changing the settings (which are obfuscated anyway) as I would like the library to open a certain way but it insists on reverting to something else no matter how many times I set it.
As for databases, there are two associated with the Reader app (/data/data/com.bn.nook.reader.activites/databases/lastreadingpoint.db and /readerlocal.db). Historically there have been issues with the databases becoming garbled and there are a couple of postings somewhere in the forum with sqlite sequences for clearing out the dross and starting over. I'll see if I can scare those up but you should search also. And you'll need a sqlite database viewer if you want to examine the databases on your PC to see what's there.
Edit: This is the main thread I was remembering: https://forum.xda-developers.com/t/solved-on-the-problem-of-broken-bookmarks.1467429/
nmyshkin said:
AFAIK there is nothing specifically for the Library app other than an xml file (/data/data/com.bn.nook.library/shared_prefs.xml) which I imagine is supposed to control how the various library options display when the library is accessed. I've never had any luck with changing the settings (which are obfuscated anyway) as I would like the library to open a certain way but it insists on reverting to something else no matter how many times I set it.
As for databases, there are two associated with the Reader app (/data/data/com.bn.nook.reader.activites/databases/lastreadingpoint.db and /readerlocal.db). Historically there have been issues with the databases becoming garbled and there are a couple of postings somewhere in the forum with sqlite sequences for clearing out the dross and starting over. I'll see if I can scare those up but you should search also. And you'll need a sqlite database viewer if you want to examine the databases on your PC to see what's there.
Edit: This is the main thread I was remembering: https://forum.xda-developers.com/t/solved-on-the-problem-of-broken-bookmarks.1467429/
Click to expand...
Click to collapse
Thx, I will dig a bit. Strange thing is just read books from search don't appear in library's beginning at all. On the other hand, books read from library do change order in the library. Besides database, any other possible modules that would such problems?
smjohn1 said:
Thx, I will dig a bit. Strange thing is just read books from search don't appear in library's beginning at all. On the other hand, books read from library do change order in the library. Besides database, any other possible modules that would such problems?
Click to expand...
Click to collapse
I've come up empty. From examining the two Reader databases it is clear that they do not contain any information that would create placement in the Library such as shelves. That information must be somewhere but I have not been able to find it. There is another database, home.db, which is part of the bn.home app. There is minimal data there about books, but nothing helpful.
What is distressing (besides not being able to track down where this information is stored) is that there seems to be no mechanism to flush out the databases. Looking over mine I see (sideloaded) books that I have deleted a long time ago. No wonder things act funny after awhile.
Edit: Never say never. This post: https://forum.xda-developers.com/t/automating-shelving.1378510/ reveals the whereabouts of the information for the Library. I never would have guessed B&N would use stock Android for that!
Yeah, there used to be problems with the MediaScanner on the NST.
I got used to not relying on it.
Even now, my Library app has a fixed number of locations for books and you just hit Refresh once in a while.
The AdbSync script (makefile actually) that I use just pokes a refresh after syncing the Books directory.
nmyshkin said:
I've come up empty. From examining the two Reader databases it is clear that they do not contain any information that would create placement in the Library such as shelves. That information must be somewhere but I have not been able to find it. There is another database, home.db, which is part of the bn.home app. There is minimal data there about books, but nothing helpful.
What is distressing (besides not being able to track down where this information is stored) is that there seems to be no mechanism to flush out the databases. Looking over mine I see (sideloaded) books that I have deleted a long time ago. No wonder things act funny after awhile.
Edit: Never say never. This post: https://forum.xda-developers.com/t/automating-shelving.1378510/ reveals the whereabouts of the information for the Library. I never would have guessed B&N would use stock Android for that!
Click to expand...
Click to collapse
Wow! Thx. I need to learn sqlites to see all the contents.
Renate said:
Yeah, there used to be problems with the MediaScanner on the NST.
I got used to not relying on it.
Even now, my Library app has a fixed number of locations for books and you just hit Refresh once in a while.
The AdbSync script (makefile actually) that I use just pokes a refresh after syncing the Books directory.
Click to expand...
Click to collapse
how tro refresh? Is there adb code for that? Thx again.
smjohn1 said:
Wow! Thx. I need to learn sqlites to see all the contents.
Click to expand...
Click to collapse
You can do sqlite manipulations via ADB is you have sqlite3 installed on the NST, but for a better overall view you really need to copy the database file to a PC use a tool like this.
smjohn1 said:
How to refresh? Is there adb code for that?
Click to expand...
Click to collapse
Not really.
There are ways to make the MediaScanner scan a single file.
There is no simple way to tell it to just rescan everything.
I was talking about my Library.apk which does a simple foreground scan when you:
Code:
adb shell am start -a com.temblast.library.REFRESH

Categories

Resources