Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-20-2016, 03:49 PM   #1786
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
Couldn't make what work?
USBnetworking?
Extracting jars?

Give us more of a hint here please.
knc1 is offline   Reply With Quote
Old 02-21-2016, 04:08 AM   #1787
sprite7
Member
sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.
 
Posts: 16
Karma: 3274
Join Date: Dec 2014
Device: Kindle Oasis 3
USBnetworking is now working.
I copied file "/opt/amazon/ebook/lib/HTMLReader-impl-en_GB.jar" from KV to my PC to change margins.
Now I just need to edit "ReaderSDK-impl-ln_LN.jar -> ReaderResources_ln_LN.class -> Methods -> <init> -> [0] Code" using this method https://www.mobileread.com/forums/sho....php?p=2699121 and to upload it back on KV.

upd: It's working! KV 5.6.5 FW. I used 12.74 8.49 6.38 values for font.wordsperline.margin.list (see this post https://www.mobileread.com/forums/sho...66&postcount=1 )
Attached Thumbnails
Click image for larger version

Name:	565new2.png
Views:	458
Size:	80.4 KB
ID:	146554   Click image for larger version

Name:	screenshot_2016_02_21T14_29_48+0300.png
Views:	539
Size:	73.8 KB
ID:	146560  

Last edited by HarryT; 02-21-2016 at 08:27 AM.
sprite7 is offline   Reply With Quote
Advert
Old 02-21-2016, 08:26 AM   #1788
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Moderator Notice
Do NOT upload copyrighted material to MobileRead without the permission of the copyright holder. We have very strict rules about that. Copyright infringement will not be tolerated.
HarryT is offline   Reply With Quote
Old 02-21-2016, 08:27 AM   #1789
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
Thanks for the quick fix.

Last edited by knc1; 02-21-2016 at 08:30 AM.
knc1 is offline   Reply With Quote
Old 02-29-2016, 05:51 AM   #1790
mitra
Connoisseur
mitra began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Jan 2016
Location: Mumbai
Device: Kindle PW2
Could anyone please update Margin, font size and reflow hack from @kaznelson page no 106 for kindle PW2 5.6.5 9017 IL model.

I read about 70 pages out of 120 pages specially from page no 106 onwards where he mentions how to edit the jars but i could not understand any of it. Then there is How to run the JBE on windows to edit jars and then there is patch JBE. The last post says USB networking to make it work.

I am just finding it complex.

For me, Putting .bin file in MR package folder and three .jar files in kindle root directory is what i am looking for. I know i am asking too much like a piece of cake.

But that is my limit and sadly, i cannot help myself at this moment. If i could have understood it well and not afraid of bricking my kindle, I would have myself tried it.

Somehow, i always got answers at this forum and someone took efforts to explain me to make it simple.

I am ready to do it myself if anyone can take up to this task of guiding me.

Thank you.
mitra is offline   Reply With Quote
Advert
Old 02-29-2016, 06:19 AM   #1791
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
Quote:
Originally Posted by mitra View Post
Could anyone please update Margin, font size and reflow hack from @kaznelson page no 106 for kindle PW2 5.6.5 9017 IL model.

I read about 70 pages out of 120 pages specially from page no 106 onwards where he mentions how to edit the jars but i could not understand any of it. Then there is How to run the JBE on windows to edit jars and then there is patch JBE. The last post says USB networking to make it work.

I am just finding it complex.

For me, Putting .bin file in MR package folder and three .jar files in kindle root directory is what i am looking for. I know i am asking too much like a piece of cake.

But that is my limit and sadly, i cannot help myself at this moment. If i could have understood it well and not afraid of bricking my kindle, I would have myself tried it.

Somehow, i always got answers at this forum and someone took efforts to explain me to make it simple.

I am ready to do it myself if anyone can take up to this task of guiding me.

Thank you.
See the post three posts above yours?
The work has already been done.
PM that person.
knc1 is offline   Reply With Quote
Old 02-29-2016, 07:44 AM   #1792
mitra
Connoisseur
mitra began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Jan 2016
Location: Mumbai
Device: Kindle PW2
Will do that now.
mitra is offline   Reply With Quote
Old 02-29-2016, 07:56 AM   #1793
mitra
Connoisseur
mitra began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Jan 2016
Location: Mumbai
Device: Kindle PW2
Would KV Jar file work without bricking PW2 ? If i happen to receive as it is.

Also I was wondering if the jar file for kindle voyage which @sprite7 tested on KV 5.6.5 , would work without any problems on my Kindle PW2, if i had to use the same jar file on kindle PW2?

My concern is would it brick my kindle PW2? If i happen to use it as it is.

I have rescue pack and coward rescue pack installed on kindle PW2.
mitra is offline   Reply With Quote
Old 02-29-2016, 09:02 AM   #1794
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
Quote:
Originally Posted by mitra View Post
Also I was wondering if the jar file for kindle voyage which @sprite7 tested on KV 5.6.5 , would work without any problems on my Kindle PW2, if i had to use the same jar file on kindle PW2?

