Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon Kindle issue #255

Closed
bookworm17 opened this issue Apr 13, 2017 · 29 comments
Closed

Amazon Kindle issue #255

bookworm17 opened this issue Apr 13, 2017 · 29 comments

Comments

@bookworm17
Copy link

Having a problem with Amazon Kindle. I did the full remove from Amazon, uninstall, reinstall, etc already. OSX 10.12.4 (16E195). Kindle app from Mac App Store. Calibre 2.71

problem loading.txt

@ElleKayEm
Copy link

I don't believe these tools work with the Mac store Kindle app. Try installing Kindle for Mac version 1.17. See the FAQs here:

https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#a-recent-change-to-kindle-for-pckindle-for-mac

(Be sure to uncheck auto-updates.)

@bookworm17
Copy link
Author

Hmm, it was working fine with the (earlier versions of the) App store Kindle. Note that the App store version stores its content in a different place, but I was using it fine.

In any event, I removed that version and downloaded 1.17.1. Still doesn't remove the DRM.

@ElleKayEm
Copy link

ElleKayEm commented Apr 14, 2017

I guess someone must have just been speculating about the Mac Store app then. Post a log of an import with a freshly downloaded book from 1.17.

@bookworm17
Copy link
Author

problem loading.txt

Here is the debug log.

@ElleKayEm
Copy link

Somehow it's still not getting the right key. When you reinstalled, did you follow these instructions from the FAQs for removing all associated folders? And the book was definitely downloaded with the new installation?

@bookworm17
Copy link
Author

Yes, but I will repeat them tomorrow (not time today).

@bookworm17
Copy link
Author

still a failure
load failure.txt

@ElleKayEm
Copy link

Let me ask @pdurrant to take a look. Maybe he'll see what I'm missing. He's also a Mac user so he might have a better idea.

@pdurrant
Copy link
Contributor

How very strange. What Mac is it? Does it have multiple internal hard disks, or multiple ethernet ports? I beleive that the decoding of the Mac key uses some ID numbers from the hard disk or ethernet port, and perhaps if there are more than one of either it's finding the wrong one.

I think you'll need to wait for Apprentice Harper to chime in on this one.

@bookworm17
Copy link
Author

Here's the full information on my Mac. Note that everything was working fine - even with the Kindle from the App Store - until I upgraded to OS X 10.12.4.

Mac mini.spx.zip

@bookworm17
Copy link
Author

For what it's worth, I tried a fresh install on a new Mac. (Not convenient for long-term use, but ok for testing) and it converted fine.

@apprenticeharper
Copy link
Owner

If your Mac Mini has any external drives (e.g. DVD-R), try with them disconnected. I haven't had other reports of problems with 10.12.4 as far as I remember, so it's probably something peculiar to your setup. Have you tried in a new user account on your Mac Mini?

@bookworm17
Copy link
Author

Yes, it has several (:-). However, I'm pretty sure that we've already established that it's a user-account related setting/piece of configuration. The question is what setting?

@bookworm17
Copy link
Author

I went through and cleaned out and reinstalled from scratch. I even found a few extra Kindle files under Preferences and removed them. (Essentially, I looked for anything under ~/Library that had "Kindle" or "kindle" anywhere in the name.) Still failed.

I did set up a second user on my main Mac and was able to convert fine. So, this is a less-painful workaround.

I'd really like to get this working properly. Ideas?

@apprenticeharper
Copy link
Owner

On Windows having a short user name containing non-ascii characters will cause decryption to fail. Perhaps this applies on Mac too?

Otherwise, I'm out of ideas.

@bookworm17
Copy link
Author

User name is "craig". (:-)(:-(.

@ElleKayEm
Copy link

For whatever reason, the key file is found, but it can't be decrypted. In the last log you posted:

Found k4Mac kinf2011 file: /Users/craig/Library/Application Support/Kindle/storage/.kinf2011
Couldn't decrypt file.

Normally it would say:

Decrypted key file using IDString ‘some string of characters here’ and UserName ‘craig’

So it seems to be having trouble figuring out whatever IDString is suppose to be. What both pdurrant and Harper said suggest this is something to do with the hard drive.

@apprenticeharper
Copy link
Owner

That it works on a new user account on the same machine means it isn't hardware related.

If you're willing to spend the time needed, I can try to work out what the problem is, but it's likely to take some weeks of back and forth.

To start with, please make sure you've completely removed all Amazon and Kindle folders/files from the usr Library and re-install Kindle for Mac 1.17 and check it's still not working.

@ElleKayEm
Copy link

Oops, I was assuming the main Mac and the Mac mini were different machines.

@bookworm17
Copy link
Author

I am happy to work with you. I understand that it will take a few weeks of back-and-forth (especially because I travel a lot).

I did the completely remove and re-install on my last attempt (where I got the second user on the same machine to work).

@apprenticeharper
Copy link
Owner

Great. Let's have a closer look at why the decryption is failing.

I need you to edit kindlekey.py a little, and run it manually in each user account and upload the output here.

The edits needed are at at lines 1458, 1538 and 1539 where you need to remove the # before the print statement. Make sure the print statement is indented the same amount as the statement on the line that follows it.

This will give us the first clues as to why the decryption is failing.

@bookworm17
Copy link
Author

I can do this.

Where do I find the kindlekey.py file? Is in ~/Preferences/calibre? ~/Application Support/calibre?

@bookworm17
Copy link
Author

I tried the following:

cd ~/Library
find . -name kindlekey.pl

and found nothing.

Note: I'll be traveling the next week, so won't be able to do any follow up until the 8th.

@ElleKayEm
Copy link

It's in the DeDRM plugin zip. You could edit it before loading the zip into calibre. Or open calibre and click preferences > miscellaneous > open calibre configuration directory. Then look in the plugins folder for DeDRM.zip.

@bookworm17
Copy link
Author

I edited the file and loaded the new .zip file into calibre.

I then loaded the book fresh from Amazon and reloaded into calibre in debug mode.

Of course, it worked this time. In any event, here is the debug trace with the extra printing on.
worked.txt

Again, I won't be back at this machine until next Sunday. So, no response doesn't mean that I've lost interest.

@apprenticeharper
Copy link
Owner

Well, try again with the original plugin, but I suspect that will work too. At some point that file got recreated, in a format that the tools could handle.

But if it does return, please let me know.

@bookworm17
Copy link
Author

I just did a new batch of Kindle books and it's working fine.

sigh

Close thread.

@ElleKayEm
Copy link

If you're all set, you can close the issue.

@bookworm17
Copy link
Author

bookworm17 commented May 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants