android-ndk

How do I run my packaged binary in my Android app?

南笙酒味 提交于 2021-02-18 03:26:26
问题 I have an Android app that needs to run a custom binary app I wrote. I already built the binary using ndk and packaged it in the apk under res/raw I did something like this to first run the su process. Process process; process = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(process.getOutputStream()); What do I do after this to run the binary from resources? There was another question here that suggested the use of AssetManager but I don't understand how to do it

How do I run my packaged binary in my Android app?

我们两清 提交于 2021-02-18 03:26:09
问题 I have an Android app that needs to run a custom binary app I wrote. I already built the binary using ndk and packaged it in the apk under res/raw I did something like this to first run the su process. Process process; process = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(process.getOutputStream()); What do I do after this to run the binary from resources? There was another question here that suggested the use of AssetManager but I don't understand how to do it

Crash when closing soft keyboard while using native activity

天涯浪子 提交于 2021-02-18 02:29:00
问题 We are developing an indie game for android and would like the user to choose his nickname. We have chosen to use the Native Activity that is provided by the NDK as that seemed to be the easiest way to go. The first problem we've encountered with the keyboard was that the function ANativeActivity_showSoftInput() seems to do nothing at all (as described e.g. here), so we bring up the keyboard using JNI calls to function: static void showKeyboard(Activity activity) { String s = Context.INPUT

Crash when closing soft keyboard while using native activity

旧巷老猫 提交于 2021-02-18 02:25:14
问题 We are developing an indie game for android and would like the user to choose his nickname. We have chosen to use the Native Activity that is provided by the NDK as that seemed to be the easiest way to go. The first problem we've encountered with the keyboard was that the function ANativeActivity_showSoftInput() seems to do nothing at all (as described e.g. here), so we bring up the keyboard using JNI calls to function: static void showKeyboard(Activity activity) { String s = Context.INPUT

Why AVCodecContext extradata is NULL?

拜拜、爱过 提交于 2021-02-11 18:20:02
问题 I am trying to decode h264 video using ffmpeg and stagefright library. I'm using this example. The example shows how to decode mp4 files, but i want to decode only h264 video. Here is piece of my code.. AVFormatSource::AVFormatSource(const char *videoPath) { av_register_all(); mDataSource = avformat_alloc_context(); avformat_open_input(&mDataSource, videoPath, NULL, NULL); for (int i = 0; i < mDataSource->nb_streams; i++) { if (mDataSource->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)

No arm-linux-androideabi-gcc in prebuilts for ndk r21d

二次信任 提交于 2021-02-11 15:02:04
问题 Hi I'm trying to build a custom android kernel. I was told to $ export CROSS_COMPILE=/home/user/adb-fastboot/kernel-custom/android-ndk-r21d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- with nothing after the dash But when I $ make clean && make mrproper I get make: /home/user/adb-fastboot/kernel-custom/android-ndk-r21d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found So when I assume that make

Native Crash tgkill+8 for MediaPlayer (Samsung Oreo 8.0)

会有一股神秘感。 提交于 2021-02-11 12:55:53
问题 We are seeing a weird tgkill native crash for all kinds of Samsung devices with Android Oreo 8.0. #00 pc 000000000006b818 /system/lib64/libc.so (tgkill+8) #01 pc 000000000001df10 /system/lib64/libc.so (abort+88) #02 pc 0000000000007f44 /system/lib64/liblog.so (__android_log_assert+304) #03 pc 0000000000015a94 /system/lib64/libutils.so (_ZN7android6Looper4wakeEv+192) #04 pc 0000000000695368 /system/framework/arm64/boot-framework.oat (android.os.Binder.restoreCallingIdentity [DEDUPED]+152) #05

Failed to cross-compile library from Windows to Android

◇◆丶佛笑我妖孽 提交于 2021-02-11 07:13:13
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Failed to cross-compile library from Windows to Android

别等时光非礼了梦想. 提交于 2021-02-11 07:10:51
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Failed to cross-compile library from Windows to Android

爷,独闯天下 提交于 2021-02-11 07:09:22
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5