How do I disable metrics with the Android CLI?


The Android CLI, which has superseded the sdkmanager, collects statistics by default:

> Android CLI collects data on basic usage of the tool.

How can I disable data collection?

1
Sep 5 at 10:27 PM
User Avatarjpmc26
#android#command-line#android-sdk-manager#data-collection

Accepted Answer

Android CLI supports a --no-metrics flag that supposedly disables data collection:

android --no-metrics info

To permanently disable metrics, you can create an .androidrc file in your home directory. Just include the flag:

--no-metrics

<sub>If someone wants to actually do some network monitoring to prove this works, that would be amazing. I might eventually do so myself if no one else does.</sub>


You can confirm that the android command is actually using your rc file by including a garbage flag. For example, including --proveit will cause this behavior:

.androidrc:

--no-metrics
--proveit
PS&gt; android --no-metrics --version
Warning: failed to parse .androidrc: Unrecognized option: --proveit
1.0.16261425
User Avatarjpmc26
Sep 5 at 10:27 PM
2