I try to figure out some problem caused by thread sync in mips android, I installed valgrind in my mips machine, It is ok when using memcheck, but when I changed the option to --tool=helgrind, logcat says this:
I/start_valgrind.sh( 9328): link_image[2207]: 9329 could not load needed library '/data/local/Inst/lib/valgrind/vgpreload_drd-mips32-linux.so' for '/system/bin/app_process' (mips_relocate_got[1749]: 9329 cannot locate 'sched_yield'...
I located sched_yield in /system/lib/libc.so, but I can't find a way to add it to the link path; I using valgrind-3.10.0 and my android system version is 4.1.
So is it possible to run helgrind/drd in android? Thanks!
Related
I am trying to implement H265 using the x265enc encoder in an android application using GStreamer. I have constructed the pipeline which works when using the terminal and gst-launch-1.0 and videotestsrc. However, when trying to execute the pipeline in android it doesn't work and gives the error gst_error_factory_make: no such element factory "x265enc"! and is unable to build the pipeline due to the element x265enc missing.
I have installed plugins-bad (contains x265enc) on the computer and it is in the android.mk file. When I look in the plugins.mk file I don't see x265 mentioned anywhere (x264 is mentioned and x264enc works). Is this an issue? Is there another way to install x265enc so that android can recognize it?
try to install gst-plugins-ugly-1.0 and it will solve your issue
Is there a way to Load the kernel32.dll library in the Android NDK?
I'm trying to extract the GetTickCount and GetTickCount64 functions out of it, and I get this error when trying to run the LoadLibrary("KERNEL32.DLL"):
Function 'LoadLibrary' could not be resolved
Any suggestions to get the GetTickCount and GetTickCount64?
Android is Linux, not Windows. You need to use Linux APIs. Use clock_gettime instead of GetTickCount (example).
I'm facing problem in file upload in webview in Kitkat(4.4).
As per https://code.google.com/p/android/issues/detail?id=62220 it can't be done in 4.4 due to missing method in new version of webview.
Hence searched and found GeckoView(https://wiki.mozilla.org/Mobile/GeckoView) as alternative for webview.
I followed all steps specified at https://wiki.mozilla.org/Mobile/GeckoView, still project is not running in emulator as well as android device.
I tried downloading and importing sample project Geckobrowser in https://wiki.mozilla.org/Mobile/GeckoView, but it gives compile time error for getCurrentBrowser() method.
I'm using Windows OS. Can anyone please guide me through, not able to know what i'm missing. I'll really great-full for any lead in correct direction.
You must check cpu abi version, and change geckoview_library and geckoview_asset to match the abi.
http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/
From the link, you can download several kinds of geckoview library.
This is a sample.
[DIR] latest-mozilla-central-android-armv6/ 12-Dec-2013 11:50 -
[DIR] latest-mozilla-central-android-r7/ 12-Dec-2013 11:56 -
[DIR] latest-mozilla-central-android-x86/ 12-Dec-2013 11:56 -
[DIR] latest-mozilla-central-android/ 12-Dec-2013 11:56 -
In each folder, download geckoview_library and geckoview_asset.
I have a problem running openCV samples project (3 - 4). Everytime that I run the program, I found the problem "Unforunately OpenCV Manager has stopped" displays in my Android emulator.
The problem occurs everytime that I call
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_3, this, mLoaderCallback);
I followed this page
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
This is the Warning Message that I have
/Applications/eclipse-android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
warning: hidden symbol '__aeabi_atexit' in
./obj/local/armeabi-v7a/libgnustl_static.a(atexit_arm.o) is referenced
by DSO
/Applications/eclipse-android/OpenCV-2.4.3-android-sdk/sdk/native/jni/../libs/armeabi-v7a/libopencv_java.so
Logcat (from OpenCV sample4):
gralloc_goldfish, org.opencv.samples.tutorial4 Emulator without GPU
emulation detected.
Note:
I set java compliance level to 1.6 since I have some problem compiling OpenCV c++ file.
(followed this page: 'Must Override a Superclass Method' Errors after importing a project into Eclipse)
I install adb with both OpenCV_2.4.3_binary_pack_armv7a.apk and OpenCV_2.4.3_Manager_2.0_armeabi-v7a.apk
I used Samsung Galaxy S as my cellphone emulator
I run into the same problem:
hidden symbol '__aeabi_atexit' armeabi-v7a/libgnustl_static.a(atexit_arm.o) is referenced by DSO
I am using the opencv test in jni, with an application that worked before I have added it.
I have tried to change the ARMv7-A machine to armeabi in the "Application.mk'
I have also tried to add all the paths mentioned above to the Project -> Properties -> C/C++ General -> Path and Symbols.
It didn't work.
Thanks to my team leader, I have found the solution:
in Application.mk, You need to change the APP_STL := gnustl_static
to APP_STL := gnustl_shared. This is because the lib apparantly was compiled in shared instead of static.
In addition, add to the loadlibrary area the lib: System.loadLibrary("gnustl_shared");
This should be done in a static area, as followed:
static {
try{
System.loadLibrary("gnustl_shared");
//To do - add your static code
}
catch(UnsatisfiedLinkError e) {
Log.v(TAG, "Native code library failed to load.\n" + e);
}
catch(Exception e) {
Log.v(TAG, "Exception: " + e);
}
}
That's it! it solved my problem...
Hope it helped.
Inbal
Your problem might simply be emulator itself, try to get an actually device to test on.
There are a lot of things that emulator can't handle.
If you use Android 4.2 than change to 4.0.3 or to 4.1. There is a bug about that: http://code.opencv.org/issues/2537
I had problems this days running the two tutorials too.
On my machine I installed OpenCV 2.4.3, Android-sdk-21 and Android-ndk-r8c, Eclipse Juno. I perform my tests on an Asus Transformer tf101g running Android 4.0.3.
When I ran the tutorials it failed with a strange ClassNotFoundException. Checking the project properties I realized that the two projects look for headers in a wrong place. Go to Project -> Properties -> C/C++ General -> Path and Symbols. Here you can see the include directories used in the jni file.
The NDKROOT environment variable was not set in my system and I had to manually set it to point to the NDK root folder.
Then I had to change the stl include from
${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include
to
${NDKROOT}/sources/cxx-stl/gnu-libstdc++/4.6/include
Hope this can help.
I too struggled with this for almost 4 hours, including downgrading target to 4.0.3 but did not work.
The solution was to download the latest openCV manager from google play to your device directly.
I got the same error and thought even though late,the solution might help for some in future.
The error "Unforunately OpenCV Manager has stopped" pops up if its version is not supported by the android device hardware(like armeabi-v7a (ARMv7-A + NEON) or Intel x86,etc). uninstall the current Manager and install the proper one.
Paste the following code before onCreate() Method:
static {
System.loadLibrary("opencv_java3");
}
it worked for me.
So a few days ago I got my hands on an Arduino Mega ADK board, and the last couple of nights I have been setting up my development environment, getting to grips with the tools etc. The tools and libraries all work fine, for example I can get a program written in the Processing IDE to compile and run on an Asus Eee Pad Transformer TF101 running Android 4.03. But when I get it to try to compile and run one of the pre-written examples, it gives me a compiler error:
Android SDK Tools Revision 20
Installed at C:\NVPACK\android-sdk-windows
Project Type: Application
Project Target: Android 2.3.3
API level: 10
Library dependencies:
No Libraries
API<=15: Adding annotations.jar to the classpath.
Merging AndroidManifest files into one.
Manifest merger disabled. Using project manifest only.
No AIDL files to compile.
No RenderScript files to compile.
Generating resource IDs...
Generating BuildConfig class.
BUILD FAILED
C:\NVPACK\android-sdk-windows\tools\ant\build.xml:680: The following error occurred while executing this line:
C:\NVPACK\android-sdk-windows\tools\ant\build.xml:693: Compile failed; see the compiler error output for details.
Total time: 7 seconds
And that's all the console seems to output as well, which is rather frustrating! As far as I'm aware all of my SDK versions, tools and plugins are all up to date. I've tried this using a Linux partition I have on my hard drive and it produces the same error message, although it mentions a problem with the package com.Android.future.UsbAccessory. Given what I've seen, it seems that the problem is with the tools, either my directory structure doesn't match up to what the correct setup is, or something else is wrong :S. If anyone has had similar problems, some help would be smashing! (For the record, my setup was done using the instructions on the Arduino website, although I already had the Android SDK tools installed).
Will Scott-Jackson
It sounds like your haven't added in the support library to your project and/or you haven't downloaded it into your Android SDK.
The ADK1 demokit app targets API Level 10 (Android 2.3.3); That means you need to use the support libraries in your project and that's why the compiler is complaining about level 10 library dependencies not being available. The support libraries are a separate download in the SDK Manager, so you might not have them in your development environment.
In Android API Level 12 and higher, the USB Accessory protocol was added to the framework API, so there are two different ways to use the accessory protocol. So, you don't have to use the support libraries if you are targeting Honeycomb and higher versions, but you'll have to update the demokit app code to make this work.
Hope this helps.
So I've double checked my setup and started working on a project I had in mind, it seems to import the libraries appropriately. So far so good, but when I input:
ArduinoAdkUsb arduino;
void setup() {
arduino = new ArduinoAdkUsb(this);
//Other UI initialisation etc.
}
I get this error:
##name## ##version## by ##author##
FATAL EXCEPTION: Animation Thread
java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager
at cc.arduino.ADKCommunication.<init>(Unknown Source)
at cc.arduino.ArduinoAdkUsb.<init>(Unknown Source)
at
processing.android.test.sketch_120730a.
sketch_120730a.setup(sketch_120730a.java:48)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:856)
After the app has been built and installed onto the Android tablet I am using. Any thoughts how I can over come this? From what I can tell, this has no problem finding com.android.future.usb.manager to compile and install the program, but once it tries to run it can find it.
Based on this tutorial from http://stream.tellart.com/controlling-arduino-with-android/
In the examples RGB_Arduino the name, version and author variables are set at the top of the sketch.
Try adding in this section of code at the top of your arduino sketch just underneath the library imports
// accessory descriptor. It's how Arduino identifies itself to Android
char applicationName[] = "Mega_ADK"; // the app on your phone
char accessoryName[] = "Mega_ADK"; // your Arduino board
char companyName[] = "Freeware";
// make up anything you want for these
char versionNumber[] = "1.0";
char serialNumber[] = "1";
char url[] = "http://labs.arduino.cc/adk/"; // the URL of your app online
//initialize the accessory:
AndroidAccessory usb(companyName, applicationName,
accessoryName,versionNumber,url,serialNumber);