Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Auto-save logcat during installation #130

Open
Tungstwenty opened this issue Apr 17, 2014 · 1 comment
Open

Auto-save logcat during installation #130

Tungstwenty opened this issue Apr 17, 2014 · 1 comment

Comments

@Tungstwenty
Copy link
Contributor

It would be useful to have some logic on the Installer (potentially optional) to help obtain better troubleshooting info with less effort from non-tech users.
One of these would be storing the logcat while doing a soft-reboot, so it can then be posted or shared.

A process can be spawned on the background with nohup to avoid getting it killed when the zygote process tree restarts:
nohup .../logcat_grabber.sh &

logcat_grabber.sh could contain:

logcat -v time > .../logcat.log
CHILD_PID=$!
sleep <reasonable seconds to wait for the boot(loop)>
kill $CHILD_PID

Actually, check http://stackoverflow.com/a/2387538 for some additional safety to prevent killing the child in case some other process has already reused its pid.

@rovo89
Copy link
Owner

rovo89 commented Apr 17, 2014

That's a good idea, I think it would help to get better logs.

One idea on SO is to use the "timeout" command. It's also part of BusyBox (just not enabled in our version), so we could be sure that we get the expected behavior. I'd prefer that over a script that might be interpreted differently, depending on things like the installed shell.

I would probably make this optional, maybe with a target path that could be chosen by the user (to make it easier for them to share it). When enabled, we might want to disable options like installation via recovery, full reboot etc. to ensure that normal installation + soft reboot is used.

@rovo89 rovo89 added question and removed question labels May 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants