Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-10-2012, 10:50 AM   #31
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677557
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Oh, as a side note, I just tried it with the NiLuJe's file from http://www.mobileread.com/forums/sho...45#post1988645

It's a mere 445 kB (i.e. it's even SMALLER than the one shipped with KT), and I don't even know which freetype version it is at all, but for the time being, it seems to fix display errors both in cr3xcb and in fonthack. Go figure
ixtab is offline   Reply With Quote
Old 03-10-2012, 12:32 PM   #32
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677557
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
I'm shamelessly hijacking your thread one last time for an advertisement

I just packaged varnie's file into an installer. Maybe it's somehow useful or relevant here for this topic as well

Full announcement here: http://www.mobileread.com/forums/sho...91#post1998991

Oh, and thanks for your help!
ixtab is offline   Reply With Quote
 
Enthusiast
Old 03-10-2012, 05:11 PM   #33
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,961
Karma: 4501011
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
@ixtab: I'm always using a live git snapshot, the latest build is just a few commits shy of today's stable release (2.4.9 if I remember correctly) . It's probably smaller because I'm using a very recent GCC, I strip the binaries, and I build with -O2, which tends to output smaller (and/or faster) binaries than when using O3.).

I won't be home for the next week, but I could build a K4/KT toolchain when I get back to try a potentially faster binary if you're sure it fixes the weird font issues on these devices too .

Last edited by NiLuJe; 03-10-2012 at 05:25 PM.
NiLuJe is offline   Reply With Quote
Old 03-10-2012, 06:21 PM   #34
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 161
Karma: 164959
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Okay, I got now an GUI launcher extension for HackedUpReader.

You can download it from its repository on github.

Put the hackedreader directory under the extensions directory and then execute the following line on the command line:

Code:
mntroot rw; cat /mnt/us/extensions/hackedupreader/hackedupreader.policy >>/usr/java/lib/security/java.policy ; mntroot ro; killall cvm
This is needed as the java code of the extension needs to be allowed to run the HackedUpReader program and read the documents directory to build the menu.

After the Kindle has restarted, you get a new HackedUpReader menu entry in the launcher menu. Under this entry you'll find directories and supported files.
bhaak is offline   Reply With Quote
Old 03-10-2012, 06:26 PM   #35
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677557
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by bhaak View Post
Okay, I got now an GUI launcher extension for HackedUpReader.

You can download it from its repository on github.

Put the hackedreader directory under the extensions directory and then execute the following line on the command line:

Code:
mntroot rw; cat /mnt/us/extensions/hackedupreader/hackedupreader.policy >>/usr/java/lib/security/java.policy ; mntroot ro; killall cvm
This is needed as the java code of the extension needs to be allowed to run the HackedUpReader program and read the documents directory to build the menu.

After the Kindle has restarted, you get a new HackedUpReader menu entry in the launcher menu. Under this entry you'll find directories and supported files.
I don't have the time to test it right now, but just a quick shot: did you try putting the .jar file into /opt/amazon/ebook/lib instead of /mnt/us/extensions?

This would still require access to the root FS, but at least one doesn't need to *modify* Amazon's files, but just add/remove files.

PS: Totally different topic, but along the same lines: http://www.mobileread.com/forums/sho...74#post1994774
ixtab is offline   Reply With Quote
Old 03-11-2012, 04:11 AM   #36
varnie
Connoisseur
varnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tongue
 
Posts: 95
Karma: 22248
Join Date: Dec 2011
Device: Kindle Touch
Hello, bhaak
I recompiled your newest sources and didn't get 'Quit' in the app's menu.
Strange.

as for me, I tried to implement this feature. Everything works but there is one memory-related bug when the program is exiting. It is related to some free() invocation in the glibc library.
Have you experienced such bug?

Last edited by varnie; 03-11-2012 at 04:15 AM. Reason: grammar
varnie is offline   Reply With Quote
Old 03-11-2012, 06:14 AM   #37
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 161
Karma: 164959
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Quote:
Originally Posted by ixtab View Post
I don't have the time to test it right now, but just a quick shot: did you try putting the .jar file into /opt/amazon/ebook/lib instead of /mnt/us/extensions?
I didn't try it before, but you are right, if you put it in there and modify the jar attribute in config.xml, it works without adding a custom policy bit.

I've looked into it and the Kindle Touch has these Java security restrictions:
Code:
# The default is to have a single system-wide policy file,
# and a policy file in the user's home directory.
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy
# key system components.                                 
policy.url.3=file:${policy.home}/framework.policy
policy.url.4=file:${policy.home}/application.policy
policy.url.5=file:${policy.home}/external.policy
$HOME/.java.policy would be an option for custom policies, although we'd need to regenerate that every time the kindle reboots. Root's home directory is not persistent.

