4

For using macrobenchmark, we need to add <profileable> to AndroidManifest.

<profileable
    android:shell="true"
    tools:targetApi="q" />

Is it safe to include <profileable> in the production build?

mlykotom
  • 4,850
  • 1
  • 22
  • 27
STAR_ZERO
  • 1,400
  • 11
  • 21

2 Answers2

5

It is considered safe. It exposes only limited amount of information that are either obfuscated or lacking symbols in the release build. Some of the Google apps are using it in production.

mlykotom
  • 4,850
  • 1
  • 22
  • 27
1

Why not merge this manifest node with the debug source-set?
One also could remove it from the release source-set, same effect.
This might not answer the question, but it makes it irrelevant.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • Yeah, it makes sense. I will merge the manifest in my project. But, I want to know it. If it has any problem, I will share it with my colleagues. – STAR_ZERO May 19 '22 at 04:22
  • I'm not exactly sure, in particular what it does or if it even still works with `debuggable="false"`... but it's generally a good practice to keep all debug-mode related things strictly apart from the release build. Alike in this case, when not being certain about it - it doesn't matter. – Martin Zeitler May 19 '22 at 05:44