Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2016, 06:29 PM   #106
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
I've updated the .zip file in post #1 to include the following patches:

`My 24 line spacing values`
`Force user font-family in ePubs` (two-part patch)
`KePub text-rendering options`
GeoffR is offline   Reply With Quote
Old 12-26-2016, 07:46 AM   #107
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
Hello!

I really like all of your work in patching Kobo fw.
I tried it myself, and created a hungarian keyboard based on the turkish keyboard.
But something is not good, most of the characters doesn't have upper case, and adds and extra space after them. Only the hyphenated characters work as expected.
Here's the code:

Code:
<Patch>
patch_name = `Hungarian keyboard`
patch_enable = `yes`
# patch_group = `Keyboard alternatives`
#
## Replaces keys on the Extended Latin keypad with Hungarian alternatives.
#
# Enable uppercase for `ß` key
#replace_bytes = 851C38, 00 24, 01 24
# Replace layout sign
find_base_address = `ÉÀÇ`
replace_string = 0000, `ÉÀÇ`, `EN/HU`
# Change keyboard layout
find_base_address = `æ\0\0à\0\0è\0\0ì\0\0`
# Second row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, first column.)
replace_string = 0000, `æ\0`, `q`
replace_string = 0004, `à\0`, `w`
replace_string = 0008, `è\0`, `e`
replace_string = 000C, `ì\0`, `r`
replace_string = 0010, `ò\0`, `t`
replace_string = 0014, `ù\0`, `z`
replace_string = 0018, `á\0`, `u`
replace_string = 001C, `é\0`, `i`
replace_string = 0020, `í\0`, `o`
replace_string = 0024, `ó\0`, `p`
replace_string = 0028, `ú\0`, `ő`
replace_string = 002C, `ý\0`, `ú`
# Third row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, second column.)
replace_string = 0030, `œ\0`, `a`
replace_string = 0034, `â\0`, `s`
replace_string = 0038, `ê\0`, `d`
replace_string = 003C, `î\0`, `f`
replace_string = 0040, `ô\0`, `g`
replace_string = 0044, `û\0`, `h`
replace_string = 0048, `ä\0`, `j`
replace_string = 004C, `ë\0`, `k`
replace_string = 0050, `ï\0`, `l`
replace_string = 0054, `ö\0`, `é`
replace_string = 0058, `ü\0`, `á`
replace_string = 005C, `ÿ\0`, `ű`
# Bottom row, left to right:
replace_string = 0060, `ã\0`, `í`
replace_string = 0064, `ñ\0`, `y`
replace_string = 0068, `õ\0`, `c`
replace_string = 006C, `å\0`, `v`
replace_string = 0070, `ß\0`, `b`
replace_string = 0074, `ç\0`, `n`
replace_string = 0078, `đ\0`, `m`
replace_string = 007C, `ø\0`, `ö`
replace_string = 0080, `ij\0`, `ü`
replace_string = 0084, `ł\0`, `ó`
#
# Top row: Extra keys for Touch/Mini/Glo/Aura only.
# (This patch cannot change the top row of the AuraHD/H2O/GloHD keypad.)
##find_base_address = `ƒ\0\0þ\0\0š\0\0ž\0\0`
# Top row: columns 1-2 (see first key of second/third rows above.)
# Top row: columns 3-5
##replace_string = 0004, `þ\0`, `?`
##replace_string = 0008, `š\0`, `”`
##replace_string = 000C, `ž\0`, `-`
# Top row: column 6 is a duplicate of the last key on the bottom row.
# Top row: columns 7-10
##replace_string = 0000, `ƒ\0`, `:`
##replace_string = 0010, `μ\0`, `;`
##replace_string = 0014, `ª\0`, `,`
##replace_string = 0018, `º\0`, `.`
</Patch>
Any help would be appreciated.

Last edited by kido.resuri; 12-27-2016 at 12:34 PM. Reason: Fine-tuned the code
kido.resuri is offline   Reply With Quote
Advert
Old 12-26-2016, 06:23 PM   #108
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by kido.resuri View Post
I tried it myself, and created a hungarian keyboard based on the turkish keyboard.
But something is not good, most of the characters doesn't have upper case, and adds and extra space after them. Only the hyphenated characters work as expected.
Here's the code:
I tried your Hungarian keyboard patch on my Glo and it seems to work fine, uppercase/lowercase work correctly for all letters.

