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 09-13-2012, 03:53 PM   #16
ihor
Enthusiast
ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'
 
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
Quote:
Originally Posted by ixtab View Post
Well, since that topic has been pending for almost a week now, and you didn't bother to answer, I suppose that you're not interested anymore.
wrong assumption. I am struggling with usbNetwork hack on my DX Graphite, and unfortunately, unsuccessfully.

I do the following:
1) installed update update_usbnetwork_0.39.N_dxg_install.bin
2) rebooted my kindle
3) launched command ;debugOn
4) launched command ~help
this command displayed a list of commands, among which the last one was ~usbNetwork
5) launched command ~usbNetwork
6) connected my USB cable to kindle device.

I expected to see one more network adapter in my Win7 (x86) where I should put IP = 192.168.2.1, and my kindle will be 192.168.2.2.

But unfortunately, kindle is recognized as Flash Disk after connecting USB. And I have no idea what to do.

Can anyone help me?
ihor is offline   Reply With Quote
Old 09-13-2012, 04:13 PM   #17
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 ihor View Post
wrong assumption. I am struggling with usbNetwork hack on my DX Graphite, and unfortunately, unsuccessfully.

I do the following:
1) installed update update_usbnetwork_0.39.N_dxg_install.bin
2) rebooted my kindle
3) launched command ;debugOn
4) launched command ~help
this command displayed a list of commands, among which the last one was ~usbNetwork
5) launched command ~usbNetwork
6) connected my USB cable to kindle device.

I expected to see one more network adapter in my Win7 (x86) where I should put IP = 192.168.2.1, and my kindle will be 192.168.2.2.

But unfortunately, kindle is recognized as Flash Disk after connecting USB. And I have no idea what to do.

Can anyone help me?
Hmmm... as said, I don't have a DX, so I can't really help you with that. However, it *looks* correct to me. Maybe someone who actually has a DX, and got usbnetwork running, can jump in and help.

If you don't get a response within a few days, the problem has probably gone unnoticed, so it may be best to start a new thread "how to enable usbnetwork on DX" or so...

EDIT: I just saw that you did exactly that
ixtab is offline   Reply With Quote
Old 09-13-2012, 04:24 PM   #18
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
Quote:
Originally Posted by ihor View Post
wrong assumption. I am struggling with usbNetwork hack on my DX Graphite, and unfortunately, unsuccessfully.

I do the following:
1) installed update update_usbnetwork_0.39.N_dxg_install.bin
2) rebooted my kindle
3) launched command ;debugOn
4) launched command ~help
this command displayed a list of commands, among which the last one was ~usbNetwork
5) launched command ~usbNetwork
6) connected my USB cable to kindle device.

I expected to see one more network adapter in my Win7 (x86) where I should put IP = 192.168.2.1, and my kindle will be 192.168.2.2.

But unfortunately, kindle is recognized as Flash Disk after connecting USB. And I have no idea what to do.

