android-ndk

Android: error: use of undeclared identifier 'fseeko'

北战南征 提交于 2020-02-25 04:00:33
问题 When I am trying to build a boost library in Android using its source code, I am getting below error release|armeabi-v7a : D:/Android/Sdk/ndk->bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\fstream:969:9: release|armeabi-v7a : error: use of undeclared identifier 'fseeko' release|armeabi-v7a : if (fseeko(__file_, __sp, SEEK_SET)) Below is my CMake externalNativeBuild { cmake { cppFlags "-std=c++14 -frtti -fexceptions -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"

How to store secretkey in Android securely?

左心房为你撑大大i 提交于 2020-02-22 06:28:45
问题 I'm reading about store a secretkey (to encrypt/to decrypt data) and seems there is no way achieve that. One can only increase difficult for an attacker accomplish this. It's really like that? What I've got so far: Store in shared preference ( private mode ) - Rooted phone will be able to retrieve it. NDK C/C++ native code, create .so file - Hard to decompile, but one could call this .so file and retrieve it. A webserver to store the key, looks useless, if a have to send credentials, a

How to store secretkey in Android securely?

被刻印的时光 ゝ 提交于 2020-02-22 06:28:32
问题 I'm reading about store a secretkey (to encrypt/to decrypt data) and seems there is no way achieve that. One can only increase difficult for an attacker accomplish this. It's really like that? What I've got so far: Store in shared preference ( private mode ) - Rooted phone will be able to retrieve it. NDK C/C++ native code, create .so file - Hard to decompile, but one could call this .so file and retrieve it. A webserver to store the key, looks useless, if a have to send credentials, a

Firebase Crashlytics Android NDK: empty symbols on crash reports

独自空忆成欢 提交于 2020-02-22 05:28:04
问题 I have a project in Android Studio that consist on Android Java Services that uses some native libraries through JNI calls. Basically, I have 2 libraries I compile and another library that is precompiled, so I don't have access to the source code. As the precompiled library is only built for armeabi-v7a, I have an abiFilter. Here, my /build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter()

Problems compiling avahi into Android NDK project

寵の児 提交于 2020-02-12 02:38:09
问题 Over the last few days I've been having a difficult time trying to build avahi into a static or shared library for use with an existing Android NDK project. We have a few games in the App and Play stores and my task is to get multiplayer working in the Android versions. Specifically the task involves replacing the Bonjour component so that these games can connect to each other via zeroconf. Research seemed to indicate that avahi is the lib that we're looking for, but at this point I'm open to

cmake - Creating a shared arm library which can be used in Android

拈花ヽ惹草 提交于 2020-02-06 08:13:06
问题 I have a project which has armeabi-v7a folder and uses libssl.a and libcrypto.a libraries. Now i am able to compile the project with the source code c++ files and use that into a project. Now i want cmake to create a shared library which i can use in any other project. I don't have much knowledge of cmake What i have tried? cmake -DCMAKE_TOOLCHAIN_FILE=$(NDK_PATH)/build/cmake/android.toolchain.cmake -DANDROID_NDK=$(NDK_PATH) -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-21 -DANDROID

cmake - Creating a shared arm library which can be used in Android

爱⌒轻易说出口 提交于 2020-02-06 08:12:40
问题 I have a project which has armeabi-v7a folder and uses libssl.a and libcrypto.a libraries. Now i am able to compile the project with the source code c++ files and use that into a project. Now i want cmake to create a shared library which i can use in any other project. I don't have much knowledge of cmake What i have tried? cmake -DCMAKE_TOOLCHAIN_FILE=$(NDK_PATH)/build/cmake/android.toolchain.cmake -DANDROID_NDK=$(NDK_PATH) -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-21 -DANDROID

sigemptyset() NDK UnsatisfiedLinkError dlopen()

ぐ巨炮叔叔 提交于 2020-02-05 08:32:46
问题 A certain C-code in my Android NDK application, calls the sigemptyset() function defined in the signal.h. I am building my project using the NDK-r9 . My library file called "libnative-service.so" is built fine, after the c-code is compiled. But on running the application i get the following error regarding the refernce to sigemptyset() . Am i missing something ?? 09-22 15:13:09.102: E/art(3718): dlopen("/data/app-lib/com.project/libnative-service.so", RTLD_LAZY) failed: dlopen failed: cannot

Firebase Crashlytics does not support NDK?

可紊 提交于 2020-02-05 07:31:04
问题 When you want to use Crashlytics NDK , you need call Fabric.with(this, new Crashlytics(),new CrashlyticsNdk()); But Firebase Crashlytics calls Fabric.with(context, new Kit[]{new Crashlytics()}); on startup. As the result you cannot use Crashlytics NDK. How can I avoid this problem? public class CrashlyticsInitProvider extends ContentProvider { private static final String TAG = "CrashlyticsInitProvider"; public CrashlyticsInitProvider() { } public boolean onCreate() { Context context = this

Change function name in a .so library

 ̄綄美尐妖づ 提交于 2020-02-05 04:33:04
问题 I only have 1 .so file from old project. How can I use this file without creating the same package in project or module ? 回答1: Actually, you don't need to change function name in .so file. You can use dlopen to load your .so library dynamically at runtime and dlsym to get pointer for you YOUR_FUNCTION_NAME() and then call YOUR_FUNCTION_NAME() by pointer. For do that in your current project you can create "wrapper" like that: public class OldSoHelper { public static native void loadOldSo();