java.policy looks like Java's standard java.policy file. external.policy defines permissions for stuff signed by Amazon.

framework.policy and application.policy allow anything under
/opt/amazon/ebook/lib, /usr/local/ebook/lib, and /opt/amazon/ebook/booklet full permissions for everything (although the comments suggests that they wanted change that to signed jars at a [future?] time).

Although a really simple solution would be to specify a separate policy file but for that we'd need to modify /etc/upstart/framework.

Quote:
Originally Posted by ixtab View Post
This would still require access to the root FS, but at least one doesn't need to *modify* Amazon's files, but just add/remove files.
Technically, it's modifying Sun's/Oracle's files, not Amazon's

Quote:
Originally Posted by ixtab View Post
PS: Totally different topic, but along the same lines: http://www.mobileread.com/forums/sho...74#post1994774
I guess without some sort of modifications you can't achieve this. IMO modifications of /etc/upstart/framework would be the best solution as this can be handled centrally and is easier to handle than some fs trickery.
bhaak is offline   Reply With Quote
Old 03-11-2012, 06:18 AM   #38
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 161
Karma: 164959
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Quote:
Originally Posted by varnie View Post
Hello, bhaak
I recompiled your newest sources and didn't get 'Quit' in the app's menu.
Strange.
That's because the change is not in the binary but in the keymaps.ini. It was just a configuration issue.

Quote:
Originally Posted by varnie View Post
as for me, I tried to implement this feature. Everything works but there is one memory-related bug when the program is exiting. It is related to some free() invocation in the glibc library.
Have you experienced such bug?
Yes although I haven't been able to track it down. It must happen at a rather late moment when the exiting code is called, as everything works fine otherwise.

Your current position in the e-book is saved, the recent e-books list is updated. If I didn't start the program from the command line, I wouldn't have noticed that something is wrong.
bhaak is offline   Reply With Quote
Old 03-11-2012, 08:17 AM   #39
varnie
Connoisseur
varnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tongue
 
Posts: 95
Karma: 22248
Join Date: Dec 2011
Device: Kindle Touch
just an idea:
we can use a different approach to pass e-book file name to the app.
But it would imply modifying cr3 sources.
Here's what I mean:
At the very beginning cr3 would show us a dialogue window with the available e-books listing. After we select some filename entry it'd come back to the normal execution flow. But on that moment cr3 will have all the needed information regarding filename to process.
Of course in this case we will have to implement that "dialogue" and a search appropriate files feature within it.

If I am not mistaken this time we wouldn't need all these manipulations with root FS and 'Java-related nightmare'. Pls correct me if I am wrong.
varnie is offline   Reply With Quote
Old 03-11-2012, 09:45 AM   #40
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 161
Karma: 164959
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Quote:
Originally Posted by varnie View Post
If I am not mistaken this time we wouldn't need all these manipulations with root FS and 'Java-related nightmare'. Pls correct me if I am wrong.
No, you are correct. But using the GUI launcher is a much easier solution and one that I could get done much faster than implementing a file dialog in the cr3gui sources itself (the extension has only ~100 lines of code).

I already played around a bit with implement a custom file dialog based on the code for the recent books menu but I didn't get far before it occurred to me that a GUI launcher implementation would be usable much faster.

I also would probably sink much more time into a file dialog, as there you can add a lot of features (showing size, sort by last read, mark new e-books, etc.). No danger for that when using the GUI launcher.
bhaak is offline   Reply With Quote
Old 03-14-2012, 02:50 PM   #41
varnie
Connoisseur
varnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tonguevarnie can tie a knot in a cherry stem with his or her tongue
 
Posts: 95
Karma: 22248
Join Date: Dec 2011
Device: Kindle Touch
Hey.
I implemented the "open ebooks" feature for the main menu.
I can send you a pull request. My git fork is located here:
https://github.com/varnie/HackedUpReader
The download of the compiled binary is here:
https://github.com/varnie/HackedUpReader/downloads

Stay in touch.
varnie is offline   Reply With Quote
Old 03-15-2012, 08:04 AM   #42
gogogo
Junior Member
gogogo began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2012
Device: kindle touch
Quote:
Originally Posted by varnie View Post
Hey.
I implemented the "open ebooks" feature for the main menu.
I can send you a pull request. My git fork is located here:
https://github.com/varnie/HackedUpReader
The download of the compiled binary is here:
https://github.com/varnie/HackedUpReader/downloads

