FreeRDP/docs/README.android

78 lines
2.1 KiB
Plaintext
Raw Normal View History

Overview
========
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)
Build requirements
=================
For the Android port some additional dependencies need to be fulfilled:
* for JNI
2016-06-06 12:32:25 +03:00
- CMake >= 3.0
- Android NDK (>= r9)
* for the Java GUI
- Android SDK
FreeRDP requires openssl libraries for building but they are not part of the
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.
Build native libraries:
2013-11-21 12:46:25 +04: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
Currently the default script builds for:
* armeabi
* armeabi-v7a
* x86
* mips
2016-06-06 12:32:25 +03:00
* arm64-v8a
* x86_64
* mips64
When the script is finished the libraries are ready for android studio to
be picked up in client/Android/Studio/freeRDPCore/src/main/jniLibs
Building the APK (Android Studio)
================
* Import the folder client/Android/Studio in Android Studio
* You are ready to go
Building the APK (gradle)
================
* change to directory client/Android/Studio
* run ./gradlew build to build
* run ./gradlew tasks for other gradle options
Development
===========
Updating JNI
------------
Whenever the FreeRDP API changes or you need some extra functionality in your Java
GUI the JNI needs to be updated.
The JNI functions are defined in client/Android/android_freerdp.c
Add the new functions to the methods struct.
* 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.