My concern is would it brick my kindle PW2? If i happen to use it as it is.

I have rescue pack and coward rescue pack installed on kindle PW2.
Every Java build by Amazon uses a different obfuscation -
So even if functionally identical in its entry points and external references - the "names" (usually a single letter) would not match.

tl;dr: No, it will not run outside of its own build.

My suggestion to PM that author was to get a set of specific directions on what/how to change the *.jar you have, not to get a *.jar that you could load and run.

Last edited by knc1; 02-29-2016 at 09:05 AM.
knc1 is offline   Reply With Quote
Old 03-02-2016, 12:29 PM   #1795
sprite7
Member
sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.
 
Posts: 16
Karma: 3274
Join Date: Dec 2014
Device: Kindle Oasis 3
Changing margins and mobi font sizes for dummies
Works with jailbroken Voyage/KPW3/KPW2/KPW1 5.4.x-5.6.x and others (probably). Tested on Voyage 5.6.5, see also https://www.mobileread.com/forums/sho....php?p=2527653

Not а fish, but а fishing rod.

1. USBNetwork@Windows.
You need it to read/write Kindle system jar files.
Spoiler:

See here https://wiki.mobileread.com/wiki/Kind...USB_Networking

To write files, open PuTTy and write
Quote:
if you need to change anything that is not in /mnt/us, then you will need to first mount the filesystem as RW (readwrite):
mntroot rw
Once you're done, you should put the filesystem back to RO (readonly):
mntroot ro
To navigate Kindle filesystem, use WinSCP app.


