diff --git a/client/Android/aFreeRDP/.project b/client/Android/aFreeRDP/.project
index 0174cad38..f71736165 100644
--- a/client/Android/aFreeRDP/.project
+++ b/client/Android/aFreeRDP/.project
@@ -6,6 +6,60 @@
FreeRDPCore
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+ ?children?
+ ?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.buildArguments
+
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ ndk-build
+
+
+ org.eclipse.cdt.make.core.cleanBuildTarget
+ clean
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ false
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ true
+
+
+
com.android.ide.eclipse.adt.ResourceManagerBuilder
@@ -26,9 +80,19 @@
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
com.android.ide.eclipse.adt.AndroidNature
org.eclipse.jdt.core.javanature
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
diff --git a/client/Android/aFreeRDP/AndroidManifest.xml.cmake b/client/Android/aFreeRDP/AndroidManifest.xml.cmake
index fb4b8a1ef..8cec9833d 100644
--- a/client/Android/aFreeRDP/AndroidManifest.xml.cmake
+++ b/client/Android/aFreeRDP/AndroidManifest.xml.cmake
@@ -19,7 +19,6 @@
diff --git a/client/Android/aFreeRDP/CMakeLists.txt b/client/Android/aFreeRDP/CMakeLists.txt
index 99e715791..664f19727 100644
--- a/client/Android/aFreeRDP/CMakeLists.txt
+++ b/client/Android/aFreeRDP/CMakeLists.txt
@@ -18,6 +18,8 @@
set(ANDROID_PACKAGE_NAME "aFreeRDP")
+add_subdirectory(jni)
+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml.cmake
${CMAKE_CURRENT_BINARY_DIR}/AndroidManifest.xml @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build.xml.cmake
@@ -45,6 +47,7 @@ if(ANDROID_BUILD_JAVA)
# command to create the android package
add_custom_command(
OUTPUT "${APK}"
+ COMMAND ${NDK_COMMAND} NDK_DEBUG=${NDK_DEBUG}
COMMAND ${ANT_COMMAND} ${ANDROID_BUILD_TYPE}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
MAIN_DEPENDENCY AndroidManifest.xml
diff --git a/client/Android/aFreeRDP/jni/Android.mk.cmake b/client/Android/aFreeRDP/jni/Android.mk.cmake
new file mode 100644
index 000000000..aa4051d5b
--- /dev/null
+++ b/client/Android/aFreeRDP/jni/Android.mk.cmake
@@ -0,0 +1 @@
+include @NDK_LIB_CFG@
diff --git a/client/Android/aFreeRDP/jni/Application.mk.cmake b/client/Android/aFreeRDP/jni/Application.mk.cmake
new file mode 100644
index 000000000..3655c4062
--- /dev/null
+++ b/client/Android/aFreeRDP/jni/Application.mk.cmake
@@ -0,0 +1 @@
+APP_ABI := @ANDROID_ABI@
diff --git a/client/Android/aFreeRDP/jni/CMakeLists.txt b/client/Android/aFreeRDP/jni/CMakeLists.txt
new file mode 100644
index 000000000..7151c0f1b
--- /dev/null
+++ b/client/Android/aFreeRDP/jni/CMakeLists.txt
@@ -0,0 +1,22 @@
+# FreeRDP: A Remote Desktop Protocol Implementation
+# Android Client
+#
+# Copyright 2013 Armin Novak
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Application.mk.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/Application.mk @ONLY)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Android.mk.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/Android.mk @ONLY)
+