[Xposed Framework Modules] kotey:
Google Analytics

can you implement google analytics blocking?

i know, its irony because you, me, other devs have used it in the past. that was selfish, and a grave mistake. what john doe clicked are going to stay online for a long time...

for now, i'm not very sure since the implementation varies between apps. for example, i've stripped ga from 5 smali lines in an app, did a 2 byte jump/nop patch for another, but another app needed extensive editing for about 250+lines because the author hardcoded ga into almost everything. so far by patching alone the success rate is not 100%, ga (v2) sometimes manages to escape and still run, thus forcing a more aggressive approach. maybe i'm not that good at catching bugs, or maybe they're good at making escape.

my suggestion here is for the basic type (the lazy dev type, point and shoot sdk programming) which somewhat is majority of 'market' apps, not a few crazy type (or tricky or clever or something, i dont know) that i've encountered.

the idea is just like disabling ad calls, by disabling ga at its root.

problem with ga is, its there whether its a free or paid app. some author didn't gave choice to turn it off (want to buy my app, here's ga, live with it as a consequence) most of them never tell users that their activity are being tracked.

adfree/adblock already blocked the phone home address but...:

- clicks/taps are still being recorded, thus wasting cpu

- its a bad thing having an ever growing analytics.db in appdata, it takes space and wears out flash because it commits write while all you do is viewing/tapping and didnt download/save anything.

- by blocking report server, old records usually are not being flushed out, thus making the db even bigger! (and app become slower over time)

- still, privacy issue bla bla, no option to turn off.

for example, an app i did, its service no longer stalled after extended use (now i can do crazy fast clicks), never crashes anymore and app and device become smoother because it no longer tracks everything i did. sounds familiar? that sounds just like why we remove ads in the first place, too.

so:

- we need to kill/eliminate the call(s) to ga

- it may not be possible for all but maybe most generic apps, just like ads

- this should be easier (i guess) than ads, because there's only one usually used analytics, only different implementations

- i think its possible because i've done several before, and i've seen some different and some generic patterns (old ga, new ga, ga+gms etc)

inside the module, it could be another option per app, just like current url filter, and disabled by default.

the drawback is, the result of sucess/failure will be invisible, since the acvitivity itself is invisible, compared to ads.

if you need some idea, maybe i can give some, but my online and/or computing time now is very limited in real life. (one of the reason i can no longer code, among others)

some extra ideas to consider (somewhat extreme, but very effective for me) : detect ad providers, disable the offensive ad activities from app (i used rom toolbox or lucky patcher or android tuner) then minminguard cleans up the remaining mess (if any) real nice. for some app which still display disabled google.ads.activity warning, an extra patch are sometimes needed (this is where i think mmg should overcome, patch that nasty call, usually only need one patch to do the trick) hosts file almost never required then. you might want to consider disabling activities as additional feature (or core function) in future, just a suggestion.

i'm not sure if this idea should be for another app/module/whatever or its a bad/impossible idea itself but here is what/where i think/like it should be, in minminguard.

ps: for ads, i found playhaven, startapp, among the easiest to remove. most of the time, i usually dont mind admob (some author do make it nice and small too), but i hate appbrain because the way it integrates with apps (and full screen ads or nag).