Android Emulator install debug react native app - android

I'm trying to set up previously working on Mac react native project on Linux and I ran into an issue.
I start the emulator
cd $ANDROID_HOME/tools && sudo ./emulator -avd nexus-5X-API-27
then I try to install the debug *.apk to it. In the [project_folder]/android/app/build/outputs/apk/debug
sudo adb install -r app-debug.apk
and I have the following errors in the adb logcat
04-21 10:25:49.672 +0000 1587 1662 D ConnectivityService: NetworkAgentInfo [WIFI () - 101] validation passed
04-21 10:25:49.677 +0000 1587 4035 I WifiService: getConnectionInfo uid=10013
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#12529024#12.5.29 (040700-192802242):13)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at libcore.io.Linux.setsockoptTimeval(Native Method)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:175)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : [AppCertManager] IOException while requesting key:
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : java.io.IOException: Invalid device key response.
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gga.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):12)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gga.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):64)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gfy.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):8)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gfu.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):1)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gft.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):10)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms#12529024#12.5.29 (040700-192802242):7)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at fiw.call(:com.google.android.gms#12529024#12.5.29 (040700-192802242):3)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.util.concurrent.FutureTask.run(FutureTask.java:266)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at nsg.run(:com.google.android.gms#12529024#12.5.29 (040700-192802242):27)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at nya.run(Unknown Source:7)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.lang.Thread.run(Thread.java:764)
04-21 10:25:54.479 +0000 1587 1600 E memtrack: Couldn't load memtrack module
Any thoughts what could be the cause of that? I would appreciate any direction!
UPDATE
Actually, the
sudo adb install -r app-debug.apk
Installs the app, and everything works. Seems that adb logcat is not relevant here.
However, if I run
sudo react-native run-android
It executes successfully but on the emulator, I have the following error.
As far as I understand this error tells that the development server (I assume it's node) returns the error, which means that any changes to the code will not be dynamically picked up, which is what I'm trying to accomplish.
UPDATE
OK, I finally figure out what is wrong here.
When I first ran
sudo adb install -r app-debug.apk
The Running Metro Bundler was not started, meaning after system reboot I hadn't run the
sudo react-native run-android
Which starts the development server. Therefore the application was running OK.
Now what I did, I killed the server
sudo lsof -i :8081
kill -9 <PID>
And started the
sudo react-native start
In a separate terminal session. There I could see that I have some issues with the watchman lib when I start my app on the emulator, which I believe are the cause of my issue.
Hope it will be useful for somebody.

Related

Silent APK installation by the device owner doesn't work on MIUI 11

I have a "device owner" Android app which silently installs APK using PackageInstaller (see the code, for example, here).
This code works perfectly on all Android 7+ devices except Xiaomi Redmi 7A (running MIUI 11). The installation fails, here's the related logcat output:
01-16 00:43:21.494 1488 2892 I InstallationStatistic: beginInstallSession: 417086238
01-16 00:43:21.600 1488 1658 D com.android.server.pm.PackageManagerServiceInjector: Package verify start
01-16 00:43:21.601 1488 1538 D CompatibilityInfo: mCompatibilityFlags - 0
01-16 00:43:21.601 1488 1538 D CompatibilityInfo: applicationDensity - 320
01-16 00:43:21.601 1488 1538 D CompatibilityInfo: applicationScale - 1.0
01-16 00:43:21.611 24382 24395 D GuardProvider: start parse apk : /data/app/vmdl417086238.tmp
01-16 00:43:21.618 24382 24395 E i.guardprovide: Invalid ID 0x00000000.
01-16 00:43:21.638 4434 24418 D PackageVerifyedRecevier: verify package /data/app/vmdl417086238.tmp info: PackageInfo{45d0d6b com.hmdm.sendphoto}
01-16 00:43:21.638 4434 24418 D PackageVerifyedRecevier: verify package /data/app/vmdl417086238.tmp finish true
01-16 00:43:21.639 1488 1658 I com.android.server.pm.PackageManagerServiceInjector: MIUILOG- Install Reject uid: 10161 pkg : com.hmdm.launcher
01-16 00:43:21.639 1488 1658 E PackageInstaller: Commit of session 417086238 failed: Permission Denied
Package ID of the installer (device owner) is com.hmdm.launcher. Package ID of the app being installed is com.hmdm.sendphoto.
I tried to add the "Install unknown apps" permission but this didn't help.
Looks like the app must request MIUI OS for some special (undocumented) permissions?
The device owner rights were granted to the application by QR code based enrollment.
Also with MIUI 10.3 some apps are refused to install/update.
For instance, I cannot install a Threema update the usual way (and just get a silly error 'not installed'). logcat shows that com.miui.global.packageinstaller.action.verifypackage called by com.android.server.pm.PackageManagerServiceInjector fails:
02-16 11:29:05.809 1271 1853 D com.android.server.pm.PackageManagerServiceInjector: Package verify start
02-16 11:29:05.810 1271 1317 D CompatibilityInfo: mCompatibilityFlags - 0
02-16 11:29:05.810 1271 1317 D CompatibilityInfo: applicationDensity - 440
02-16 11:29:05.810 1271 1317 D CompatibilityInfo: applicationScale - 1.0
02-16 11:29:05.812 1271 6228 W ActivityManager: Sending non-protected broadcast com.miui.global.packageinstaller.action.verifypackage from system 3440:com.miui.securitycenter.remote/1000 pkg com.miui.securitycenter. Callers=
02-16 11:29:05.816 3440 25765 E ActivityThread: Failed to find provider info for guard
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: parseApk
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: java.lang.IllegalArgumentException: Unknown URI content://guard
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at android.content.ContentResolver.call(Unknown Source:63)
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at com.miui.permcenter.install.q.doInBackground(Unknown Source:17)
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at com.miui.permcenter.install.q.doInBackground(Unknown Source:2)
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at android.os.AsyncTask$2.call(Unknown Source:20)
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
02-16 11:29:05.817 3440 25765 E PackageVerifyedRecevier: at java.lang.Thread.run(Thread.java:764)
02-16 11:29:05.817 3440 25765 D PackageVerifyedRecevier: verify package /data/app/vmdl216836998.tmp info: null
02-16 11:29:05.818 3440 25765 D PackageVerifyedRecevier: verify package /data/app/vmdl216836998.tmp finish false
02-16 11:29:05.818 1271 1853 I com.android.server.pm.PackageManagerServiceInjector: MIUILOG- INSTALL_FAILED_VERIFICATION_FAILURE uid: 10026 pkg : com.google.android.packageinstaller
What worked for me was to move the apk file to /data/local/tmp/
and then call as root
pm install -r file.apk

Android SSL errors, afwlocalproxy MITM?

I recently updated an Android app from targeted API 23 to 28. The biggest issue I am having after deploying to my users is that maybe 1 in 1000 users cannot log in anymore! After getting the logs from them, I found something I hadn't ever seen before. The certificate they're getting is not the certificate I'm serving, and it's being rejected by Android.
I know that some offices and such will MITM SSL certificates, and I suppose some of my users could be completely hacked... I had the users try to use our website, which uses the same SSL certificates as the app, and it works fine for them--so, if this is some MITM (on purpose or not), it's "configured correctly" on their web browser, but not for our app.
When looking at the false certificate details, I see multiple users have the same false Issuer:
06-25 16:49:00.800 25286 25377 E CONSCRYPT: ------------------Untrusted chain: ----------------------
06-25 16:49:00.800 25286 25377 E CONSCRYPT: == Chain0 ==
06-25 16:49:00.800 25286 25377 E CONSCRYPT: Version: 3
06-25 16:49:00.800 25286 25377 E CONSCRYPT: Serial Number: d0ca...0df
06-25 16:49:00.800 25286 25377 E CONSCRYPT: SubjectDN: CN=*.REDACTED.COM, CN=*.REDACTED.COM
06-25 16:49:00.800 25286 25377 E CONSCRYPT: IssuerDN: CN=afwlocalproxy
06-25 16:49:00.802 25286 25377 E CONSCRYPT: Get not before: Sun Jun 23 13:43:18 GMT+12:00 2019
06-25 16:49:00.802 25286 25377 E CONSCRYPT: Get not after: Mon Jun 22 13:43:18 GMT+12:00 2020
06-25 16:49:00.802 25286 25377 E CONSCRYPT: Sig ALG name: SHA256withRSA
06-25 16:49:00.802 25286 25377 E CONSCRYPT: Signature: 59c279...07f810
06-25 16:49:00.814 25286 25377 E CONSCRYPT: Public key:
06-25 16:49:00.814 25286 25377 E CONSCRYPT:
06-25 16:49:00.814 25286 25377 E CONSCRYPT: 30 82 ... 00 03
06-25 16:49:00.814 25286 25377 E CONSCRYPT: 82 01 ... 88 d7
....
(I replaced the domain with REDACTED and some numbers with ...)
Does anyone know what afwlocalproxy is? Is it an Android for Work thing? Is it AFW Proxy (https://afw-proxy-server.soft112.com/)? I scoured the internet a bit and didn't see anything, except two or three packet log analyses that look almost identical to mine above. I guess another possibility is that afwlocalproxy is just the name of some configured SSL proxy server, and these affected users all work at the same company or something.
These users were using the app just fine before the upgrade, and then upgraded, and it instantly stopped working for them. It is now 100% reproducible for them. One of them is on a Pixel 2, but they all have mentioned "security software" being installed on their phones by their providers or workplace.

ANDROID App crash when installed in device: JSException: Can't find variable: Promise (RN 0.57.1)

Android app installs but crashes on open in devices, but in debug mode works perfectly.
You can see the crash report below
2019-03-15 15:02:50.685 4431-4515/? E/WindowManager: win=Window{8cd349a u0 Splash Screen com.sample EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0, caller=com.android.server.wm.AppWindowToken.destroySurfaces:748 com.android.server.wm.AppWindowToken.destroySurfaces:732 com.android.server.wm.WindowState.onExitAnimationDone:5646 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:553 com.android.server.wm.DisplayContent.lambda$-com_android_server_wm_DisplayContent_21578:476
2019-03-15 15:02:51.555 970-1030/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.sample, PID: 970
com.facebook.react.common.JavascriptException: Can't find variable: props, stack:
value#285:1369
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:764)
2019-03-15 15:02:51.989 4431-4515/? E/WindowManager: win=Window{bb689b5 u0 com.sample/com.sample.MainActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8, caller=com.android.server.wm.AppWindowToken.destroySurfaces:748 com.android.server.wm.AppWindowToken.destroySurfaces:732 com.android.server.wm.WindowState.onExitAnimationDone:5646 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:553 com.android.server.wm.DisplayContent.lambda$-com_android_server_wm_DisplayContent_21578:476
Try to follow this issue: https://github.com/facebook/metro/issues/197:
When using react-native bundle (the command that runs when you build a
release), InitializeCore.js is not the first file that get required,
but instead it is required later, sometime during the generation of
the bridge method, randomly (which is why if you are lucky or not
using Promise // setTimeout early you'll be fine) iOS does not need
all those polyfills which is why the issue is only detected on android
in release mode.

Android emulator (v28.0.23) unable to make HTTP requests

I am running a NativeScript-Vue application (TNS Android v5.1.0) on Mojave v10.14.3 with Android Studio v3.3.1 and Android emulator v28.0.23.
The Android emulator I am using (Nexus 6, API 25, Android 7.1.1 (Google APIs), x86) loses ability to make HTTP requests. The request hangs for a couple of minutes and eventually times out. I am using axios as the HTTP client to consume a remote C#.NET API (this is a client's API so I do not have access to it directly).
I found this SO post and tried most of the solutions. Some of them seemed to work, but then after a few minutes, the problem reoccurs.
Solutions I have tried:
Wiped data from emulator via AVD manager
Cold booted emulator via AVD manager
Created a new emulator via AVD manager
Set emulator proxy status to "No proxy" instead of using Android Studio's default proxy settings
Ran adb kill-server
Added 8.8.8.8 and 8.8.4.4 as DNS servers for my Mac
Started emulator with a specified DNS server, e.g. $ANDROID_HOME/emulator/emulator -avd Nexus_6_API_25 -dns-server 8.8.8.8,8.8.4.4
Attempted on Genymotion emulator (same issue)
Set WiFi as first in the Network Service order
Rebooting system; works for a few minutes then issue reoccurs
Additional information:
I am using WiFi and have not recently switched from LAN.
Chrome doesn't have internet access either.
The application works as expected on the iOS simulator and on physical android devices.
I installed Mojave recently, however the issue existed previously, although not as frequently it seemed.
JDK-8 and Android-SDK were installed via Homebrew following the NativeScript docs here.
I am fairly new to mobile development, please let me know if any more information is needed.
Does anyone know how I can fix this issue? I have limited access to a physical device so getting this fixed would be a tremendous help. Thanks!
HTTP Request example:
// api/config.js
import axios from "axios";
export default axios.create({
baseURL: "https://testapi.org",
headers: {
"Content-Type": "application/json",
}
});
// store/modules/auth.js
import api from "api/config.js";
const actions = {
login: async function(context, payload) {
try {
const response = await api.post("/api/account/login", payload);
context.dispatch("setUser", response.data.user);
} catch (error) {
console.log(error);
}
}
};
export default {
namespace: true,
actions
};
Logcat output:
02-28 14:12:40.742 1722 1816 D ConnectivityService: NetworkAgentInfo [MOBILE (LTE) - 100] validation failed
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: Error sending ping
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: java.net.SocketTimeoutException: SSL handshake timed out
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms#13280022#13.2.80 (040700-211705629):8)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms#13280022#13.2.80 (040700-211705629):15)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connectTls(Connection.java:235)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connectSocket(Connection.java:199)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connect(Connection.java:172)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:367)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at bsc.a(SourceFile:230)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at bsf.run(SourceFile:174)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at java.lang.Thread.run(Thread.java:761)
02-28 14:12:49.375 2651 2932 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:49.376 2651 2932 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:49.376 2651 2932 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:49.376 2651 2932 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:49.376 2651 2932 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:49.376 2651 2932 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:12:50.171 2651 2930 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:50.171 2651 2930 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:50.171 2651 2930 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:50.172 2651 2930 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:50.172 2651 2930 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:50.172 2651 2930 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:12:50.283 2651 2929 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:50.284 2651 2929 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:50.284 2651 2929 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:50.284 2651 2929 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:50.284 2651 2929 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:50.284 2651 2929 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:12:51.482 2651 3200 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:51.482 2651 3200 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:51.482 2651 3200 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:51.482 2651 3200 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:51.482 2651 3200 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:51.482 2651 3200 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:13:05.945 5154 5156 I art : Do partial code cache collection, code=30KB, data=30KB
02-28 14:13:05.946 5154 5156 I art : After code cache collection, code=30KB, data=30KB
02-28 14:13:05.946 5154 5156 I art : Increasing code cache capacity to 128KB
02-28 14:13:14.458 2363 5301 E WakeLock: GCM_HB_ALARM release without a matched acquire!

android eclipse java logcat runtime errors

04-21 02:27:40.341: E/vold(27): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
04-21 02:27:40.341: E/vold(27): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory)
04-21 02:27:40.341: E/vold(27): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
04-21 02:27:40.341: E/vold(27): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory)
04-21 02:27:49.111: E/BatteryService(52): usbOnlinePath not found
04-21 02:27:49.111: E/BatteryService(52): batteryVoltagePath not found
04-21 02:27:49.111: E/BatteryService(52): batteryTemperaturePath not found
04-21 02:27:49.111: E/SurfaceFlinger(52): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
04-21 02:27:52.211: E/EventHub(52): could not get driver version for /dev/input/mouse0, Not a typewriter
04-21 02:27:52.211: E/EventHub(52): could not get driver version for /dev/input/mice, Not a typewriter
04-21 02:27:53.231: E/System(52): Failure starting core service
04-21 02:27:53.231: E/System(52): java.lang.SecurityException
04-21 02:27:53.231: E/System(52): at android.os.BinderProxy.transact(Native Method)
04-21 02:27:53.231: E/System(52): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
04-21 02:27:53.231: E/System(52): at android.os.ServiceManager.addService(ServiceManager.java:72)
04-21 02:27:53.231: E/System(52): at com.android.server.ServerThread.run(SystemServer.java:176)
04-21 02:27:53.251: E/AndroidRuntime(52): Crash logging skipped, no checkin service
04-21 02:28:01.915: E/ActivityThread(102): Failed to find provider info for android.server.checkin
04-21 02:28:03.255: E/ActivityThread(102): Failed to find provider info for android.server.checkin
04-21 02:28:03.325: E/ActivityThread(102): Failed to find provider info for android.server.checkin
04-21 02:28:05.265: E/MediaPlayerService(31): Couldn't open fd for content://settings/system/notification_sound
04-21 02:28:05.295: E/MediaPlayer(52): Unable to to create media player
04-21 02:28:13.005: E/AndroidRuntime(131): ERROR: thread attach failed
04-21 02:28:14.785: E/AndroidRuntime(210): ERROR: thread attach failed
04-21 02:28:14.975: E/jdwp(222): Failed sending req to debugger: Broken pipe (-1 of 27)
04-21 02:28:14.975: E/jdwp(222): Failed sending req to debugger: Broken pipe (-1 of 27)
04-21 02:28:14.975: E/jdwp(222): Failed sending reply to debugger: Broken pipe
I think the problem is in your native function signature. You should decare it with JNIEXPORT and JNICALL.
Use the javah tool for generating header and source files.
Here is example: JNI Example
And next time try to find some related answers like java-lang-unsatisfiedlinkerror before asking another question.

Categories

Resources