Android Bluetooth LE Connection issue with other bluetooth devices - android

First of all, there's no problem with iOS, but the problem occurs when the app is running on Androids.
There's a BLE device that does pair / notification / write / read.
It seems all good until other bluetooth devices are connected and paired or synced.
For example, if the android phone is restarted (or Bluetooth is off and on again), my BLE device works great with the app.
If I open fitbit app and sync a fitbit device, then my device cannot connect anymore. (and not pairing as well)
Not only for fitbit but also for samsung smart watch, the same thing happens.
Anyone recommendation will be appreciated.
Tested with Android 6. Samsung GS6 and Nexus 5.
Update 1:
After synced with fitbit, I get the following messages from my app when connecting to my device.
11-11 09:02:41.811 781 1599 I ActivityManager: Killing 21073:com.android.chrome:privileged_process0/u0a34 (adj 13): empty #17
11-11 09:02:41.822 21010 21010 W cr_ChildProcessConnect: onServiceDisconnected (crash or killed by oom): pid=21073
11-11 09:02:41.838 781 952 D ActivityManager: cleanUpApplicationRecord -- 21073
11-11 09:02:41.838 781 952 W ActivityManager: Scheduling restart of crashed service com.android.chrome/org.chromium.content.app.PrivilegedProcessService0 in 1000ms
11-11 09:02:41.857 781 1226 I ActivityManager: Start proc 23634:com.android.chrome:privileged_process1/u0a34 for service com.android.chrome/org.chromium.content.app.PrivilegedProcessService1
11-11 09:02:41.902 21010 21010 W .android.chrome: type=1400 audit(0.0:21068): avc: denied { ioctl } for path="socket:[1799361]" dev="sockfs" ino=1799361 ioctlcmd=7704 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=unix_stream_socket permissive=0
11-11 09:02:41.902 23644 23644 W Binder_1: type=1400 audit(0.0:21069): avc: denied { ioctl } for path="socket:[1799361]" dev="sockfs" ino=1799361 ioctlcmd=7704 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=unix_stream_socket permissive=0
11-11 09:02:41.902 23644 23644 W Binder_1: type=1400 audit(0.0:21070): avc: denied { ioctl } for path="socket:[1799361]" dev="sockfs" ino=1799361 ioctlcmd=7704 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=unix_stream_socket permissive=0
11-11 09:02:41.905 23634 23634 I cr_ChildProcessService: Creating new ChildProcessService pid=23634
11-11 09:02:41.908 781 2450 I ActivityManager: Killing 21102:com.android.chrome:sandboxed_process0/u0a34i52 (adj 13): empty #17
11-11 09:02:41.912 21010 21010 W .android.chrome: type=1400 audit(0.0:21071): avc: denied { ioctl } for path="socket:[1799361]" dev="sockfs" ino=1799361 ioctlcmd=7704 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=unix_stream_socket permissive=0
11-11 09:02:41.919 23634 23644 I cr_LibraryLoader: Using linker: org.chromium.base.library_loader.ModernLinker
11-11 09:02:41.920 21010 21010 W cr_ChildProcessConnect: onServiceDisconnected (crash or killed by oom): pid=21102
11-11 09:02:41.941 23634 23646 I cr_LibraryLoader: Loading chrome from within /data/app/com.android.chrome-1/base.apk
11-11 09:02:41.965 22521 22521 I System.out: writeCharacteristic(4, 8, AQAAAA==)
11-11 09:02:41.967 781 1226 D ActivityManager: cleanUpApplicationRecord -- 21102
11-11 09:02:41.967 781 1226 W ActivityManager: Scheduling restart of crashed service com.android.chrome/org.chromium.content.app.SandboxedProcessService0 in 1000ms
11-11 09:02:42.016 23634 23646 I cr_LibraryLoader: Time to load native libraries: 95 ms (timestamps 5253-5348)
11-11 09:02:42.016 23634 23646 I cr_LibraryLoader: Expected native library version number "54.0.2840.85", actual native library version number "54.0.2840.85"
11-11 09:02:42.016 23634 23646 I chromium: [INFO:library_loader_hooks.cc(151)] Chromium logging enabled: level = 0, default verbosity = 0
11-11 09:02:42.027 23634 23646 E libEGL : validate_display:255 error 3008 (EGL_BAD_DISPLAY)
11-11 09:02:42.028 23634 23646 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 10/21/15, 369a2ea, I96aee987eb
After this, it does one more reading then disconnected.
If I goto bluetooth app and 'clear data', then it works fine again.

Related

QML Camera not showing in Android

