Fix trace naming due to an overwrite permission issue with root permissions

When adbd was started as root, the trace was owned by 'root' user.
If, afterwards, adbd started to record a trace with 'shell' permissions,
it would fail, because it doesn't have the permissions to overwrite the
trace in the output directory.

Now, after having readed a trace, we always try to delete it.
This deletion will succeed only for 'root' users, and fail for 'shell'
users. This will solve the case described before.

Change-Id: Ideb577d89e2e0bb85ad6aba86bdf93e36d5faea1
2 files changed
tree: 695fbe97a43761cdc295d2168639f71a159acd97
  1. bazel/
  2. build_overrides/
  3. buildtools/
  4. debian/
  5. docs/
  6. gn/
  7. include/
  8. infra/
  9. protos/
  10. src/
  11. test/
  12. tools/
  13. ui/
  14. .clang-format
  15. .gitignore
  16. .gn
  17. Android.bp
  18. Android.bp.extras
  19. BUILD
  20. BUILD.extras
  21. BUILD.gn
  22. codereview.settings
  23. heapprofd.rc
  24. MODULE_LICENSE_APACHE2
  25. NOTICE
  26. OWNERS
  27. perfetto.rc
  28. PRESUBMIT.py
  29. README.chromium
  30. README.md
  31. TEST_MAPPING
  32. WORKSPACE
README.md

Perfetto - Performance instrumentation and tracing

Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.

See www.perfetto.dev for docs.

Bugs

  • For bugs affecting Android or the tracing internals use the internal bug tracker (go/perfetto-bugs).
  • For bugs affecting Chrome use http://crbug.com, Component:Speed>Tracing label:Perfetto.