View Single Post
Old 06-04-2021, 01:26 AM   #1257
rpmahe
Junior Member
rpmahe began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2008
Device: none
No method is working

Quote:
Originally Posted by jhowell View Post
The Kindle for PC and Kindle for Mac programs use Amazon's KFX format for most books. Each book will appear in a separate subdirectory of the "My Kindle Content" folder with a file extension of ".azw". Unless additional steps are taken, these books will fail to convert in calibre with the error: "KFXError: This is an Amazon KFX book. It cannot be processed."

There are several methods for either avoiding or handling KFX format. The following descriptions apply both to Kindle for PC and Kindle for Mac unless one is mentioned explicitly.


Method 1 - Revert to an older version of Kindle for PC/Mac

Older Kindle for PC/Mac version 1.17 can be installed to work around this problem for most users. (Note: This is a 32-bit program and so it is not compatible with MacOS Catalina.)

Perform the following steps:
  • Launch Kindle and under the menu choice "Tools", "Options", "General", uncheck "Automatically install updates when they are available without asking me.", and save. (Note: This option is not available in some Kindle for Mac versions.)
  • Exit the Kindle program.
  • Delete the contents of the "My Kindle Content" folder within your "Documents" folder.
  • Download and verify version 1.17 of Kindle for PC/Mac. (See instructions later in this post.)
  • Install the downloaded version 1.17 software.
  • Launch it and check that the option to automatically install updates is still turned off.
  • Kindle may need to be registered by signing in to your Amazon account within the program. Some users have reported being unable to sign in to their Amazon account within Kindle for PC once version 1.17 is reinstalled. If that occurs go to the Amazon website and on the manage your content and devices page, and on the "Your Devices" tab locate "Kindle for PC" (or Mac) and deregister it using the "..." "Actions" menu. Wait a few minutes for it to take effect and try to sign in again. (If all else fails then re-install and register again and start over with step 1.)
  • If asked if you want to update to the new version always reject it. (Choose "Skip this version".)
  • Re-download your books and import into calibre as before.
  • See the end of this post for ways to prevent undesired updating of the Kindle app.


Method 2 - Disable KFX support in Kindle for PC/Mac

It is possible to prevent most versions of Kindle for PC/Mac from making use of KFX format.

Note: The following method will work with Kindle for Mac but will not work with recent versions of Kindle for PC. The last PC version in which KFX can be disabled using this method is 1.24.3 (51068). For an alternate method that works with more recent versions of Kindle for PC see this post and this post.

Additional steps, linked to below, are required to make this method work with recent versions of Kindle for Mac.
  • Exit the Kindle program.
  • Open a command window (PC) or terminal window (Mac).
  • Cut and paste the appropriate command for your operating system to disable the renderer-test program.
    PC:
    ren %localappdata%\Amazon\Kindle\application\renderer-test.exe renderer-test.xxx
    Mac:
    chmod -x /Applications/Kindle.app/Contents/MacOS/renderer-test
    This prevents the renderer-test program from executing, blocking the use of KFX.

    PC Note: The renderer-test program may be in a different location in some Kindle for PC installations. If the rename command fails look in other folders, such as C:\Program Files\Amazon\Kindle.

    Mac Note: If the chmod command fails with a permission error try again using sudo.
  • After restarting the Kindle program any books previously downloaded in KFX format will no longer open. You will need to remove them from your device and re-download them. All future downloads will use the older Kindle formats instead of KFX although they will continue to be placed in one individual subdirectory per book.
  • See the post by odamizu for additional instructions required when using Kindle for Mac 1.25.2 or later. (link)
  • If the Kindle software is updated or re-installed these steps will need to be repeated. See the end of this post for ways to prevent undesired updating of the Kindle app.


Method 3 - Use an e-ink Kindle instead

If you have an e-ink Kindle device registered to your Amazon account you have the option of downloading books directly from Amazon instead of using Kindle for PC/Mac.
  • From the Amazon website access "Account & Lists" -> "Manage Your Content and Devices".
  • Find a book you want to import into calibre and press the "..." button in the "Actions" column for that book.
  • In the menu that pops up choose "Download & transfer via USB". Then select the name of your registered kindle device in the drop down menu and press the "Download" button.
  • Import the downloaded file into calibre using the same procedure that you would use for a file from Kindle for PC. You will need to select the proper folder containing the downloaded file. (This folder will be different from the "My Kindle Content" folder used by Kindle for PC.)
  • Users of the DRM Tools should refer to Apprentice Alf's Blog or Apprentice Harper's GitHub for information on the configuration required to support books downloaded for an e-ink Kindle.

