Closed lauraannwilliams closed 3 years ago
Thank you for your time and work, btw
You are still seeing KFX-ZIP after running the chmod command and then re-downloading and re-adding your books to calibre? If so, it would seem that Kindle for Mac is ignoring the fact that it can't run renderer-test and is downloading KFX format anyway. (Kindle for Mac gives the .azw extension to all of the main book files regardless of the underlying format. If you also see .voucher/.res/.md files in the same folder, that's KFX format. KFX-ZIP is what happens when the KFX Input plugin has gathered the multiple files together, but DeDRM wasn't able to decrypt it.)
If you can get non-KFX format, you should be able to remove the DRM with your current calibre/DeDRM versions. If you are unable to prevent KFX format downloads and Kindle for Mac has not auto-updated past 1.26, then DeDRM 6.8.1 loaded into calibre 4.23 will work.
Did you try sudo chmod -x as well as chmod -x? Sometimes chmod -x doesn't work and you need to add sudo first (it will ask for an admin password, which you will need to provide).
Also, make sure the filepath is correct. If K4Mac isn't in your Applications folder, you will need to revise the filepath accordingly.
Finally, it's weird if it's working for some books and not others. chmod -x will block KFX. I think it either works or it doesn't work. It doesn't work on some books, but not others, which suggests something else may be going on ...
What are the extensions in calibre for the files that worked?
I've double checked the chmod and there was an error there - files are being flagged as AZW files now. However, they're still not decrypting.
The ones that ARE decrypted are all flagged as AZW3 files
Here's a log with one successful and one failed file.
Thanks to everyone responding
The book that worked was already DRM-free to begin with. A key is found and decrypted, but it is not unlocking the DRM book. The Kindle for Mac installation that you are using to download these is the one that is currently on the same machine and user as calibre with DeDRM?
yes its all the same machine. i'll see if i can figure out if any of the other books that opened had drm
It should be all or nothing. If key and book are from the same installation of Kindle for Mac, they should work. I don't know if the problem here is beta DeDRM 7, something with Big Sur, something about your setup, or some combination of those. I have seen reports of things working on Big Sur with DeDRM 6.8.1 installed in calibre 4.23.
In an effort to provide more information, I downloaded and tried (and failed) to decrypt with the following kindle versions
1.26.1 1.27 1.28 1.29 1.30
My Calibre, OS and DeDRM version all stayed the same. Each time I deleted both the app and the application support folder, and reran the chmod hack.
Off into work time tomorrow so not sure when I'll be able to try again
You deleted and re-downloaded the books and removed and re-added them to calibre?
I don't think the version of Kindle for Mac makes any difference as long as you have KFX disabled. I'd give DeDRM 6.8.1/calibre 4.23 a try.
I am in the same boat. Freshly installed and registered Kindle version (1.30) from the Mac App Store. Mac OS X 11.1. Successfully disabled KFX using sudo chmod. located the .azw file in my Kindle folder. I've installed the latest pre-release of DeDRM (7.0.0) and Obok DeDRM (6.7.0) [my understanding is that Obok is not necessary but thought I'd include it just in case]. Re-started Calibre. Deleted previously failed attempt at importing book. This is all on the same computer, same user account.
Importing the .azw file still does nothing to remove the DRM. When I try to convert the book to epub Calibre complains and says that it is DRM-protected. Sad :(
I cannot figure out where to find the DeDRM logs. If someone can let me know where to find them I'm happy to post the log.
Found the log. Welcome any input!
calibre Debug log
calibre 5.7.2 embedded-python: True is64bit: True
macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '20.2.0', 'Darwin Kernel Version 20.2.0: Wed Dec 2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64')
Python 3.8.5
OSX: ('10.16', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 0, 0) && Obok DeDRM (6, 7, 0)
calibre 5.7.2 embedded-python: True is64bit: True
macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '20.2.0', 'Darwin Kernel Version 20.2.0: Wed Dec 2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64')
Python 3.8.5
OSX: ('10.16', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 0, 0) && Obok DeDRM (6, 7, 0)
devicePixelRatio: 2.0
logicalDpi: 72.0 x 72.0
physicalDpi: 92.0000013817014 x 92.00000138170138
Using calibre Qt style: True
[0.00] Starting up...
[0.03] Showing splash screen...
[0.27] splash screen shown
[0.27] Initializing db...
[0.28] db initialized
[0.28] Constructing main UI...
[0.93] main UI initialized...
[0.93] Hiding splash screen
Starting QuickView
DeDRM v7.0.0: Trying to decrypt B084M1NCF7_EBOK.azw
Using Library AlfCrypto Python
Using Library AlfCrypto Python
MobiDeDrm v1.0.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: What Tech Calls Thinking (FSG Originals x Logic)
Found 0 keys to try after 0.1 seconds
Crypto Type is: 2
DeDRM v7.0.0: Failed to decrypt with error: No key found in 0 keys tried.
DeDRM v7.0.0: Looking for new default Kindle Key after 0.1 seconds
Found k4Mac kinf2018 file: /Users/Harshita/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
trying username b'Harshita' on file /Users/Harshita/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
trying IDString: b'5d5a674fe638'
Decrypted key file using IDString '5d5a674fe638' and UserName 'Harshita'
DeDRM v7.0.0: Found 1 new key
MobiDeDrm v1.0.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: What Tech Calls Thinking (FSG Originals x Logic)
Got SerialNumber from database default_key_1
Got UsernameHash from database default_key_1
Found 4 keys to try after 0.6 seconds
Crypto Type is: 2
DeDRM v7.0.0: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
File "calibre_plugins.dedrm.__init__", line 534, in KindleMobiDecrypt
book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
File "calibre_plugins.dedrm.k4mobidedrm", line 238, in GetDecryptedBook
mb.processBook(totalpids)
File "calibre_plugins.dedrm.mobidedrm", line 476, in processBook
raise DrmException("No key found in {0:d} keys tried.".format(len(goodpids)))
calibre_plugins.dedrm.mobidedrm.DrmException: No key found in 0 keys tried.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "calibre/customize/ui.py", line 172, in _run_filetype_plugins
File "calibre_plugins.dedrm.__init__", line 627, in run
decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
File "calibre_plugins.dedrm.__init__", line 577, in KindleMobiDecrypt
raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
calibre_plugins.dedrm.DeDRMError: DeDRM v7.0.0: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
[14.93] splash screen hidden
[14.93] Started up in 14.93 seconds with 0 books
Added What Tech Calls Thinking (FSG Originals x Logic) to db in: 0.0
Added 1 books in 1.1 seconds
Traceback (most recent call last):
File "calibre/gui2/ui.py", line 134, in __init__
File "calibre/gui2/ui.py", line 152, in init_iaction
File "calibre/customize/__init__.py", line 614, in load_actual_plugin
File "importlib/__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "calibre/customize/zipplugin.py", line 192, in exec_module
File "calibre_plugins.obok_dedrm.action", line 24, in <module>
from calibre_plugins.obok_dedrm.dialogs import (SelectionDialog, DecryptAddProgressDialog,
File "calibre/customize/zipplugin.py", line 192, in exec_module
File "calibre_plugins.obok_dedrm.dialogs", line 30, in <module>
from calibre_plugins.obok_dedrm.utilities import (SizePersistedDialog, ImageTitleLayout,
File "calibre/customize/zipplugin.py", line 192, in exec_module
File "calibre_plugins.obok_dedrm.utilities", line 10, in <module>
from StringIO import StringIO
ModuleNotFoundError: No module named 'StringIO'
The obok one works very well - I use it on my Kobo and Smashwords books which download through adobe digital images. You don't need it if you're only using Amazon
@harshita-gupta — try Calibre 4.23 and tools v6.8.1
If that doesn't work, try downloading K4Mac 1.30.0 from Amazon's website (click on Download for PC & Mac) rather from the Mac App Store. Be sure to delete /Users/Harshita/Library/Containers/com.amazon.Kindle folder.
Obok is only for books from the Kobo Desktop app or a Kobo ereader.
@ZolaLa9 tried with the older Calibre and tools versions, and it worked – thanks for the suggestion.
Works for me as well with the older versions. thanks
What I've been recommending all along. :)
CheckList
The Title
and TheLog Title
are setted correctly.my environment
.the log
.Title
Big Sur Kindle Does not decrypt
My Environment
Calibre:
5.7.2
Kindle:
1.26.1
DeDRM:
7.0.0b4
Log
I have a brand new Macbook running Big Sur. My old harddrive died so everything is all new installs and trying to get set up again.
I have installed and Registered Kindle on this machine, and downloaded (but not opened) a file. Calibre is running the same machine/user I have run the chmod command to block the new file format The files I'm downloading are named like
B00AP949RQ_EBOK.azw
but calibre is flagging them as 'KFX-ZIP' filesNote: this issue isn't happening on every file, but I don't know if that means some are drm'd and some are not, or if some are working and some are not. I can provide a log file with a file that does work if that would be helpful.
Log Title
[tmp4fbezz4d.txt](https://github.com/apprenticeharper/DeDRM_tools/files/5720615/tmp4fbezz4d.txt) ```log PUT YOUR LOG ```