08-11-2016, 12:33 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Kindle PW3
|
Keyboard localization to Korean
Hi, all!
I'm glad to present Kindle Korean keyboard(kingul) for you. Spoiler:
This is an open source project and curretnly being managed on github(https://github.com/hylo926/kingul). Since it captures keyboard inputs and can send arbitrary input, it would be useful to someone who wants to make a feature like snippet or something. What Does It Do?: Spoiler:
Latest Updates (08/31/2016): Spoiler:
INSTALL: Spoiler:
UNINSTALL: Spoiler:
NOTES & TROUBLESHOOTING: Spoiler:
Changelog: Spoiler:
Got the basic idea from https://www.mobileread.com/forums/sho...5&postcount=28 Thanks you, baf. Original Post: Spoiler:
Last edited by hylo; 08-31-2016 at 01:58 AM. |
08-11-2016, 05:15 AM | #2 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Kindle PW3
|
It was libpredict.so that is required to convert Romaji to Hiragana which I least suspected... I changed one of the letters in Korean keymap to 'a' and when I typed it converted into Hiragana although device had soft reset soon after. I assume it's a soft reset because SSH connection was not disconnected during 'the boy under the tree' screen with a progress bar.
[root@kindle ja.ko]# ldd libpredictor.so /usr/lib/libenvload.so (0x40138000) libwlf.so => /usr/lib/libwlf.so (0x40056000) libicuuc.so.50 => /usr/lib/libicuuc.so.50 (0x401d3000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x402fc000) libc.so.6 => /lib/libc.so.6 (0x403f4000) libiwnn.so => /usr/lib/libiwnn.so (0x400d1000) libicudata.so.50 => /usr/lib/libicudata.so.50 (0x40522000) libpthread.so.0 => /lib/libpthread.so.0 (0x40141000) libdl.so.2 => /lib/libdl.so.2 (0x40161000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x4123b000) libm.so.6 => /lib/libm.so.6 (0x41306000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40077000) /lib/ld-linux.so.3 (0x400a9000) libicudata.so is presumed to be the one I'm looking for. I'm going to find some patterns of unicode of Japanese characters inside that library. International Components for Unicode(ICU) project is an open source project. (http://site.icu-project.org/) Maybe I can build my own libicudata.so. |
08-11-2016, 08:11 AM | #3 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Have you checked the Amazon source code archive for your device's 5.8.1?
It may have the source for that library in it (if it is GPL, that is all they release). |
08-11-2016, 10:35 PM | #4 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Kindle PW3
|
Quote:
I looked up their 5.8.1 source code, but unfortunately, there wasn't. By the way, it's ICU License rather than GPL and I couldn't find any clause that the user have to make their source code public. The ICU project is somewhat bulky so building it appropriately seems a lot of work.. |
|
08-15-2016, 10:14 PM | #5 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Kindle PW3
|
Ok, so I've implemented Korean keyboard with postprocessing during the weekend. The basic idea is intercepting the X11 event related to keyboard sent to X11 windows generated from /usr/bin/kb and tweaking the unicodes within the range of Korean characters. So, theoretically, it shouldn't disturb or interrupt other language keyboard inputs and processes. I think it's working well in that perspective.
Anyway, I'm going to make the source code public. And I'd like to release it in a package form with a help of kindletool. I'm searching this forum for how this tool works or at least the usage of this tool. Since my kindle has GLIBC of version 2.19(PW3 5.8.1) and I had to use it for building binaries instead of default 2.12, I'm worrying it won't work on other versions of firmware. Last edited by hylo; 08-15-2016 at 10:20 PM. |
08-15-2016, 10:56 PM | #6 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
The symbols your program references are versioned and include what revision glibc they first appeared in.
So list them. Probably nm would be the tool to use. For details: Code:
man nm Code:
man --help Let me guess here - You must be most familar with one of those operating systems where the help files are an extra-cost option. |
08-16-2016, 06:10 AM | #7 |
Addict
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
|
Congratulations on getting your keyboard working, that sounded a bit difficult!
|
08-16-2016, 08:30 AM | #8 |
BLAM!
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
|
As @knc1 mentioned, examining the symbol table of your resulting binary should be enough to make sure you're not hitting ABI issues.
I'm personally a fan of readelf for that job, which I find more user-friendly than nm . |
08-17-2016, 09:10 PM | #9 | ||
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Kindle PW3
|
Quote:
Quote:
Code:
Symbol table '.dynsym' contains 31 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTab 2: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 3: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 4: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 5: 00021ae0 0 NOTYPE GLOBAL DEFAULT 23 _bss_end__ 6: 00000000 0 FUNC GLOBAL DEFAULT UND XGetWindowAttributes 7: 000116ec 0 FUNC GLOBAL DEFAULT 13 _fini 8: 00021ad4 0 NOTYPE GLOBAL DEFAULT 23 __bss_start__ 9: 000106e4 0 FUNC GLOBAL DEFAULT 10 _init 10: 00021ad4 0 NOTYPE GLOBAL DEFAULT 23 __bss_start 11: 00000000 0 FUNC GLOBAL DEFAULT UND XDisplayKeycodes 12: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2) 13: 00021ae0 0 NOTYPE GLOBAL DEFAULT 23 _end 14: 00021ae0 0 NOTYPE GLOBAL DEFAULT 23 __end__ 15: 00000000 0 FUNC GLOBAL DEFAULT UND XSelectInput 16: 00000000 0 FUNC GLOBAL DEFAULT UND XFree 17: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2) 18: 00021ad4 0 NOTYPE GLOBAL DEFAULT 22 _edata 19: 00000000 0 FUNC GLOBAL DEFAULT UND usleep@GLIBC_2.4 (2) 20: 00000000 0 FUNC GLOBAL DEFAULT UND XOpenDisplay 21: 00000000 0 FUNC GLOBAL DEFAULT UND XCheckWindowEvent 22: 00000000 0 FUNC GLOBAL DEFAULT UND XSendEvent 23: 00000000 0 FUNC GLOBAL DEFAULT UND puts@GLIBC_2.4 (2) 24: 00021ae0 0 NOTYPE GLOBAL DEFAULT 23 __bss_end__ 25: 00000000 0 FUNC GLOBAL DEFAULT UND XChangeKeyboardMapping 26: 00000000 0 FUNC GLOBAL DEFAULT UND XFetchName 27: 00000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.4 (2) 28: 00000000 0 FUNC GLOBAL DEFAULT UND XLookupKeysym 29: 00000000 0 FUNC GLOBAL DEFAULT UND XGetInputFocus 30: 00000000 0 FUNC GLOBAL DEFAULT UND raise@GLIBC_2.4 (2) Thank you! |
||
08-17-2016, 09:29 PM | #10 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
That is indeed what it means
"GLIBC version 2.4 OR MORE RECENT" |
08-18-2016, 02:32 AM | #11 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Kindle PW3
|
|
Tags |
keyboard, localization |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle 3 localization | JirkaS | Kindle Developer's Corner | 287 | 05-20-2018 10:08 AM |
[K3] Physical keyboard localization | Sir Alex | Kindle Developer's Corner | 112 | 05-19-2018 11:23 PM |
Keyboard localization (hack) | Sir Alex | Kindle Developer's Corner | 72 | 04-16-2013 03:05 PM |
Calibre2opds Localization | itimpi | Related Tools | 0 | 01-14-2012 11:58 AM |