Stay in touch.
Hi, varnie
How to install HackedUpReader,
Can you explain to me a little easier?
Thanks
gogogo is offline   Reply With Quote
Old 03-15-2012, 01:43 PM   #43
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, KPW
Ok, let me understand. I'm missing a few things.
  1. There's a libfreetype bin package that can be installed/uninstalled by putting it on the top of the USB accessible directory. If something is messed after first reboot, reboot once more. Is this right?.
  2. There's a hackedpubreader extension for GUI launcher that can be copied in the "extensions" directory of the USB accessible directory. Something has to be activated by executing
    Code:
    mntroot rw; cat /mnt/us/extensions/hackedupreader/hackedupreader.policy >>/usr/java/lib/security/java.policy 
    mntroot ro; killall cvm
    Is this right?

    By the way appending to /usr/java/lib/security/java.policy can be avoided by copying /mnt/us/extensions/hackedupreader/hackedupreader.policy to /opt/amazon/ebook/lib. The /mnt/us/extensions/hackedupreader/hackedupreader.policy should be modified also: how?
  3. The reader binaries are in the zip in https://github.com/bhaak/HackedUpReader/downloads. This zip contains a cr3xcb directory: where should it be placed?
  4. As an alternative, varnie has compiled a modified version of the binaries with a working open ebooks" feature. Where should files within that tarball be placed?



Last edited by pirl8; 03-15-2012 at 01:49 PM.
pirl8 is offline   Reply With Quote
Old 03-15-2012, 01:51 PM   #44
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677557
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by pirl8 View Post
Ok, let me understand. I'm missing a few things.

There's a libfreetype bin package that can be installed/uninstalled by putting it on the top of the USB accessible directory
Yes.
Quote:
Originally Posted by pirl8 View Post
There's a hackedpubreader extension that cab be copied in the "extensions" directory of the USB accessible directory. Something has to be activated by executing
Code:
mntroot rw; cat /mnt/us/extensions/hackedupreader/hackedupreader.policy >>/usr/java/lib/security/java.policy 
mntroot ro; killall cvm
Yes.
Quote:
Originally Posted by pirl8 View Post
By the way appending to /usr/java/lib/security/java.policy can be avoided by copying /mnt/us/extensions/hackedupreader/hackedupreader.policy to /opt/amazon/ebook/lib.
No. What would go into the /opt/amazon/ebook/lib/ directory is the jar file that is currently somewhere under /mnt/us/extensions/. This avoids the need to write custom policies altogether.
Quote:
Originally Posted by pirl8 View Post
The /mnt/us/extensions/hackedupreader/hackedupreader.policy should be modified also: how?
No. (AFAIK)
Quote:
Originally Posted by pirl8 View Post
The reader binaries are in the zip in https://github.com/bhaak/HackedUpReader/downloads. This zip contains a cr3xcb directory: where should it be placed?
/mnt/us/
Quote:
Originally Posted by pirl8 View Post
As an alternative, varnie has compiled a modified version of the binaries with a working open ebooks" feature. Where should files within that tarball be placed?
Don't know, didn't take a look at it
ixtab is offline   Reply With Quote
Old 03-15-2012, 02:22 PM   #45
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, KPW
Thank you very much.

Quote:
Originally Posted by ixtab View Post
No. What would go into the /opt/amazon/ebook/lib/ directory is the jar file that is currently somewhere under /mnt/us/extensions/. This avoids the need to write custom policies altogether.
Ok just copied and pasted the wrong path (copy&paste will eventually destroy the world). What I mean is that appending to java.policy could be avoided replacing the previous shell command with something like this:
Code:
mntroot rw; cp /mnt/us/extensions/hackedupreader/HackedUpReaderExtension.jar /opt/amazon/ebook/lib/ ;
mntroot ro; killall cvm
The file that bhaak suggested to modify was actually config.xml. Should it be modified? How?


(As far as varnie files are concerned, I guess they're a drop-in replacement for bhaak ones).

Last edited by pirl8; 03-15-2012 at 02:32 PM.
pirl8 is offline   Reply With Quote
Reply

Tags
epub, launcher add-ons

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Raccoon Reader - reads ePub, fb2, fb2.zip, txt on WP7 for free Andrei_Shvydryk Reading and Management 0 10-31-2011 03:17 PM
inserting blank lines into rtf/txt/html errata Ectaco jetBook 7 07-10-2010 09:16 PM
rtf -- > epub / fb2 conversion Brandobras Calibre 2 04-14-2010 01:24 AM
TXT, RTF, and HTML conversion issues daesdaemar Calibre 15 12-10-2008 09:05 PM
ereader pdb to rtf, txt, anything? Dave Berk Reading and Management 11 03-24-2007 07:45 PM


All times are GMT -4. The time now is 11:18 AM.


MobileRead.com is a privately owned, operated and funded community.