2. Changing margins
Spoiler:
  1. Copy file "/opt/amazon/ebook/lib/ReaderSDK-impl-en_GB.jar" from Kindle to you PC using usbnetwork. (For en_GB language or another file for another language)
  2. Make a backup copy of the original jar file. (And it's a good idea to copy it to Kindle in the same folder, "ReaderSDK-impl-en_GB.jar.bak")
  3. To edit jar file, unarchive it (I use WinRar) in "ReaderSDK-impl-en_GB" folder.
  4. To edit jar file, download Java Bytecode Editor here https://www.mobileread.com/forums/sho...d.php?t=236780 , unarchive it, run jbe.bat. Open file "ReaderSDK-impl-en_GB\com\amazon\ebook\booklet\reader\resources\Re aderResources_en_GB.class". In left panel go to "Methods"-"<init>"-"[0] Code". In right panel go to "Code Editor"
  5. Ctrl+F not working in code editor, so Ctrl+A -> Ctrl+C and paste text to notepad. Once you done edit text, delete text in code editor, paste new text and press "Save method".
  6. What to edit.
    See here for PW1/2 (213 dpi) https://www.mobileread.com/forums/sho....php?p=2699121 For Voyage/PW3 multiply it for 0.4245 see here https://www.mobileread.com/forums/sho...66#post3060466
    My examples for 5.6.5 Voyage:
    Spoiler:
    1. Original
      Code:
      ldc_w "font.wordsperline.margin.list"
      aastore
      dup
      iconst_3
      newarray int
      iconst_1
      dup
      pop2
      dup
      iconst_0
      ldc_w 50.94
      invokestatic com/amazon/ebook/booklet/reader/resources/ReaderResources_en_GB/pixVal(F)I
      iastore
      dup
      iconst_1
      dup_x2
      ldc_w 33.96
      invokestatic com/amazon/ebook/booklet/reader/resources/ReaderResources_en_GB/pixVal(F)I
      iastore
      dup
      iconst_2
      ldc_w 16.98
      Edited
      Code:
      ldc_w "font.wordsperline.margin.list"
      aastore
      dup
      iconst_3
      newarray int
      iconst_1
      dup
      pop2
      dup
      iconst_0
      ldc_w 12.74
      invokestatic com/amazon/ebook/booklet/reader/resources/ReaderResources_en_GB/pixVal(F)I
      iastore
      dup
      iconst_1
      dup_x2
      ldc_w 8.49
      invokestatic com/amazon/ebook/booklet/reader/resources/ReaderResources_en_GB/pixVal(F)I
      iastore
      dup
      iconst_2
      ldc_w 6.38
    2. Original
      Code:
      ldc_w "reader.progressbar.margin"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 13.58
      Edited
      Code:
      ldc_w "reader.progressbar.margin"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 8.49
    3. Original
      Code:
      ldc_w "reader.progressbar.height"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 8.49
      Edited
      Code:
      ldc_w "reader.progressbar.height"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 8.49
    4. Original
      Code:
      ldc_w "reader.progressbar.footer.height"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 13.58
      Edited
      Code:
      ldc_w "reader.progressbar.footer.height"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 8.49
    5. Original
      Code:
      ldc_w "reader.content.topMargin"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 13.58
      Edited
      Code:
      ldc_w "reader.content.topMargin"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 5.36
    6. Original
      Code:
      ldc_w "reader.content.bottomMargin"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 13.58
      Edited
      Code:
      ldc_w "reader.content.bottomMargin"
      aastore
      dup
      iconst_1
      new java/lang/Integer
      dup
      ldc_w 8.49
      Note:"reader.progressbar.footer.height" and "reader.content.bottomMargin" should be the same.
  7. You should pack back jar file from unpacked folder "ReaderSDK-impl-en_GB". For update jar file using WinRar: open "ReaderSDK-impl-en_GB.jar" file in WinRar, navigate to "ReaderSDK-impl-en_GB.jar\com\amazon\ebook\booklet\reader\resource s" and drag-and-drop your new file "ReaderResources_en_GB.class"
  8. Copy "ReaderSDK-impl-en_GB.jar" back to your Kindle.
  9. Unplug and restart your Kindle.
  10. The values for left & right margin are cached and after first reboot after changing the jar files you have to open Aa menu and press on one of the other two margin icons and then press on the first one. Then the value (and thus the margin size itself) gets updated.

3. Changing mobi font sizes.
Spoiler:

Mobi-drawing-en_GB.jar
See https://www.mobileread.com/forums/sho...postcount=1588
Note: quick dictionary uses #3 font size.

Last edited by sprite7; 12-30-2016 at 02:14 PM.
sprite7 is offline   Reply With Quote
Old 03-04-2016, 02:37 AM   #1796
mitra
Connoisseur
mitra began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Jan 2016
Location: Mumbai
Device: Kindle PW2
Wow that is a thorough guide for dummies like me. I appreciate it. It is better to understand. Thank you @sprite7.
mitra is offline   Reply With Quote
Old 03-04-2016, 10:48 AM   #1797
el_topo50
Connoisseur
el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.el_topo50 ought to be getting tired of karma fortunes by now.
 
el_topo50's Avatar
 
Posts: 52
Karma: 647162
Join Date: Oct 2013
Device: Kindle Voyage (5.7.2.1. JB)
Thanks! Will check it out!!!
el_topo50 is offline   Reply With Quote
Old 03-05-2016, 11:31 AM   #1798
ecc29
Member
ecc29 doesn't litterecc29 doesn't litterecc29 doesn't litter
 
Posts: 11
Karma: 226
Join Date: Oct 2015
Device: KPW3
Quote:
Originally Posted by sprite7 View Post
2. Changing margins
Copy file "/opt/amazon/ebook/lib/HTMLReader-impl-en_GB.jar" from Kindle to you PC using usbnetwork. (For en_GB language or another file for another language)[*] To edit jar file, unarchive it (I use WinRar) in "HTMLReader-impl-en_GB" folder.
Are you sure the file name is "HTMLReader-impl-en_GB.jar", not "ReaderSDK-impl-en_GB.jar"?
ecc29 is offline   Reply With Quote
Old 03-06-2016, 02:53 AM   #1799
sprite7
Member
sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.sprite7 could sell banana peel slippers to a Deveel.
 
Posts: 16
Karma: 3274
Join Date: Dec 2014
Device: Kindle Oasis 3
Quote:
Originally Posted by ecc29 View Post
Are you sure the file name is "HTMLReader-impl-en_GB.jar", not "ReaderSDK-impl-en_GB.jar"?
You're right -- fixed.
sprite7 is offline   Reply With Quote
Old 03-14-2016, 02:44 AM   #1800
mixedbag
Enthusiast
mixedbag began at the beginning.
 
Posts: 26
Karma: 18
Join Date: Aug 2015
Device: none
Could anyone post a .jar file for 5.6.5 and 5.6.1.1 for pws.

Could anyone please do a favour of updating kaznelsons hack (3 jar files) for PWs font considering most of the pw users are updated and jbpatch is no longer supported on newer firmwares.

Plus i guess it would be safe to assume most pw1 are or will be pushed to fw 5.6.1.1 (after amazons notice) and branch delay jb is for 5.6.5, so many would stick to it. So on these two FW most of kindle users might me currently. Sadly there is no jar files for these firmware and many would be saved of time and adventurous trip towards editing .jar files.

I must thank sprite7 for his impressive guide to edit jar but i cannot take risk. I am prone to errors. I know my limits.

So, if any generous hearted could please update kaznelsons jar hack for these two firmwares, it would be a kind act indeed. Personally, I am on pw2 5.6.5 and would remain forever so am very much selfish in rooting for the cause.

But things apart, please give it a thought.

mixedbag is offline   Reply With Quote
Reply

Tags
jbpatch, kindle touch hacks


Forum Jump


All times are GMT -4. The time now is 04:15 PM.


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