2021-07-03 21:57:53 +02:00
Introduction
------------
2021-08-25 21:54:52 +02:00
libgourou is a free implementation of Adobe's ADEPT protocol used to add DRM on ePub/PDF files. It overcome the lacks of Adobe support for Linux platforms.
2021-07-03 21:57:53 +02:00
Architecture
------------
Like RMSDK, libgourou has a client/server scheme. All platform specific functions (crypto, network...) has to be implemented in a client class (that derives from DRMProcessorClient) while server implements ADEPT protocol.
A reference implementation using Qt, OpenSSL and libzip is provided (in _ utils _ directory).
Main fucntions to use from gourou::DRMProcessor are :
* Get an ePub from an ACSM file : _ fulfill() _ and _ download() _
* Create a new device : _ createDRMProcessor() _
* Register a new device : _ signIn() _ and _ activateDevice() _
2021-12-18 17:42:23 +01:00
* Remove DRM : _ removeDRM() _
2022-04-03 09:47:47 +02:00
* Return loaned book : _ returnLoan() _
2021-07-03 21:57:53 +02:00
You can import configuration from (at least) :
2021-08-25 21:54:52 +02:00
* Kobo device : .adept/device.xml, .adept/devicesalt and .adept/activation.xml
2021-07-03 21:57:53 +02:00
* Bookeen device : .adobe-digital-editions/device.xml, root/devkey.bin and .adobe-digital-editions/activation.xml
Or create a new one. Be careful : there is a limited number of devices that can be created bye one account.
ePub are encrypted using a shared key : one account / multiple devices, so you can create and register a device into your computer and read downloaded (and encrypted) ePub file with your eReader configured using the same AdobeID account.
2021-12-18 17:42:23 +01:00
For those who wants to remove DRM without adept_remove, you can export your private key and import it within [Calibre ](https://calibre-ebook.com/ ) an its DeDRM plugin.
2021-08-25 21:54:52 +02:00
2021-07-03 21:57:53 +02:00
Dependencies
------------
For libgourou :
2022-06-12 15:00:48 +02:00
_ externals _ :
2023-01-08 21:02:59 +01:00
* libpugixml
2021-07-03 21:57:53 +02:00
2022-06-12 15:00:48 +02:00
_ internals _ :
* uPDFParser
2021-07-03 21:57:53 +02:00
For utils :
2022-03-16 22:45:33 +01:00
* libcurl
2021-07-03 21:57:53 +02:00
* OpenSSL
* libzip
2023-01-08 21:12:38 +01:00
* libpugixml
2021-07-03 21:57:53 +02:00
2022-06-12 15:00:48 +02:00
Internal libraries are automatically fetched and statically compiled during the first run.
When you update libgourou's repository, **don't forget to update internal libraries ** with :
make update_lib
2021-07-03 21:57:53 +02:00
Compilation
-----------
2021-07-03 22:02:52 +02:00
Use _ make _ command
2021-07-03 21:57:53 +02:00
2023-01-08 21:02:59 +01:00
make [CROSS=XXX] [DEBUG=(0*|1)] [STATIC_UTILS=(0*|1)] [BUILD_UTILS=(0|1*)] [BUILD_STATIC=(0*|1)] [BUILD_SHARED=(0|1*)] [all*|clean|ultraclean|build_utils|install|uninstall]
2021-07-03 21:57:53 +02:00
CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-)
DEBUG can be set to compile in DEBUG mode
2021-09-09 21:00:43 +02:00
BUILD_UTILS to build utils or not
2021-08-25 21:54:52 +02:00
2021-07-05 20:23:25 +02:00
STATIC_UTILS to build utils with static library (libgourou.a) instead of default dynamic one (libgourou.so)
2021-09-09 21:00:43 +02:00
BUILD_STATIC build libgourou.a if 1, nothing if 0, can be combined with BUILD_SHARED
2021-08-21 20:57:31 +02:00
2021-09-09 21:00:43 +02:00
BUILD_SHARED build libgourou.so if 1, nothing if 0, can be combined with BUILD_STATIC
2021-07-03 21:57:53 +02:00
2021-09-09 21:00:43 +02:00
* Default value
2021-08-25 21:54:52 +02:00
2021-12-18 17:42:23 +01:00
2021-07-03 21:57:53 +02:00
Utils
-----
2023-01-05 21:29:55 +01:00
First, add libgourou.so to your LD_LIBRARY_PATH
2021-07-03 21:57:53 +02:00
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
2023-01-05 21:29:55 +01:00
You can optionaly specify your .adept directory
export ADEPT_DIR=/home/XXX
Then, use utils as following :
You can import configuration from your eReader or create a new one with _utils/adept\_activate_ :
2022-02-22 21:15:46 +01:00
./utils/adept_activate -u <AdobeID USERNAME>
2021-07-03 21:57:53 +02:00
2023-01-05 21:29:55 +01:00
Then a _ /home/<user>/.config/adept _ directory is created with all configuration file
2021-07-03 21:57:53 +02:00
2021-08-25 21:54:52 +02:00
To download an ePub/PDF :
2021-07-03 21:57:53 +02:00
2023-01-08 21:02:59 +01:00
./utils/acsmdownloader <ACSM_FILE>
2021-07-03 21:57:53 +02:00
2022-02-22 21:15:46 +01:00
To export your private key (for DeDRM software) :
2021-08-25 21:54:52 +02:00
./utils/acsmdownloader --export-private-key [-o adobekey_1.der]
2021-12-18 17:42:23 +01:00
To remove ADEPT DRM :
2023-01-08 21:02:59 +01:00
./utils/adept_remove <encryptedFile>
2021-12-18 17:42:23 +01:00
2022-04-03 09:47:47 +02:00
To list loaned books :
./utils/adept_loan_mgt [-l]
To return a loaned book :
./utils/adept_loan_mgt -r <id>
2023-01-05 21:29:55 +01:00
2022-02-22 21:15:46 +01:00
You can get utils full options description with -h or --help switch
2022-06-08 11:39:24 +02:00
Docker
------
A docker image (by bcliang) is available at [https://github.com/bcliang/docker-libgourou/ ](https://github.com/bcliang/docker-libgourou/ )
2021-07-03 21:57:53 +02:00
Copyright
---------
Grégory Soutadé
License
-------
libgourou : LGPL v3 or later
utils : BSD
2021-07-12 21:26:53 +02:00
Special thanks
--------------
* _Jens_ for all test samples and utils testing
2022-02-22 21:15:46 +01:00
* _Milian_ for debug & code