All I can think of that might cause the problem is if the editor you are using to edit the patch file is not using UTF-8 character encoding. See if you can set it to use UTF-8, or maybe try another editor. If you are not sure, zip the edited libnickel.so.1.0.0.patch file and post it here, and I'll see if I can find anything wrong with it.
GeoffR is offline   Reply With Quote
Old 12-26-2016, 06:40 PM   #109
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
For reference, attached is the libnickel.so.1.0.0.patch file with the `Hungarian keyboard` patch included, which worked on my Glo.
Attached Thumbnails
Click image for larger version

Name:	HUkeyboard1.png
Views:	364
Size:	24.0 KB
ID:	153792   Click image for larger version

Name:	HUkeyboard2.png
Views:	352
Size:	26.1 KB
ID:	153793  
Attached Files
File Type: zip libnickel.so.1.0.0.patch.zip (15.2 KB, 309 views)

Last edited by GeoffR; 12-26-2016 at 06:57 PM. Reason: added screenshots
GeoffR is offline   Reply With Quote
Old 12-26-2016, 07:01 PM   #110
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
I edited it in notepad. According to the save dialog, it's UTF-8.
All the hungarian-specific charcters (öüóőúéáűí) work good, both upper and lowercase.
The strange thing i noticed that the characters that are on the first page and on the patched layout (standard characters a-z) doesn't change to uppercase on the patched layout.

This happens with the Turkish keyboard patch also.

I tried this on a H2O.

Edit: I see your images, nice. H2O has different layout.

Edit2: Here are my screenshots (taken with camera...). Notice the space after a, s and d, these are added on each keypress, I didn't press space.
Click image for larger version

Name:	Office Lens 20161227-010606.jpg
Views:	390
Size:	267.7 KB
ID:	153794Click image for larger version

Name:	Office Lens 20161227-010717.jpg
Views:	382
Size:	302.0 KB
ID:	153795
Attached Files
File Type: zip libnickel.so.1.0.0.zip (15.2 KB, 324 views)

Last edited by kido.resuri; 12-26-2016 at 07:17 PM. Reason: Added screenshots
kido.resuri is offline   Reply With Quote
Advert
Old 12-26-2016, 07:27 PM   #111
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
Okay, I tried with your patch file, just unzipped and applied the patch. The same behavior as with mine.
kido.resuri is offline   Reply With Quote
Old 12-26-2016, 07:49 PM   #112
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by kido.resuri View Post
This happens with the Turkish keyboard patch also.

I tried this on a H2O.
Your libnickel.so.1.0.0.patch file is okay, so the character encoding is not the problem.

It could just be a difference between the Glo and H2O that hasn't been noticed before: for some reason the firmware interprets the same character data differently depending on which device it is running on, If that is the case then I don't know how to fix it.
GeoffR is offline   Reply With Quote
Old 12-26-2016, 07:57 PM   #113
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
Well, okay, I think I have to live with it. At least I have the accent characters.
Is there any way to change the first page of the keyboard?
kido.resuri is offline   Reply With Quote
Old 12-26-2016, 08:18 PM   #114
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by kido.resuri View Post
Is there any way to change the first page of the keyboard?
Not that I know of, sorry.

The keyboard patches changed in later firmware versions, the character data is stored differently in firmware 4.x.x than it was in 3.x.x so it is possible that the keyboard code has changed in other ways too.
GeoffR is offline   Reply With Quote
Old 12-27-2016, 05:35 PM   #115
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
Is there a neat and clear how-to instruction or thread about how to extract the contents of the firmware?
I would like to examine it a bit, maybe i find some fun and useful stuff others missed. I'm not good in linux yet, so I'm not familiar with "binary" formats.
I'm expecting to "touch" the user interface a bit (extra menus, etc.).
kido.resuri is offline   Reply With Quote
Old 12-27-2016, 05:56 PM   #116
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 876
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by kido.resuri View Post
Is there a neat and clear how-to instruction or thread about how to extract the contents of the firmware?
I would like to examine it a bit, maybe i find some fun and useful stuff others missed. I'm not good in linux yet, so I'm not familiar with "binary" formats.
I'm expecting to "touch" the user interface a bit (extra menus, etc.).
The firmware 'image' is just a '.tar.gz' file, so it can be extracted using tar. The contents is basically a linux distribution.

I believe most of the interface stuff is in the nickel binaries though, so I don't know how much more can be discovered.

