There is a 60s timeout for this command. I'd rather do it as an individual timeout
for each of the services, but this is easier and will probably cover for busted apps
well enough. Also, this is running last in dumpstate, so if it's lost... oh well.
Also, clean up the formatting of the service dump so it's more readable in bugreport.
Change-Id: Ibd727f4b3366f7af9e7ef1e231868f5cedc48132
Merge commit '9a430d8c0e376160f287e50cdad99177e69ec384'
* commit '9a430d8c0e376160f287e50cdad99177e69ec384':
allow dumpstate to work for non-root users.
- New feature to "am monitor" to have it automatically launch
gdbserv for you when a crash/ANR happens, and tell you how to
run the client.
- Update dumpstate to match new location of binder debug logs
- Various commented out logs that are being used to track down
issues.
Change-Id: Ia5dd0cd2df983a1fc6be697642a4590aa02a26a5
setuid() and family can fail. Check return values to make
sure this doesn't happen unexpectedly.
Also call setgid() to drop root group permissions.
Change-Id: Id06fbe6239e2ed2fe23368695e333514e0581e6d
This comes in the form of a command, `screenshot`, which
will read /dev/graphics/fb0 (in a manner very similar to
adb's framebuffer_service) and write to the specified PNG
file.
Additionally, dumpstate now accepts a -p flag (mnemonic:
"picture" or "png") that, when specified, will cause a
screenshot to be captured in the same directory as the
bugreport.
Future work: invoke `dumpstate -p` when the bugreport
keychord is pressed, giving users a convenient way to attach
screenshots to bug reports (or simply take screenshots at
all without developer tools).
Bug: 2216571 (and probably plenty of others)
Change-Id: I36afbc55a0308a7bc01112ef39c4c62777efb203
- include basic build & timestamp information in the header
- collect stack traces immediately at bugreport time
- *also* show stack traces from last ANR (as before), if in the last 15 minutes
- alphabetize system properties dump
- remove now-obsolete (and always questionable) "dumpcrash" functionality
- write to a .tmp file first, then rename to the final filename
- friendly usage message
- output sections include the exact file/command run
- source de-weirdification -- it's several hundred lines shorter now
The same data is present in the same order as before, and I've tried
to preserve all the grep/search targets people might use to find their
way through the file.
This is needed since its no longer copied to /data/dontpanic by init.
Change-Id: I5217da73ec470653824b7fb9a31e093e263a8dc9
Signed-off-by: Dima Zavin <dima@android.com>
Since the logcat is not printed until later in the output, this will
make it easier to determine at what point the user pressed the key sequence
to initiate the bugreport, which can be helpful when debugging timing dependent problems.
b/2164183
Change-Id: I5b650a6163c383183ff28e344dac36fab11a2c7b
Signed-off-by: Mike Lockwood <lockwood@android.com>
Now that we have straightened out the permissions on /data/dontpanic,
root is no longer necessary.
Change-Id: Ic895d712c2e929e4935707da321e1a2b015285c0
Signed-off-by: Mike Lockwood <lockwood@android.com>
This will be used to allow running dumpstate as root from the init process
to enable gathering debugging information that requires root to access.
Change-Id: I5bb7e83071fad2b377e549058f318a5118194061
Signed-off-by: Mike Lockwood <lockwood@android.com>