Invalid ELF file - android

if I run my application on Android I always get this error and the application crashes immediately:
03-25 14:29:44.011 1833 7290 I ActivityManager: START u0 {flg=0x10000000 cmp=cz.jech.muzika/.Muzika} from uid 2000
03-25 14:29:44.093 1833 1998 I ActivityManager: Start proc 17399:cz.jech.muzika/u0a464 for activity cz.jech.muzika/.Muzika
03-25 14:29:44.098 17399 17399 E cz.jech.muzika: Not starting debugger since process cannot load the jdwp agent.
03-25 14:29:44.193 1833 2400 I WindowManager: SURFACE show Surface(name=Splash Screen cz.jech.muzika)/#0xbe60fc9: Splash Screen cz.jech.muzika
03-25 14:29:44.298 14007 17395 D InstalledAppProviderSer: insertAppIntoDb cz.jech.muzika
03-25 14:29:44.302 17399 17414 E AndroidRuntime: Process: cz.jech.muzika, PID: 17399
03-25 14:29:44.302 17399 17414 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: invalid ELF file "/data/app/cz.jech.muzika-iMRmvRSnmwPpVhRlaZJJwg==/lib/arm64/libswscale.so" load segment[4]: p_offset (0x41000) + p_filesz (0x0) ( = 0x41000) past end of file (0x40910)
03-25 14:29:44.306 1833 9531 W ActivityManager: Force finishing activity cz.jech.muzika/.Muzika
03-25 14:29:44.327 1833 4076 I ActivityManager: Process cz.jech.muzika (pid 17399) has died: vis TOP
03-25 14:29:44.336 1140 1237 W SurfaceFlinger: Attempting to destroy on removed layer: AppWindowToken{485887d token=Token{1c63ed4 ActivityRecord{a8f0c27 u0 cz.jech.muzika/.Muzika t4527}}}#0
What could be the root cause of the error? The ffmpeg libraries I use are from here. What does the error "invalid ELF file" mean?

The file /lib/arm64/libswscale.so is corrupt. In particular, it has a PT_LOAD segment with offset that is past the end of the file (file size is 0x40910) and has 0 length.
One way the file may have become corrupt is if you did an FTP transfer and forgot to set binary mode. (Of course there are numerous other ways, such as decompressing the archive and running out of disk space.)
Your best bet is to re-extract the archive, check the length and md5sum of the file, and use scp or something other than ASCII FTP transfer, then verify that the md5sum is still the same on the target device.

Related

Page does not render completely and keeps on flickering through appium but renders correctly when done manually

