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 10-29-2012, 05:36 PM   #886
kbaerwald
BioReader
kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'
 
kbaerwald's Avatar
 
Posts: 292
Karma: 42568
Join Date: Apr 2009
Location: Germany
Device: Various
@NiLuJe: version is 5.1.2 (1679530004) / JBPatch is 27/25 (v2.4.1)
kbaerwald is offline   Reply With Quote
Old 10-29-2012, 05:56 PM   #887
kbaerwald
BioReader
kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'
 
kbaerwald's Avatar
 
Posts: 292
Karma: 42568
Join Date: Apr 2009
Location: Germany
Device: Various
I repeated the value change process through JBPatch and looked into the txt file - no changes again. Also creation date and mod date (as seen from Windows operating system) have not changed. It is interesting: when I do a manual change of this txt file Windows reflects the actual time of change but after restarting the reader the mod date is set back to 01.04.2012 01:20.

In the end - now that I know how to change values manually I have a good workaround as I do not plan to change these values very often.

@ixtab: I am sorry but I cannot judge the content of the logfile from reading the screen. Is it available as a logfile somewhere on the reader so I can copy it and send it to you?


P.S. And ... I appreciate your quick response in this matter ... thank you!

Last edited by kbaerwald; 10-29-2012 at 06:07 PM.
kbaerwald is offline   Reply With Quote
Advert
Old 10-29-2012, 06:07 PM   #888
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,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by kbaerwald View Post
@ixtab: I am sorry but I cannot judge the content of the logfile from reading the screen. Is it available as a logfile somewhere on the reader so I can copy it and send it to you?
Yes, of course. The file is /tmp/jbpatch.log. But you'll probably need usbnetwork to retrieve the file...
ixtab is offline   Reply With Quote
Old 10-30-2012, 04:34 AM   #889
dung.saga
Junior Member
dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.
 
Posts: 7
Karma: 11342
Join Date: Oct 2012
Device: Kindle Touch
much harder than I expected

Quote:
Originally Posted by dung.saga View Post
I've just decoded PDFReader-impl.jar with jad, and I've found something looks like PDF zoom parameters in source code of PDFPageImpl.class
...
I guess this related to zoom ratio in PDF reader. But I don't know how to test it with JBPatch yet. A job for next week .
Eclipse is too bloat for my taste. So, after some searching, I use JD-GUI instead.

Arggg!!! Amazon obfuscated many class names in recent firmware updates. I wasted some time trying to figure it out. This is much harder than I expected.

Thanks to ixtab, I grabbed the firmware 5.0.0 and extract the JARs from it. All the class and method names are back . But it seems that the decompiler can't differentiate among local variables, all of them are named "a" . Does anybody know how to fix this?
dung.saga is offline   Reply With Quote
Old 10-30-2012, 06:34 AM   #890
dung.saga
Junior Member
dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.
 
