[Macro Tip] Stop any service(s) at boot

aitn

Member
I got the following phone:
Moto G Pure | 2021 | 2-Day battery | Unlocked | Made for US by Motorola | 3/32GB | 13MP Camera | Deep Indigo
https://www.amazon.com/gp/product/B09BTB5MKT/
It has an Android 11 installed.


I followed the guide on reddit titled “Found a way to disable OTA Updates on Android 11 Motorolas.”

[ https://www.reddit.com/r/MotoG/comments/zk4m5b
The last step mentions that:

*“Now, reboot the device.*

*Here's the caveat of this approach - We can disable run in background permissions, but cannot control the BOOT\_COMPLETED intent. This means the two apps still auto-start on each boot after receiving the boot complete signal.*

*Workaround you need to do on every reboot of the device:*

*Go to Settings -> System -> Advanced -> Developer Options -> Running Services*

*Select Software Update. You'll see two processes: OTA Service, and FOTA Controller. Hit stop on both of them, one by one. The Android system will then kill both processes. Due to the RUN\_IN\_BACKGROUND deny restriction, the Software Update app will stay down until the next reboot as Android will not allow it to restart."*

For the completeness of the guide above, for the last manual step to do at boot, I was able to create a macro that does it automatically for you using Macrodroid app:

The macro I'm sharing with you was created for Motorola Software Update/Software Update services but you could change it to any other service you want to close.

It runs at boot, scans Running Services for either Motorola Software Update or Software Update services and stops them. Was only tested on a Motorola G Pure. Adjust the XY coordinates, service names and time values as needed to match your phone.

The macro has comments that explain most of the actions but let me know if you have any questions.

Note: This is meant only for services that can't be disabled through adb. Otherwise use adb to disable them when possible.
 

Attachments

  • Stop_Motorola_Software_Update_Official.macro
    7.4 KB · Views: 38
Last edited:

aitn

Member
@Dimlos @Endercraft @Jacob L Does anyone has an issue to import the macro?

Someone on reddit
https://www.reddit.com/r/macrodroid/comments/144vdas/_/joark37 says:

"Thanks for this. I tried to import the macro into the latest Macrodroid and I get a "Import Failed Could not import macros" error.... Any ideas?"

To which I responded:

"How are you importing the macro? What steps are you taking exactly inside the app?

I used Macrodroid v5.32.8 to export the single macro which generated the file "Stop_Motorola_Software_Update_Official.macro" which I think has a pretty standard JSON structure when you try to open/view the file content with a notepad?

I would defer to u/Lawsonator85 to see if he has any ideas or has the same issue as you when trying to import it."
 

Endercraft

Moderator (& bug finder :D)
It may be the version. Some versions had a bug that would not let you import macros or backups.
 
Top