将下面代码加入开机启动脚本即可:
#Use logcat to save log to file
logPath="/data/local/log/"
if [ ! -d "$logPath" ]; then
mkdir "$logPath"
fi
logcat -b radio -r 2000 -n 3 -v time -f /data/local/log/radio.log *:D &
logcat -v time -r 5000 -n 3 -f /data/local/log/app.log *:D &