Posts: 7
Karma: 11342
Join Date: Oct 2012
Device: Kindle Touch
While scanning decompiled source code of PDFReader-impl.jar, I found a method named zoomToColumn in class PDFBookNavigator. So, I guess Kindle Touch can zoom in to a column of text in a PDF file. I tried to double tap and it works (but I can't scroll to next or previous page without zooming out).

Zooming function of PDFReader-impl really sucks, that's why I'm searching for a way to improve it. Pan-and-zoom mode isn't fine grain enough, and zoom-to-column mode doesn't allow switching page .

I still can't find the zooming step for pan-and-zoom mode. Right now it zoom in at 1x, 2x, 3x, 4x, ... I think I should try to imrove zoom-to-column mode instead.
dung.saga is offline   Reply With Quote
Advert
Old 10-30-2012, 07:57 AM   #891
dung.saga
Junior Member
dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.
 
Posts: 7
Karma: 11342
Join Date: Oct 2012
Device: Kindle Touch
I found something interesting in method mousePressed(MouseEvent a) in class ContentPanel (in ReaderSDK-impl.jar). A variable is increased or decreased by 40 (depends on value of a.getButton() is 8 or 7).
As I watched "showlog -f", I see Button=7 when I tried to pinch with 2 fingers, and Button=8 when I tried to stretch with 2 fingers.

So, if my guesses are correct, I can change the zoom factor by replacing 40 with some user-defined values . Next step is learning how to do it with jbpatch
dung.saga is offline   Reply With Quote
Old 10-30-2012, 10:19 AM   #892
geekmaster
Carpe diem, c'est la vie.
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: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
You just confirmed that pinch = keycode 7 and stretch = keycode 8, as was reported some time ago:
https://www.mobileread.com/forums/sho....php?p=1932094

You gave good information on how to use this information in java. Perhaps you could try the other gestures reported in that previous thread, using your method.

We have SO MANY threads here, that a lot of useful information can get deeply burried. The gesture engine thread link above IS in the index wikis, but even those wikis are getting a bit large.

Last edited by geekmaster; 10-30-2012 at 03:35 PM.
geekmaster is offline   Reply With Quote
Old 10-30-2012, 10:26 AM   #893
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,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by dung.saga View Post
Eclipse is too bloat for my taste. So, after some searching, I use JD-GUI instead.

Arggg!!! Amazon obfuscated many class names in recent firmware updates. I wasted some time trying to figure it out. This is much harder than I expected.

Thanks to ixtab, I grabbed the firmware 5.0.0 and extract the JARs from it. All the class and method names are back . But it seems that the decompiler can't differentiate among local variables, all of them are named "a" . Does anybody know how to fix this?
No easy way to fix it. The decompiler decompiles correctly - the variables *are* all named "a" because of obfuscation. (Yes, even 5.0.0 is slightly obfuscated). You might be able to "rename" them by modifying the constants pool of the class file, and correctly "linking" the variables there. If you're lucky, there is some deobfuscator out there which can do that, but I don't remember seeing one. If you do find one, then I'm very interested in it, because yes, it's a PITA to read such code.

One more comment concerning 5.0.0/5.1.x/5.2.0: I'm also usually resorting to the 5.0.0 version to understand what's going on, and then try to matchmake with the newer version. Just remember that the code may change slightly between the versions (some parts also changed heavily), and that ultimately you have to figure out the patch for the code of the exact version that you want to support. Oh, and a hint: "jad -a" is your friend.
ixtab is offline   Reply With Quote
Old 10-30-2012, 11:17 AM   #894
askak
Enthusiast
askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.
 
Posts: 29
Karma: 16752
Join Date: Sep 2012
Device: Kindle Touch
@ixtab

I've been told to do a full debrick after my font hack problem but obviously I'm very afraid of it. I'm thinking if there's a way of manually uninstalling or restoring the files that your hack modifies.

The first time I uninstalled the Jbpatch, it let me install the fonthack, which I couldn't, my mistake that I didn't try to install Jbpatch right away.

I'm asking because I want to avoid the debrick if possible, it scares me to dead, my kindle works, only problem is I can't install few hacks, and also I'm afraid it could happen again after debricking, I mean, is not that I messed up deleting some file or something. You even said it was a strange error, right?

Thanks for any help, and by the way, the time I could enjoy your hack worked great, I specially like the margins, a lot of time, I was reading in landscape mode, very few words per line with the original margins.
askak is offline   Reply With Quote
Old 10-30-2012, 12:10 PM   #895
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,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by askak View Post
@ixtab

I've been told to do a full debrick after my font hack problem but obviously I'm very afraid of it. I'm thinking if there's a way of manually uninstalling or restoring the files that your hack modifies.

The first time I uninstalled the Jbpatch, it let me install the fonthack, which I couldn't, my mistake that I didn't try to install Jbpatch right away.

I'm asking because I want to avoid the debrick if possible, it scares me to dead, my kindle works, only problem is I can't install few hacks, and also I'm afraid it could happen again after debricking, I mean, is not that I messed up deleting some file or something. You even said it was a strange error, right?

Thanks for any help, and by the way, the time I could enjoy your hack worked great, I specially like the margins, a lot of time, I was reading in landscape mode, very few words per line with the original margins.
Hmm... I mean it's your device after all, but I also suggest to do a full debrick. Your device is definitely acting strange if you can install some hacks, but not others, if fonthack only works after uninstalling jbpatch, etc. There is nothing to be scared of in the debrick procedure (except possibly the length of reading and understanding the procedure, and the windows driver nightmare). It is completely impossible to permanently brick the Kindle Touch - you can always get it back to life with the debrick procedure. Just make sure to understand and follow the guide, and your device will be up and running within 10 minutes.
ixtab is offline   Reply With Quote
Old 10-30-2012, 01:42 PM   #896
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,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
@askak: one more thing, in case you didn't debrick yet: can you try to install JBPatch and report back what exactly it says when failing? The JBPatch installer will tell exactly which step failed. That may be valuable information.
ixtab is offline   Reply With Quote
Old 10-30-2012, 07:17 PM   #897
askak
Enthusiast
askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.
 
Posts: 29
Karma: 16752
Join Date: Sep 2012
Device: Kindle Touch
Thanks a lot for your time ixtab.

Installing the error just says "unable to copy jbpatch.jar". And trying to uninstall (have to try everything) "can't restore init.xargs, bailing out".

Hope it helps a little bit.
askak is offline   Reply With Quote
Old 10-30-2012, 07:41 PM   #898
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: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@askak: Yeah, that's... not good. To be perfectly honest, we could spend (some? a lot of?) time to take a dive into the logs & the system to try to figure it out, but it'd quite frankly be a lot less painful if you had a bit of Linux background.

(FWIW, that smells like a ro rootfs, which shouldn't happen during the update process (might happen with a corrupt FS, but in that case, it should have triggered a fsck at boot, which should have fixed it... :?)).

So, yeah, the full debrick/reflash might really be the easiest/fastest solution .
NiLuJe is offline   Reply With Quote
Old 11-01-2012, 09:40 AM   #899
askak
Enthusiast
askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.askak 's shirt has a full set of merit badges.
 
Posts: 29
Karma: 16752
Join Date: Sep 2012
Device: Kindle Touch
Quote:
Originally Posted by NiLuJe View Post
@askak: Yeah, that's... not good. To be perfectly honest, we could spend (some? a lot of?) time to take a dive into the logs & the system to try to figure it out, but it'd quite frankly be a lot less painful if you had a bit of Linux background.

(FWIW, that smells like a ro rootfs, which shouldn't happen during the update process (might happen with a corrupt FS, but in that case, it should have triggered a fsck at boot, which should have fixed it... :?)).

So, yeah, the full debrick/reflash might really be the easiest/fastest solution .
Well, I changed the filesystem to rw, because the wiki commands to backup weren't working, and if has to be changed to ro again I don't think I did . I tried to ssh a lot of times, so probably yes, I damaged the filesystem.
askak is offline   Reply With Quote
Old 11-04-2012, 12:54 PM   #900
icantbebothered
Penguin
icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.
 
icantbebothered's Avatar
 
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
Sorry to break the mellow atmosphere, but I have an idea for a patch.

It's a patch that keeps the black header thingy at the top of the page when reading, even after you turn the page. And I hope nobody waits for me to make it, because they might wait over a year.
icantbebothered is offline   Reply With Quote
Reply

Tags
jbpatch, kindle touch hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 02:25 AM.


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