I have a test case scenario to add medicine to a cart as below:
send medicine name in textbox
from the search results select the medicine by clicking ADD button
verify add medicine
Issue: When I click on the add button in step 2, the medicine gets added, but the page starts to flicker i.e. page keeps on rendering or refreshing (I don't know what to call in exactly), and so I am not able to perform the next steps.
One more concern is that the same scenario works perfectly when executed manually. The issue occurs only for execution done via appium. If I stop the appium server at the point where issue occurs, the flickering stops.
So seems to me like appium is messing something up.
My Android app is React Native app.
At the point of failure I can see below failure in adb logs:
Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
ADB logs:
09-19 15:20:05.274 2132 2132 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-19 15:20:05.690 2132 2132 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-19 15:20:10.719 2132 2132 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-19 15:20:10.770 15240 15240 I chatty : uid=10105(com.medlife.customer) expire 5 lines
09-19 15:20:10.784 2132 2132 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-19 15:20:10.809 2132 2132 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-19 15:20:10.916 2132 2132 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
ADB logs while executing on real device:
09-26 16:11:30.314 775 775 D SurfaceFlinger: duplicate layer name: changing com.medlife.customer/com.medlife.customer.MainActivity to com.medlife.customer/com.medlife.customer.MainActivity#1
09-26 16:11:30.524 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 45 lines
09-26 16:11:30.611 775 1301 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen com.medlife.customer#0
09-26 16:11:30.611 775 1301 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen com.medlife.customer#0
09-26 16:11:32.669 30011 30132 I chatty : uid=10273(com.medlife.customer) expire 5 lines
09-26 16:11:32.695 30011 30134 I chatty : uid=10273(com.medlife.customer) expire 4 lines
09-26 16:11:32.980 775 1301 W SurfaceFlinger: Attempting to set client state on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-26 16:11:32.980 775 1301 W SurfaceFlinger: Attempting to destroy on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-26 16:11:33.313 30011 30022 I chatty : uid=10273(com.medlife.customer) expire 3 lines
09-26 16:11:33.317 30011 30020 I chatty : uid=10273(com.medlife.customer) expire 36 lines
09-26 16:11:43.478 30011 30011 I chatty : uid=10273(com.medlife.customer) expire 12 lines
09-26 16:11:46.282 1451 1644 D ActivityManager: handleProcessStartedLocked mDoneFinishBooting && app.pid != 0 ---> notifyProcessStart, app.processName = android:ui, app.info = ApplicationInfo{58c1294 android}, app.hostingType = activity, getHostingName() = ComponentInfo{android/com.android.internal.app.ChooserActivity}, getIntentFlag() = 0, getIsPackageRunning() = false, app = ProcessRecord{ae3a8d2 30232:android:ui/1000}, getExtraData() = Bundle[{ACTIVITY_TASK_AFFINITY=android, ACTIVITY_INTENT=Intent { act=android.intent.action.CHOOSER flg=0x800000 cmp=android/com.android.internal.app.ChooserActivity (has extras) }, CALLER_PACKAGE=com.medlife.customer, ACTIVITY_INFO=ActivityInfo{382be16 com.android.internal.app.ChooserActivity}}]
09-26 16:11:47.830 1451 1714 D AR_ADV_APPS_USAGE_COL: com.medlife.customer -> resizable apps -> USAGE 17406
09-26 16:11:51.603 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 624 lines
09-26 16:11:54.508 30011 30011 I chatty : uid=10273(com.medlife.customer) expire 1 line
09-26 16:11:54.619 2492 2492 I AndroidIME: PasswordIme.onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Show : AutoCorrection = Disable : Microphone = Show : NoPersonalizedLearning = Disable
09-26 16:11:54.798 2492 2492 I ConversationToQueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-26 16:11:55.057 2492 2492 I AndroidIME: LatinIme.onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : NoPersonalizedLearning = Disable
09-26 16:11:55.191 2492 2492 I ConversationToQueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-26 16:11:59.524 30011 30020 I chatty : uid=10273(com.medlife.customer) expire 3 lines
09-26 16:12:09.589 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 541 lines
09-26 16:12:23.113 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 21 lines
09-26 16:12:30.807 1451 2766 I ActivityManager: Force stopping com.medlife.customer appid=10273 user=0: from pid 30567
09-26 16:12:30.812 1451 2766 I ActivityManager: Killing 30011:com.medlife.customer/u0a273 (adj 0): stop com.medlife.customer
09-26 16:12:30.818 1451 2766 W ActivityManager: Force removing ActivityRecord{4610f1b u0 com.medlife.customer/.MainActivity t24974}: app died, no saved state
09-26 16:12:30.926 1451 1714 D AR_ADV_APPS_USAGE_COL: com.medlife.customer -> resizable apps -> USAGE 38817
09-26 16:12:31.912 1451 4565 I ActivityManager: Force stopping com.medlife.customer appid=10273 user=0: from pid 30594
09-26 16:13:41.434 3974 31010 D PowerCalculator: topApCounter com.medlife.customer
09-26 16:13:41.434 3974 31010 D PowerCalculator: topApCounter com.medlife.customer
09-26 16:13:41.434 3974 31010 D PowerCalculator: topApCounter com.medlife.customer
ADB logs post after disabling:
09-30 12:43:17.696 1992 3969 I ActivityManager: Force stopping com.medlife.customer appid=10102 user=0: from pid 5797
09-30 12:43:17.697 1992 3969 I ActivityManager: Killing 5609:com.medlife.customer/u0a102 (adj 0): stop com.medlife.customer
09-30 12:43:17.709 1992 3969 W ActivityManager: Force removing ActivityRecord{8440c12 u0 com.medlife.customer/.MainActivity t113}: app died, no saved state
09-30 12:43:18.010 1992 3969 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.medlife.customer/.MainActivity} from uid 2000
09-30 12:43:18.174 1992 2012 I ActivityManager: Start proc 5800:com.medlife.customer/u0a102 for activity com.medlife.customer/.MainActivity
09-30 12:43:18.505 5800 5819 I FA : adb shell setprop debug.firebase.analytics.app com.medlife.customer
09-30 12:43:18.975 5800 5879 I edlife.custome: Thread[44,tid=5879,Native,Thread*=0x75721b54ec00,peer=0x12fd1880,"create_react_context"] recursive attempt to load library "/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/lib/x86_64/libfb.so"
09-30 12:43:19.225 5800 5891 D : Successfully queried cache dir: /data/user_de/0/com.medlife.customer/code_cache
09-30 12:43:19.226 5800 5891 D RenderScript: Setting cache dir: /data/user_de/0/com.medlife.customer/code_cache
09-30 12:43:19.433 1928 1928 D SurfaceFlinger: duplicate layer name: changing com.medlife.customer/com.medlife.customer.MainActivity to com.medlife.customer/com.medlife.customer.MainActivity#1
09-30 12:43:19.614 5800 5883 I edlife.custome: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk"],nativeLibraryDirectories=[/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/lib/x86_64, /data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk!/lib/x86_64, /system/lib64]]
09-30 12:43:19.616 5800 5883 I edlife.custome: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk"],nativeLibraryDirectories=[/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/lib/x86_64, /data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk!/lib/x86_64, /system/lib64]]
09-30 12:43:19.694 1992 2018 I ActivityManager: Displayed com.medlife.customer/.MainActivity: +1s549ms
09-30 12:43:21.337 1928 2346 W SurfaceFlinger: Attempting to set client state on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-30 12:43:21.337 1928 2346 W SurfaceFlinger: Attempting to destroy on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-30 12:43:23.086 5800 5952 E cr_VariationsUtils: Failed reading seed file "/data/user/0/com.medlife.customer/app_webview/variations_seed": /data/user/0/com.medlife.customer/app_webview/variations_seed (No such file or directory)
09-30 12:43:34.090 2128 2128 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-30 12:43:34.395 2128 2128 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-30 12:43:37.846 2128 2128 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-30 12:43:37.856 2128 2128 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-30 12:43:38.429 2128 2128 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-30 12:43:38.465 2128 2128 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-30 12:46:28.724 1992 2665 I ActivityManager: Force stopping com.medlife.customer appid=10102 user=0: from pid 6074
09-30 12:46:28.724 1992 2665 I ActivityManager: Killing 5800:com.medlife.customer/u0a102 (adj 0): stop com.medlife.customer
09-30 12:46:28.725 1992 2665 W ActivityManager: Force removing ActivityRecord{f56adcb u0 com.medlife.customer/.MainActivity t114}: app died, no saved state
09-30 12:46:29.671 1992 2666 I ActivityManager: Force stopping com.medlife.customer appid=10102 user=0: from pid 6091
You need to increase the RAM and internal storage size that you are assigning to the emulator in order for that exception to go away. You are trying to do some action in the android code that's eating up the emulator's RAM and internal memory.

