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

View Poll Results: Does the latest version work for you?
Yes 85 88.54%
No 11 11.46%
Voters: 96. You may not vote on this poll

Reply
 
Thread Tools Search this Thread
Old 10-14-2012, 05:47 AM   #571
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by pmul View Post
Fascinating!
Sorry if this is well known, but I just discovered this: in /usr/bin/ are native executables that allow one to get/set properties send events, and probably more.
/usr/bin/lipc-get-prop
/usr/bin/lipc-send-event
/usr/bin/lipc-daemon
/usr/bin/lipc-probe
/usr/bin/lipc-wait-event
/usr/bin/lipc-set-prop
/usr/bin/lipc-hash-prop...
SNIP
yup. It's explored in reasonable depth on the wiki. (but for the touch)
http://wiki.mobileread.com/wiki/K3_Index (not much on there)
http://wiki.mobileread.com/wiki/Kind...h_Hacking#LIPC
EDIT: (but much of it revolves around the implementation on the Touch not the 3) http://wiki.mobileread.com/wiki/Kind...Java_Subsystem
So you will have to use a little judgement.

As you are using the DX / 3 you may also wish to have a snoop around some older links to get a feel for the java bits, my favourite link is now dead so I have recovered it... sigh...)
http://adq.livejournal.com/tag/kindle (keystore work as-was)
http://webcache.googleusercontent.co...g-started.html
[Recovered as dead]
Spoiler:
Quote:
SNIPPED JAILBREAK INFO

Development tools

Kindle applications are written in Java. It's Personal Basis Profile 1.1 and Java 1.4, both of which are ancient and horrible. It's been heavily customised and there's a set of extra proprietary libraries that give access to things like the e-ink screen and the Kindle's native user interface.

Personal Basis Profile 1.1 Javadoc
Javadoc for PBP 1.1. This is your first port of call for all Java programming.

Kindle proprietary libraries javadoc
And here's the javadoc for the Kindle libraries (kindly hosted by Amazon themselves).

Of course, in order to be able to compile code against the Kindle libraries, you need to get a copy: the easiest way to do that is to pull it off the Kindle. To do this, use the following update. When installed, it will copy the entire contents of the Kindle's library directory into /lib where you can get at it. The only jar you need is Kindlet-1.2.jar but we copy the rest anyway in case something interesting is there.

Kindle library extractor (11.5 kB)
(I HAVE A BACKUP OF THIS SOMEWHERE, IF IT STAYS MISSING)
A one-shot update package that copies all the Kindle's system libraries into /lib where we can get at them. Remember to use the right .bin file for your device; the codes are the same as for the jailbreak.
YOU CAN DO THIS YOURSELF IIRC

Once you have this, add it to your build classpath.

Signing applications

The Kindle will only run signed applications, and wants to be able to verify the signatures before it will run anything. This means that:

You must have a set of private developer keys to sign your applications with.
Anyone who wants to run your applications must install your public developer keys before your applications will run.
So, you now need to generate a set of developer keys.

