actually, I'm writing a script to auto logcat on boot
but I've messed something up , and I'm frozen
literally only just done this now, first boot with it
I have a simple userinit.d script
Code:
#!/system/bin/sh
#start log at boot in bg
/system/bin/sh /data/Logatboot.sh &
^^^ I don't think that put it in the background

edit3: meh, for some reason busybox gets zombied, if I kill the logwrapper for the userinit.d run-parts, it continues
edit4: doh! yeah it will zombie, I stick it in the bg and it can't exit !!, so.. 99complete doesn't run.... hehe so simple
init service will not have this problem, but I'll do some nasty workaround to make it easy to "slot in"
99complete
Code:
#!/system/bin/sh
sync;
setprop cm.filesystem.ready 1;
chmod 700 /data/Logatboot.sh
exec /data/Logatboot.sh
edit5: ^^ not so nasty,
I'll depersonalise the log, and move this off to its own thread
/data/Logatboot.sh
Code:
#!/system/bin/sh
bootlog=/data/bootlogcat.txt
if [ -e $bootlog ];
then
rm $bootlog
fi
logcat -f $bootlog *:V &
# wait until bootanimation starts
while [ "`getprop init.svc.bootanim`" != "running" ];do
sleep 5
done
# wait until bootanimation stops
while [ "`getprop init.svc.bootanim`" != "stopped" ];do
sleep 5
done
kill `busybox ps w|grep $bootlog|grep -v grep|cut -d ' ' -f2`
so. each boot a new log is made, so now we only need to teach people how to get /data/bootlogcat.txt to us
starting the script as an init service would be ideal
If I can't get it to fork off to the background I will mod the init.rc
Edit:
kill `busybox ps w|grep $bootlog|grep -v grep|sed -e s/\ \ \/\ /g -e s/\ \ /\ /g|cut -d ' ' -f2`
is better ( get all spacing to 1 )
Edit2 :
need to build in a cleanup routine
privacy issues ( email, location etc )