Xamarin: Couldn't find "libmonodroid.so" emulator error - android

I've been getting this problem for a couple days and haven't found a solution yet.
I've been using an Android 7.0 ARM (armeabi-v7a) image for my emulator. Because it's so painfully slow, I've been trying to use Android 7.0 Intel Atom (x86_64) with HAXM but I get the following error when opening the app.
AndroidRuntime: java.lang.UnsatisfiedLinkError:
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/SiteToolsMobile.
Droid-1/base.apk"],nativeLibraryDirectories=[/data/app/SiteToolsMobile.Droid-1/l
ib/x86_64, /data/app/SiteToolsMobile.Droid-1/base.apk!/lib/x86_64, /vendor/lib64
, /system/lib64]]] couldn't find "libmonodroid.so"
The full logcat can be seen here-
--------- beginning of system
10-26 10:30:39.317 1534 1545 I ActivityManager: START u0 {act=android.intent.a
ction.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=SiteToolsMo
bile.Droid/md5988fcde8450a201101ada904f480bb79.SplashActivity (has extras)} from
uid 10007 on display 0
--------- beginning of main
10-26 10:30:39.360 2778 2778 I art : Not late-enabling -Xcheck:jni (alread
y on)
10-26 10:30:39.368 1534 1715 I ActivityManager: Start proc 2778:SiteToolsMobil
e.Droid/u0a56 for activity SiteToolsMobile.Droid/md5988fcde8450a201101ada904f480
bb79.SplashActivity
10-26 10:30:39.395 2778 2778 D AndroidRuntime: Shutting down VM
--------- beginning of crash
10-26 10:30:39.395 2778 2778 E AndroidRuntime: FATAL EXCEPTION: main
10-26 10:30:39.395 2778 2778 E AndroidRuntime: Process: SiteToolsMobile.Droid,
PID: 2778
10-26 10:30:39.395 2778 2778 E AndroidRuntime: java.lang.UnsatisfiedLinkError:
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/SiteToolsMobile.
Droid-1/base.apk"],nativeLibraryDirectories=[/data/app/SiteToolsMobile.Droid-1/l
ib/x86_64, /data/app/SiteToolsMobile.Droid-1/base.apk!/lib/x86_64, /vendor/lib64
, /system/lib64]]] couldn't find "libmonodroid.so"
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at java.lang.Runtime.loa
dLibrary(Runtime.java:367)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at java.lang.System.load
Library(System.java:1076)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at mono.MonoPackageManag
er.LoadApplication(MonoPackageManager.java:34)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at mono.MonoRuntimeProvi
der.attachInfo(MonoRuntimeProvider.java:42)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT
hread.installProvider(ActivityThread.java:5153)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT
hread.installContentProviders(ActivityThread.java:4748)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT
hread.handleBindApplication(ActivityThread.java:4688)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT
hread.-wrap1(ActivityThread.java)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT
hread$H.handleMessage(ActivityThread.java:1405)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.os.Handler.di
spatchMessage(Handler.java:102)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.os.Looper.loo
p(Looper.java:148)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT
hread.main(ActivityThread.java:5417)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at java.lang.reflect.Met
hod.invoke(Native Method)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at com.android.internal.
os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-26 10:30:39.395 2778 2778 E AndroidRuntime: at com.android.internal.
os.ZygoteInit.main(ZygoteInit.java:616)
10-26 10:30:39.396 1534 2013 W ActivityManager: Force finishing activity Sit
eToolsMobile.Droid/md5988fcde8450a201101ada904f480bb79.SplashActivity
10-26 10:30:39.699 1534 2013 I WindowManager: Screenshot max retries 4 of Toke
n{e7ebe9 ActivityRecord{6e79c70 u0 SiteToolsMobile.Droid/md5988fcde8450a201101ad
a904f480bb79.SplashActivity t6 f}} appWin=Window{a134507 u0 Starting SiteToolsMo
bile.Droid} drawState=1
10-26 10:30:39.736 1534 2729 I OpenGLRenderer: Initialized EGL, version 1.4
10-26 10:30:40.201 1534 1548 W ActivityManager: Activity pause timeout for Act
ivityRecord{6e79c70 u0 SiteToolsMobile.Droid/md5988fcde8450a201101ada904f480bb79
.SplashActivity t6 f}
10-26 10:30:43.005 2778 2778 I Process : Sending signal. PID: 2778 SIG: 9
10-26 10:30:43.016 1534 2729 E Surface : getSlotFromBufferLocked: unknown buff
er: 0x7fb4b733ab20
10-26 10:30:43.027 1534 2013 W InputMethodManagerService: Window already focus
ed, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Pr
oxy#67e1464 attribute=null, token = android.os.BinderProxy#f656261
10-26 10:30:43.053 1534 1716 I ActivityManager: Process SiteToolsMobile.Droid
(pid 2778) has died
10-26 10:30:43.207 1534 1553 W AppOps : Finishing op nesting under-run: uid 1
000 pkg android code 24 time=0 duration=0 nesting=0
So i know it can't find this lib, but I don't know why it can't find this lib and I don't know how to fix it.
I've tried uninstalling the app, cleaning the solution, and rebuilding.
I've tried the 6.0 as well as 7.1.1 system images.
I haven't tried reinstalling xamarin or anything else because that would take the rest of the day on the network I have available to me.
Why doesn't libmonodroid.so exist and how do I fix it?
EDIT
x86_64 is enabled. Here is a screenshot of my device and the advanced android options.
AVD Settings-
Build Options-

