[IOT-2207] Update build to use android-ndk-r10e
authorGeorge Nash <george.nash@intel.com>
Mon, 5 Jun 2017 21:48:14 +0000 (14:48 -0700)
committerPhil Coval <philippe.coval@osg.samsung.com>
Thu, 22 Jun 2017 16:28:52 +0000 (16:28 +0000)
The android-ndk-r10d is unsupported. This updates the scripts
to download and use version r10e.

Bug: https://jira.iotivity.org/browse/IOT-2207
Change-Id: I730524749f76868f81756a1f704ee761819d1891
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20561
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 09dd38165eae5a7313cabf39ae2f817d892f1f7b)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20939
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
build_common/android/SConscript
extlibs/android/ndk/SConscript
java/iotivity-android/run_android_smoketests.py
resource/csdk/connectivity/build/android/README.txt
service/easy-setup/Build_Instructions_Android_Arduino.txt
tools/vagrant/iotivity-setup.sh

index 034bdf6..1a4f5e0 100644 (file)
@@ -10,7 +10,7 @@ Import('env')
 help_vars = Variables()
 if not env.get('ANDROID_NDK'):
     SConscript('../../extlibs/android/ndk/SConscript')
-    help_vars.Add(PathVariable('ANDROID_NDK', 'Android NDK root directory', os.path.join(env.get('SRC_DIR'), 'extlibs', 'android', 'ndk', 'android-ndk-r10d')))
+    help_vars.Add(PathVariable('ANDROID_NDK', 'Android NDK root directory', os.path.join(env.get('SRC_DIR'), 'extlibs', 'android', 'ndk', 'android-ndk-r10e')))
 
 if not env.get('ANDROID_GRADLE'):
     SConscript('../../extlibs/android/gradle/SConscript')
@@ -30,7 +30,7 @@ else:
 *      # scons ANDROID_NDK=<path to android NDK> ...                          *
 *******************************************************************************
 '''
-       android_ndk = os.path.join(env.get('SRC_DIR'), 'extlibs', 'android', 'ndk', 'android-ndk-r10d')
+       android_ndk = os.path.join(env.get('SRC_DIR'), 'extlibs', 'android', 'ndk', 'android-ndk-r10e')
 
 if env.get('ANDROID_GRADLE'):
        android_gradle = env.get('ANDROID_GRADLE')
@@ -226,7 +226,7 @@ if env.get('SECURED') == '1':
        env.AppendUnique(LIBS = ['mbedtls','mbedx509','mbedcrypto'])
 else:
        env.AppendUnique(LIBS = ['mbedcrypto'])
-    
+
 # From android-5 (API > 20), all application must be built with flags '-fPIE' '-pie'.
 # Due to the limitation of Scons, it's required to added it into the command line
 # directly (otherwise, it will also be added when build share library)
index cc36c4e..ee4e6ae 100644 (file)
@@ -14,7 +14,7 @@ host_os = sys.platform
 # Build flags
 ######################################################################
 src_dir = env.get('SRC_DIR')
-path = os.path.join(src_dir, 'extlibs', 'android', 'ndk', 'android-ndk-r10d')
+path = os.path.join(src_dir, 'extlibs', 'android', 'ndk', 'android-ndk-r10e')
 
 # check 'ndk' library, if it doesn't exits, ask user to download it
 if not os.path.exists(path):
@@ -22,16 +22,16 @@ if not os.path.exists(path):
        if host_os == 'linux2' :
                archType = 8 * struct.calcsize("P")
                if archType == 64:
-                       env.Download('android-ndk-r10d.bin', 'http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin')
+                       env.Download('android-ndk-r10e.bin', 'http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin')
                else:
-                       env.Download('android-ndk-r10d.bin', 'http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86.bin')
+                       env.Download('android-ndk-r10e.bin', 'http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86.bin')
 
-               os.system("chmod a+x android-ndk-r10d.bin")
-               os.system("./android-ndk-r10d.bin")
+               os.system("chmod a+x android-ndk-r10e.bin")
+               os.system("./android-ndk-r10e.bin")
        else:
                if target_arch in ['x86_64']:
-                       env.Download('android-ndk-r10d', 'http://dl.google.com/android/ndk/android-ndk-r10d-windows-x86_64.exe')
+                       env.Download('android-ndk-r10e', 'http://dl.google.com/android/ndk/android-ndk-r10e-windows-x86_64.exe')
                if target_arch in ['x86']:
-                       env.Download('android-ndk-r10d', 'http://dl.google.com/android/ndk/android-ndk-r10d-windows-x86.exe')
+                       env.Download('android-ndk-r10e', 'http://dl.google.com/android/ndk/android-ndk-r10e-windows-x86.exe')
 
 
index 6ae3bd5..a73b946 100755 (executable)
@@ -68,7 +68,7 @@ def start_avd(avd_name, console_port):
     Keyword arguments:
     avd_name -- the name of the created android virtual device
     console_port -- the port number that will attempt to be used
-                    by the when starting the avd 
+                    by the when starting the avd
     '''
     command = 'emulator -avd ' + avd_name + ' -port ' + console_port + ' -wipe-data -no-boot-anim -no-window'
     subprocess.Popen([command], shell=True)
