2013-01-29 15:59:58 +04:00
|
|
|
Overview
|
|
|
|
========
|
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
The FreeRDP Android port consists of three parts:
|
|
|
|
* Android Java GUI (client/Android/Studio)
|
|
|
|
* FreeRDP library and its dependencies
|
|
|
|
* JNI bindings (client/Android/android_freerdp.c
|
|
|
|
and client/Android/Studio/freeRDPCore/src/main/java/com/freerdp/freerdpcore/services/LibFreeRDP.java)
|
2013-01-29 15:59:58 +04:00
|
|
|
|
|
|
|
Build requirements
|
|
|
|
=================
|
|
|
|
|
|
|
|
For the Android port some additional dependencies need to be fulfilled:
|
|
|
|
|
|
|
|
* for JNI
|
2020-12-08 13:25:08 +03:00
|
|
|
- CMake >= 3.0 (install CMake from Android SDK. It is part of the SDK Tools)
|
|
|
|
- Android NDK (>= r15c)
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
* for the Java GUI
|
|
|
|
- Android SDK
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
FreeRDP requires openssl libraries for building but they are not part of the
|
2013-01-29 15:59:58 +04:00
|
|
|
Android NDK and therefore they need to be prebuild manually.
|
|
|
|
|
2013-11-21 12:46:25 +04:00
|
|
|
For jpeg support https://github.com/akallabeth/jpeg8d has been tested and used.
|
|
|
|
However, any other static builds should work as well.
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
Build native libraries:
|
2013-11-21 12:46:25 +04:00
|
|
|
======================
|
2016-02-01 18:01:32 +03:00
|
|
|
From the project root run the build script
|
|
|
|
./scripts/android-build-freerdp.sh --ndk <ANDROID_NDK> --sdk <ANDROID_SDK>
|
|
|
|
Set ANDROID_NDK and ANDROID_SDK to the absolute paths on your machine.
|
|
|
|
This will fetch sources from git and build OpenSSL, OpenH264, libJPEG.
|
|
|
|
The native FreeRDP libraries will also be build.
|
2013-11-08 19:43:33 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
Currently the default script builds for:
|
|
|
|
* armeabi-v7a
|
|
|
|
* x86
|
2016-06-06 12:32:25 +03:00
|
|
|
* arm64-v8a
|
|
|
|
* x86_64
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
When the script is finished the libraries are ready for android studio to
|
|
|
|
be picked up in client/Android/Studio/freeRDPCore/src/main/jniLibs
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2017-01-16 17:23:11 +03:00
|
|
|
The default configuration build configuration can be found in
|
|
|
|
./scripts/android-build.conf and is configured to provide debug builds.
|
|
|
|
They are limited to API level 21 and above.
|
|
|
|
|
|
|
|
If release binaries (and old android API support) are required, build 32 bit architectures with
|
|
|
|
./scripts/android-build-freerdp.sh --ndk <ANDROID_NDK> --sdk <ANDROID_SDK> --conf ./scripts/android-build-32.conf
|
|
|
|
and 64 bit architectures with
|
2017-12-16 22:37:32 +03:00
|
|
|
./scripts/android-build-freerdp.sh --ndk <ANDROID_NDK> --sdk <ANDROID_SDK> --conf ./scripts/android-build-64.conf
|
2017-01-16 17:23:11 +03:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
Building the APK (Android Studio)
|
|
|
|
================
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
* Import the folder client/Android/Studio in Android Studio
|
|
|
|
* You are ready to go
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
Building the APK (gradle)
|
|
|
|
================
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
* change to directory client/Android/Studio
|
|
|
|
* run ./gradlew build to build
|
|
|
|
* run ./gradlew tasks for other gradle options
|
2013-01-29 15:59:58 +04:00
|
|
|
|
|
|
|
Development
|
|
|
|
===========
|
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
Updating JNI
|
|
|
|
------------
|
2013-01-29 15:59:58 +04:00
|
|
|
|
|
|
|
Whenever the FreeRDP API changes or you need some extra functionality in your Java
|
2016-02-01 18:01:32 +03:00
|
|
|
GUI the JNI needs to be updated.
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
The JNI functions are defined in client/Android/android_freerdp.c
|
|
|
|
Add the new functions to the methods struct.
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
* edit client/Android/src/com/freerdp/afreerdp/services/LibFreeRDP.Java to
|
|
|
|
reflect your changes
|
|
|
|
* edit client/Android/android_freerdp.c and adjust the methods struct to reflect
|
|
|
|
the changes made.
|
2013-09-17 17:58:32 +04:00
|
|
|
|