The file descriptors stdout / stderr are sent to /dev/null in Android applications. (The Java equivalents, System.out and System.err , are redirected to the log using the application platform.)
A hack is included in the Dalvik VM that allows you to see stdout / stderr on the root device by setting the log.redirect-stdio property. See this link for more details. It works by creating a stream that reads from stdio file descriptors and copies the data to the logging system.
For new code, itβs much easier to use Android log calls directly. If you import the library from other sources, this is of course a bit more complicated. If necessary, you can copy the code from Dalvik to your application and do the same.
fadden Jun 19 '13 at 19:28 2013-06-19 19:28
source share