@@ -121,7 +121,7 @@ def build_smoketests():
     '''
     Use gradlew to build the android smoke tests
     '''
-    os.environ['ANDROID_NDK_HOME'] = os.path.abspath(os.getcwd() + '/../../extlibs/android/ndk/android-ndk-r10d')
+    os.environ['ANDROID_NDK_HOME'] = os.path.abspath(os.getcwd() + '/../../extlibs/android/ndk/android-ndk-r10e')
     command = './gradlew assembleAndroidTest'
     subprocess.Popen([command], shell=True).wait()
 
@@ -158,7 +158,7 @@ def kill_avd(console_port):
 
 def create_avd(avd_name, target, abi):
     '''
-    Create a new android virtual device 
+    Create a new android virtual device
 
     Keyword arguments:
     avd_name -- the name of the created avd
@@ -200,16 +200,16 @@ def start_android_and_run_tests(target, abi):
     '''
     avalible_port = find_avalible_console_port()
     avd_name = 'smoke_test_avd_' + avalible_port
-    
+
     create_avd(avd_name, target, abi)
-    
+
     start_avd(avd_name, avalible_port)
     wait_for_avd_boot(avalible_port)
-    
+
     build_smoketests();
     install_smoketests(avalible_port)
     run_smoketests(avalible_port)
-    
+
     kill_avd(avalible_port)
     delete_avd(avd_name)
 
@@ -239,5 +239,3 @@ def main(argv):
 
 if __name__ == "__main__":
    main(sys.argv[1:])
-
-
index 819b828..a0c61ca 100644 (file)
@@ -2,7 +2,7 @@ Compiling Interface APIs FOR Android:
 ===================================
 •Preconditons :
 •Supported version : 5.0 ( Lollipop )
-•Required NDK version : android-ndk-r10d ( https://developer.android.com/tools/sdk/ndk/index.html )
+•Required NDK version : android-ndk-r10e ( https://developer.android.com/tools/sdk/ndk/index.html )
 
 Building CA Library for android :
 
index 90d46ab..c01e1b7 100644 (file)
@@ -52,7 +52,7 @@ Steps to build and deploy Easysetup Mediator in Android platform
         <iotivity-root>/service/easy-setup/mediator/richsdk/android
 
     d) Execute NDK-Build with the following command to cross compiled Easysetup JNI .so files
-       <iotivity>/extlibs/android/ndk/android-ndk-r10d/ndk-build
+       <iotivity>/extlibs/android/ndk/android-ndk-r10e/ndk-build
 
     e) Step (d) will generate cross compiled Easysetup JNI .so files in the following folder
        <iotivity>/service/easy-setup/mediator/richsdk/android/libs/armeabi
index 78d675f..234fcf4 100644 (file)
@@ -44,9 +44,9 @@ if [ ! -d ${ANDROID_NDK} ]
 then
        mkdir -p ${ANDROID_NDK}
        pushd ${ANDROID_NDK}
-       wget_if_not_exists "android-ndk-r10d-linux-x86_64.bin" http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin
-       chmod a+x android-ndk-r10d-linux-x86_64.bin
-       ./android-ndk-r10d-linux-x86_64.bin
+       wget_if_not_exists "android-ndk-r10e-linux-x86_64.bin" http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin
+       chmod a+x android-ndk-r10e-linux-x86_64.bin
+       ./android-ndk-r10e-linux-x86_64.bin
        popd
 fi