hi, dear all I want to record the log info into a file in sdcard when the device is running. And the file name will be unique so that there will be a new file for each time.
add end of init.rc with following code: service logcat /system/bin/logcat -r 1000 -v long -f /mnt/sdcard/log_$(date +%b_%d_%H_%M_%S).txt However, I can see "log_$(date" file under /mnt/sdcard. And this file will be flushed when logcat service restart. It seem that init process does not interpreter "$(date +%b_%d_%H_%M_%S)" as shell command when parse init.rc. When I do "adb shell", and run following command. /system/bin/logcat -r 1000 -v long -f /mnt/sdcard/log_$(date +%b_%d_%H_%M_%S).txt A file like log_Apr_08_14_04_06.txt will be saved in /mnt/sdcard. Because the android shell can parse $(date +%b_%d_%H_%M_%S). How can I do this in init.rc? Anyone can help me out? Thank you very much! -- Best Regards! xiaofen -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting