Conan Troutman · Feb 11, 2013 at 07:00 pm

How to Enable Anonymous Usage Statistics In Your ROM

Anyone who has ever flashed a build of CyanogenMod could not have possibly failed to notice the initial notification after a fresh install. That’s right, the one asking whether or not you would like to opt in to allow the transmission of anonymous usage statistics from your device. For any developers out there who would also like to keep track of how their work is being used, XDA Senior Member mcbyte_it has made that a lot easier to implement. And as we already provide this information to Google, we may as well help out any curious developers as well, right?

The information in question is completely non-invasive and anonymous. It consists of an MD5 hash of either IMEI or WiFi MAC address, country and carrier info, device model/version and ROM name/version. It also sends a record of the first check in and last check in which enables the removal of inactive devices from the database. This should help to give developers a pretty clear picture of where their work is used and on which devices.

The process of implementing this into your ROM is pretty straightforward and consists of two procedures. The first requires you to add the Romstats.apk file into your ROM as either a system or user app (if you’d prefer to give the user the option of uninstalling as well as opting out), and making the necessary amendments to the build.prop file. The application itself is created from the original sources of the CyanogenMod statistics reporting APK, and the sources are available from a Github link in thread. The second part of the process involves setting up a web application to receive and store the data. Mcbyte_it’s solution to this is simple: PHP page and Mysql database to store the data.

Everything you need to set this up can be found in the original forum thread, so be sure to check it out if you’d like to implement this.


_________
Want something on the XDA Portal? Send us a tip!
TAGS:

Conan Troutman

Conan Troutman is an editor on XDA-Developers, the largest community for Android users. Senior Moderator, Newswriter, Recovering Meme Addict. View Conan Troutman's posts and articles here.
Mario Tomás Serrafero · Jul 5, 2015 at 11:00 am · 2 comments

Sunday Debate: Which Factors Caused HTC’s Woes?

Join us in a fun Sunday Debate on HTC's situation. Come with your opinions and feel free to read some of our thoughts, then pick your side or play devil’s advocate to get your voice heard and engage in friendly discussion. You can read our food-for-thought or jump straight into the fray below!     HTC is underperforming, and there isn’t much of a way of denying this. In April, their revenue nearly declined 40%, plummeting after the HTC One M9 had...

XDA NEWS
Mathew Brack · Jul 4, 2015 at 05:07 pm · 4 comments

HTC’s New Ad Campaign And What It Really Means

HTC has just released three new blind test adverts comparing app loading speed, audio and selfies. Whilst you are surely astounded that HTC won every time, the tests were incredibly biased and their release shows something concerning about the company and how they are performing in the current market.     One of the many reasons companies tend to utilize blind trials is when they feel that their product is comparable or better than its competitors. This leads to the assumption...

XDA NEWS
Mario Tomás Serrafero · Jul 4, 2015 at 12:00 pm · 5 comments

XDA Picks: Best Apps of the Week (June 27 – July 4)

Apps are at the front and center of any smartphone experience, and with over a million apps on the Google Play Store and new apps being submitted to our forums every day, staying up to date on the latest apps and games can be a hassle. At XDA we don’t discriminate apps - if it’s interesting, innovative, original or useful, we mention them. The XDA Portal Team loves apps too, and here are our top picks for this week.  ...

XDA NEWS
Share This