Skip to main content
The FreeRDP Android port consists of three parts:
  • Android Java GUI — located in client/Android/Studio
  • Native FreeRDP libraries — built with the Android NDK and CMake
  • JNI bindingsclient/Android/android_freerdp.c and the corresponding Java class LibFreeRDP.java
More documentation may be found at the FreeRDP Compilation wiki.

Build requirements

For the native JNI libraries

  • CMake >= 3.13 — install via Android SDK Manager (SDK Tools section)
  • Android NDK >= r15c

For the Java GUI

  • Android SDK
  • Android Studio (recommended) or Gradle

Optional dependencies

  • cJSON — required for logging in to Azure accounts
  • MIT or Heimdal Kerberos — for Kerberos authentication
  • libjpeg — for JPEG support (akallabeth/jpeg8d has been tested)
FreeRDP requires OpenSSL libraries, which are not part of the Android NDK. They must be pre-built manually. The android-build-freerdp.sh script handles this automatically.

Building the native libraries

From the repository root, run the build script passing the paths to your NDK and SDK installations:
Replace <ANDROID_NDK> and <ANDROID_SDK> with the absolute paths on your machine. The script will fetch and build:
  • OpenSSL
  • OpenH264
  • libjpeg
  • The FreeRDP native libraries

Supported ABIs

The default configuration builds for all four common ABIs: The default build configuration is at scripts/android-build.conf and produces debug builds targeting API level 21 and above.

Release builds

For release binaries (with older Android API support), build the 32-bit and 64-bit architectures separately using the dedicated conf files:
When the script completes, the built libraries are placed at:
Android Studio will pick them up automatically from that location.

Building the APK

1

Import the project

Open Android Studio and choose Open (or Import Project). Navigate to client/Android/Studio inside the repository and select it.
2

Build

Use the standard Build > Make Project menu or run the app directly on a device or emulator.

CMake preload configuration

The repository ships ci/cmake-preloads/config-android.txt with the settings used in CI. Key options:

Updating the JNI bindings

Whenever the FreeRDP C API changes or you need additional functionality exposed to Java:
  1. Edit client/Android/android_freerdp.c and add the new function to the methods struct.
  2. Edit client/Android/Studio/freeRDPCore/src/main/java/com/freerdp/freerdpcore/services/LibFreeRDP.java to mirror the change.