how to check the output of init.rc (init process) in Android platform?
android, linux, linux-kernel, system
Solution
Init is writing to the kernel buffer. You can see its output with dmesg. Make sure to ramp up the loglevel in your init.rc file.
Problem
I want to dump stack when some event happened, so I write a script to init.rc as below. Then I use `setprop dump_stack 0` and `setprop dump_stack 1` to rigger it,but there is no output in my console? ``` on property:dump_stack=1 exec /system/bin/cat /proc/100/stack # pid = 100 ``` I have add some log in system\core\init\builitins.c, it says the code is work (the retstatus is 0). Even I change the script to "exec /system/bin/cat /proc/100/stack > /data/temp", it still doesn't work. So, Where is the output of init.rc (init process)? PS. The reason I write the script to init.rc is "Permission". The init process is root, so it can dump the stack of others process. And, is the syntax correct or not? I write the "exec /system/bin/cat /proc/100/stack" by the Android Init Language in http://www.kandroid.org/online-pdk/guide/bring_up.html