Android app crashes instantly after adding RealmReactPackage

I followed the instructions from the realm page and did these steps:
npm install realm
react-native link realm --> For iOS everything works out without any further steps at this point.
Opened android studio and updated changes in settings.gradle, app/build.gradle and imported the RealmReactPackage in MainApplication.java
If I build and start the app, everything is working out fine. Then I add new RealmReactPackage() to the list to the other ReactPackages.
If I start the app now, the app crashes immediately. The logcat doesn't say any reason for the crash, but I add the output anyways below.
Things I tried already:
Clear caches
Restart packager
Deinstall app from emulator
Clear node-modules and run npm install again and repeat the steps from above
My setup:
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-navigation": "v2.0.1937"
Node version 9.5.0
Android Studio version: 3.1.3
What I didn't do so far:
There is one instruction at the realm site under Examples:
Note that on Android, you need the NDK installed and must have set the ANDROID_NDK environment variable.
export ANDROID_NDK=/usr/local/Cellar/android-ndk/r10e
My Question is, is this relevant for my config or just for the examples?
LogCat Output:
07-03 17:51:04.909 1664 1676 I ActivityManager: START u0 {flg=0x10100000 cmp=com.cowoperation/.MainActivity} from uid 2000
07-03 17:51:04.938 1664 2392 I ActivityManager: Start proc 32299:com.cowoperation/u0a91 for activity com.cowoperation/.MainActivity
07-03 17:51:05.319 32299 32325 V FA : App package, google app id: com.cowoperation, 1:314188610363:android:2d8c823aa5045bd7
07-03 17:51:05.320 32299 32299 V fb-UnpackingSoSource: locked dso store /data/user/0/com.cowoperation/lib-main
07-03 17:51:05.320 32299 32325 I FA : adb shell setprop debug.firebase.analytics.app com.cowoperation
07-03 17:51:05.320 32299 32299 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.cowoperation/lib-main
07-03 17:51:05.321 32299 32299 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.cowoperation/lib-main
07-03 17:51:05.654 32299 32345 I zygote : Thread[30,tid=32345,Native,Thread*=0x88b19a00,peer=0x13214b48,"Thread-8"] recursive attempt to load library "/data/app/com.cowoperation-gxY-ptC8QV3xKg796vAtEA==/lib/x86/libfb.so"
07-03 17:51:05.808 1664 1690 I ActivityManager: Displayed com.cowoperation/.MainActivity: +878ms
07-03 17:51:05.880 32299 32325 V FA : Event recorded: Event{appId='com.cowoperation', name='screen_view(_vs)', params=Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-6439080053319785913}]}
07-03 17:51:05.979 32299 32345 E AndroidRuntime: Process: com.cowoperation, PID: 32299
07-03 17:51:05.979 32299 32345 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN5realm8jni_util9hack_initEv" referenced by "/data/app/com.cowoperation-gxY-ptC8QV3xKg796vAtEA==/lib/x86/librealmreact.so"...
07-03 17:51:05.980 32299 32345 E UncaughtException: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN5realm8jni_util9hack_initEv" referenced by "/data/app/com.cowoperation-gxY-ptC8QV3xKg796vAtEA==/lib/x86/librealmreact.so"...
07-03 17:51:06.074 32299 32325 V FA : Event recorded: Event{appId='com.cowoperation', name='app_exception(_ae)', params=Bundle[{firebase_event_origin(_o)=crash, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-6439080053319785913, timestamp=1530633065983, fatal=1}]}
07-03 17:51:06.153 32299 32325 V FA : Event recorded: Event{appId='com.cowoperation', name='user_engagement(_e)', params=Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=596, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-6439080053319785913}]}
07-03 17:51:06.359 1664 2392 W ActivityManager: Force finishing activity com.cowoperation/.MainActivity
07-03 17:51:06.373 1664 1684 I ActivityManager: Showing crash dialog for package com.cowoperation u0
07-03 17:51:06.569 32299 32325 V FA : Event recorded: Event{appId='com.cowoperation', name='user_engagement(_e)', params=Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=266, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-6439080053319785913}]}

