Adobe RMSDK and DL Reader

Building RMSDK and DL Reader on Android


The instructions apply to DL Reader for Android v4.1.x for use with RMSDK 11.0.2, released May 20, 2015.

Note:To write software for an eReader viewer app with RMSDK for use on Android devices, you need to use Mac hardware.

The following are recommended for building DL Reader for Android:

  • For your Mac computer we recommend the Mac OS 10.9.5 or Mac Yosemite (OS 10.10.3) as the minimum version of your operating system.
  • Java Standard Edition Development Kit (JDK) 1.6.0
  • Apache Ant 1.9.4
  • Via Android SDK Manager), install at least:
    • Android 4.0, API level 14 SDK
    • Android 5.1, API level 22 SDK
    • Android SDK Build tools (latest version)
  • Android NDK r9d and GCC 4.8 for the DL Reader JNI.
    • Download NDK r9d for Mac OS X 32-bit here.
    • Download NDK r9d for Mac OS X 64-bit here.
  • OpenSSL version 1.0.1j. The same web page also provides source code distribution for earlier versions of the software.
  • cURL version 7.36.0. You can download the curl-7.36.0.tar.gz file directly, or visit the download page to access earlier versions of the software. Click the Old Releases option in the Related box on the right side of the screen.

DL Reader files

DLReader for Android builds against an RMSDK binary. Beginning with RMSDK 11, DL Reader does not build RMSDK from source.

Unzip your source distribution file for DL Reader into the samples sub-directory of your RMSDK 11 installation folder, so that your DL Reader project will be stored there.

For example:

$ cd ~/Adobe_RMSDK_11/samples
$ unzip ~/Downloads/

Your DL Reader installation is now found at:


Look for the rmsdk-exports sub-directory in your DL Reader installation folder. This directory contains two files that must be copied into the RMSDK folder structure.

      1. DLBuildAndroidExternals.mak. Copy this file to the root directory for the RMSDK installation package.
      2. Makefile. Copy this also to the RMSDK root directory.

For example:

$ cd ~/Adobe_RMSDK_11
$ cp samples/DLReader-Android-4.1.3/rmsdk-exports/Makefile

RMSDK resources directory

The RMSDK resources directory is where the fonts, hyphen dictionaries, and certificates are stored.

For each build target, the RMSDK resources directory can be found at the following path, substituting the target name for the string [target]:
So the directory might look like this:

Configure environment variables

In order to build dp and DL Reader from the command line, you will need to add directories to your environment PATH.

      • ANDROID_NDK. Path to where you unzipped the Android NDK files.
      • ANDROID_SDK. Path to your Android SDKs.

For your convenience, is provided in the root of your DL Reader distribution.

Open the file in an editor:


Remove the comments for two lines, for Android NDK and Android SDK:


Set their values appropriately. Modify your PATH with the following command:
$ .
Make sure that you run this shell script with the initial period (“$ . “) followed by a space.

Build external libraries

Build OpenSSL and cURL from source files before you build DL Reader. The recommended files are listed at the beginning of this page.

Datalogics provides a makefile (DLBuildAndroidExternals.mak) for building these libraries. Make sure that you have copied it to the right RMSDK directory.

      1. Unpack OpenSSL into your RMSDK root directory. Rename the directory to openssl.
      2. Unpack Curl into your RMSDK root directory. Rename the directory to curl
      3. From your RMSDK root, run:

make -f DLBuildAndroidExternals.mak
After the build is complete, the static libraries will be placed in these directories:

      • thirdparty/openssl/public/linux_arm_android-ndk
      • thirdparty/curl/public/linux_arm_android-ndk

Build dp module

The dp library is an RMSDK module that is shared in source code format to support reader-specific implementations of RMSDK device interfaces. This library must be built from source code.

Datalogics has created a makefile for quickly building the dp library on iOS and Android platforms. Make sure that you have copied the makefile to the right RMSDK directory.

Run this command from the root directory of RMSDK:
make <target>
The command can have one of these three forms. This one builds the dp library in debug mode:
make dp-android-debug
This builds the dp library in release mode:
make dp-android-release
This builds both of the above targets:
make dp-android-all
The static library and/or libraries will be copied to the appropriate folders per configuration in:

