Trying to get access to "data/tombstones" directory from my rooted phone. I am implementing a crash collector application (system application) which would help to record the system's ANRs and tombstones crashes. I am able to access the "data/anr" but not "data/tombstones"

I have written required SELinux rules to access both "data/anr" and "data/tombstones" but still it does not work for tombstones.

I am trying to read them through below Lines of code:

File[] anrs = new File("/data/anr/").listFiles();
File[] tombstones = new File("/data/tombstones").listFiles();

This way I can read the ANRs but not tombstones.

Any help to solve this will be appreciated.

  • Please note that app development is off-topic since Android Enthusiasts focuses on end-users or power-users (but not necessarily developers) solving their issues. While the community may help in explaining what happens, code-related solution is off-topic here and may be more suitable on Stack Overflow.
    – Andrew T.
    Commented Nov 3, 2022 at 9:26
  • this is not just an app development but system application and feature implementation where I am trying to access crash dumps and logging them via a system application. For this, I may have to modify the selinux permissions in system/sepolicy. And so i posted this query here
    – Lavyansi
    Commented Nov 3, 2022 at 10:08
  • 1
    Thanks for the clarification. My comment was just a heads-up in case the solution is app-level coding.
    – Andrew T.
    Commented Nov 3, 2022 at 10:12
  • Can't you just get what you need from a bug report? Settings/system/developer options/bug report. Or, if enabled, from your power menu screen.
    – Orfan
    Commented Nov 7, 2022 at 3:11


You must log in to answer this question.

Browse other questions tagged .