This question already has an answer here:
I am writing an application for reporting crashes and the relevant logs. So from my application I am trying to access traces.txt and tombstones, but I am getting an error:
03-25 09:48:46.220 W/System.err(10250): java.io.FileNotFoundException: /data/tombstone/tombstone_00 (Permission denied)
I am able to access traces.txt, but not tombstones.
If you get "permission denied" you can do this:
You can capture a full bug report in Developer Options (see Android docs). In the bug report's ZIP file, you can find
tombstones
andanr
folders in/FS/data
.This will with rooted and unrooted devices.
You can use adb tool located in your_sd_root_dir/tools. Use it like this
This will copy traces.txt in anr.txt in your current set directory
You should be able to get the file you need via DropBoxManager class http://developer.android.com/reference/android/os/DropBoxManager.html
The tombstone file is also copied to dropbox (at least on emulator)
Adb shell data/system/Dropbox then use ls to view files generated inside Dropbox iinside dropbox you will get crashes,anr and traces file
If you want access them create folder and open adb inside that folder and use following command adb pull data/system/dropbox