I am trying to make an application with QML and C++ for Android on Qt6. I used a sample code from Qt help segment for checking if the camera works or not (see the code segment). I have implemented C++ just for loading the QML file.
My problem is the camera does not show up in the app, I am using Android 10 phone as test device.
import QtQuick
import QtMultimedia
Item {
width: 640
height: 360
CaptureSession {
camera: Camera {
id: camera
focusMode: Camera.FocusModeAutoNear
customFocusPoint: Qt.point(0.2, 0.2) // Focus relative to top-left corner
}
videoOutput: videoOutput
}
VideoOutput {
id: videoOutput
anchors.fill: parent
}
}
The error I face is following. Please help me with this.
W AdrenoUtils: <ReadGpuID_from_sysfs:194>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
W AdrenoUtils: <ReadGpuID:218>: Failed to read chip ID from gpu_model. Fallback to use the GSL path
W Gralloc3: mapper 3.x is not supported
D ForceDarkHelper: updateByCheckExcludeList: pkg: org.qtproject.example.test activity: org.qtproject.qt.android.bindings.QtActivity#21c7d27
W Qt A11Y : Could not (yet) activate platform accessibility.
W qtMainLoopThrea: type=1400 audit(0.0:11018091): avc: denied { read } for name="u:object_r:camera_prop:s0" dev="tmpfs" ino=17688 scontext=u:r:untrusted_app:s0:c189,c258,c512,c768 tcontext=u:object_r:camera_prop:s0 tclass=file permissive=0
E libc : Access denied finding property "camera.aux.packagelist"
E libc : Access denied finding property "camera.aux.packagelist"
E libc : Access denied finding property "camera.aux.packagelist"
E libc : Access denied finding property "vendor.camera.hal1.packagelist"
E libc : Access denied finding property "camera.aux.packagelist"
E libc : Access denied finding property "camera.aux.packagelist"
E libc : Access denied finding property "camera.aux.packagelist"
E libc : Access denied finding property "vendor.camera.hal1.packagelist"
E libc : Access denied finding property "camera.aux.packagelist"
D ForceDarkHelper: updateByCheckExcludeList: pkg: org.qtproject.example.test activity: org.qtproject.qt.android.bindings.QtActivity#21c7d27
D SurfaceView: UPDATE null, mIsCastMode = false
E libc : Access denied finding property "camera.aux.packagelist"
E libc : Access denied finding property "vendor.camera.hal1.packagelist"
E libc : Access denied finding property "camera.aux.packagelist"
W System.err: java.lang.RuntimeException: setParameters failed
W System.err: at android.hardware.Camera.native_setParameters(Native Method)
W System.err: at android.hardware.Camera.setParameters(Camera.java:2250)
W System.err: java.lang.RuntimeException: setParameters failed
W System.err: at android.hardware.Camera.native_setParameters(Native Method)
W System.err: at android.hardware.Camera.setParameters(Camera.java:2250)
W Gralloc3: allocator 3.x is not supported
I ct.example.tes: ProcessProfilingInfo new_methods=210 is saved saved_to_disk=1 resolve_classes_delay=8000
W IInputConnectionWrapper: getExtractedText on inactive InputConnection
W IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
W BpBinder: Slow Binder: BpBinder transact took 340 ms, interface=android.hardware.ICamera, code=6 oneway=false
D Camera : app passed NULL surface
D Camera : app passed NULL surface
W BpBinder: Slow Binder: BpBinder transact took 337 ms, interface=android.hardware.ICamera, code=1 oneway=false

Black Screen after Huawei login, caused by InputRealNameActivitys

Environment
OS: Android10
Model: Huawei Honor 10
SDK: hwid 5.0.4
Problem describe
Test brid report there are black screen found in our app with few specific devices.
As we reproduced, the black screen happen after we called Huawei login method. And black screen is disappear after we click Android back button.
useful info
As we dig into, the top activity that make screen black is com.huawei.hwid20.inputrealname.InputRealNameActivity, and more, as we search in the logcat, we found following lines that you may interesting:
06-18 10:13:55.326 700 3444 E BufferQueueProducer: [com.huawei.hwid/com.huawei.hwid20.inputrealname.InputRealNameActivity#0]:1338: disconnect: not connected (req=1)
06-18 10:13:55.326 12947 15847 W libEGL : EGLNativeWindowType 0x7ae5fab910 disconnect failed
06-18 10:13:55.319 14683 14683 W GameMain: type=1400 audit(0.0:65405): avc: granted { read } for pid=14683 name="a0" dev="sdcardfs" ino=55427 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=dir
06-18 10:13:55.319 14683 14683 W GameMain: type=1400 audit(0.0:65406): avc: granted { read } for pid=14683 name="a0" dev="sdcardfs" ino=55427 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=dir
06-18 10:13:55.319 14683 14683 W GameMain: type=1400 audit(0.0:65407): avc: granted { read open } for pid=14683 path="/storage/emulated/0/Android/data/com.syzh.jsxw.huawei/files/patch/a0" dev="sdcardfs" ino=55427 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=dir
06-18 10:13:55.319 14683 14683 W GameMain: type=1400 audit(0.0:65408): avc: granted { write } for pid=14683 name="a0" dev="sdcardfs" ino=55427 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=dir
06-18 10:13:55.303 1474 1842 D HwGameAssistantController: Keycontrol mode is 2 for user 0
06-18 10:13:55.328 1474 3047 V WindowManager: removeIfPossible: Window{bfd80e1 u0 com.huawei.hwid/com.huawei.hwid20.inputrealname.InputRealNameActivity} callers=com.android.server.wm.WindowState.removeIfPossible:5504348 com.android.server.wm.WindowManagerService.removeWindow:5502984 android.view.IWindowSession$Stub.onTransact:7520340 com.android.server.wm.Session.onTransact:6765932 android.os.Binder.execTransactInternal:8316500
06-18 10:13:55.328 1474 3047 D HwAppTransitionImpl: windowAnimations = 2060168 dose not come from system, not to override it.
06-18 10:13:55.330 16001 16001 D AndroidRuntime: Shutting down VM
06-18 10:13:55.331 1474 3047 V WindowManager: Not removing Window{bfd80e1 u0 com.huawei.hwid/com.huawei.hwid20.inputrealname.InputRealNameActivity EXITING} due to exit animation
06-18 10:13:55.332 1474 1501 I StatusBarDisable: setFlags what=0 which=1 pkg=Window{bfd8171 u0 com.huawei.hwid/com.huawei.hwid20.inputrealname.InputRealNameActivity}
06-18 10:13:55.332 1474 3047 D ZrHung.AppEyeTransparentWindow: TransparentWindow mHungConfigStatus = 0,mHungConfigEnable = 1
06-18 10:13:55.346 12947 12947 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
06-18 10:13:55.346 700 700 D SurfaceFlinger: Found SecureRecScreen Layer
06-18 10:13:55.346 1474 4353 E InputDispatcher: Window handle Window{bfd80e1 u0 com.huawei.hwid/com.huawei.hwid20.inputrealname.InputRealNameActivity} has no registered input channel
So we think the SDK was trying to remove InputRealNameActivity but failed due to exit animation.
In our brain storm opinion, we are thinking some animation play failed due to device issue, and this failed animation prevent the destroy of InputRealNameActivity, so it leaves in the screen.
Anyway what we can confirm is, an Activity InputRealNameActivity from huawei SDK do make the screen black, and users may have no idea how to cancel it, it hurts our user experience and I believe it hurts Huawei's user as well.
Reproduce
As what we know, it is not a common case, so you can not produce it easily, luckily we found a device in test brid could reproduce it.
enter here, https://www.testbird.com/ , login, and search for Huawei Honor, you'll find there is only one Huawei Honor 10 device, that device could reproduce it easily. Just run the app, and tigger Huawei account login.
Thank you in advance, if the team could take a look about this issue.
According to the team, this issue is caused by security considerations.
The screen recording prevention and screen capture prevention functions are provided on the account login page. Then the device in test brid may have triggered this security mechanism, so it goes black screen.

android add_service(android.hardware.camera.provider#2.4-service) fails- /dev/vndbinder permission denied

I'm working on HiKey aosp installed running on Linux 16.04, trying to connect v4l2 camera and use it. Currently, I've added the device drivers for v4l2 and usbcamera, and added the camera-hal to ~/(aosp)/device/linaro/hikey/camera directory. media_profiles.xml is contained in this directory.
I'm facing this problem where the camera service provider is killed in the init process and runs infinite loop of the booting process as it constantly tries to start camera service and kill all related processes.
Logcat:
01-01 00:00:14.067 1999 1999 I mediaserver: ServiceManager: 0xf69994c0
01-01 00:00:14.068 1903 1903 E SELinux : avc: denied { add } for service=media.cas pid=1999 uid=1013 scontext=u:r:mediadrmserver:s0 tcontext=u:object_r:default_android_service:s0 tclass=service_manager permissive=0
01-01 00:00:14.069 1903 1903 E ServiceManager: **add_service**('media.cas',3) uid=1013 - **PERMISSION DENIED**
01-01 00:00:14.199 1968 1968 W android.hardwar: type=1400 audit(0.0:61): avc: denied { read write } for name="vndbinder" dev="tmpfs" ino=10306 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file permissive=0
01-01 00:00:14.205 1968 1968 I **android.hardware.camera.provider#2.4-service**: Camera provider Service is starting.
01-01 00:00:14.205 1968 1968 W ProcessState: **Opening '/dev/vndbinder' failed: Permission denied**
01-01 00:00:14.205 1968 1968 F **ProcessState: Binder driver could not be opened. Terminating.**
--------- beginning of crash
01-01 00:00:14.205 1968 1968 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 1968 (android.hardwar), pid 1968 (android.hardwar)
01-01 00:00:14.266 2005 2005 I /vendor/bin/hw/android.hardware.media.omx#1.0-service: mediacodecservice starting
01-01 00:00:14.266 2005 2005 I ProcessState: Wonn1e: initWithDriver [1]
01-01 00:00:14.288 2005 2005 W /vendor/bin/hw/android.hardware.media.omx#1.0-service: Could not read additional policy file '/vendor/etc/seccomp_policy/mediacodec.policy'
01-01 00:00:14.288 2005 2005 W /vendor/bin/hw/android.hardware.media.omx#1.0-service: libminijail[2005]: failed to get path of fd 5: No such file or directory
According to the answer given to Start native service at early-init before coldboot done, native service including this camera provider service would not open the /dev/binder because it starts before the coldboot. Also, it uses the passthrough mode. How can I tweak the init process so that camera provider service would run and not kill itself?

Android 8 Settings app crashes on emulator with clean AOSP build

"Settings" app will crash immediately after open with clean Android 8 build (aosp_x86-eng) on emulator. logcat output is below:
--------- beginning of main
1536 1550 E memtrack: Couldn't load memtrack module
1536 1550 W android.os.Debug: failed to get memory consumption info: -1
--------- beginning of system
1536 1548 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings (has extras)} from uid 10013
1373 2321 W audio_hw_generic: Not supplying enough data to HAL, expected position 926726 , only wrote 926722
2477 2477 W zygote : Unexpected CPU variant for X86 using defaults: x86
1536 1548 I ActivityManager: Start proc 2477:com.android.settings/1000 for activity com.android.settings/.Settings
2477 2477 I zygote : The ClassLoaderContext is a special shared library.
2477 2477 D OpenGLRenderer: HWUI GL Pipeline
2477 2477 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
2477 2477 D ConditionManager: conditions loading asychronously
2477 2496 D ConditionManager: loading conditions from xml
2477 2495 E BluetoothAdapter: Bluetooth binder is null
2477 2495 V NFC : this device does not have NFC support
1388 1836 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2477 2500 D SuggestionParser: Day 0 for com.android.settings.suggested.category.FIRST_IMPRESSION
2477 2495 D BatteryInfo: time to make batteryStatsHelper: 1ms
1536 1554 I WifiService: requestActivityInfo uid=1000
1536 1554 I WifiService: reportActivityInfo uid=1000
1536 1554 I WifiService: getSupportedFeatures uid=1000
1536 1606 W HalDeviceManager: isWifiStarted called but mWifi is null!?
2477 2500 I SuggestionParser: Use fingerprint requires unavailable feature android.hardware.fingerprint
1536 1554 E BluetoothAdapter: Bluetooth binder is null
1536 1554 E BatteryExternalStatsWorker: no controller energy info supplied for wifi
1536 1554 E KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (No such file or directory)
1536 1554 E BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2477 2500 I SuggestionParser: Add another fingerprint requires unavailable feature android.hardware.fingerprint
2477 2495 D BatteryInfo: time for getStats: 10ms
2477 2500 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
1643 1852 D EGL_emulation: eglMakeCurrent: 0x945dab60: ver 2 0 (tinfo 0x945e4970)
1380 1380 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1540096
1380 1525 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1540096
2477 2499 D : HostConnection::get() New Host Connection established 0xa750eb00, tid 2499
2477 2499 I zygote : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2477 2499 I OpenGLRenderer: Initialized EGL, version 1.4
2477 2499 D OpenGLRenderer: Swap behavior 1
2477 2500 E SystemServiceRegistry: No service published for: wifip2p
2477 2500 E SystemServiceRegistry: android.os.ServiceManager$ServiceNotFoundException: No service published for: wifip2p
2477 2500 E SystemServiceRegistry: at android.os.ServiceManager.getServiceOrThrow(ServiceManager.java:75)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$49.createService(SystemServiceRegistry.java:569)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$49.createService(SystemServiceRegistry.java:567)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$StaticServiceFetcher.getService(SystemServiceRegistry.java:987)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:914)
2477 2500 E SystemServiceRegistry: at android.app.ContextImpl.getSystemService(ContextImpl.java:1667)
2477 2500 E SystemServiceRegistry: at android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:171)
2477 2500 E SystemServiceRegistry: at android.app.Activity.getSystemService(Activity.java:5915)
2477 2500 E SystemServiceRegistry: at com.android.settings.wfd.WifiDisplaySettings.isAvailable(WifiDisplaySettings.java:216)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity.doUpdateTilesList(SettingsActivity.java:845)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity.-wrap0(Unknown Source:0)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity$5.run(SettingsActivity.java:747)
2477 2500 E SystemServiceRegistry: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
2477 2500 E SystemServiceRegistry: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
2477 2500 E SystemServiceRegistry: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
2477 2500 E SystemServiceRegistry: at java.lang.Thread.run(Thread.java:764)
1536 1548 W ActivityManager: Force finishing activity com.android.settings/.Settings
1536 1552 I ActivityManager: Showing crash dialog for package com.android.settings u0
It seems that crash is somehow related to WiFi, but Android emulator shouldn't have WiFi support anyway. What could be the issue here?
I managed to fix it myself. The problem seems to be due to com.android.settings.wfd.WifiDisplaySettings.isAvailable reporting that WiFi is available, while wifip2p service is absent. I went to WifiDisplaySettings.java:216 and replaced this check with false, so it won't try to locate the service. Now Settings can be opened properly.
Alter your WifiDisplaySettings.java in
/YoutAospRoot/packages/apps/Settings/src/com/android/settings/wfd/WifiDisplaySettings.java
Change the code snippet
public static boolean isAvailable(Context context) {
return context.getSystemService(Context.DISPLAY_SERVICE) != null
&& context.getSystemService(Context.WIFI_P2P_SERVICE) != null;
}
To
public static boolean isAvailable(Context context) {
return false;
}
Then
make systemimage
Maybe this can help too. I noticed that the Settings app is not crashing when building an clean Android 8 with lunch aosp_x86-userdebug instead of lunch aosp_x86-eng.

