Sunday, October 14, 2012

How to display logs from android service:

By default,If we added any android service in init.rc, logs are redirected to null device. So logs wont be shown from service. Sometimes it will show sometimes it wont show logs. To display logs always from service,

we have to do the following

service serviceName /system/bin/logwrapper /system/bin/dhcpcd -BKLA -d eth0

/system/bin/logwrapper - this will redirect the  service logs to logcat.

init.rc script is executed by init process.

No comments: