native

native java bytecode instrumentation

我是研究僧i 提交于 2019-12-21 05:13:23
问题 for bytecode instrumentation in java, there is the asm framework and the bcel and javaassist libraries. However I need to do instrumentation in native code, since some java classes are already loaded by the time the javaagent runs, eg java.lang.Thread, java.lang.Class, etc is there any library for instrumenting java classes in native code? Edit: Seems there is a bit of confusion. What I want is: Create a native java agent, which uses JVMTI apis to change the bytecode of a class while its

LD_LIBRARY_PATH ignored on Android sometimes

纵然是瞬间 提交于 2019-12-21 02:56:10
问题 i have an android app which spawns many native executables dinamically linked with libraries i distribute with the package. To launch those binaries, i use the LD_LIBRARY_PATH environment variable to make them aware of the place to load the libraries from, but on some devices this doesn't work at all, the LD_LIBRARY_PATH is correctly updated but the binary fails to find the library anyway. This is not something i can reproduce because on my two devices ( Galaxy Nexus & Nexus 7 with stock roms

Native crash in /system/lib/libart.so

大憨熊 提交于 2019-12-20 18:34:08
问题 I have an app on the Play Store, it has an IntentService that does some work when the app starts, and it's causing native crashes on Android 5.0. This service just scans the assets folder for app updating purposes. Specifically, this crash seems to happen on Samsung S5 after the ugrade to Lollipop, but I don't know if it's strictly related to that device, as it's an Italian app and here that's still the only widely diffuse (i.e. that I know of) device that's getting Lollipop. However, I tried

Gdb debug the native (not jni) program on android

两盒软妹~` 提交于 2019-12-20 10:55:36
问题 I failed to debug the native program with NDK toolchain. Follows are my detailed steps and output. Env Setting: NDK_ROOT=/opt/android/ndk SYSROOT=$NDK_ROOT/platforms/android-8/arch-arm TOOLCHAIN=$NDK_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin PATH=$TOOLCHAIN:$NDK_ROOT:$PATH Source: hello.c 1 #include <stdio.h> 2 3 int main() { 4 printf("Hello World!\n"); 5 return 0; 6 } Build by the standalone toolchain provied by NDK. #arm-linux-androideabi-gcc -g hello.c -o hello -

Convert Existing PHP/MYSQL/ website to Native IOS/Android Apps

此生再无相见时 提交于 2019-12-20 10:09:14
问题 Weeks of searching and worked on a few guides to convert my existing hosted PHP/MYSQL website to Native IOS/Android Apps. So far no good result. Tried Phonegap and Cordova too. Searches from the past years back to 2009 stated it is not possible. Is it possible now? Can share a complete guide or e-book for it? The app will be just a direct link to my php website. The app is actually acting like a browser. This is my very first app. http://tech.sarathdr.com/featured/steps-to-convert-a-web-app

SetThreadName not working with Visual Studio 2005

允我心安 提交于 2019-12-20 07:27:33
问题 SetThreadName does not set thread name with Visual Studio 2005, when used as below: DWORD threadId; HANDLE handle = CreateThread(NULL, stackSize, ThreadFunction, ThreadParam, CREATE_SUSPENDED, &threadId); if (handle) { SetThreadName(threadId, "NiceName"); ResumeThread(handle); } After opening the Threads window, instead of NiceName I can see the name of the ThreadFunction there. Other tools (like Intel Parallel Inspector) use NiceName as expected. Is something wrong with the code above? Does

Using opencv FileStorage native in android

╄→гoц情女王★ 提交于 2019-12-20 07:21:45
问题 I am trying to write an android applications witch calculates keypoints and descriptors using opencv and store them. However i am getting troubles with cv:FileStorage. I am actually passing the file path throw native methods. The same path (different file ending) is also used to store another file on the javaside. JNIEXPORT void JNICALL Java_com_..._CalcFeatures(JNIEnv* env, jobject, jlong addrGray, jstring location){ ... const char *nativeString = env->GetStringUTFChars(location, NULL);

Can c# compiled app run on machine where .net is not installed?

会有一股神秘感。 提交于 2019-12-20 01:35:06
问题 I want to develop a small utility for windows and I prefer doing that in c# because it is easier (I'm a java developer). The utility will be available for download by many people and I assume some of them will not have the .net framework installed (is this assumption correct, say I target win xp and above?) My question is: can a c# application be compiled in a way that it will not require the .net framework installed? 回答1: Normally, you will need the .NET Framework being installed on the

React Native - Disable “Screen Size” Setting

大城市里の小女人 提交于 2019-12-19 19:58:37
问题 I am currently developing a React Native application, and some of our users might have slight vision problems. We wish to prevent the setting "Display Size" in Android, as this makes our app unusable. We solved the problem with the Font Size using the simple line: Text.defaultProps.allowFontScaling=false; Is there a similar solution to the Display Size setting? Thanks in advance 回答1: You can control using flex property in view. Use to below to the parent view and adjust the flex value from 0

Memcpy of native array to managed array in C++ CLI

自古美人都是妖i 提交于 2019-12-19 16:35:07
问题 Am I doing this right? I get a pointer to a native array and need to copy to a managed array. Use memcpy() with a pin_ptr. unsigned char* pArray; unsigned int arrayCount; // get pArray & arrayCount (from a COM method) ManagedClass->ByteArray = gcnew array<Byte,1>(arrayCount) pin_ptr<System::Byte> pinPtrArray = &ManagedClass->ByteArray[0]; memcpy_s(pinPtrArray, arrayCount, pArray, arrayCount); arrayCount is the actual length of pArray, so not really worried about that aspect. Looked at the