My Application Shuts Down with a Silent Error (AndroidRuntime: Shutting down VM)

MyApplication terminates silently. The last thing it prints is a tracelog from a function, then the Vm shuts down without any reference to my application.
This is the log snippet
05-17 15:25:28.294 4385 4385 D MyApplication: MyFunction()
05-17 15:25:28.294 4385 4385 D AndroidRuntime: Calling main entry com.android.commands.am.Am
05-17 15:25:28.369 4400 4400 W app_process: type=1400 audit(0.0:76): avc: denied { write } for name="system#framework#boot.art" dev="dm-0" ino=149 scontext=u:r:shell:s0 tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file permissive=0
05-17 15:25:28.419 4400 4400 W main : type=1400 audit(0.0:77): avc: denied { write } for name="arm64" dev="dm-0" ino=143 scontext=u:r:shell:s0 tcontext=u:object_r:dalvikcache_data_file:s0 tclass=dir permissive=0
05-17 15:25:28.371 4400 4400 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
05-17 15:25:28.375 4400 4400 D AndroidRuntime: CheckJNI is OFF
05-17 15:25:28.417 4400 4400 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
05-17 15:25:28.458 4400 4400 I Radio-JNI: register_android_hardware_Radio DONE
05-17 15:25:28.478 4385 4385 D AndroidRuntime: Shutting down VM
05-17 15:25:28.526 4400 4400 D AndroidRuntime: Calling main entry com.android.commands.am.Am
05-17 15:25:28.546 4400 4400 D AndroidRuntime: Shutting down VM
The application continued running.
There's no clear indicator except the generic: 05-17 15:25:28.546 4400 4400 D AndroidRuntime: Shutting down VM
The error was caused by an StackOverflow in native code I wrote.
Stackoverflows shut down silently in Android Native Code, in contrast to segfaults and are therefore hard to find.
Locate the last working piece of code with Tracelogging / Logdebug or use the debugger of Android Studio and you will find the location of the bug.
The indicator for the silent termination is: "Shutting down VM"
05-17 15:25:28.478 4385 4385 D AndroidRuntime: Shutting down VM
05-17 15:25:28.526 4400 4400 D AndroidRuntime: Calling main entry com.android.commands.am.Am
05-17 15:25:28.546 4400 4400 D AndroidRuntime: Shutting down VM
The application continued running, because the code was executed within it's own process (via ProcessBuilder.command())

Categories

Resources