Themes / Apps / Mods [MOD/magisk/root] Magisk module to disable app Ads/Analytics/Firebase/Crashlytics

Search This thread

hanschke

Senior Member
Mar 30, 2007
1,743
234
A GUI will BE nice with Community Support that we will get Feedback from others WHO Tell us If the app work after disabling it and it is safe
 
Attached is a (simple) Magisk module which allows you to disable:

- app measurement
- app analytics
- app firebase tracking
- app crashlytics

In short, each APK (system app or user app) may have background services to do all sorts of tracking and ad handling. Module allows you to disable (or enable) those services.

You must obviously be rooted and have a working Magisk.

How to install:
Code:
a) download attached zip file
b) push the zip file to your /sdcard folder (use: adb push dss.zip /sdcard)
c) open Magisk
d) in the panel at the bottom, tap the "modules" icon
e) at the top, select "install downloaded module"
f) navigate to your /sdcard folder
g) select dss.zip
h) tap the reboot button

After installation:
The script must be run manually using the command line. First, open a shell using adb:
Code:
> adb shell
$ su
#
The script has the following syntax:
Code:
dss {disable|enable} {user|system} <package-name>
You must provide 2 or 3 arguments to the script:
a) first argument is "disable" or "enable" (by default Analytics/Firebase/etc services are enabled)
b) second argument is "user" or "system" (use "user" for any app wich you installed using an APK or installed from play store; use "system" for apps which come as part of the official Google image, e.g. contacts/dialer/messaging)
c) the third argument is optional and - if present - contains the name of a specific package (e.g. com.banking.mybankapp)

Examples:

1) disable analytics/firebase/etc for ALL user apps
Code:
# dss disable user
2) enable analytics/firebase/etc for ALL system apps (this is the default)
Code:
# dss enable system
3) disable analytics/firebase/etc for Feedly
Code:
# dss disable user com.devhd.feedly
The script will show you output of the services which get disabled, for example for the Feedly case:
Code:
Component {com.devhd.feedly/com.facebook.internal.FacebookInitProvider} new state: disabled
Component {com.devhd.feedly/com.google.android.gms.analytics.AnalyticsJobService} new state: disabled
Component {com.devhd.feedly/com.google.android.gms.analytics.AnalyticsReceiver} new state: disabled
Component {com.devhd.feedly/com.google.android.gms.analytics.AnalyticsService} new state: disabled
Occasionally it can happen that after disabling Analytics/Firebase/etc, the app no longer works. Then just "enable" again. Apps should - in principle - be resilient but some are not coded properly. Alternatively, you can try to figure out exactly which of the services causes the crash and (manuall) re-enable that service (but you will need to look into the source code a bit). When you run this on Feedly for example, you will find that it crashes afterwards (reason is that the script disabled com.devhd.feedly/com.facebook.internal.FacebookInitProvider). You can re-enable that service individually using:
Code:
pm enable com.devhd.feedly/com.facebook.internal.FacebookInitProvider
or just do:
Code:
# dss enable user com.devhd.feedly
(that will re-enable all the services previously disabled)

You can also disable stuff for system apps, e.g. com.android.contacts (Contacts), com.android.vending (Play store app), etc ...
However, one BIG WARNING. If you disable this for system apps, make sure to re-run the script with the 'enable system' argument BEFORE running a Play-systemupdate otherwise that may bootloop. So, to be on the safe side, if you have used the script to disable services in system APKs, then run:
Code:
# dss enable system
before doing the Play-systemupdate.

I you want to check the source code (simple sh script), just unzip the dss.zip in a new directory and check out the file system/bin/dss. It's not complicated ...

