|
|
#1 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 65
Karma: 1876850
Join Date: Jun 2023
Device: iPhone
|
Some help with compilation and/or testing
Recently, there have been complaints about Dedrm not working on various firmware versions of Kindle. I guess the interest in such tools for jailbroken Kindles is not very high, though, since the possible solution is, well, porting KFXArchiver to the device, because why not? So I tried doing that (in KUAL addon form), just for completion's sake. However, I only have pw2 with 5.12.2.2 firmware, (recently got it on a whim) little to no experience with cross-compiling and no way to test the compiled executables. So I would like some help with that, if possible?
As one can see, I thought that there are roughly 4 divisions, compilation with c++11 strings and without, as well as HF and not HF glibc. There might be more, and I might have compiled them wrong in the first place. Oasis, for example *should* be HF/old strings. But once again, not much knowledge in this area. There is also a possibility that different FW have different method signatures... So, if possible, could somebody here either compile the source and try it for various jailbroken devices or at least try prepared executables and report, here or in DM, about their failure modes? Expected failure modes: Wrong HF - executable "is not found" Wrong C++ ABI: usually bad_alloc but may very with segfault Wrong signature in shared lib: segfault (null call) Wrong implementation for newer firmware (scribe, etc?): runs but the books are not decrypted. |
|
|
|
|
|
#2 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,184
Karma: 12360286
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
|
Did you try using this toolchain for compiling?
https://github.com/koreader/koxtoolchain As for Kindle devices using v5.x firmware branch stuff is usually compiled to target ABI and use certain compiler flags in groups like this: 1) Kindle Touch & PW1 2) PW2 and all later models, all the way to firmware 5.16.2.1.1 ( = the last "soft float" firmware) 3) armhf ABI / firmware 5.16.3 and later. So then you have situation that all models released between PW4 and PW6 could be on armel or armhf ABI depending on if the device is on older or latest available firmware for that particular model. Thus the end user needs to know and use correct binaries. Like, I have a PW5 on 5.16.2.1.1 firmware that I do not want to ever update to newer, armhf firmware. |
|
|
|
| Advert | |
|
|
|
|
#3 | ||||
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 65
Karma: 1876850
Join Date: Jun 2023
Device: iPhone
|
Thank you for your response.
Quote:
Later it turned out that combination of static stdlib and flags to disable c++11 ABI would work, but at first, I had to compile using gcc 4.9.4 Quote:
Quote:
Same as above, both instruction set and ABI should match, I think. If anything, software FP might still work, I am not too concerned with performance, it is slow as molasses. Quote:
|
||||
|
|
|
|
|
#4 | |
|
Doingsmth
![]() Posts: 54
Karma: 10
Join Date: Mar 2026
Device: Kindle PW3
|
Quote:
Well in have pw3(pw 7) if you want i can test for you and I can compile for you to(using tccmake) |
|
|
|
|
|
|
#5 | |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 65
Karma: 1876850
Join Date: Jun 2023
Device: iPhone
|
Quote:
|
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,184
Karma: 12360286
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
|
Code:
root@kindle dedrm_test]# ./kfxdedrm_c11 -h Kindle reader , 2 arguments Selected Out folder: "/mnt/us/dedrm" Created directory: "/mnt/us/dedrm" usid length 17 strind legnth: 24 DSN_removed_serial_ Booksec: 0x1ef00e8 Vtable: 0xb6d471a0 Found getbook 0xb6b04a89 DeDRM all done. [root@kindle dedrm_test]# [root@kindle dedrm_test]# [root@kindle dedrm_test]# ./kfxdedrm_old -h Kindle reader , 2 arguments Selected Out folder: "/mnt/us/dedrm" usid length 17 strind legnth: 4 DSN_removed_serial_ Booksec: 0x1890130 Vtable: 0xb6d871a0 Found getbook 0xb6b44a89 DeDRM all done. [root@kindle dedrm_test]# [root@kindle dedrm_test]# [root@kindle dedrm_test]# ./kfxdedrmhf_static_c11 -h -sh: ./kfxdedrmhf_static_c11: not found [root@kindle dedrm_test]# [root@kindle dedrm_test]# [root@kindle dedrm_test]# ./kfxdedrmhf_static_old -h -sh: ./kfxdedrmhf_static_old: not found [root@kindle dedrm_test]# |
|
|
|
|
|
#7 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 65
Karma: 1876850
Join Date: Jun 2023
Device: iPhone
|
Thank you!
Are there any KFX books on that kindle? As expected, hf did not work, but... Maybe I should be explicit as to what the executables (are supposed to) do... They are supposed to scan us/documents for KFX books and decrypt them, if possible, to "/mnt/us/dedrm". I expect the ones with CXXABI mismatch to crash when it tries decryption, but sadly, without books present, I cannot tell if it works or not Maybe I should also ask in one of the parent forum threads... Note, executables do not have command line arguments, I wanted to, ah, simplify them for eventual use with KUAL. |
|
|
|
|
|
#8 |
|
Doingsmth
![]() Posts: 54
Karma: 10
Join Date: Mar 2026
Device: Kindle PW3
|
Well it's works too well(tried kfxdedrm_c11) well in have a lot of books and well when I used it after just a while it kinda filled my storage....
Kindle reader , 1 arguments Selected Out folder: "/mnt/us/dedrm" usid length 16 strind legnth: 24 DSNG090G1058263026X Booksec: 0xd48868 Vtable: 0x4069f1a0 Found getbook 0x4045ca89 Adding "IMG-20251108-WA0006_6D64DD8CF9724C23B76C3EE04CE62243.kfx" as book candidate Adding "Prabhat Advanced Hindi English Dictionary (Hindi Edition)_B06VW73857.kfx" as book candidate Adding "The-Martial-Unity_700B5820ABB74B449153513C580190E2.kfx" as book candidate Adding "552604629_699152783227259_5696614269396812001_n_4 D42EB3C3A0D413FA74703E1C2E4CEBA.kfx" as book candidate Adding "IMG_20250818_144140_223_7D4AFBA4B1DD4869813F15AA5 FA74AE5.kfx" as book candidate Adding "City_of_Sin_D0032BBF2D384420A216D6183DE8F4BC. kfx" as book candidate Adding "Screenshot 2025-10-14 005520_5FF53BEC74F64234AE1960CED47C5020.kfx" as book candidate Adding "538045760_805200355410574_3400909187705123903_n_9 610067095F34310801903B1275B03D5.kfx" as book candidate Adding "547576386_771450569070739_1581618550762328268_n_7 64339ADA31B4E3DACA1078843F2050C.kfx" as book candidate Adding "IMG_20250904_235941_814_57E2EBC6334B4D2781BC46083 D7A4F35.kfx" as book candidate Adding "547512877_1492599781883299_4402028627756705956_n_ DF5BE2AA63ED4F91AD9BB6A601E3EA5D.kfx" as book candidate Adding "551574510_1116261957319288_1598189977775533327_n_ 8670436AD541418291BD108E69194A31.kfx" as book candidate Adding "551181119_3682910701845436_4063045626028104048_n_ 115E2791C06246D789905FF52BEAE26D.kfx" as book candidate Adding "Screenshot_20251231_091614_Drive-cd3598a3-4da2-4aeb-8629-8c99f3202dad_8714BED021BE48E2A0EC41F84E13A546.kfx" as book candidate IMG-20251108-WA0006_6D64DD8CF9724C23B76C3EE04CE62243.kfx terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted Last edited by Hag_Sub; 05-09-2026 at 04:41 PM. |
|
|
|
|
|
#9 |
|
Doingsmth
![]() Posts: 54
Karma: 10
Join Date: Mar 2026
Device: Kindle PW3
|
Well nvm it did nothing for some reason...
|
|
|
|
|
|
#10 |
|
Doingsmth
![]() Posts: 54
Karma: 10
Join Date: Mar 2026
Device: Kindle PW3
|
And permission denied for run_cmd.sh
|
|
|
|
|
|
#11 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,184
Karma: 12360286
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
|
|
|
|
|
|
|
#12 | |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 65
Karma: 1876850
Join Date: Jun 2023
Device: iPhone
|
Quote:
If you are on PW1, or anything under and potentially including oasis, please try kfxdedrm_old, though space might be an issue. Not sure what to do about it (space) for now. kfxdedrm_c11 has incompatible ABI, hence the bad_alloc crash. |
|
|
|
|
|
|
#13 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,184
Karma: 12360286
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
|
He has a PW3, you can see the serial number in output text
(G090G1 = PW3).
|
|
|
|
|
|
#14 |
|
Laura
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,728
Karma: 24000000
Join Date: Nov 2009
Device: Kobo Sage, Kobo Elipsa, Nook Glowlight 4 Plus, Kindle Oasis 2
|
Since the Paperwhite 1 (5th gen) doesn't get kfx and is one of the ones getting disconnected in a few days, is this testing for the older formats which might still occasionally show up on newer devices?
|
|
|
|
|
|
#15 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 83,294
Karma: 153646249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
This is testing to try to get KFX off of a Kindle and have it end up in calibre with no DRM.
Last edited by JSWolf; 05-10-2026 at 04:47 PM. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Please help with these compilation errors | darkbreath | Sigil | 24 | 07-22-2016 11:47 AM |
| Can I make a compilation within a compilation? | Villordsutch | Amazon Kindle | 5 | 01-04-2012 03:10 AM |
| compilation error | iomari | Calibre | 1 | 10-04-2011 09:01 AM |
| New firmware compilation (June 9) | ahhahh | iRex | 38 | 06-16-2010 04:28 PM |
| Compilation of Q&A | FGFuzaxx | iRex | 14 | 07-17-2006 07:51 AM |