Libgourou

Libgourou Git Source Tree

Root/README.md

1Introduction
2------------
3
4libgourou 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.
5
6
7Architecture
8------------
9
10Like 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.
11A reference implementation using cURL, OpenSSL and libzip is provided (in _utils_ directory).
12
13Main fucntions to use from gourou::DRMProcessor are :
14
15 * Get an ePub from an ACSM file : _fulfill()_ and _download()_
16 * Create a new device : _createDRMProcessor()_
17 * Register a new device : _signIn()_ and _activateDevice()_
18 * Remove DRM : _removeDRM()_
19 * Return loaned book : _returnLoan()_
20
21You can import configuration from (at least) :
22
23 * Kobo device : .adept/device.xml, .adept/devicesalt and .adept/activation.xml
24 * Bookeen device : .adobe-digital-editions/device.xml, root/devkey.bin and .adobe-digital-editions/activation.xml
25
26Or create a new one. Be careful : there is a limited number of devices that can be created bye one account.
27
28ePub 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.
29
30For 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.
31
32
33Dependencies
34------------
35
36For libgourou :
37
38_externals_ :
39
40 * libpugixml
41
42_internals_ :
43
44 * uPDFParser
45
46For utils :
47
48 * libcurl
49 * OpenSSL
50 * libzip
51 * libpugixml
52
53
54Internal libraries are automatically fetched and statically compiled during the first run.
55When you update libgourou's repository, **don't forget to update internal libraries** with :
56
57 make update_lib
58
59
60Compilation
61-----------
62
63Use _make_ command
64
65 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]
66
67CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-)
68
69DEBUG can be set to compile in DEBUG mode
70
71BUILD_UTILS to build utils or not
72
73STATIC_UTILS to build utils with static library (libgourou.a) instead of default dynamic one (libgourou.so)
74
75BUILD_STATIC build libgourou.a if 1, nothing if 0, can be combined with BUILD_SHARED
76
77BUILD_SHARED build libgourou.so if 1, nothing if 0, can be combined with BUILD_STATIC
78
79other variables are DESTDIR and PREFIX to handle destination install directory
80
81* Default value
82
83
84Utils
85-----
86
87First, add libgourou.so to your LD_LIBRARY_PATH
88
89 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
90
91You can optionaly specify your .adept directory
92
93 export ADEPT_DIR=/home/XXX
94
95Then, use utils as following :
96
97You can import configuration from your eReader or create a new one with _utils/adept\_activate_ :
98
99 ./utils/adept_activate -u <AdobeID USERNAME>
100
101Then a _/home/<user>/.config/adept_ directory is created with all configuration file
102
103To download an ePub/PDF :
104
105 ./utils/acsmdownloader <ACSM_FILE>
106
107To export your private key (for DeDRM software) :
108
109 ./utils/acsmdownloader --export-private-key [-o adobekey_1.der]
110
111To remove ADEPT DRM :
112
113 ./utils/adept_remove <encryptedFile>
114
115To list loaned books :
116
117 ./utils/adept_loan_mgt [-l]
118
119To return a loaned book :
120
121 ./utils/adept_loan_mgt -r <id>
122
123
124You can get utils full options description with -h or --help switch
125
126
127Docker
128------
129
130A docker image (by bcliang) is available at [https://github.com/bcliang/docker-libgourou/](https://github.com/bcliang/docker-libgourou/)
131
132
133Copyright
134---------
135
136Grégory Soutadé
137
138
139License
140-------
141
142libgourou : LGPL v3 or later
143
144utils : BSD
145
146
147Special thanks
148--------------
149
150 * _Jens_ for all test samples and utils testing
151 * _Milian_ for debug & code
152 * _Berwyn H_ for all test samples, feedbacks, patches and kind donation

Archive Download this file