Android O HIDL not available

I have problem with Android O HIDL. The failure log shows it can't find out the service.
However I can see it by adb shell ps -A | grep fingerprint
system 18758 1 17408 3276 pipe_wait 7c79e93e08 R android.hardware.biometrics.fingerprint#2.1-service`
Could anyone give me a hint how to solve the problem? I checked https://source.android.com/devices/architecture/hidl/ but could not get the solution.
Error log:
08-21 06:00:35.864 1890 2264 V FingerprintService: mDeamon was null, reconnect to fingerprint
08-21 06:00:35.864 1890 2264 I system_server: Looking for service android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint/default
08-21 06:00:35.864 2240 2240 D wpa_supplicant: nl80211: Set mode ifindex 24 iftype 2 (STATION)
08-21 06:00:35.866 566 566 W /system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint in either framework or device manifest, using default transport.
08-21 06:00:35.866 1890 2264 E system_server: service android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint declares transport method EMPTY but framework expects hwbinder.
08-21 06:00:35.867 1890 2264 E FingerprintService: Failed to get biometric interface
08-21 06:00:35.867 1890 2264 E FingerprintService: android.os.RemoteException: HwBinder Error: (-2147483648)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.HwBinder.getService(Native Method)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint.getService(IBiometricsFingerprint.java:44)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService.getFingerprintDaemon(FingerprintService.java:239)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService$FingerprintServiceWrapper.isHardwareDetected(FingerprintService.java:1198)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.fingerprint.IFingerprintService$Stub.onTransact(IFingerprintService.java:156)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.Binder.execTransact(Binder.java:674)
08-21 06:00:35.867 1890 2264 W FingerprintService: fingerprint HIDL not available
I've succeeded in running my fingerprint HAL on Android 8.1 executing on HiKey
96 board after modified files as below.
Firstly, it's necessary that adding HIDL configures to declare a device as a vendor or you would get VTS failed.
About HIDL configures
device/linaro/hikey/manifest.xml
+<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<version>2.1</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>
Secondly, finger service will be started after you define it in the file below.
device/linaro/hikey/device-common.mk
+#init finger service and copy
android.hardware.biometrics.fingerprint#2.1-service.rc to
system/vendor/etc/init
+PRODUCT_PACKAGES += \
+android.hardware.biometrics.fingerprint#2.1-service
+# copy permission file of finger service
+PRODUCT_COPY_FILES += \
+frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc
/permissions/android.hardware.fingerprint.xml
Finally, check finger service has been started and running in Android system by using terminal commands such as "adb shell" and "ps | grep finger".
Any suggestion is welcome.
I found out that I need to add the code to the manifest.xml
(Ref. https://source.android.com/devices/architecture/vintf/objects )
<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<impl level="generic"></impl>
<version>2.1</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>

Cannot execute HelloJni app with Valgrind

I am trying to analyse a simple HelloJni project (built in Android Studio) using Valgrind and I am facing some troubles in the final steps when executing the application with Valgrind.
I am developing on a Nexus 4 device with Android 5.1.
Installation info:
I have used the "build_valgrind.sh" script to cross-compile valgrind (for api android-21) and to copy it to /data/local/Inst.
I have also copied "start_valgrind.sh" to /data/local/ folder, giving all permissions ("chmod 777) to the script.
Then I set properties to the HelloJni app.
adb shell "su -c 'setprop wrap.com.example.hellojni \"logwrapper /data/local/start_valgrind.sh \"'"
The actual problem comes when I try to execute the app:
adb shell "su -c 'am start -a android.intent.action.MAIN -n com.example.hellojni/.HelloJni'"
The logcat output I get is posted at the end.
When I execute the HelloJni app without setting logwrapper properties, it executes as expected. I am not sure what I am doing wrong, but it looks as if I have problems with "CheckJNI is OFF". Has someone been able to execute any application with this approach? Any help will be appreciated.
logcat_output
--------- beginning of main
I/Finsky (19498): [1] com.google.android.finsky.services.j.a(148): Installation state replication succeeded.
E/kickstart( 627): Wrote to /sys/power/wake_lock
E/kickstart( 627): Received file "/dev/block/platform/msm_sdcc.1/by-name/m9kefs1"
E/kickstart( 627): 786432 bytes transferred in 0.185s (4.06 MBps)
E/kickstart( 627): Successfully downloaded files from target
E/kickstart( 627): Wrote to /sys/power/wake_unlock
E/kickstart( 627): Sahara protocol completed
D/AndroidRuntime(22076): >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
D/AndroidRuntime(22076): CheckJNI is OFF
D/AndroidRuntime(22077): >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
D/AndroidRuntime(22077): CheckJNI is OFF
W/app_process32_o(22077): type=1400 audit(0.0:317): avc: denied { write } for name="system#framework#boot.art" dev="mmcblk0p23" ino=185108 scontext=u:r:shell:s0 tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
D/AndroidRuntime(22076): Calling main entry com.android.commands.am.Am
--------- beginning of system
I/ActivityManager(18563): START u0 {act=android.intent.action.MAIN flg=0x10000000 cmp=com.example.hellojni/.HelloJni} from uid 0 on display 0
V/WindowManager(18563): addAppToken: AppWindowToken{385169a4 token=Token{13e037 ActivityRecord{2ce09936 u0 com.example.hellojni/.HelloJni t3}}} to stack=1 task=3 at 0
D/AndroidRuntime(22077): Calling main entry com.android.commands.am.Am
I/art (22110): Late-enabling -Xcheck:jni
I/start_valgrind.sh(22127): valgrind: cannot create log file '/sdcard/valgrind.log.22128': Permission denied
I/start_valgrind.sh(22127): start_valgrind.sh terminated by exit(1)
W/Zygote (18317): Error reading pid from wrapped process, child may have died
W/Zygote (18317): java.io.EOFException
W/Zygote (18317): at libcore.io.Streams.readFully(Streams.java:83)
W/Zygote (18317): at java.io.DataInputStream.readInt(DataInputStream.java:103)
W/Zygote (18317): at com.android.internal.os.ZygoteConnection.handleParentProc(ZygoteConnection.java:979)
W/Zygote (18317): at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:276)
W/Zygote (18317): at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:788)
W/Zygote (18317): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
I/ActivityManager(18563): Start proc 22110:com.example.hellojni/u0a125 for activity com.example.hellojni/.HelloJni
D/AndroidRuntime(22076): Shutting down VM
I/art (22076): Debugger is no longer active
D/AndroidRuntime(22077): Shutting down VM
I/art (22077): Debugger is no longer active
I/Zygote (18317): Process 22110 exited cleanly (1)
W/ActivityManager(18563): Process ProcessRecord{173c48d3 22110:com.example.hellojni/u0a125} failed to attach
I/ActivityManager(18563): Killing 22110:com.example.hellojni/u0a125 (adj -100): start timeout