In addition, the owners of older e-ink Kindles running firmware prior to 5.6.5 (August 2015) can access books in non-KFX formats directly from the device via USB.


Method 4 - Convert from KFX to other formats

It is possible to convert books from KFX to other formats in calibre by installing the optional KFX Input plugin. This can be useful for books that are only available in KFX format, such as those in Arabic and Traditional Chinese.

The last version of Kindle for PC/Mac for which KFX DRM removal is possible is 1.26. (See instructions later in this post for obtaining a copy.) Removal of KFX DRM is not possible when using more recent versions of Kindle for PC/Mac.


**********************************************
Obtaining and verifying Kindle for PC/Mac software

Older versions of the Kindle PC/Mac software are no longer available directly from Amazon. You will need to search online for the proper file name and download it from a third party site. The file name to search for each version is listed below.

Important: After downloading you should verify the SHA-256 hash of the file in order to avoid malware. If the hash does not match, delete the downloaded file and try again from another site. Do not install a file that has an incorrect hash!

One way to verify a hash in Windows is to open a command window, change to the folder containing the downloaded program, and enter the command:
certutil -hashfile <filename> SHA256

In MacOS use the command:
shasum -a 256 <filename>

(Replace <filename> with the actual name of the downloaded file.)


version 1.17/1.17.1
filename: KindleForPC-installer-1.17.44170.exe
SHA-256: 14e0f0053f1276c0c7c446892dc170344f707fbfe99b695176 2c120144163200

filename: KindleForMac-44182.dmg
SHA-256: 28dc21246a9c7cdedd2d6f0f4082e6bf7ef9db9ce9d485548e 8a9e1d19eae2ac

version 1.24
filename: KindleForPC-installer-1.24.51068.exe
SHA-256: c7a1a93763d102bca0fed9c16799789ae18c3322b1b3bdfbe8 c00422c32f83d7

version 1.26
filename: KindleForPC-installer-1.26.55076.exe
SHA-256: c9d104c4aad027a89ab92a521b7d64bdee422136cf562f8879 f0af96abd74511

filename: KindleForMac-55093.dmg
SHA-256: 580957ca56b1e77b7952f41970836481f37ada3071eaee3552 265069b89ef757

version 1.28
filename: KindleForPC-installer-1.28.57030.exe
SHA-256: 6feea6ec44ff3d3b7be23e7a969fe14ab884a7b19e23bc2c74 237730411559f6

filename: KindleForMac-57029.dmg
SHA-256: b4de86ba1b78966c754d220fe09fd7dbdbadd874b19e51d261 d8308e6e0d4cb3


**********************************************
Preventing undesired app updates

The Kindle app can be aggressive about updating itself to the latest version. Even after the option to automatically install updates is deselected the software sometimes will update itself unexpectedly. Here are some tips on preventing this:

If the program updates to an undesired version then run it and uncheck the setting to automatically install updates under
Tools->Options->General and save preferences before uninstalling.

Once the desired Kindle version has been reinstalled go to the setting to automatically install updates, check and then uncheck it again, and save preferences.

Kindle for PC/Mac will usually continue to update itself to a newer version, even though the option to automatically install updates is deselected.

One method to block automatic updates under Windows is to locate the "updates" folder within your Kindle for PC installation and replace it with a file of the same name. The attached batch file ("disable k4pc download.bat") will perform that process automatically as long as Kindle for PC has been installed for single user use. After running this file Kindle for PC will still try to download the new update each time it is restarted, but it will be unable to do so.

See this post by odamizu for instructions to block automatic updates on the Mac platform.

When running the app if a dialog pops up indicating that a newer version is available always choose the option to "skip this version".



Thank you for your post. But no method is working. Even the latest version 1.31 kindle for pc is not able to download some books. We donot need to downgrade to1.17, because most of books cannot be downloaded with this version. The version 1.24 is the best one, Calibre works well with this version.
rpmahe is offline