Setting permissions on Android¶
Kanzi Monitor writes trace files to the host application’s internal storage (Context.getFilesDir()), which does not require any manifest permission. The only Android permission Kanzi Monitor requires is network access for the remote console (TCP) and the Monitor Web UI bridge.
Setting permissions in the manifest file¶
In the application manifest file, add the INTERNET permission:
<uses-permission android:name="android.permission.INTERNET"/>
Note
Kanzi Monitor 1.40.0 wrote traces to external storage (/sdcard/), which required MANAGE_EXTERNAL_STORAGE (SDK 30 and later) or WRITE_EXTERNAL_STORAGE (earlier SDKs). Starting in 1.41.0, traces go to internal storage and neither permission is needed for Kanzi Monitor. Remove them unless your host application uses them for other reasons. See Migration guides for the trace-output-path change and how to copy traces off the device with adb run-as.
Enabling profiling on release builds¶
To capture traces with Android Performance Analyzer or the perfetto CLI against a release-style build (e.g. using the perfetto-producer writer), declare the application as profileable in the manifest. This lets shell tools attach without requiring android:debuggable="true", which would change runtime performance characteristics.
<application>
...
<profileable android:shell="true" />
...
</application>
This is required when ActiveWriters includes perfetto-producer (see Configuring Kanzi Monitor) — Perfetto’s traced daemon will refuse to collect events from a process that is neither debuggable nor profileable.