I found a solution!
Disable ever ABI except x86_64.
I don't know yet which ABI causes the conflict. I think maybe X86. Because he always deployed a MonoRuntime...

Enable the x86_64 ABI in your Android Build Advance options:

Removing everything except x86 and x86_x64 will disable debugging on physical device.
The correct solution is to remove arm64-v8a and it will work alright.

Recently installed Xamarin and ran into the same issue, found the error in the Android Device Log (Visual Studio: Tools/Android/Device Log...) and this solution did resolve the issue. I went one step further and narrowed down the issue (at least in my case) to the need to remove supported architecture: armeabi. None of the other supported architectures caused the issue. I'm running Xamarin for Visual Studio 4.2.2.11, with Android 7.1.1 under the Android Emulator using Google APIs Intel Atom (x86_64) and Google's Nexus 5 device.

On, Visual Studio for Mac (8.7.1) this issue came up recently and there is an installation package for the Xamarin.Android SDK has been given in the GitHub issue.
Please check: https://github.com/xamarin/xamarin-android/issues/4983

As mentioned here, it started happening again and is fixed in the latest update of Visual Studio. So just check for updates and then install them.

Related

React Native App crashing on release mode but working fine debug mode

My React native app was working fine few days back on both release and debug mode but from yesterday it keeps crashing on start in release mode, but it is working perfectly fine on debug mode.
When i ran
adb logcat *:E
it gave me following logs but i can't find anything on internet related to this
02-17 18:30:56.108 564 595 E libPowerHal: Could not open '/proc/1705/comm'
02-17 18:30:56.108 564 595 E libPowerHal: error : 13, Permission denied
02-17 18:30:56.260 22398 22398 E com.blackhedge: Not starting debugger since process cannot load the jdwp agent.
02-17 18:30:56.282 564 595 E libPowerHal: perfLockRel handle:293
02-17 18:30:56.517 22398 22398 E libc : Access denied finding property "ro.vendor.df.effect.conflict"
02-17 18:30:56.518 534 22445 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.518 534 22447 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.518 534 22446 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.597 564 595 E libPowerHal: perfLockRel handle:294
02-17 18:30:56.716 1204 1687 E WindowManager: App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
02-17 18:30:56.716 534 22467 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: FATAL EXCEPTION: create_react_context
02-17 18:30:56.720 22398 22454 E AndroidRuntime: Process: com.blackhedge, PID: 22398
02-17 18:30:56.720 22398 22454 E AndroidRuntime: java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:239)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:29)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:268)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1371)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1065)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at java.lang.Thread.run(Thread.java:919)
02-17 18:30:56.730 22398 22457 E fullstory: Destroy scanner called twice
02-17 18:30:56.809 1204 1329 E InputDispatcher: channel '81fad7a com.blackhedge/com.blackhedge.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-17 18:30:56.812 4731 4790 E PowerKeeper.Event: oops, parse AM_RESTART_ACTIVITY_AI parameter error
02-17 18:30:56.814 1204 1343 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.927) failed {.code = ERROR_NOT_SUPPORTED, .description = }
02-17 18:30:57.182 1705 1705 E Launcher: changeViewByFsGestureState, view=ShortcutMenuLayer, alpha=1.0, scale=1.0
02-17 18:30:57.233 564 595 E libPowerHal: perfLockRel handle:295
02-17 18:30:59.825 1204 1343 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.927) failed {.code = ERROR_NOT_SUPPORTED, .description = }
I tried generating logs and searched on internet the errors i was getting on logs but found nothing
this error is caused by the absence of the index.android.bundle file in the ./android/app/src/main/assets directory
First step:
Create the assets folder if it does not exist in the android/app/src/main/ directory
Second step:
Run the following command line:
react-native bundle --platform android --dev false --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res/
Step three:
Compile the application in release mode

Release app crashes instantly when run. Debug version is fine react native android

