MacroDroid Game Mode

The idea to create this macro/automation (with MacroDroid) is to reduce the power/sources consumption while my kids holding my phone… for games. Starting to higher performance, reduce to lowest performance and finally kill all the gaming apps.

My phone spec:
Samsung Galaxy S7 Edge
Decent UltraLite 3.0
MacroDroid
Rooted with TWRP SuperSU
Notorious kernel
Spectrum (kernel tool)
Kids Mode (game launcher)
39 games apps

Legends:
T — Trigger
C — Constraints / Conditions
A — Actions

Here is the macro, named Game Mode:

T:Empty trigger (optional)
T:Application Launched (Kids Mode)
– I had all games added in Kids Mode (centralized). If you don’t have any game launcher (e.g. Samsung Game Launcher), then you may need to add all of them individually.
T: Application Launched (Lawnchair)
– My default home launcher.
A: Shell Script (setprop persist.spectrum.profile 3)
C: Trigger fired (Application Launched (Kids Mode))
– This to set the kernel to Gaming mode during start up of Kids Mode. No matter what is the current state of it.
A: WHILE / DO
C: Trigger fired – (Application Launched (Kids Mode))
– Start the loop every 5 minutes to check current battery level and update the phone performance accordingly.
A: Modile Data Off
C: Wifi connected (Any network)
– Connected to wifi, turning off data may save some battery.
A: Disable Wifi
C: Wifi not connected (Any network)
– No need wifi, e.g. in car or outside.
A: Location Service Off
– My kids gaming, I don’t need any map directions.
A: Auto Sync Off
– Not doing any work, as the phone with my kids.
If clause
C: Battery < 25%
A: Speak Text (Phone is running out batter bla bla bla)
– To tell my kids the battery is currently low.
A: Screen Off
A: Kill Applications (any apps)
A: Shell Script (setprop persist.spectrum.profile 2)
– Set kernel to Battery mode.
A: Cancel Macro Actions (This macro)
– To stop the loop.
Else
If clause
C: Battery < 30%
A: Speak Text (Phone is running out batter bla bla bla)
– First low battery alert.
A: Shell script (setprop persist.spectrum.profile 2)
– Force kernel set to Battery mode.
Else
If clause
C: Battery < 50%
A: Battery saver on
A: Shell script (setprop persist.spectrum.profile 2)
– Force kernel set to Battery mode.
Else
If clause
C: Battery < 60%
A: Disable wifi
A: Mobile data off
A: Shell script (setprop persist.spectrum.profile 0)
– Set kernel to Balance mode.
Else
If clause
C: Battery < 70%
A: Shell script (setprop persist.spectrum.profile 0)
– Set kernel to Balance mode.
Else
If clause
C: Battery >= 70%
A: Shell script (setprop persist.spectrum.profile 3)
– Set kernel to Gaming mode.
End If
End If
End If
End If
End If
End If
A: Wait Before Next Action (5 minutes)
A: End Loop
If clause
C: Trigger Fired (Application Launched (Lawnchair))
A: Cancel Macro Actions
End If

Yes, the macro is quite long. In fact it’s longer in my phone with some extra stuffs such as messages, wifi and sync interval, etc. Perhaps, I should attach the macro as screenshot 🙂

p/s: Sorry, some actions not captured if I take scroll screenshot.

Leave a Reply