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

Removing DRM from an Adobe Digital Editions failed #238

Closed
realMagnesium12 opened this issue Jan 3, 2023 · 3 comments
Closed

Removing DRM from an Adobe Digital Editions failed #238

realMagnesium12 opened this issue Jan 3, 2023 · 3 comments

Comments

@realMagnesium12
Copy link

realMagnesium12 commented Jan 3, 2023

Question / bug report

I tried to import a file downloaded by Adobe Digital Editions. It shows up, but the DRM was not removed.

The WINEPREFIX is set up correct with ADE, vcredists, .NET 4.5 and Python 3.11.

While digging deeper in the log i found an exception in adobekey.py. You can see it in the attached log.

Additional informations:
I'm running Debian 12 with Python 3.10, Wine 7.0.1, Calibre 6.10 and DeDRM 10.0.3.
I also tried it on Windows 11, the same error occured.

Which version of Calibre are you running?

6.10

Which version of the DeDRM plugin are you running?

v10.0.3

If applicable, which version of the Kindle software are you running?

ADE: 4.5.11

Log output

002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
No installed Python found!
Es konnte keine Anwendung gestartet werden, oder es ist keine Anwendung mit der angegebenen Datei verknüpft.
ShellExecuteEx fehlgeschlagen: Datei nicht gefunden.

DeDRM v10.0.3: wine python3.exe is not python3
DeDRM v10.0.3: Python3 exec found as wine python.exe
DeDRM v10.0.3: Running adobekey.py under Wine
adobekey.py v7.4
Copyright © 2009-2020 i♥cabbages, Apprentice Harper et al.
Traceback (most recent call last):
  File "Z:\home\user\.config\calibre\plugins\DeDRM\libraryfiles\adobekey.py", line 625, in <module>
    sys.exit(cli_main())
             ^^^^^^^^^^
  File "Z:\home\user\.config\calibre\plugins\DeDRM\libraryfiles\adobekey.py", line 542, in cli_main
    keys, names = adeptkeys()
                  ^^^^^^^^^^^
  File "Z:\home\user\.config\calibre\plugins\DeDRM\libraryfiles\adobekey.py", line 347, in adeptkeys
    keykey = CryptUnprotectData(device, entropy)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Z:\home\user\.config\calibre\plugins\DeDRM\libraryfiles\adobekey.py", line 327, in CryptUnprotectData
    raise ADEPTError("Failed to decrypt user key key (sic)")
ADEPTError: Failed to decrypt user key key (sic)
DeDRM v10.0.3: Wine subprocess call error: 1
DeDRM v10.0.3: Found and decrypted 0 key files
@ElleKayEm
Copy link

Have a look at using the DeACSM plugin instead of ADE.

https://www.mobileread.com/forums/showthread.php?t=341975

@realMagnesium12
Copy link
Author

realMagnesium12 commented Jan 3, 2023

Update: Fixed it by myself. For the interested one who want to know how and for people having the same issue here is a explanation.

There was an other issue. The exception showed in the log was caused, because there where no *.der key written under

/home/user/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir/

in the initial setup of ADE in DeDRM. The cause where insufficient permissions of flatpak. I ran ADE with wine IN BOTTLES. Bottels (a wine management tool like PlayOnLinux) doesn't have permissions to do stuff in home and so doen't have this either.
After setting the permissions correct, the key where written (JAY!).

Then the next error occured. But that was a known one (Link1, Link2) that is fixed in the current master.

After building DeDRM by my own from the current master branch, I got it working.

Well, it tooks nearly five ours, but I learned some interesting stuff.

@realMagnesium12
Copy link
Author

realMagnesium12 commented Jan 3, 2023

Closed it, because the issue is fixed in the next release

@realMagnesium12 realMagnesium12 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2023
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

2 participants