Kindle developer key creator (9.5 kB)
(I HAVE A BACKUP OF THIS SOMEWHERE, IF IT STAYS MISSING)
(A much newer toolset is now available via Niluje)
A crude but serviceable set of scripts that generate Kindle developer private and public keys, and produce a set of Kindle update packages that all the public keys to be installed onto a device. (This is all a set of thin wrappers around Andrew de Quincey's excellent tools, which are actually doing all the work.)

Once you have a developer.keystore, put it somewhere safe and don't lost it. Then install the appropriate public key update package on your Kindle.

Skipping ahead

Right now you should be in a position to be able to build, install, and run applications. However, to save time here's something I prepared earlier:

'Hello, World' sample application (552.0 kB)
(I think HAVE A BACKUP OF THIS SOMEWHERE, IF IT STAYS MISSING)
A guaranteed-to-build sample application plus scripts that will compile, package and sign the result.

The above rather meaty package contains everything you need to get started. Unzip, run the ./makekindlet script, and you should end up with a HelloWorld.azw2 ready to deploy onto your Kindle. There might even be some working Eclipse project files.

(The script does assume that your developer private keys and Kindlet-1.2.jar are both in the $HOME/.kindle directory.)

You also get the following extremely handy features:

Java 1.4 is horrible, so I've bolted on the totally excellent RetroWeaver. This tool allows you to use Java 1.5 code on a older version of the JVM. This means we get to use things like generics, autoboxing, foreach loops, better reflection, and in general all the stuff that makes Java an actually usable language.
I've wrapped the Kindlet lifecycle API in the excellent event bus mechanism ported from GWT. The reason for this is to insulate you from the fact that said API is multithreaded. This isn't Amazon's fault, as they're just copying what Midlets did, but it's an excruciatingly horrible thing to have to work with. (You cannot, for example, make UI calls from one of the lifecycle callbacks, because you're not running in the UI thread.) Now they're just event sources. Plus, the event bus mechanism is extremely useful to have around anyway.
It might also be possible to bolt on ProGuard. This would shrink the resulting .azw2 file by detecting unused code --- the Retroweaver support libraries in particular are pretty large. However, I don't reckon it's really worth the hassle.

Gotchas

And now some warnings.

There's a reason Amazon don't officially allow homebrew on the Kindle, and I don't think it's business related. The Kindle is a very fragile device. It's incredibly easy to crash; there's no isolation between user applications and the system user interface.

This means:

Whenever you load a class containing static members, the memory used for those members will never be freed. Ever.
There is no way to forcibly terminate an application. Accidentally get an infinite loop? That thread will run forever.
If you leave a thread running on exit, your Kindle will crash.
This means that if you're writing code and testing it on your Kindle, you will see it crash and reboot a lot. So far I haven't lost any data. You may not be so lucky.

In particular, if you run a lot of third party applications, I think you're very likely to see slow bit rot, where the device will slowly destabilise over time until it crashes and reboots, at which point it goes back to normal and then starts to slowly destabilise over time, etc. Remember that the Kindle's normal lifecycle is never to reboot, ever. This means that slow memory leaks over time that you would never notice on a desktop will slowly build up.

So, to summarise: I think the reason Amazon don't officially allow homebrew on the Kindle is because they don't want the blame when people start complaining that their Kindles are unreliable. By requiring all third-party applications to be vetted by them does at least allow them to run some basic checks to see whether the applications are fit for purpose or not.

Thanks

Most of this work's not mine; I'm merely collating and glueing together functionality other people have done. In particular, the hard work in producing the jailbreaks, signing tools etc came from the folks on the excellent Kindle Developer's Corner forum on mobileread.com.

Another surprisingly good source for technical information is the official Amazon development forum... although I'd recommend against posting there.

(I hate it when good references die)

So back on topic: (a bit)

I was thinking of your issue this w/e.
was wondering about ripping out a few more bits in the startup (specifically the bit just before the test for WIFIOFF) but look's like you have made progress.

You have tried the good old tried and tested "KILL STUFF and WATCH THE LOGS" method? *Looks up* seems like you have. no joy via that method???

hmm.. I suppose I could go killing in my 3 and see what occurs. Also occurs to me to ask Ixtab if that is in fact a Java component, May wield my showlog -f -g -p / kill -15/9 [pid] hammer then if you have no further joy.

Last edited by twobob; 10-14-2012 at 06:38 AM. Reason: your issue, better links, recovered page
twobob is offline   Reply With Quote
Old 10-14-2012, 05:58 PM   #572
pmul
Enthusiast
pmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to beholdpmul is a marvel to behold
 