Can anyone help me?
If you look closely at the ~help output, you will see that the commands on a DX start with a back-quote (`), not a tilde (~).

Try using the correct command symbol on your `usbNetwork command.
geekmaster is offline   Reply With Quote
Old 09-13-2012, 07:00 PM   #19
ihor
Enthusiast
ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'
 
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
Quote:
Originally Posted by ixtab View Post
Code:
mount > /tmp/out.txt
ps wwwaux >> /tmp/out.txt
find / >> /tmp/out.txt 2>/dev/null
and send me the content of /tmp/out.txt
I sent you the file in the private message.
ihor is offline   Reply With Quote
Old 09-13-2012, 07:31 PM   #20
ihor
Enthusiast
ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'
 
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
On my kindle I see a folder
/opt/amazon/ebook/booklet/
- it contans 11 jar files:

AudiblePlayer.jar
AudioPlayer.jar
Browser.jar
Home.jar
KindletBooklet-1.2.jar
MobiReader.jar
msp.jar
PictureViewer.jar
Search.jar
XymlBooklet.jar

In the MobiReader.jar I see a class
\com\amazon\ebook\booklet\reader\resources\ReaderR esources.class

decompilation of this class gives this:

}, new Object[] {
"mobireader.default.font.size.list", new int[] {
17, 19, 21, 25, 31, 33, 36, 41, 45, 48,
60, 63, 66, 70, 86, 88, 90, 92, 100
}
}, new Object[] {
"topazreader.default.font.zoom.factors", new int[] {
75, 90, 100, 120, 140, 160, 190, 220
}

I have no idea what the first array is, but the second one seems to be exactly what I need to change.

The only question is how to rebuild the class and make jar.

I have nothing against paying someone for his job, but since I am a programmer as well, such is my soul - to first try to do it on my own.
So, please, understand me. Don't think I am greedy, I simply want to play with programming (I am a .NET guru, but Java for me is still an area where my foot did not yet make a step).
ihor is offline   Reply With Quote
Old 09-13-2012, 08:16 PM   #21
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Going by the values, I would guess that the first array is font size in points and the second array is the sizes in ppi (points per inch).

Disclaimer: Font mechanics isn't my best field.
knc1 is offline   Reply With Quote
Old 09-13-2012, 08:28 PM   #22
ihor
Enthusiast
ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'
 
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
I've looked at the class file - at the binary structure of it. And I've found this array

}, new Object[] {
"topazreader.default.font.zoom.factors", new int[] {
75, 90, 100, 120, 140, 160, 190, 220
}

converting into hex all those numbers, here they are:


So, the obvios question is next: what if I take my hex editor, change those numbers on what I need, and will replace this class file back into jar? Will it work?

I don't know if java class files have any CRC or something like this - not sure it will be working...
ihor is offline   Reply With Quote
Old 09-13-2012, 08:35 PM   #23
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Oops.

Last edited by knc1; 09-14-2012 at 07:46 AM.
knc1 is offline   Reply With Quote
Old 09-13-2012, 08:38 PM   #24
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
@ihor: And that's the Topaz reader, which you probably don't give a flying crap about, since there's almost no Topaz books left out there .
NiLuJe is offline   Reply With Quote
Old 09-13-2012, 08:54 PM   #25
ihor
Enthusiast
ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'
 
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
Quote:
Originally Posted by NiLuJe View Post
@ihor: And that's the Topaz reader, which you probably don't give a flying crap about, since there's almost no Topaz books left out there .
inside jar file in this folder
\com\amazon\ebook\booklet\
there are 2 subfolders:
reader and topazreader

Let us go inside reader folder - into \com\amazon\ebook\booklet\reader\resources\ReaderR esources.class

in this file there are just 2 arrays with sizes. First one contains 19 numbers, second one - 8 numbers. I have no idea why it is named topazreader.default.font.zoom.factors

but it looks exactly as my 8 font sizes when I press Aa button.

So, if you want to tell that this is a wrong array - ok. But could you please then tell where is the right one?
ihor is offline   Reply With Quote
Old 09-13-2012, 08:57 PM   #26
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
@ihor: No idea, but the mobi6 reader is indeed called mobireader. And the last font size selected is saved in system/reader.pref in the userstore. If it helps .
NiLuJe is offline   Reply With Quote
Old 09-13-2012, 09:28 PM   #27
ihor
Enthusiast
ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'
 
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
Quote:
Originally Posted by NiLuJe View Post
@ihor: No idea, but the mobi6 reader is indeed called mobireader. And the last font size selected is saved in system/reader.pref in the userstore. If it helps .
you are right. I've gone further. I changed the font, and after each change I looked into this reader.pref file. I noticed that these values are used:

17, 18, 21, 25, 31, 36, 60, 86

if we look in the array

"mobireader.default.font.size.list", new int[] {
17, 19, 21, 25, 31, 33, 36, 41, 45, 48,
60, 63, 66, 70, 86, 88, 90, 92, 100
}


then we see that
a) 17, 21, 25, 31, 36, 60, 86 are present in this array
b) 18 is absent in array, but surprisignly it is written to reader.pref when second font is chosen. 19 must be instead.
c) in the array there are many numbers that are simply not used: on kindle dx there are just 8 different positions, while this array consists of 19 numbers.

I don't understand...
ihor is offline   Reply With Quote
Old 09-13-2012, 09:50 PM   #28
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,586
Karma: 6299991
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
how are you testing?

can not a strace? or something.. give you an idea what's being referenced?

EDIT: hmm inside java.. hmm maybe not
twobob is offline   Reply With Quote
Old 09-14-2012, 03:35 AM   #29
ihor
Enthusiast
ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'ihor understands when you whisper 'The dog barks at midnight.'
 
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
Quote:
Originally Posted by twobob View Post
how are you testing?
I said how I was testing. I was changing the font size on my kindle dx, and after this change I looked at /mnt/us/system/com.amazon.ebook.booklet.reader/reader.pref - there I saw the parameter FONT_SIZE

So, this parameter FONT_SIZE had values 17, 18, 21, 25, 31, 36, 60, 86 - one after another. These are values from this array except 18. What other values in this array mean and why they are present in array - I have no idea.

If someone can give me a hint how to trace/debug or something - I will do it.
ihor is offline   Reply With Quote
Old 09-14-2012, 07:41 AM   #30
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
So... since you already have the decompiled file, you're almost there. Just change the numbers - for a start, I suggest this:
Code:
}, new Object[] {
"mobireader.default.font.size.list", new int[] {
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17
}
}, new Object[] {
"topazreader.default.font.zoom.factors", new int[] {
190, 190, 190, 190, 190, 190, 190, 190
}
Rename the class to ReaderResources_en (that is, change the class name inside the source code, and the file name). Make sure that you have directories corresponding to the package name. I.e. you will need a directory "com", a directory "amazon" inside "com", etc.

Compile the class (I haven't done this by hand for ages, but "javac com/amazon/.../ReaderResources_en.java") should do. Finally, zip up the entire com directory, and rename the zip file to .jar. Drop the jar file onto the Kindle, reboot, and see if it changed.

PS: No, you can't just use a hex editor to patch the class file. You would simply break the class.
PPS: Be extra careful when compiling - make sure that you compile for Java 1.4. IIRC, there is a "targetVersion" (or so) switch to javac.

Last edited by ixtab; 09-14-2012 at 07:44 AM.
ixtab 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
Font sizes paulfiera Conversion 2 08-14-2012 08:49 AM
602 How to set a hot key for turning off WIFI jshzh PocketBook 2 01-27-2011 05:06 PM
Font sizes DaleDe Sigil 8 03-13-2010 05:52 PM
Font Sizes brewt Amazon Kindle 9 06-12-2009 03:03 PM
Font Sizes on DX wallcraft Amazon Kindle 1 05-06-2009 11:08 PM


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


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