GeoffR and others are the people who know a lot more about it than I do however.
sherman is offline   Reply With Quote
Old 12-27-2016, 07:05 PM   #117
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
Thanks, I just realized I wasn't clear. I know the firmware is a compressed tar.gz, but I meant the libnickel.so and other binaries. I saw with a simple text viewer that there are reference stuff in there for other libraries and binaries maybe, but I don't have the skills yet to discover them in a more clear way.

By the way, I set my locale to hu_HU, to display the clock in hungarian format, and the word puzzle scramble disappeared from the beta features menu. Strange, isn't it?
I also saw some reference to something crossword puzzle maybe?
So there may be hidden features also. I wish to discover these.
kido.resuri is offline   Reply With Quote
Old 12-29-2016, 04:18 PM   #118
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by kido.resuri View Post
Is there a neat and clear how-to instruction or thread about how to extract the contents of the firmware?
I would like to examine it a bit, maybe i find some fun and useful stuff others missed. I'm not good in linux yet, so I'm not familiar with "binary" formats.
I'm expecting to "touch" the user interface a bit (extra menus, etc.).
To look inside the binary files I use a hex editor and a disassembler. There is also pipcat's python program which can be used to examine the compressed strings in the nickel executable.

I have Debian Linux, I use the objdump program included in the binutils-multiarch package as a disassembler (the strings program in the same package is also useful), and I use Emacs as my normal text editor which also works as a hex editor in hexl-mode. But there are lots of other programs you can use instead, these are just the ones I am used to, not necessarily the best or easiest to use.
GeoffR is offline   Reply With Quote
Old 12-30-2016, 07:30 AM   #119
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
Thank You!
Pipcat's scripts look very promising!

I'll look into it!

I'm a Windows user by the way, Hex editor is not a problem, I also have python isntalled now (for the Kobo translation), I only need an objdump alternative, perhaps it also could be used from cygwin.
kido.resuri is offline   Reply With Quote
Old 12-30-2016, 04:04 PM   #120
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by kido.resuri View Post
I'm a Windows user by the way, Hex editor is not a problem, I also have python isntalled now (for the Kobo translation), I only need an objdump alternative, perhaps it also could be used from cygwin.
objdump will only really be useful if you know how to read the output it produces, i.e. ARM assembly language.
Spoiler:
Code:
008a21a8 <FrontLightPopup::decreaseBrightness()>:
  8a21a8:       6c03            ldr     r3, [r0, #64]   ; 0x40
  8a21aa:       b5b0            push    {r4, r5, r7, lr}
  8a21ac:       4604            mov     r4, r0
  8a21ae:       af00            add     r7, sp, #0
  8a21b0:       6b58            ldr     r0, [r3, #52]   ; 0x34
  8a21b2:       f764 e0d6       blx     406360 <_init+0xd018>
  8a21b6:       6c23            ldr     r3, [r4, #64]   ; 0x40
  8a21b8:       4605            mov     r5, r0
  8a21ba:       6b58            ldr     r0, [r3, #52]   ; 0x34
  8a21bc:       f77a e69a       blx     41cef4 <_init+0x23bac>
  8a21c0:       f1a0 010a       sub.w   r1, r0, #10
  8a21c4:       4620            mov     r0, r4
  8a21c6:       42a9            cmp     r1, r5
  8a21c8:       bfb8            it      lt
  8a21ca:       4629            movlt   r1, r5
  8a21cc:       46bd            mov     sp, r7
  8a21ce:       e8bd 40b0       ldmia.w sp!, {r4, r5, r7, lr}
  8a21d2:       f781 b35f       b.w     423894 <_init+0x2a54c>
  8a21d6:       bf00            nop


There is a lot you can do without a disassembler though, most of the current patches just modify the data, mainly strings, and dont need to know anything about the code that uses it.

Last edited by GeoffR; 12-30-2016 at 04:12 PM.
GeoffR is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.17.3 GeoffR Kobo Developer's Corner 60 09-17-2015 05:35 PM
Instructions for patching firmware 3.17.0 GeoffR Kobo Developer's Corner 49 08-16-2015 05:20 AM
Instructions for patching firmware 3.16.10 GeoffR Kobo Developer's Corner 12 08-14-2015 03:40 AM
Instructions for patching firmware 3.11.0 GeoffR Kobo Developer's Corner 226 06-01-2015 05:32 AM
Instructions for patching firmware 3.8.0 GeoffR Kobo Developer's Corner 92 10-22-2014 07:22 AM


All times are GMT -4. The time now is 12:02 PM.


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