android-ndk

Demonstrating printf or __android_log_print Vulnerabilities With Android NDK

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 08:01:23
问题 I am interested in demoing printf vulnerabilities via an NDK app. To be clear, I am aware that to log in the console we can use __android_log_print(ANDROID_LOG_DEBUG, "LOG_TAG", "Print : %d %s",someVal, someStr); . I have tried it and I know it works. But I explicitly want to demo the vulnerabilities of printf() , specifically to use the %n specifier to write to a pointed location. Is there a way to make printf() work to this effect or is it possible to achieve this via __android_log_print()

getting this error while building Android ndk

不打扰是莪最后的温柔 提交于 2020-01-06 08:00:30
问题 jni/../external/libjpeg/jidctfst.S: Assembler messages: jni/../external/libjpeg/jidctfst.S:66: Error: missing ')' jni/../external/libjpeg/jidctfst.S:66: Error: garbage following instruction -- 'pld (r2,#0)' jni/../external/libjpeg/jidctfst.S:259: Error: missing ')' jni/../external/libjpeg/jidctfst.S:259: Error: garbage following instruction -- 'pld (sp,#32)' jni/../external/libjpeg/jidctfst.S:271: Error: missing ')' jni/../external/libjpeg/jidctfst.S:271: Error: garbage following instruction

Native libs issue starting process command

核能气质少年 提交于 2020-01-06 06:04:32
问题 Error:Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'. A problem occurred starting process 'command 'C:\Users\LENOVO\AppData\Local\Android\Sdk\ndk-bundle\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip'' 回答1: I had a similar problem and the solution was to increase the maximum heap size for both Gradle and Android Studio. Try to put this in your gradle.properties file: org.gradle.jvmargs=-Xms1548m -Xmx6g Also to

Can I set the ndk.dir out of the sdk.dir path, why there is no ndk.dir automatic creation?

霸气de小男生 提交于 2020-01-06 05:45:29
问题 I fetch a project from Windows to my local Mac environment. You see there, under the Gradle Script , the local.properties : ndk.dir=D\:\\sdk\\ndk-bundle sdk.dir=/Users/lisa/software/android-sdk-macosx you see there has the ndk.dir and sdk.dir , the latter is my new Mac SDK path, but the ndk.dir did not change now. from the D\:\\sdk\\ndk-bundle , whether we know the ndk-bundle should be under the sdk path( /Users/lisa/software/android-sdk-macosx )? but in the /Users/lisa/software/android-sdk

Android ndk giving errors while compiling in eclipse

為{幸葍}努か 提交于 2020-01-06 05:40:10
问题 Following is the Android.mk file of my android application in eclipse. LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) OPENCV_CAMERA_MODULES := off OPENCV_MK_PATH:=C:\Users\rabbia\Downloads\OpenCV300androidsdk1\OpenCV-android-sdk\sdk\native\jni\OpenCV.mk OPENCV_LIB_TYPE:=STATIC OPENCV_INSTALL_MODULES:=on include $(OPENCV_MK_PATH) #Profiler #-include android-ndk-profiler.mk #include ../includeOpenCV.mk #ifeq ("$(wildcard $(OPENCV_MK_PATH))","") # #try to load OpenCV.mk from default install

Eigen - Levenberg Marquardt algorithm: invalid template arguments on definition of permutation

孤街浪徒 提交于 2020-01-06 04:32:31
问题 I'm trying to use the Eigen implementation of Levenberg Marquardt algorithm on a Android application. In order to use Eigen, I'm using Android NDK and jni. I've already tested Eigen with simple calculations (like matrix creation and vector sums) and it works perfectly. However, when I tried to use the Levenberg Marquardt algorithm I got some errors on the LevenbergMarquardt.h file from Eigen's library. First, here is my code. I based on this code: Eigen::MatrixXd matrix(count, 3); for (int i

Gradle 2.5 Experimental : include .so library and call from JNI

不羁岁月 提交于 2020-01-06 02:57:10
问题 My problem is that I fail to find some proper documents/guides to follow in order to set up my environment correctly. Basically I am using Android Studio 1.3.2 (latest stable as of 22nd september 2015) with Gradle Experimental version 2.5. I followed Google official documentation here : http://tools.android.com/tech-docs/new-build-system/gradle-experimental but I find no help when it comes to JNI Libs. I tried many other solutions but they do not work because they seem to be obsolete. I have

Error to build native library from Android studio 6.1

匆匆过客 提交于 2020-01-06 02:16:28
问题 Category: Using NDK with Android studio on Windows 7 64-bit MyProject has MyNdkProject native code under MyNDKProject/src/main/jni/ path. .so file gets generated using ndk-build.cmd from Android Studio terminal. However, when executing the complete project it exits with following error from gradle console '"D:\MyProjectPath\find-win-host.cmd"' is not recognized as an internal or external command, operable program or batch file. Error:Execution failed for task ':MyNdkProject:ndkBuild'. >

Android NDK: Static library used is different than precompiled library specified

无人久伴 提交于 2020-01-05 14:59:54
问题 I build a C++ library manually using the Android SDK compiler. The result is libMyUtils.a. I'm using the following in my Java/JNI test application: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := MyUtils LOCAL_SRC_FILES := ../../../../libs/libMyUtils.a include $(PREBUILT_STATIC_LIBRARY) LOCAL_MODULE := AndroidTests LOCAL_STATIC_LIBRARIES := MyUtils include $(BUILD_SHARED_LIBRARY) When I build the console shows the following: [armeabi] Install : libMyUtils.so => libs/armeabi

std::strtoull not recognized under my JNI NDK environment

十年热恋 提交于 2020-01-05 12:30:20
问题 i use some c++ code under android project by using JNI. But always it give an alert saying that : jni/sample.cpp: In function 'int Java_com_android_mymapsforge_create(JNIEnv*, jo bject)': jni/sample.cpp:78:14: error: 'strtoull' is not a member of 'std' jni/sample.cpp:78:14: note: suggested alternative: C:/TDDOWNLOAD/adt-bundle-windows-x86_64-20130729/ndk/android-ndk-r9/platforms/an droid-14/arch-arm/usr/include/stdlib.h:66:27: note: 'strtoull' make: *** [obj/local/armeabi/objs/ann/sample.o]