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

Trying to remove drm from epub (not kindle...) help info would be appreciated. #650

Open
Fizzgiggg opened this issue Oct 9, 2024 · 7 comments

Comments

@Fizzgiggg
Copy link

Hi, sorry if this has been asked before but DRM doesn't seem to get removed from an epub I got from "bookbites"

Thanks for any help you can provide.

Here are the debug logs:


ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre Debug log
calibre 7.19 embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 16, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 16, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0)
calibre 7.19 embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 16, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 16, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0)
QPA platform: windows
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 127.66492146596858 x 127.59069767441859
[0.00] Starting up...
[0.02] Showing splash screen...
[1.17] splash screen shown
[1.17] Initializing db...
[1.19] db initialized
[1.19] Constructing main UI...
[2.17] GUI main window shown
Ignoring blacklisted device: The \?\usb#vid_04e8&pid_6860&ms_comp_mtp&samsung_android#6&372e58ac&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33} device has been blacklisted by the user
[2.27] main UI initialized...
[2.27] Hiding splash screen
[2.27] splash screen hidden
[2.27] Started up in 2.27 seconds with 0 books
DeDRM v10.0.9: Trying to decrypt e30338411e179be69c1a996e3da23c9602fb9aa6.epub
DeDRM v10.0.9: Verifying zip archive integrity
FontDecrypt: Checking OEBPS/content.opf for IETF font obfuscation keys ... found '3ce3c366-810e-4732-8ced-159bd152e80b' (no.bokbasen.PrimaryID)
FontDecrypt: Checking OEBPS/content.opf for Adobe font obfuscation keys ... found '8722C73B83A14947A01E6B548FC8AD3C'
FontDecrypt: There's remaining entries in encryption.xml, adding file ...
DeDRM v10.0.9: Post-processing took 0.1 seconds
DeDRM v10.0.9: Finished after 0.2 seconds
Added Det gylne kompasset to db in: 0.1
Added 1 books in 0.8 seconds

@ElleKayEm
Copy link

Looks like the main DRM may have been removed, but for some reason (something with font obfuscation) there are still some entries in encryption.xml. I don't know how to resolve that.

@Fizzgiggg
Copy link
Author

Looks like the main DRM may have been removed, but for some reason (something with font obfuscation) there are still some entries in encryption.xml. I don't know how to resolve that.

Thanks, how strange... I have no idea about this stuff either, hopefully someone else here might know....?

@Fizzgiggg
Copy link
Author

I can of course provide the epub file for testing purposes...

@noDRM
Copy link
Owner

noDRM commented Nov 10, 2024

Not seeing any attempt of DRM removal in the logs. It seems to have successfully removed the font obfuscation but it found remaining encryption entries. This can sometimes be just random junk, but may also be a custom, non-Adobe DRM used by bookbites. Are these normal EPUBs that can be used on a normal eReader, or only in their apps?

If you want you can send me the EPUB file (the original one that was not yet processed by the plugin) to the mail address on my github profile and I'll take a look when I have time to confirm if that's the case.

@Fizzgiggg
Copy link
Author

Fizzgiggg commented Nov 10, 2024

Not seeing any attempt of DRM removal in the logs. It seems to have successfully removed the font obfuscation but it found remaining encryption entries. This can sometimes be just random junk, but may also be a custom, non-Adobe DRM used by bookbites. Are these normal EPUBs that can be used on a normal eReader, or only in their apps?

If you want you can send me the EPUB file (the original one that was not yet processed by the plugin) to the mail address on my github profile and I'll take a look when I have time to confirm if that's the case.

I haven't tested it in many eReaders, but as far as I can tell it can only be read in the app... Which is the problem because i would just really like to get books from there and convert to read on kindle for my travels, so if you are able to figure it out that would be amazing. I just sent you an email... Thanks :)

@noDRM
Copy link
Owner

noDRM commented Nov 11, 2024

I just took a look at that file and yeah, it looks like some proprietary DRM just for the Bookbites apps. I don't think you'll find any other app that can read these files.

The files barely contain any metadata related to the DRM. There's no license or rights.xml file inside the EPUB like with Adobe or LCP DRM to link the file to any account ID or encryption key, the only thing in there is an XML tag on the file nodes in the encryption.xml with a <ds:KeyInfo><ds:KeyName>BookBitesCipherKey</ds:KeyName></ds:KeyInfo> so the app can identify it as a Bookbites EPUB file. All the "magic" to actually know how to decrypt this must be in their reading apps.

Only thing I can do for now is to add support for detecting this DRM so the plugin prints a warning that it found that DRM but wasn't able to remove it. To actually figure out a way to remove this DRM someone would probably have to reverse-engineer their Android app. Though, given that this seems a library app of some kind and not books actually bought, so it's probably unlikely that someone will do that.

@Fizzgiggg
Copy link
Author

I just took a look at that file and yeah, it looks like some proprietary DRM just for the Bookbites apps. I don't think you'll find any other app that can read these files.

The files barely contain any metadata related to the DRM. There's no license or rights.xml file inside the EPUB like with Adobe or LCP DRM to link the file to any account ID or encryption key, the only thing in there is an XML tag on the file nodes in the encryption.xml with a <ds:KeyInfo><ds:KeyName>BookBitesCipherKey</ds:KeyName></ds:KeyInfo> so the app can identify it as a Bookbites EPUB file. All the "magic" to actually know how to decrypt this must be in their reading apps.

Only thing I can do for now is to add support for detecting this DRM so the plugin prints a warning that it found that DRM but wasn't able to remove it. To actually figure out a way to remove this DRM someone would probably have to reverse-engineer their Android app. Though, given that this seems a library app of some kind and not books actually bought, so it's probably unlikely that someone will do that.

That's fair enough, it's a shame, but such is life... Thank you for taking a look, I really appreciate it. 🙏

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

3 participants