diff --git a/.gitignore b/.gitignore
index 0779f1d..53c6290 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,11 @@ rpm/spec
*.rpm
wolfcrypt*.tar.gz
+# Android
+IDE/Android/.idea/deploymentTargetDropDown.xml
+IDE/Android/app/.cxx/
+IDE/Android/app/src/main/cpp/wolfssl
+
# Windows
IDE/WIN/.vs
IDE/WIN/wolfcryptjni.vcxproj.user
diff --git a/IDE/Android/.gitignore b/IDE/Android/.gitignore
new file mode 100644
index 0000000..2b75303
--- /dev/null
+++ b/IDE/Android/.gitignore
@@ -0,0 +1,13 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/IDE/Android/.idea/.gitignore b/IDE/Android/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/IDE/Android/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/IDE/Android/.idea/codeStyles/Project.xml b/IDE/Android/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/IDE/Android/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/.idea/compiler.xml b/IDE/Android/.idea/compiler.xml
new file mode 100644
index 0000000..b589d56
--- /dev/null
+++ b/IDE/Android/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/.idea/gradle.xml b/IDE/Android/.idea/gradle.xml
new file mode 100644
index 0000000..0897082
--- /dev/null
+++ b/IDE/Android/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/.idea/jarRepositories.xml b/IDE/Android/.idea/jarRepositories.xml
new file mode 100644
index 0000000..a5f05cd
--- /dev/null
+++ b/IDE/Android/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/.idea/misc.xml b/IDE/Android/.idea/misc.xml
new file mode 100644
index 0000000..3e48d41
--- /dev/null
+++ b/IDE/Android/.idea/misc.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/.idea/vcs.xml b/IDE/Android/.idea/vcs.xml
new file mode 100644
index 0000000..f81dde8
--- /dev/null
+++ b/IDE/Android/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/README.md b/IDE/Android/README.md
new file mode 100644
index 0000000..73c47a2
--- /dev/null
+++ b/IDE/Android/README.md
@@ -0,0 +1,92 @@
+# Android Studio Example Project
+
+This is an example Android Studio project file for wolfcrypt-jni / wolfJCE.
+This project should be used for reference only.
+
+Tool and version information used when testing this project:
+
+- Ubuntu 20.04.3 LTS
+- Android Studio Chipmunk 2021.2.1
+- Android Gradle Plugin Version: 4.2.2
+- Gradle Version: 7.1.3
+- API 30: Android 11
+- Emulator: Pixel 5 API 31
+
+The following sections outline steps required to run this example on an
+Android device or emulator.
+
+## 1. Add Native wolfSSL Library Source Code to Project
+
+This example project is already set up to compile and build the native
+wolfSSL library source files, but the wolfSSL files themselves have not been
+included in this package. You must download or link an appropriate version
+of wolfSSL to this project using one of the options below.
+
+The project looks for the directory
+`wolfcrypt-jni/IDE/Android/app/src/main/cpp/wolfssl` for wolfSSL source code.
+This can added in multiple ways:
+
+- OPTION A: Download the latest wolfSSL library release from www.wolfssl.com,
+unzip it, rename it to `wolfssl`, and place it in the direcotry
+`wolfcrypt-jni/IDE/Android/app/src/main/cpp/`.
+
+```
+$ unzip wolfssl-X.X.X.zip
+$ mv wolfssl-X.X.X wolfcrypt-jni/IDE/Android/app/src/main/cpp/wolfssl
+```
+
+- OPTION B: Alternatively GitHub can be used to clone wolfSSL:
+
+```
+$ cd /IDE/Android/app/src/main/cpp/
+$ git clone https://github.com/wolfssl/wolfssl
+$ cp wolfssl/options.h.in wolfssl/options.h
+```
+
+- OPTION C: A symbolic link to a wolfssl directory on the system by using:
+
+```
+$ cd /IDE/Android/app/src/main/cpp/
+$ ln -s /path/to/local/wolfssl ./wolfssl
+```
+
+## 2. Update Java Symbolic Links (Only applies to Windows Users)
+
+The following Java source directory is a Unix/Linux symlink:
+
+```
+wolfcrypt-jni/IDE/Android/app/src/main/java/com/wolfssl
+```
+
+This will not work correctly on Windows, and a new Windows symbolic link needs
+to be created in this location. To do so:
+
+1) Open Windows Command Prompt (Right click, and "Run as Administrator")
+2) Navigate to `wolfcrypt-jni\IDE\Android\app\src\main\java\com`
+3) Delete the existing symlink file (it shows up as a file called "wolfssl")
+
+```
+del wolfssl
+```
+
+4) Create a new relative symbolic link with `mklink`:
+
+```
+mklink /D wolfssl ..\..\..\..\..\..\..\src\java\com\wolfssl\
+```
+
+## 3. Import and Build the Example Project with Android Studio
+
+1) Open the Android Studio project by double clicking on the `Android` folder
+in wolfcrypt-jni/IDE/. Or, from inside Android Studio, open the `Android`
+project located in the wolfcrypt-jni/IDE directory.
+
+2) Build the project and run MainActivity from app -> java/com/example.wolfssl.
+This will ask for permissions to access the certificates in the /sdcard/
+directory and then print out the server certificate information on success.
+
+## Support
+
+Please contact wolfSSL support at support@wolfssl.com with any questions or
+feedback.
+
diff --git a/IDE/Android/app/.gitignore b/IDE/Android/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/IDE/Android/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/IDE/Android/app/build.gradle b/IDE/Android/app/build.gradle
new file mode 100644
index 0000000..2d61afd
--- /dev/null
+++ b/IDE/Android/app/build.gradle
@@ -0,0 +1,50 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdk 33
+ defaultConfig {
+ applicationId "com.example.wolfssl"
+ /* Min SDK should stay at 24 to detect if we try to use newer APIs
+ * than were available in that Android SDK. We have users who are still
+ on SDK 24 (ref ZD 18311) */
+ minSdkVersion 24
+ targetSdkVersion 33
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ externalNativeBuild {
+ cmake {
+ cppFlags ""
+ }
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ externalNativeBuild {
+ cmake {
+ path "src/main/cpp/CMakeLists.txt"
+ }
+ }
+ sourceSets {
+ main.java.srcDirs += '../../../src/main/java'
+ test.java.srcDirs += '../../../src/main/test'
+ }
+ namespace 'com.example.wolfssl'
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ implementation 'com.android.support.constraint:constraint-layout:2.0.4'
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+}
diff --git a/IDE/Android/app/proguard-rules.pro b/IDE/Android/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/IDE/Android/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/IDE/Android/app/src/main/AndroidManifest.xml b/IDE/Android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..c102629
--- /dev/null
+++ b/IDE/Android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/app/src/main/cpp/CMakeLists.txt b/IDE/Android/app/src/main/cpp/CMakeLists.txt
new file mode 100644
index 0000000..e3dd587
--- /dev/null
+++ b/IDE/Android/app/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,344 @@
+# For more information about using CMake with Android Studio, read the
+# documentation: https://d.android.com/studio/projects/add-native-code.html
+
+# Sets the minimum version of CMake required to build the native library.
+cmake_minimum_required(VERSION 3.4.1)
+
+# Define project as both C and ASM for cases for SP has assembly enabled
+project("wolfcryptjni-gradle" C ASM)
+
+# set wolfCrypt JNI location as environment variable, change if needed
+set(wolfcryptjni_DIR ${CMAKE_SOURCE_DIR}/../../../../../../)
+set(wolfssl_DIR ${CMAKE_SOURCE_DIR}/wolfssl/)
+
+# set warnings as errors, used in this example project but may be different
+# in production apps/environments.
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
+
+# ---------------- wolfSSL Normal vs. FIPS Ready Selection ---------------------
+# Select if wolfSSL is normal ("normal") or FIPS Ready ("fipsready")
+# wolfSSL FIPS Ready is available for download on the wolfssl.com download page.
+# For more information on wolfSSL FIPS Ready see:
+#
+# https://www.wolfssl.com/license/fips/
+#
+# FIPS Ready requires different preprocessor flags, files, and a specific file
+# ordering as set up below.
+set(WOLFSSL_PKG_TYPE "normal")
+
+# -------------------------- Math Library Selection ----------------------------
+# wolfCrypt math library selection, used to switch on below. Should be one of:
+# fastmath
+# spmath
+set(WOLFSSL_MATH_LIB "spmath")
+
+# Add header directories to include paths
+include_directories(
+ ${wolfssl_DIR}
+ ${wolfcryptjni_DIR}/jni/include
+)
+
+# ---------------------------- Preprocessor Defines ----------------------------
+
+if ("${WOLFSSL_PKG_TYPE}" MATCHES "normal")
+ # Add preprocessor defines to CFLAGS, these match those placed into
+ # wolfssl/options.h by configure if using: "./configure --enable-jni".
+ # This list may be configurable depending on use case and desired
+ # optimizations.
+ add_definitions(-DWC_RSA_BLINDING -DWOLFSSL_SHA224 -DWOLFSSL_SHA384
+ -DWOLFSSL_SHA512 -DHAVE_HKDF -DNO_DSA -DHAVE_ECC
+ -DECC_SHAMIR -DWC_RSA_PSS -DWOLFSSL_BASE64_ENCODE
+ -DWOLFSSL_SHA3 -DHAVE_POLY1305 -DHAVE_CHACHA -DHAVE_HASHDRBG
+ -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES -DHAVE_FFDHE_2048
+ -DWOLFSSL_TLS13 -DHAVE_EXTENDED_MASTER -DWOLFSSL_JNI
+ -DHAVE_EX_DATA -DWOLFSSL_DTLS -DOPENSSL_EXTRA -DOPENSSL_ALL
+ -DHAVE_CRL -DHAVE_OCSP -DHAVE_CRL_MONITOR
+ -DPERSIST_SESSION_CACHE -DPERSIST_CERT_CACHE -DATOMIC_USER
+ -DHAVE_PK_CALLBACKS -DWOLFSSL_CERT_EXT -DWOLFSSL_CERT_GEN
+ -DHAVE_SNI -DHAVE_ALPN -DNO_RC4 -DHAVE_ENCRYPT_THEN_MAC
+ -DNO_MD4 -DWOLFSSL_ENCRYPTED_KEYS -DHAVE_DH_DEFAULT_PARAMS
+ -DNO_ERROR_QUEUE -DWOLFSSL_EITHER_SIDE -DWC_RSA_NO_PADDING
+ -DWC_RSA_PSS -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_TICKET_HAVE_ID
+ -DWOLFSSL_ERROR_CODE_OPENSSL -DWOLFSSL_ALWAYS_VERIFY_CB
+ -DWOLFSSL_VERIFY_CB_ALL_CERTS -DWOLFSSL_EXTRA_ALERTS
+ -DHAVE_EXT_CACHE -DWOLFSSL_FORCE_CACHE_ON_TICKET
+ -DWOLFSSL_AKID_NAME -DHAVE_CTS -DNO_DES3 -DGCM_TABLE_4BIT
+ -DTFM_TIMING_RESISTANT -DECC_TIMING_RESISTANT
+ -DHAVE_AESGCM -DSIZEOF_LONG=4 -DSIZEOF_LONG_LONG=8
+
+ # For gethostbyname()
+ -DHAVE_NETDB_H
+
+ # Defines added for debugging. These can be removed if debug
+ # logging is not needed and will increase performance and reduce
+ # library footprint size if removed.
+ #-DDEBUG_WOLFSSL -DWOLFSSL_ANDROID_DEBUG
+
+ # Defines added for wolfCrypt test and benchmark only, may not
+ # be needed for your own application. Add -DNO_FILESYSTEM to
+ # disable file system use for wolfCrypt test, but make sure
+ # to remove this define in production applications as
+ # filesystem access is required for wolfJCE use.
+ -DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256
+ -DNO_WRITE_TEMP_FILES -DNO_MAIN_DRIVER
+ )
+
+elseif("${WOLFSSL_PKG_TYPE}" MATCHES "fipsready")
+ # The wolfCrypt FIPS In Core Integrity checksum will vary with compiler
+ # versions, runtime library versions, target hardware, and build type.
+ # Anytime the module is shifted up or down in memory or loaded from a
+ # new memory location the hash will change. This is expected during
+ # normal development cycles but should be stable in a production
+ # deployment. The verifyCore[] hash can be manually updated in
+ # 'wolfcrypt/src/fips_test.c' and the app recompiled. Or, the define
+ # WOLFCRYPT_FIPS_CORE_HASH_VALUE can be set below, which is helpful
+ # for Android Studio, which builds for all these architectures in the
+ # same build.
+ #
+ # The hash values below are only for reference and will need to
+ # be updated to match your build. To update this value:
+ #
+ # 1. Build and install your app which contains wolfCrypt FIPS
+ # 2. Run your app on each architecture, looking at the logcat output
+ # to see the expected verifyCore[] hash value.
+ # 3. Copy the expected hash value from logcat to the proper
+ # architecture section below.
+ # 4. Re-build your application now that the expected hash value has
+ # been set.
+ # 5. Re-install and re-run your application on each architecture to
+ # confirm the hash is stable and application runs as expected.
+ #
+ # NOTE: If using wolfSSL FIPS Ready or FIPS proper with this sample
+ # application and run into the scenario where the verifyCore[] hash
+ # output at runtime is empty, consider checking/increasing the size of
+ # the MAX_FIPS_DATA_SZ define in 'wolfcrypt/src/fips_test.c'.
+
+ if("${ANDROID_ABI}" MATCHES "arm64-v8a")
+ # https://developer.android.com/ndk/guides/abis#arm64-v8a
+ add_definitions(-DWOLFCRYPT_FIPS_CORE_HASH_VALUE=DF2FF40654C405467072356FBA6C02A88F17E79B08A1A8F3A887C0F6AB4E4650)
+ elseif("${ANDROID_ABI}" MATCHES "armeabi-v7a")
+ # https://developer.android.com/ndk/guides/abis#v7a
+ add_definitions(-DWOLFCRYPT_FIPS_CORE_HASH_VALUE=DF2FF40654C405467072356FBA6C02A88F17E79B08A1A8F3A887C0F6AB4E4650)
+ elseif("${ANDROID_ABI}" MATCHES "x86_64")
+ # https://developer.android.com/ndk/guides/abis#86-64
+ add_definitions(-DWOLFCRYPT_FIPS_CORE_HASH_VALUE=DF2FF40654C405467072356FBA6C02A88F17E79B08A1A8F3A887C0F6AB4E4650)
+ elseif("${ANDROID_ABI}" MATCHES "x86")
+ # https://developer.android.com/ndk/guides/abis#x86
+ add_definitions(-DWOLFCRYPT_FIPS_CORE_HASH_VALUE=DF2FF40654C405467072356FBA6C02A88F17E79B08A1A8F3A887C0F6AB4E4650)
+ endif()
+
+ # Add preprocessor defines to CFLAGS, these match those placed into
+ # wolfssl/options.h by configure if using: "./configure" on a Unix/Linux
+ # platform. The options below have been chosen to match a FIPS Ready
+ # build, and are based on the example user_settings.h file located here:
+ # https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_fipsv5.h
+ # This list may be configurable depending on use case and desired
+ # optimizations, being careful not to break FIPS compatibility if
+ # targeting FIPS proper in the future.
+ add_definitions(-DHAVE_FIPS -DHAVE_FIPS_VERSION=5 -DHAVE_FIPS_VERSION_MINOR=3
+ -DHAVE_HASHDRBG -DHAVE_THREAD_LS -DHAVE_REPRODUCIBLE_BUILD
+ -DFP_MAX_BITS=16384 -DSP_INT_BITS=8192 -DWOLFSSL_PUBLIC_MP
+ -DTFM_TIMING_RESISTANT -DECC_TIMING_RESISTANT -DWC_RSA_BLINDING
+ -DWC_RNG_SEED_CB -DWOLFSSL_VALIDATE_ECC_IMPORT
+ -DWOLFSSL_VALIDATE_ECC_KEYGEN -DWOLFSSL_VALIDATE_FFC_IMPORT
+ -DWOLFSSL_TLS13 -DHAVE_TLS_EXTENSIONS -DHAVE_ENCRYPT_THEN_MAC
+ -DHAVE_SUPPORTED_CURVES -DHAVE_EXTENDED_MASTER -DHAVE_ONE_TIME_AUTH
+ -DHAVE_SECURE_RENEGOTIATION -DHAVE_SERVER_RENEGOTIATION_INFO -DHAVE_SESSION_TICKET
+ -DWOLFSSL_USE_ALIGN -DWOLFSSL_BASE64_ENCODE -DHAVE_CRL
+ -DHAVE_EXT_CACHE -DWOLFSSL_VERIFY_CB_ALL_CERTS -DWOLFSSL_ALWAYS_VERIFY_CB
+ -DWOLFSSL_DH_EXTRA -DWOLFSSL_WOLFSSH -DOPENSSL_EXTRA -DOPENSSL_ALL
+ -DHAVE_FFDHE_Q -DHAVE_FFDHE_2048 -DHAVE_FFDHE_3072 -DHAVE_FFDHE_4096
+ -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DHAVE_DH_DEFAULT_PARAMS -DHAVE_PUBLIC_FFDHE
+ -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR -DHAVE_ECC_CDH -DECC_USER_CURVES
+ -DHAVE_ECC256 -DHAVE_ECC384 -DHAVE_ECC521 -DWOLFSSL_ECDSA_SET_K
+ -DWC_RSA_PSS -DWOLFSSL_KEY_GEN -DWC_RSA_NO_PADDING
+ -DWOLFSSL_AES_COUNTER -DHAVE_AESCCM -DHAVE_AES_ECB -DWOLFSSL_AES_DIRECT
+ -DWOLFSSL_AES_OFB -DHAVE_AESGCM -DGCM_TABLE_4BIT -DWOLFSSL_CMAC
+ -DWOLFSSL_SHA224 -DWOLFSSL_SHA512 -DWOLFSSL_SHA384 -DWOLFSSL_NO_SHAKE256
+ -DWOLFSSL_NOSHA512_224 -DWOLFSSL_NOSHA512_256 -DWOLFSSL_SHA3 -DHAVE_HKDF
+ -DNO_OLD_TLS -DNO_PSK -DNO_DO178
+ -DNO_RC4 -DNO_MD4 -DNO_MD5 -DNO_DES3 -DNO_DSA -DNO_RABBIT
+
+ -DWOLFSSL_JNI -DHAVE_EX_DATA -DHAVE_OCSP -DHAVE_CRL_MONITOR
+ -DWOLFSSL_CERT_EXT -DWOLFSSL_CERT_GEN -DHAVE_SNI -DHAVE_ALPN
+ -DWOLFSSL_ENCRYPTED_KEYS -DNO_ERROR_QUEUE -DWOLFSSL_EITHER_SIDE
+ -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_TICKET_HAVE_ID
+ -DWOLFSSL_ERROR_CODE_OPENSSL -DWOLFSSL_EXTRA_ALERTS
+ -DWOLFSSL_FORCE_CACHE_ON_TICKET -DWOLFSSL_AKID_NAME -DHAVE_CTS
+ -DKEEP_PEER_CERT -DSESSION_CERTS
+ -DSIZEOF_LONG=4 -DSIZEOF_LONG_LONG=8
+
+ # For gethostbyname()
+ -DHAVE_NETDB_H
+
+ # Enable below options for wolfSSL debug logging
+ #-DDEBUG_WOLFSSL -DWOLFSSL_ANDROID_DEBUG
+
+ # Below options are added only for wolfCrypt test and benchmark
+ # applications. These can be left off / removed when integrating
+ # into a real-world application. Add -DNO_FILESYSTEM to disable
+ # file system use for wolfCrypt test, but make sure to remove
+ # this define in production applications as filesystem access
+ # is required for wolfJCE use.
+ -DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256
+ -DNO_WRITE_TEMP_FILES -DNO_MAIN_DRIVER
+ )
+endif()
+
+if ("$WOLFSSL_MATH_LIB" MATCHES "fastmath")
+ # Use fastmath library
+ add_definitions(-DUSE_FAST_MATH -DTFM_ECC256 -DTFM_NO_ASM)
+
+elseif("${WOLFSSL_MATH_LIB}" MATCHES "spmath")
+ # Use SP math Library
+ add_definitions(
+ -DWOLFSSL_HAVE_SP_RSA -DWOLFSSL_SP_4096
+ -DWOLFSSL_HAVE_SP_DH
+ -DWOLFSSL_HAVE_SP_ECC -DWOLFSSL_SP_384 -DWOLFSSL_SP_521
+ -DWOLFSSL_SP_LARGE_CODE)
+
+ # SP Math architecture-specific settings (ex: assembly optimizations)
+ if("${ANDROID_ABI}" MATCHES "arm64-v8a")
+ # Using ASM for SP, need to use WOLFSSL_SP_MATH instead of WOLFSSL_SP_MATH_ALL
+ add_definitions(-DWOLFSSL_SP_MATH)
+ add_definitions(-DWOLFSSL_SP_ASM -DWOLFSSL_SP_ARM64 -DWOLFSSL_SP_ARM64_ASM -DHAVE___UINT128_T)
+ elseif("${ANDROID_ABI}" MATCHES "armeabi-v7a")
+ # Add SP optimizations for ARMv7 here when available.
+ # Not using ASM, need to use WOLFSSL_SP_MATH_ALL for SW-only implementation
+ add_definitions(-DWOLFSSL_SP_MATH_ALL)
+ elseif("${ANDROID_ABI}" MATCHES "x86_64")
+ # Using ASM for SP, need to use WOLFSSL_SP_MATH instead of WOLFSSL_SP_MATH_ALL
+ add_definitions(-DWOLFSSL_SP_MATH)
+ add_definitions(-DWOLFSSL_SP_ASM -DWOLFSSL_SP_X86_64 -DWOLFSSL_SP_X86_64_ASM -DHAVE___UINT128_T)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_x86_64_asm.S)
+ elseif("${ANDROID_ABI}" MATCHES "x86")
+ # Add SP optimizations for X86 here when available.
+ # Not using ASM, need to use WOLFSSL_SP_MATH_ALL for SW-only implementation
+ add_definitions(-DWOLFSSL_SP_MATH_ALL)
+ else()
+ # Not using ASM, need to use WOLFSSL_SP_MATH_ALL for SW-only implementation
+ add_definitions(-DWOLFSSL_SP_MATH_ALL)
+ endif()
+endif()
+
+# --------------------------- wolfSSL and wolfCrypt Source Files -----------------------------------
+# Add TLS sources to TLS_SOURCES list and remove files that are included inline by other files
+aux_source_directory(${wolfssl_DIR}/src TLS_SOURCES)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/bio.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/conf.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/pk.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_bn.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_asn1.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_certman.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_crypto.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_load.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_misc.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_p7p12.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_sess.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/x509.c)
+list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/x509_str.c)
+
+if ("${WOLFSSL_PKG_TYPE}" MATCHES "normal")
+ # Add crypto sources to CRYPTO_SOURCES, remove files that are included inline by other files
+ aux_source_directory(${wolfssl_DIR}/wolfcrypt/src CRYPTO_SOURCES)
+ list(REMOVE_ITEM CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/evp.c)
+ list(REMOVE_ITEM CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/misc.c)
+
+elseif("${WOLFSSL_PKG_TYPE}" MATCHES "fipsready")
+ # FIPS Ready needs to explicitly order files for in-core integrity check to work properly.
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/wolfcrypt_first.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/hmac.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/random.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sha256.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/kdf.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/rsa.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/ecc.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/aes.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sha.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sha512.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sha3.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/dh.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/cmac.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/fips.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/fips_test.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/wolfcrypt_last.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/hash.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/cpuid.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/logging.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/wc_port.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/error.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/wc_encrypt.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/signature.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_arm32.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_arm64.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_armthumb.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_c32.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_c64.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_cortexm.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_dsp32.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_int.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/sp_x86_64.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/wolfmath.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/memory.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/asn.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/coding.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/pwdbased.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/pkcs12.c)
+ list(APPEND CRYPTO_SOURCES ${wolfssl_DIR}/wolfcrypt/src/tfm.c)
+endif()
+
+# wolfSSL will be compiled as a SHARED library
+add_library(wolfssl SHARED
+ ${CRYPTO_SOURCES}
+ ${TLS_SOURCES}
+)
+
+# set_target_properties(wolfssl PROPERTIES LIBRARY_OUTPUT_DIRECTORY
+# ${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI})
+
+# wolfCrypt JNI/JCE library wil be compiled as SHARED library
+# wolfCrypt JNI Java files are tied into build in Module build.gradle file
+add_library(wolfcryptjni SHARED
+ ${wolfcryptjni_DIR}/jni/jni_aes.c
+ ${wolfcryptjni_DIR}/jni/jni_aesgcm.c
+ ${wolfcryptjni_DIR}/jni/jni_asn.c
+ ${wolfcryptjni_DIR}/jni/jni_chacha.c
+ ${wolfcryptjni_DIR}/jni/jni_curve25519.c
+ ${wolfcryptjni_DIR}/jni/jni_des3.c
+ ${wolfcryptjni_DIR}/jni/jni_dh.c
+ ${wolfcryptjni_DIR}/jni/jni_ecc.c
+ ${wolfcryptjni_DIR}/jni/jni_ed25519.c
+ ${wolfcryptjni_DIR}/jni/jni_error.c
+ ${wolfcryptjni_DIR}/jni/jni_feature_detect.c
+ ${wolfcryptjni_DIR}/jni/jni_fips.c
+ ${wolfcryptjni_DIR}/jni/jni_hmac.c
+ ${wolfcryptjni_DIR}/jni/jni_jce_wolfsslkeystore.c
+ ${wolfcryptjni_DIR}/jni/jni_logging.c
+ ${wolfcryptjni_DIR}/jni/jni_md5.c
+ ${wolfcryptjni_DIR}/jni/jni_native_struct.c
+ ${wolfcryptjni_DIR}/jni/jni_pwdbased.c
+ ${wolfcryptjni_DIR}/jni/jni_rng.c
+ ${wolfcryptjni_DIR}/jni/jni_rsa.c
+ ${wolfcryptjni_DIR}/jni/jni_sha.c
+ ${wolfcryptjni_DIR}/jni/jni_wolfcrypt.c
+ ${wolfcryptjni_DIR}/jni/jni_wolfobject.c
+ ${wolfcryptjni_DIR}/jni/jni_wolfssl_cert_manager.c
+)
+
+# set_target_properties(wolfcryptjni PROPERTIES LIBRARY_OUTPUT_DIRECTORY
+# ${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI})
+
+# Find the android log library, store into variable ${lib-log}
+find_library(lib-log log)
+
+# Link libwolfssl to android log library
+target_link_libraries(
+ wolfssl
+ ${lib-log}
+)
+
+# Link libwolfcryptjni to libwolfssl
+target_link_libraries(
+ wolfcryptjni
+ wolfssl
+)
diff --git a/IDE/Android/app/src/main/java/com/example/wolfssl/MainActivity.java b/IDE/Android/app/src/main/java/com/example/wolfssl/MainActivity.java
new file mode 100644
index 0000000..41403f4
--- /dev/null
+++ b/IDE/Android/app/src/main/java/com/example/wolfssl/MainActivity.java
@@ -0,0 +1,95 @@
+/* MainActivity.java
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+
+package com.example.wolfssl;
+
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.Security;
+
+import com.wolfssl.provider.jce.WolfCryptProvider;
+
+public class MainActivity extends AppCompatActivity {
+
+ private View.OnClickListener buttonListener = new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ TextView tv = (TextView) findViewById(R.id.sample_text);
+
+ try {
+ testFindProvider(tv);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ };
+
+ private void setDisplayText(String s)
+ {
+ runOnUiThread(() -> {
+ TextView tv = (TextView) findViewById(R.id.sample_text);
+ tv.setText(s);
+ });
+ }
+
+ private void appendDisplayText(String s)
+ {
+ runOnUiThread(() -> {
+ TextView tv = (TextView) findViewById(R.id.sample_text);
+ tv.append(s);
+ });
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ Button button = (Button) findViewById(R.id.button);
+ button.setOnClickListener(buttonListener);
+
+ setDisplayText("wolfCrypt JNI/JCE Android Studio Example app\n");
+ }
+
+ public void testFindProvider(TextView tv)
+ throws NoSuchProviderException, NoSuchAlgorithmException {
+
+ Security.addProvider(new WolfCryptProvider());
+
+ Provider p = Security.getProvider("wolfJCE");
+ if (p == null) {
+ appendDisplayText("Unable to find wolfJCE provider\n");
+ return;
+ }
+ else {
+ appendDisplayText("Successfully found wolfJCE provider\n");
+ return;
+ }
+ }
+}
diff --git a/IDE/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/IDE/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..1f6bb29
--- /dev/null
+++ b/IDE/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IDE/Android/app/src/main/res/drawable/ic_launcher_background.xml b/IDE/Android/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..0d025f9
--- /dev/null
+++ b/IDE/Android/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IDE/Android/app/src/main/res/layout/activity_main.xml b/IDE/Android/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..e9e3b41
--- /dev/null
+++ b/IDE/Android/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/IDE/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..8f19fa9
--- /dev/null
+++ b/IDE/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/IDE/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..41680d8
Binary files /dev/null and b/IDE/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/IDE/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/IDE/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..0068bc6
Binary files /dev/null and b/IDE/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/IDE/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/IDE/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..dd6fa74
Binary files /dev/null and b/IDE/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/IDE/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/IDE/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4b63df0
Binary files /dev/null and b/IDE/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/IDE/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/IDE/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aa9c1ec
Binary files /dev/null and b/IDE/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/IDE/Android/app/src/main/res/values/colors.xml b/IDE/Android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..69b2233
--- /dev/null
+++ b/IDE/Android/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #008577
+ #00574B
+ #D81B60
+
diff --git a/IDE/Android/app/src/main/res/values/strings.xml b/IDE/Android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..d7f5ebf
--- /dev/null
+++ b/IDE/Android/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ wolfSSL
+
diff --git a/IDE/Android/app/src/main/res/values/styles.xml b/IDE/Android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..5885930
--- /dev/null
+++ b/IDE/Android/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/IDE/Android/build.gradle b/IDE/Android/build.gradle
new file mode 100644
index 0000000..0f5a2ae
--- /dev/null
+++ b/IDE/Android/build.gradle
@@ -0,0 +1,32 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ google()
+ jcenter()
+
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:8.3.1'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+ gradle.projectsEvaluated {
+ tasks.withType(JavaCompile) {
+ options.compilerArgs << "-Xlint:all" << "-Werror"
+ options.deprecation = false
+ }
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/IDE/Android/gradle.properties b/IDE/Android/gradle.properties
new file mode 100644
index 0000000..6c12845
--- /dev/null
+++ b/IDE/Android/gradle.properties
@@ -0,0 +1,17 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+android.nonFinalResIds=false
+android.nonTransitiveRClass=false
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+
diff --git a/IDE/Android/gradle/wrapper/gradle-wrapper.jar b/IDE/Android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/IDE/Android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/IDE/Android/gradle/wrapper/gradle-wrapper.properties b/IDE/Android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..6215070
--- /dev/null
+++ b/IDE/Android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Thu Nov 04 15:51:08 MDT 2021
+distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/IDE/Android/gradlew b/IDE/Android/gradlew
new file mode 100755
index 0000000..cccdd3d
--- /dev/null
+++ b/IDE/Android/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/IDE/Android/gradlew.bat b/IDE/Android/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/IDE/Android/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/IDE/Android/settings.gradle b/IDE/Android/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/IDE/Android/settings.gradle
@@ -0,0 +1 @@
+include ':app'