[MOD][Xposed]MyAndroidTools Xposed Module 0.1

Search This thread

nick_white

Senior Member
May 14, 2014
194
50
The module is a great addition.
However, like in MyAndroidTools, I don't want to disable the whole application.
Some applications routinely enable / disable their components that are vital to their functioning, so I don't want those prevented.
However, the same applications also re-enable all sorts of "optional" components. For example, Google Play Services re-enables SMS monitoring receiver, wearable service...
We should be able, like in MyAndroidTools, to blacklist the components themselves, not the whole application. The hooked method receives the ComponentName, so it can be detected. Moreover, you can just check the log and long press to blacklist the components one by one (please display / add option to display the full package name, like MyAndroidTools).
 

patrickdrd

Senior Member
Mar 24, 2015
721
141
highly agreed!

I would say that we want a way to prevent a specific service from auto-starting, not the whole app!
What if the app is trying to launch a service for a specific task as needed?

Here comes another question though:
what if it works this way but the app tries to enable this service over and over again?
Our devices will fill with wakelocks, as happened with me over the weekend when I was testing afwall and
disabled downloads service and I got a downloads wakelock stuck in my wakelocks/alarms!
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    This module prevents components from trying to enable themselves.

    ---------------------------------
    We can use MyAndroidTools or MyAndroidTools Pro (you can find them in the Google Play) to disable components(service,broadcast receiver,activity,content provider).
    But any app can enable their own component through an open api (setComponentEnabledSetting).
    This module just prevent it.
    The icon comes from Uchiha Shisui's Mangekyō Sharingan.

    1. Log:record all the components that use "setComponentEnabledSetting" to enable themselves,not matter whether it is checked in the blacklist.
    2. BlackList settings:select the app you want to block,then save.
    --------------------------------------------
    //the main source code:
    Code:
    XposedHelpers.findAndHookMethod("android.app.ApplicationPackageManager",
                    loadPackageParam.classLoader,
                    "setComponentEnabledSetting",
                    ComponentName.class, int.class, int.class,
                    new XC_MethodHook() {
                        @Override
                        protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                             if (((int) param.args[1]) == PackageManager.COMPONENT_ENABLED_STATE_ENABLED) {
                                   param.args[1]=PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
                                    }
                        }
                 });
    3
    The module is a great addition.
    However, like in MyAndroidTools, I don't want to disable the whole application.
    Some applications routinely enable / disable their components that are vital to their functioning, so I don't want those prevented.
    However, the same applications also re-enable all sorts of "optional" components. For example, Google Play Services re-enables SMS monitoring receiver, wearable service...
    We should be able, like in MyAndroidTools, to blacklist the components themselves, not the whole application. The hooked method receives the ComponentName, so it can be detected. Moreover, you can just check the log and long press to blacklist the components one by one (please display / add option to display the full package name, like MyAndroidTools).
    1
    does MyAndroidTools 1.2.8.7 apk need to be installed first and then this Xposed Module 0.1?
    how exactly does this work? please explain in detail and also the installation procedure.
    1
    @wangqi060934, it is very cool and higly anticipated feature. Thank you!

    But how does it work? How does it distinct components disabled by me with MyAndroidTools and components disabled by host app itself? And, by the way, can such components be visually distinguished in MyAndroidTools's GUI?
    I don't know the nature of this facts but some apps (e.g. Gmail) indeed have services which are disabled without any manual intrusion.

    Kind regards!
    1
    There is a beta2 now. I already have MyAndroidTools 0.9.8.6 installed from Play Store. I downloaded the beta through Xposed and installed it as we usually do for Xposed modules, enabled it in Xposed and rebooted.

    If we go to XPOSED>modules and click on My AndroidTools, we are asked to activate the module. When we click OK, it goes back to the modules screen and if once again clicked, the UI appears. We have Log, Blacklist and Settings options at top left.
    The blacklist menu gives options of third party apps and system apps and when you choose one, the apps are listed with a checkbox against their names. Till now I have experimented. After this comes the conjecture.
    If we choose one or more of the apps and click the save button at top right, then that app is prevented from enabling itself unless we invoke that app ourselves. This is my understanding. I have not attempted it. I am afraid as 1. I am not an expert 2. there is no info about what this module actually does 3. it is an Xposed module 4. I won't have my laptop for some more time (in case something happens).

    The settings option has only one option to show a toast when a blocking happens. The log is a log.

    So if somebody else is brave enough to experiment further or if the OP explains things, I would be happy.

    EDIT:
    The app also appears in the app drawer and clicking it has the same effect as from Xposed.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone