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
|
2013-10-02 01:30:58 +04:00
|
|
|
- Android NDK (>= r9)
|
2016-02-01 18:01:32 +03:00
|
|
|
- prebuild openssl (optionally libjpeg and openh264)
|
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
|
|
|
|
* armeabi-v7a
|
|
|
|
* x86
|
|
|
|
* mips
|
2013-01-29 15:59:58 +04:00
|
|
|
|
2016-02-01 18:01:32 +03:00
|
|
|
64 bit architectures will be added as soon as the OpenSSL build scripts
|
|
|
|
support the android build for those.
|
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
|
|
|
|
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
|
|
|
|