Posts: 35
Karma: 11764
Join Date: Jul 2009
Device: K-1, K-2-3G, K-3-3G, K4PC, K4iPhone, K4iPad, K-Touch-Wifi, K-Fire, DXG
Damn it. I should learn how to read log files properly. 'cmd' is the process that crashes, 'pmond' (process monitor daemon) catches this and restarts 'cmd'. This is most of the delay.
The 'orientationFaceUp' was a red herring.
BTW the state of the accelerometer is stored in '/proc/accelerometer' in plain text.
Anyway, this:
Code:
121005:181147 cvm[3427]: E lipc:dbuserr:name=org.freedesktop.DBus.Error.NoReply:Receive Dbus error message (DBUS_MESSAGE_TYPE_ERROR): Message did not receive a reply (timeout by message bus)
121005:181152 pmond[2060]: I def:exit:proc=cmd, exitcode=139:cmd (19772) exited
121005:181152 pmond[2060]: I def:rst:proc=cmd:Restarting cmd
121005:181152 cmd[20111]: I def:starting::Starting Connection Manager
is where the story really starts. After the dbus error, in cvm (java) pmond restarts cmd, which then does lots of stuff, including starting the "Connection Manager" (another red herring, I think I'll open a fish shop....)

Now, is the dbus error timeout a cause or a symptom?
And why:
  • Does it wake up rapidly if it hasn't been asleep for too long (<80 seconds or so)?
  • Does it wake up rapidly if I ssh into it before operating the power slider?
pmul is offline   Reply With Quote
Old 10-14-2012, 06:25 PM   #573
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
hmm. could of course just be "expected behaviour" somewhere or another.

Some horrific hack that simply waits for a service to fail then restarts after 10s or w/e.

I have seen reference to a few admissions of kludgery... Plus this is a "corner case", thanks your lucky stars it doesn't just explode into flames perhaps Kudos Lab126
twobob is offline   Reply With Quote
Old 10-15-2012, 05:37 AM   #574
wju
Junior Member
wju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with others
 
Posts: 4
Karma: 2600
Join Date: May 2011
Device: kindle dx graphite
cannot upgrade fonts on DXG fw 3.3

Hi all,
I have successfully upgraded fw in my DXG to 3.3 via my K3. Many thanks for this. FW 3.3 in my DXG works fine and after building search database (cca 700 books took one night) the battery drain while sleeping is not a problem any more.
I especially enjoy PDF contrast, because I convert some of my books to PDF by LaTEX and it looks terrific now.

Does anyone know how to upgrade fonts to new hacked v5.5.N?
The file “update_fonts_5.5.N_dxg_install.bin” runs successfully but after restart fonts are still the same. :-)

I was successful with font upgrade on my K3 (fw 3.4) and I really prefer this 5.5N font.

Anyone knows?
Thanks in advance.
wju
wju is offline   Reply With Quote
Old 10-15-2012, 05:39 AM   #575
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,878
Karma: 4492229
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
@wju: Drop the linkfonts folder from the K3 package on top of the one that was installed by the dxg installer.
NiLuJe is offline   Reply With Quote
Old 10-15-2012, 02:36 PM   #576
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by wju View Post
Hi all,
I have successfully upgraded fw in my DXG to 3.3 via my K3. Many thanks for this. FW 3.3 in my DXG works fine and after building search database (cca 700 books took one night) the battery drain while sleeping is not a problem any more.
I especially enjoy PDF contrast, because I convert some of my books to PDF by LaTEX and it looks terrific now.

Does anyone know how to upgrade fonts to new hacked v5.5.N?
The file “update_fonts_5.5.N_dxg_install.bin” runs successfully but after restart fonts are still the same. :-)

I was successful with font upgrade on my K3 (fw 3.4) and I really prefer this 5.5N font.

Anyone knows?
Thanks in advance.
wju
How well does sound work? That was a problem with the older K3 firmware on a DXG. Try playing an MP3 file and see if there are any "hiccups" in the audio, then report your results. Thanks.

P.S. You just got a 2600 karma upgrade.
geekmaster is offline   Reply With Quote
Old 10-17-2012, 03:49 AM   #577
wju
Junior Member
wju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with others
 
Posts: 4
Karma: 2600
Join Date: May 2011
Device: kindle dx graphite
@NiLuJe - works!!!! thanks a lot
@geekmaster: i do not play sound on DXG, have tried once and system froze; I can listen to text2speech only on K3 with my language (czech) implemented, works; but just as a fun, no serious listening
wju is offline   Reply With Quote
Old 10-17-2012, 03:35 PM   #578
wju
Junior Member
wju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with otherswju plays well with others
 