This will save you (a tiny litte bit) of battery, but more importantly, a lot of nasty "tracking" (which you don't need).

Changes are persistent across reboots.

@foobar66 is this on github now somewhere? Just so it is easier to maintain / check for updates?
 

cbomb1337

Senior Member
Jan 22, 2019
219
59
melbourne
OnePlus 7
OnePlus 7 Pro
I wonder what that enable error is though when using disable command.
 

Attachments

  • Screenshot_20221128_021016_Termux.jpg
    Screenshot_20221128_021016_Termux.jpg
    1.5 MB · Views: 93
Last edited:

cbomb1337

Senior Member
Jan 22, 2019
219
59
melbourne
OnePlus 7
OnePlus 7 Pro
Guys, there's a much faster, convenient way to do the same thing (and much more) using a GUI:
GitHub
https://github.com › MuntashirAkon
MuntashirAkon/AppManager: A full-featured package manager and viewer ...
It's slightly different I think. This one "dss" was disabling a couple other stuff I think it was like app measurement. Hey op I noticed it disables nova launchers accessibility. Can you disable that it's needed to swipe up it makes a message pop up about it.
 
Last edited:

G5-User7080

Senior Member
May 31, 2018
80
23
same error as @cbomb1337
on your github you show the feedly app (whatever that is) as example, but I don't know why it's trying to disable it on my phone when running "dss disable user", I don't have this app installed.
same for "com.strava/com.facebook.internal.FacebookInitProvider"
 

cbomb1337

Senior Member
Jan 22, 2019
219
59
melbourne
OnePlus 7
OnePlus 7 Pro
Facebookinit provider is a component. I seen it in rooted app manager and 3c Toolbox when looking through apps. Not every app has it inside I blocked that component with app manager on selected apps that have no Facebook login. But also app manager can be dangerous I bricked the tab s7 like 8 times blocking stuff. But getting better at figuring out what we can and can't block lol. I was eventually able to block probably more stuff then this module with app manager but it takes time to get it right.
 

foobar66

Senior Member
Jan 8, 2011
2,136
2,216
Brussels
Google Pixel 6 Pro
Facebookinit provider is a component. I seen it in rooted app manager and 3c Toolbox when looking through apps. Not every app has it inside I blocked that component with app manager on selected apps that have no Facebook login. But also app manager can be dangerous I bricked the tab s7 like 8 times blocking stuff. But getting better at figuring out what we can and can't block lol. I was eventually able to block probably more stuff then this module with app manager but it takes time to get it right.
Correct, as I said in the OP:

"Occasionally it can happen that after disabling Analytics/Firebase/etc, the app no longer works. Then just "enable" again. Apps should - in principle - be resilient but some are not coded properly. Alternatively, you can try to figure out exactly which of the services causes the crash and (manuall) re-enable that service."
 

G5-User7080

Senior Member
May 31, 2018
80
23
Facebookinit provider is a component. I seen it in rooted app manager and 3c Toolbox when looking through apps. Not every app has it inside I blocked that component with app manager on selected apps that have no Facebook login. But also app manager can be dangerous I bricked the tab s7 like 8 times blocking stuff. But getting better at figuring out what we can and can't block lol. I was eventually able to block probably more stuff then this module with app manager but it takes time to get it right.
App Manager is just a tool that lets you do what you want however you want, including bricking your phone.
dss is is a solution that does everything for you and (hopefully) doesnt brick ur device.
No matter how good a solution is, it can only offer generalised settings based on a guess what makes sense for the average user.

I use dss as a general "idk how this works, please do it for me" thing and then apply app managers recommended actions on newly installed user apps such as discord, instagram, etc.
This way if the app breaks, worst case I just reinstall it and it doesnt break anything from the system or give me a headache trying to figure out which thingy now trips play integrity.
 

maks44

Member
Sep 28, 2014
8
1
but the script hangs. Anyone else have this problem?
I suppose that system processes should be killed before changing the state of activities. For example:
su -c "killall -9 com.google.android.gms"

I faced this problem when I developed my own script to disable Nearby garbage in Google Play Services
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Attached is a (simple) Magisk module which allows you to disable:

    - app measurement
    - app analytics
    - app firebase tracking
    - app crashlytics

    In short, each APK (system app or user app) may have background services to do all sorts of tracking and ad handling. Module allows you to disable (or enable) those services.

    You must obviously be rooted and have a working Magisk.

    How to install:
    Code:
    a) download attached zip file
    b) push the zip file to your /sdcard folder (use: adb push dss.zip /sdcard)
    c) open Magisk
    d) in the panel at the bottom, tap the "modules" icon
    e) at the top, select "install downloaded module"
    f) navigate to your /sdcard folder
    g) select dss.zip
    h) tap the reboot button

    After installation:
    The script must be run manually using the command line. First, open a shell using adb:
    Code:
    > adb shell
    $ su
    #
    The script has the following syntax:
    Code:
    dss {disable|enable} {user|system} <package-name>
    You must provide 2 or 3 arguments to the script:
    a) first argument is "disable" or "enable" (by default Analytics/Firebase/etc services are enabled)
    b) second argument is "user" or "system" (use "user" for any app wich you installed using an APK or installed from play store; use "system" for apps which come as part of the official Google image, e.g. contacts/dialer/messaging)
    c) the third argument is optional and - if present - contains the name of a specific package (e.g. com.banking.mybankapp)

    Examples:

    1) disable analytics/firebase/etc for ALL user apps
    Code:
    # dss disable user
    2) enable analytics/firebase/etc for ALL system apps (this is the default)
    Code:
    # dss enable system
    3) disable analytics/firebase/etc for Feedly
    Code:
    # dss disable user com.devhd.feedly
    The script will show you output of the services which get disabled, for example for the Feedly case:
    Code:
    Component {com.devhd.feedly/com.facebook.internal.FacebookInitProvider} new state: disabled
    Component {com.devhd.feedly/com.google.android.gms.analytics.AnalyticsJobService} new state: disabled
    Component {com.devhd.feedly/com.google.android.gms.analytics.AnalyticsReceiver} new state: disabled
    Component {com.devhd.feedly/com.google.android.gms.analytics.AnalyticsService} new state: disabled
    Occasionally it can happen that after disabling Analytics/Firebase/etc, the app no longer works. Then just "enable" again. Apps should - in principle - be resilient but some are not coded properly. Alternatively, you can try to figure out exactly which of the services causes the crash and (manuall) re-enable that service (but you will need to look into the source code a bit). When you run this on Feedly for example, you will find that it crashes afterwards (reason is that the script disabled com.devhd.feedly/com.facebook.internal.FacebookInitProvider). You can re-enable that service individually using:
    Code:
    pm enable com.devhd.feedly/com.facebook.internal.FacebookInitProvider
    or just do:
    Code:
    # dss enable user com.devhd.feedly
    (that will re-enable all the services previously disabled)

    You can also disable stuff for system apps, e.g. com.android.contacts (Contacts), com.android.vending (Play store app), etc ...
    However, one BIG WARNING. If you disable this for system apps, make sure to re-run the script with the 'enable system' argument BEFORE running a Play-systemupdate otherwise that may bootloop. So, to be on the safe side, if you have used the script to disable services in system APKs, then run:
    Code:
    # dss enable system
    before doing the Play-systemupdate.

    I you want to check the source code (simple sh script), just unzip the dss.zip in a new directory and check out the file system/bin/dss. It's not complicated ...

    This will save you (a tiny litte bit) of battery, but more importantly, a lot of nasty "tracking" (which you don't need).

    Changes are persistent across reboots.

    github: https://github.com/foobar66/dss
    3
    Flashed and disabled analytics on ProtonAOSP. Thank you for the tool.
    3
    wow, thanks OP
    I did disable analytics/firebase/etc for ALL user apps and scrolling facebook on Chrome no longer jittery.
    3
    207 user packages got disabled.

    1. Do I have to also run "dss enable system" after the initial "dss disable user"?
    2. Will I have to re-run this after an app updates?
    3. Will I have to re-run this after a monthly android update?