1 | Introduction␊ |
2 | ------------␊ |
3 | ␊ |
4 | 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.␊ |
5 | ␊ |
6 | ␊ |
7 | Architecture␊ |
8 | ------------␊ |
9 | ␊ |
10 | 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.␊ |
11 | A reference implementation using Qt, OpenSSL and libzip is provided (in _utils_ directory).␊ |
12 | ␊ |
13 | Main 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 | ␊ |
21 | You 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 | ␊ |
26 | Or create a new one. Be careful : there is a limited number of devices that can be created bye one account.␊ |
27 | ␊ |
28 | 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.␊ |
29 | ␊ |
30 | 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.␊ |
31 | ␊ |
32 | ␊ |
33 | Dependencies␊ |
34 | ------------␊ |
35 | ␊ |
36 | For libgourou :␊ |
37 | ␊ |
38 | _externals_ :␊ |
39 | ␊ |
40 | * None␊ |
41 | ␊ |
42 | _internals_ :␊ |
43 | ␊ |
44 | * PugiXML␊ |
45 | * uPDFParser␊ |
46 | ␊ |
47 | For utils :␊ |
48 | ␊ |
49 | * libcurl␊ |
50 | * OpenSSL␊ |
51 | * libzip␊ |
52 | ␊ |
53 | ␊ |
54 | Internal libraries are automatically fetched and statically compiled during the first run.␊ |
55 | When you update libgourou's repository, **don't forget to update internal libraries** with :␊ |
56 | ␊ |
57 | make update_lib␊ |
58 | ␊ |
59 | ␊ |
60 | Compilation␊ |
61 | -----------␊ |
62 | ␊ |
63 | Use _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]␊ |
66 | ␊ |
67 | CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-)␊ |
68 | ␊ |
69 | DEBUG can be set to compile in DEBUG mode␊ |
70 | ␊ |
71 | BUILD_UTILS to build utils or not␊ |
72 | ␊ |
73 | STATIC_UTILS to build utils with static library (libgourou.a) instead of default dynamic one (libgourou.so)␊ |
74 | ␊ |
75 | BUILD_STATIC build libgourou.a if 1, nothing if 0, can be combined with BUILD_SHARED␊ |
76 | ␊ |
77 | BUILD_SHARED build libgourou.so if 1, nothing if 0, can be combined with BUILD_STATIC␊ |
78 | ␊ |
79 | * Default value␊ |
80 | ␊ |
81 | ␊ |
82 | Utils␊ |
83 | -----␊ |
84 | ␊ |
85 | You can import configuration from your eReader or create a new one with _utils/adept\_activate_ :␊ |
86 | ␊ |
87 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
88 | ./utils/adept_activate -u <AdobeID USERNAME>␊ |
89 | ␊ |
90 | Then a _./.adept_ directory is created with all configuration file␊ |
91 | ␊ |
92 | To download an ePub/PDF :␊ |
93 | ␊ |
94 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
95 | ./utils/acsmdownloader -f <ACSM_FILE>␊ |
96 | ␊ |
97 | To export your private key (for DeDRM software) :␊ |
98 | ␊ |
99 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
100 | ./utils/acsmdownloader --export-private-key [-o adobekey_1.der]␊ |
101 | ␊ |
102 | To remove ADEPT DRM :␊ |
103 | ␊ |
104 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
105 | ./utils/adept_remove -f <encryptedFile>␊ |
106 | ␊ |
107 | To list loaned books :␊ |
108 | ␊ |
109 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
110 | ./utils/adept_loan_mgt [-l]␊ |
111 | ␊ |
112 | To return a loaned book :␊ |
113 | ␊ |
114 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
115 | ./utils/adept_loan_mgt -r <id>␊ |
116 | ␊ |
117 | You can get utils full options description with -h or --help switch␊ |
118 | ␊ |
119 | ␊ |
120 | Docker␊ |
121 | ------␊ |
122 | ␊ |
123 | A docker image (by bcliang) is available at [https://github.com/bcliang/docker-libgourou/](https://github.com/bcliang/docker-libgourou/)␊ |
124 | ␊ |
125 | ␊ |
126 | Copyright␊ |
127 | ---------␊ |
128 | ␊ |
129 | Grégory Soutadé␊ |
130 | ␊ |
131 | ␊ |
132 | License␊ |
133 | -------␊ |
134 | ␊ |
135 | libgourou : LGPL v3 or later␊ |
136 | ␊ |
137 | utils : BSD␊ |
138 | ␊ |
139 | ␊ |
140 | Special thanks␊ |
141 | --------------␊ |
142 | ␊ |
143 | * _Jens_ for all test samples and utils testing␊ |
144 | * _Milian_ for debug & code␊ |