Posts: 4
Karma: 2600
Join Date: May 2011
Device: kindle dx graphite
@geekmaster: so I have tried mp3 on DXG and yes, there are "hiccups" as you call that , I´d better call it "burst noise"; it is not 0dB, but loud enough to be annoying
;-)
text2speech not working
best regards from the middle of europe

Last edited by wju; 10-23-2012 at 04:06 PM.
wju is offline   Reply With Quote
Old 10-24-2012, 03:14 AM   #579
alex2345
Junior Member
alex2345 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: Kindle DXG & 3
frankly speaking this was my worst expectation (no updates, no support etc.):

http://gizmodo.com/5951729/amazon-qu...-the-kindle-dx
alex2345 is offline   Reply With Quote
Old 11-14-2012, 02:30 AM   #580
digbybare
Member
digbybare began at the beginning.
 
Posts: 11
Karma: 47
Join Date: Oct 2012
Device: Kindle Paperwhite
Still no page numbers

I've updated my DXG to 3.2.1 with the instructions given. Everything else seems to work fine, but I still don't see any page numbers. Any ideas why?
digbybare is offline   Reply With Quote
Old 11-14-2012, 02:46 AM   #581
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,938
Karma: 4633610
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by digbybare View Post
I've updated my DXG to 3.2.1 with the instructions given. Everything else seems to work fine, but I still don't see any page numbers. Any ideas why?
AFAIK, page numbers are stored in a separate .apnx file and are only available for a limited number of titles.
There's also a Calibre plug-in that guesstimates page numbers.
Doitsu is offline   Reply With Quote
Old 11-14-2012, 11:42 AM   #582
digbybare
Member
digbybare began at the beginning.
 
Posts: 11
Karma: 47
Join Date: Oct 2012
Device: Kindle Paperwhite
I have a book that does have page numbers (my Paperwhite shows them), but when I download it to my DXG, it doesn't seem to show them.

Edit: Okay, page numbers seem to work for sideloaded books, but not for books downloaded from Amazon.

Last edited by digbybare; 11-14-2012 at 11:50 AM.
digbybare is offline   Reply With Quote
Old 11-14-2012, 02:56 PM   #583
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,445
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
Most likely it is the book format.
I do not think the DXG handles the newer Amazon book format.
knc1 is offline   Reply With Quote
Old 11-14-2012, 05:32 PM   #584
digbybare
Member
digbybare began at the beginning.
 
Posts: 11
Karma: 47
Join Date: Oct 2012
Device: Kindle Paperwhite
That makes sense. Has anyone had any success upgrading to 3.4?
digbybare is offline   Reply With Quote
Old 11-15-2012, 01:18 PM   #585
digbybare
Member
digbybare began at the beginning.
 
Posts: 11
Karma: 47
Join Date: Oct 2012
Device: Kindle Paperwhite
Hmm, it also seems like my battery life has gone down dramatically. If I just leave it sleeping, the battery ends up fully depleted within a day.

Curiously, I'm not getting the wake up delay that other people are seeing, it wakes up instantly for me, even after sleeping for a long time. It seems like maybe it's just never going to sleep, and something's pegging the CPU? It's unlikely to be indexing, as I've only put 3 books on it.
digbybare is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
images for Kindle & ipad Kindle (or tablets) hapax legomenon Kindle Formats 0 03-10-2011 10:54 PM
Kindle & Tech formatted kindle books? Ncage1974 Amazon Kindle 7 02-09-2011 10:03 AM
Possible Kindle for PC & Kindle for iPhone Issue(s) Nyssa Amazon Kindle 6 12-31-2010 03:58 PM
Kindle vs Kindle for PC vs print books & old lady eyes bert501 Amazon Kindle 30 11-19-2010 08:59 PM
did kindle 2 get updated with kindle 3 zoom and contrast adjustment software? med007 Amazon Kindle 1 10-15-2010 10:08 AM


All times are GMT -4. The time now is 01:43 AM.


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