How to export data usage stats? I am able to see the stats generated by Android at Settings&gt;Data Usage for cellular data and wifi both. Is there any way to export these stats?

I don't think android has any option for the extraction. I know apps which track data, but they wont give me historical data.

Where is this data stored, maybe, I can extract it from there.

My phone is Moto G5S, running 7.1.1, not rooted.
You can save data usage recordings using an ADB command like the following:



adb shell dumpsys netstats detail full &gt; data_usage.txt


If you are interested in the data usage of a specific application, you can find its identifier (which is used in the above recordings) using a command like the following:



adb shell dumpsys package com.example.application | grep userId