I can run my app fine on my phone while debugging but by running npx react-native run-android --variant=release
or making a release apk through android studio it crashes as soon as I open it. For what's in the logcat ithink the react-native-background-task might be to blame. Even though I tried to uninstall it. Maybe it wasn't uninstalled correctly.
adb logcat *:E
p(Looper.java:193)
08-20 23:46:52.037 21966 22003 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
08-20 23:46:52.037 21966 22003 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
08-20 23:47:04.089 22076 22133 E AndroidRuntime: Process: com.perkunos.daily_dharma, PID: 22076
08-20 23:47:04.089 22076 22133 E AndroidRuntime: java.lang.IllegalStateException: You need to call create() at least once to create the singleton
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.evernote.android.job.JobManager.instance(JobManager.java:159)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.jamesisaac.rnbackgroundtask.BackgroundTaskModule.initialize(BackgroundTaskModule.java:52)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.ModuleHolder.doInitialize(ModuleHolder.java:236)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.ModuleHolder.markInitializable(ModuleHolder.java:100)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceInitialized(NativeModuleRegistry.java:103)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl$4.run(CatalystInstanceImpl.java:542)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
08-20 23:47:05.064 1211 1365 E storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
08-20 23:47:07.842 22161 22194 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
08-20 23:47:07.842 22161 22194 E AndroidRuntime: Process: com.perkunos.daily_dharma, PID: 22161
08-20 23:47:07.842 22161 22194 E AndroidRuntime: java.lang.IllegalStateException: You need to call create() at least once to create the singleton
08-20 23:47:07.842 22161 22194 E AndroidRuntime: at com.evernote.android.job.JobManager.instance(JobManager.java:159)
React Native version:
System:
OS: Linux 4.17 Ubuntu 16.04.6 LTS (Xenial Xerus)
CPU: (4) x64 Intel(R) Core(TM) i5-4210U CPU # 1.70GHz
Memory: 1.68 GB / 7.70 GB
Shell: 4.3.48 - /bin/bash
Binaries:
Node: 12.18.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 1.8.0_201 - /usr/bin/javac
Python: 2.7.16 - /home/daniel/anaconda2/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: ~16.11.0 => 16.11.0
react-native: ~0.62.2 => 0.62.2
npmGlobalPackages:
*react-native*: Not Found
It was the react-native-background-task unnistallation that was causing problems, either I did it wrong or something went bad. Installing it again with all the steps did the trick.

Release application always crashing on splash screen

I'm facing an issue with React Native release builds. Either on iPhone or Android, my application works fine in debug mode, but after building with release configuration, the app always crashes on the splash screen.
On Android, I'm getting an OutOfMemory in the log triggered by WebSocketReader.java. Here is the Android log :
07-26 10:57:18.639 5893 7623 E AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
07-26 10:57:18.639 5893 7623 E AndroidRuntime: Process: com.schooltoring, PID: 5893
07-26 10:57:18.639 5893 7623 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 10628794 byte allocation with 4409280 free bytes and 4MB until OOM
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:79)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:207)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okio.Buffer.readString(Buffer.java:620)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okio.Buffer.readUtf8(Buffer.java:591)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:222)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:101)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:262)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:201)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.lang.Thread.run(Thread.java:762)
Complete log : https://gist.github.com/SLedunois/7d801cb0e55f2ae98bdbc054b0a84e61 (Sorry about the link. Crash report are too long to be included in the body)
On iPhone, I don't really understand the crash report. I'm new at iOS development. Here is the iOS crash report :
https://gist.github.com/SLedunois/76eaa85dfebb2ceff1f97cb4723989f1
I think, the error is caused by :
Thread 12 Crashed:
0 libsystem_kernel.dylib 0x00000001815192ec __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001816ba288 pthread_kill$VARIANT$mp + 376
2 libsystem_c.dylib 0x0000000181487d0c abort + 140
3 Schooltoring 0x0000000100ccc734 0x100c78000 + 345908
4 CoreFoundation 0x0000000181a931c8 __handleUncaughtException + 828
5 libobjc.A.dylib 0x0000000180c4c8c8 _objc_terminate+ 35016 () + 112
6 Schooltoring 0x0000000100cb090c 0x100c78000 + 231692
7 libc++abi.dylib 0x0000000180c3d37c std::__terminate(void (*)+ 111484 ()) + 16
8 libc++abi.dylib 0x0000000180c3cccc __cxxabiv1::exception_cleanup_func+ 109772 (_Unwind_Reason_Code, _Unwind_Exception*) + 0
9 libobjc.A.dylib 0x0000000180c4c720 _objc_exception_destructor+ 34592 (void*) + 0
10 Schooltoring 0x0000000100d61af0 0x100c78000 + 957168
11 Schooltoring 0x0000000100d61638 0x100c78000 + 955960
12 libdispatch.dylib 0x0000000181384aa0 _dispatch_call_block_and_release + 24
13 libdispatch.dylib 0x0000000181384a60 _dispatch_client_callout + 16
14 libdispatch.dylib 0x000000018138e9b4 _dispatch_queue_serial_drain$VARIANT$mp + 608
15 libdispatch.dylib 0x000000018138f2fc _dispatch_queue_invoke$VARIANT$mp + 336
16 libdispatch.dylib 0x000000018138fcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 340
17 libdispatch.dylib 0x0000000181398098 _dispatch_workloop_worker_thread$VARIANT$mp + 668
18 libsystem_pthread.dylib 0x00000001816b7e70 _pthread_wqthread + 860
19 libsystem_pthread.dylib 0x00000001816b7b08 start_wqthread + 4
All my builds are configured to be signed.
Does someone face a similar issue?
Try adding android:largeHeap="true" to your manifest under application:
Ex. <application android:label="YourApp" android:largeHeap="true"></application>
Found solution. The error was triggered because of the static image used in the application were too big.
See https://facebook.github.io/react-native/docs/images for more explanations.

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>

Categories

Resources