Mobile data is set to auto turn on with command but isn't working I'm using 2 apps, "MacroDroid" and AutoInput", I set a command(Macro) that would turn on mobile data and location. But when I sent the text, it shows that mobile data and location are "on" but only location works.
And when I try to manually turn on data it won't work unless I restart my phone.
Why is this happening?

Edit : From comments. OP used adb commands to give elevated privileges to an unrooted device for MacroDroid
Using adb commands to gain elevated privileges is a hack and is not guaranteed to give you behavior as on a rooted device

With macrodroid this holds true for turning data off /on. See my comment in the app forums and developer 's reply


  The common behaviour I see is that it does actually enable/disable data but then you cannot modify it later using the system controls until you reboot. However anything that is done via a hack like this may be subject to failure on different devices as it's always possible to have different implementations from other manufacturers that prevent the hack working.