MVVMCross 3.5.1 and xamarin android does not work

I have a question: is there somebody that use MVVMCross 3.5.1 with Api level android 21 and xamarin studio 5.9.3? I have a problem: I reference mvvmcross in an android app. I have a splashscreen and a firstview. When I tried to start with emulator I don't have any problem with level 15 emulator but when I tried it with the last version (Api 21) the app after splashscreen is closed without any error (not open the firstview).
Is there a solution?
UPDATE
I tried with logcat. In the following I attached the log:
W/AudioTrack( 394): AUDIO_OUTPUT_FLAG_FAST denied by client
I/ActivityManager( 394): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10000000 cmp=com.nowhere.nowhere/md51f5aeae0dbe3
fa3acab67292d41114d1.SplashScreen (has extras)} from uid 10007 on display 0
I/Choreographer( 824): Skipped 67 frames! The application may be doing too muc
h work on its main thread.
I/art ( 1716): Not late-enabling -Xcheck:jni (already on)
I/ActivityManager( 394): Start proc com.nowhere.nowhere for activity com.nowher
e.nowhere/md51f5aeae0dbe3fa3acab67292d41114d1.SplashScreen: pid=1716 uid=10056 g
ids={50056, 9997, 3003} abi=armeabi-v7a
I/Choreographer( 394): Skipped 32 frames! The application may be doing too muc
h work on its main thread.
F/MonoDroid( 1716): shared runtime initialization error: dlopen failed: library
"/data/app/Mono.Android.DebugRuntime-1/lib/arm/lib/libmonosgen-2.0.so" not found
I/Zygote ( 66): Process 1716 exited cleanly (1)
I/ActivityManager( 394): Process com.nowhere.nowhere (pid 1716) has died
I/art ( 1731): Not late-enabling -Xcheck:jni (already on)
I/ActivityManager( 394): Start proc com.nowhere.nowhere for activity com.nowher
e.nowhere/md51f5aeae0dbe3fa3acab67292d41114d1.SplashScreen: pid=1731 uid=10056 g
ids={50056, 9997, 3003} abi=armeabi-v7a
F/MonoDroid( 1731): shared runtime initialization error: dlopen failed: library
"/data/app/Mono.Android.DebugRuntime-1/lib/arm/lib/libmonosgen-2.0.so" not found
I/Zygote ( 66): Process 1731 exited cleanly (1)
I/ActivityManager( 394): Process com.nowhere.nowhere (pid 1731) has died
I/art ( 1746): Not late-enabling -Xcheck:jni (already on)
I/ActivityManager( 394): Start proc com.nowhere.nowhere for activity com.nowher
e.nowhere/md51f5aeae0dbe3fa3acab67292d41114d1.SplashScreen: pid=1746 uid=10056 g
ids={50056, 9997, 3003} abi=armeabi-v7a
F/MonoDroid( 1746): shared runtime initialization error: dlopen failed: library
"/data/app/Mono.Android.DebugRuntime-1/lib/arm/lib/libmonosgen-2.0.so" not found
I/Zygote ( 66): Process 1746 exited cleanly (1)
I/ActivityManager( 394): Process com.nowhere.nowhere (pid 1746) has died
W/ActivityManager( 394): Force removing ActivityRecord{27f513c9 u0 com.nowhere.
nowhere/md51f5aeae0dbe3fa3acab67292d41114d1.SplashScreen t8}: app died, no saved
state
W/WindowManager( 394): Failed looking up window
W/WindowManager( 394): java.lang.IllegalArgumentException: Requested window and
roid.view.ViewRootImpl$W#3c7a1def does not exist
W/WindowManager( 394): at com.android.server.wm.WindowManagerService.wi
ndowForClientLocked(WindowManagerService.java:8412)
W/WindowManager( 394): at com.android.server.wm.WindowManagerService.wi
ndowForClientLocked(WindowManagerService.java:8403)
W/WindowManager( 394): at com.android.server.wm.WindowManagerService.re
moveWindow(WindowManagerService.java:2558)
W/WindowManager( 394): at com.android.server.wm.Session.remove(Session.
java:186)
W/WindowManager( 394): at android.view.ViewRootImpl.dispatchDetachedFro
mWindow(ViewRootImpl.java:2920)
W/WindowManager( 394): at android.view.ViewRootImpl.doDie(ViewRootImpl.
java:5390)
W/WindowManager( 394): at android.view.ViewRootImpl$ViewRootHandler.han
dleMessage(ViewRootImpl.java:3223)
W/WindowManager( 394): at android.os.Handler.dispatchMessage(Handler.ja
va:102)
W/WindowManager( 394): at android.os.Looper.loop(Looper.java:135)
W/WindowManager( 394): at android.os.HandlerThread.run(HandlerThread.ja
va:61)
W/WindowManager( 394): at com.android.server.ServiceThread.run(ServiceT
hread.java:46)
W/InputMethodManagerService( 394): Window already focused, ignoring focus gain
of: com.android.internal.view.IInputMethodClient$Stub$Proxy#14f4aa0b attribute=n
ull, token = android.os.BinderProxy#5c9e508
I/Choreographer( 824): Skipped 56 frames! The application may be doing too muc
h work on its main thread.
D/TaskPersister( 394): removeObsoleteFile: deleting file=8_task.xml
UPDATE 2
The bind does not work. Inside the view..
UPDATE 3
I put the code in this repo:
https://onedrive.live.com/redir?resid=1E563B1D1AD8A1C!15847&authkey=!AII01sfuzToQiUQ&ithint=file%2czip
I used this configuration for the test:
1. Nexus 5,
2. Android 5.0-API Level 21,
3. CPU/ABI, I have chosen Google APIs Intel Atom(x86_64),
4. Use Host GPU.
UPDATE 4
new link for code: http://1drv.ms/1MZWf45
Thanks
Alessandro
I found the problem. The problem was the emulator. I tried to change the configuration and now run without problem.
Thanks
Al.

Categories

Resources