I want to get stdout and stderr from system_server
to show up in logcat since a number of native libraries have no real
awareness they are running in Android and I'd like to debug them by
examining their logging. From what I can tell by default stdout and stderr are redirected to /dev/null for processes spawned by the zygote in Android. I read that in older android versions you could use:
setprop log.redirect-stdio true
Which set -Xlog-stdio when starting dalvik. Recent
Android versions using ART seem to no longer honor this property. Is
there an alternative for recent Android versions that use ART?
I tried adding /system/bin/logwrapper to service zygote init command that starts the system server but I get this error:
Could not ctl.start for 'zygote': File /system/bin/logwrapper(labeled "u:object_r:system_file:s0") has incorrect label or no domain transition from u:r:init:s0 to another SELinux domain defined.
Have you configured your service correctly? https://source.android.com/security/selinux/device-policy#label_new_services_and_address_denials
This error appears even if I disable SELinux with setenforce 0. Perhaps there is some other mechanism in ART I'm not aware of?
Thanks,
Jacob
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-platform/f75ba323-741f-4955-a2b9-7bde0a9584fbn%40googlegroups.com.