Configure your development certificate

Starting with RMSDK 11, all applications built using RMSDK require a certificate file from Adobe Systems to allow you to distribute your code. Without a valid certificate, RMSDK APIs will not work properly.

There are two types of certificates, development and distribution. The development certificate is for building a new application, and can be used on multiple projects and platforms, but it expires after 60 days. When your development certificate expires, you need to submit a new form to replace it. You will need a distribution certificate when you plan to release an eReader app to market. Distribution certificates do not expire, and are good for each build of an application. But you must request a new distribution certificate whenever you change the source code for your app, or release a new build for the product.

To learn more about distribution certificates, see the files included in, provided with the RMSDK deliverables. You can download this zip file from an FTP site provided by Datalogics after you purchase the product.

Request both types of certificates from Datalogics. See the Adobe Systems Development Certificate. Look at ReadMe1st_DL.txt in for details on how to place your request.

After you receive the Adobe development certificate from Datalogics you need to configure DL Reader to find it. The certificate comes in the form of a file called ReaderClientCert.sig.

      1. Store the ReaderClientCert.sig file wherever you like.
      2. Look in your DL Reader directory. Find and open rmsdk_cert.cfg from the build/android folder.
      3. Change the cert-path value to point to where you copied the ReaderClientCert.sig file. It will default to DropBox. The cert-path parameter references the folder where the ReaderClientCert.sig file is stored.

For example, edit the rmsdk_cert.cfg file to look like this:

Note:Do not change the name of the certificate file ReaderClientCert.sig.

Build DL Reader from the command line

In your DL Reader Android root directory, complete these steps:

      1. Run the command ./
      2. Go to the directory DLReader
      3. Run the command make debug-release

These steps will create two files, the Android Application Package:


And the DL Reader Shared Object file:


Build DL Reader in Android Studio

Android Studio does not build the native library That means that you must build DL Reader from the command line at least once before developing in Android Studio (see previous section).

  1. Open Android Studio.
  2. Open the DL Reader project:
    1. File / Open
    2. Navigate to the root directory of android-viewer and open it.
  3. Android Studio may ask you to download and install some Gradle plugins at this point to ensure that you are up to date.
  4. Run DL Reader.
    1. Connect an Android device with debugging enabled, or launch an Android Virtual Device.
    2. Under Run, select Run ‘DLReader‘.

Dictionary support

DL Reader for Android offers the ability to use the Merriam Webster dictionary web service to look up the definition of a word on a page in an ebook file. This feature is turned off by default in DL Reader source code that Datalogics distributes to its customers.

To enable the dictionary feature in DL Reader, you need to register the Merriam Webster web page, to create an account, and select the type of dictionary you want to use.

This service is optional, though recommended. Note that you must pay for this dictionary service from Merriam Webster.

Options include:

      • Collegiate Dictionary
      • Collegiate Thesaurus
      • Spanish-English Dictionary
      • Medical Dictionary
      • Elementary Dictionary
      • Intermediate Dictionary
      • School Dictionary
      • Learners Dictionary

You may only select one dictionary.

After you have signed up, you will be given a URL to the web service for the dictionary you selected, and a key to access the dictionary.

You need to edit an XML file found in the DL Reader directory that you copied to RMSDK/Samples to add the URL and key:


Replace the text shown, online_dictionary_url and online_dictionary_key:


After you enter these values in customer-dictionary-config.xml, copy the file to this directory:


This way, when you build your RMSDK application this file will be copied into that application. If you don’t edit this XML config file to add the URL and key, the “define” option will not be displayed when a user selects text while reading an ebook in DL Reader. After you copy the file and rebuild your application, the next time you select text in DL Reader for Android the “define” option should appear. When you tap a word, it will query the dictionary web service and display a definition.

If you do not use DL Reader source code as the base of your application, you can still use the dictionary service, but you also need to make sure that the  DictionaryLibrary.jar file is included in your application. This file is stored in the DL Reader directory you copied under RMSDK/Samples, in build/android/libs.