Airplane Mode Timer that LOCKS I have found airplane mode apps where I can set a timer for when it comes on. However, I can't find anything that requires a password to turn it off. I need to set it up on my friend's phone for his son so that it forces the phone into airplane mode every night so his son goes to bed. I've tried various Parental control apps, and they suck. Also, it would be useful to have the option to manually turn the service off by sending an SMS from another phone.

Please, don't tell me that my friend needs to take away his son's phone at night. I agree. But it's not my kid so I can't do it myself.
You don't need a password for anything here, neither you've to worry much that the Airplane mode would get disabled by the kid.  Of course, if the kid is smart then s/he would find a way to by-pass the restrictions  imposed using the following solution. 

For the solution, you need to use an automation app app like Tasker (paid but trial is available) or MacroDroid (free/Pro). I've demonstrated the solution using the latter because its free version does the job.

Note: Device needs to be rooted.


We would create a macro which would make sure that if the kid disables Airplane mode by any means the Airplane mode would get turned on automatically as long as the time period remains true.


Install and launch MacroDroid.
Tap Add Macro  &rarr; Airplane Mode Changed &rarr; Airplane Mode Disabled &rarr; OK.
Under Add Actions, tap Airplane Mode On/Off &rarr; Airplane Mode On &rarr; OK &rarr; (leave options unchecked) OK &rarr; proceed.
Under Add Constraints, tap Time of Day &rarr; choose Start Time and Stop Time i.e. for the time period where you want Airplane mode to get enabled and remain active until another time is reached, such as 22:00 to 05:00 &rarr; OK &rarr; proceed.
Name the macro as Persist Airplane Mode &rarr; OK.


Your macros would show up under Macros at the default page of app.
Create a new macro to start the Airplane Mode for the time where you want the kid to sleep or go to bed:


Tap Add Macro &rarr; Day/Time Trigger &rarr; choose Days of the week and Time of Day, such as Saturday, 22:00 &rarr; OK.
Under Add Actions, tap Airplane Mode On/Off &rarr; Airplane Mode On &rarr; OK &rarr; (leave options unchecked) OK &rarr; proceed.
Ignore Add Constraints and name the macro as Start Airplane Mode.

The Airplane mode can be turned off easily after the device is rebooted and before MacroDroid is started from startup. MacroDroid wouldn't activate the Airplane mode automatically after reboot unless told to do so. 

To make sure that Airplane mode gets enabled automatically after reboot, make the following macro:


Tap Add Macro &rarr; Device Boot.
Under Add Actions, tap Airplane Mode On/Off &rarr; Airplane Mode On &rarr; OK &rarr; (leave options unchecked) OK &rarr; proceed.
Under Add Constraints,  tap Time of Day &rarr; choose Start Time and Stop Time i.e. for the time period where you want Airplane mode to get enabled and remain active until another time is reached, such as 22:00 to 05:00 &rarr; OK &rarr; proceed.
Name the macro as Activate On Boot &rarr; OK.

Now, create a final macro which would disable the Airplane mode at a particular time:


Tap Add Macro &rarr; Day/Time Trigger &rarr; choose Days of the week and Time of Day, such as Saturday, 05:00 &rarr; OK.
Under Add Actions, tap Airplane Mode On/Off &rarr; Airplane Mode Off &rarr; OK &rarr; (leave options unchecked) OK &rarr; proceed.
Ignore Add Constraints and name the macro as Stop Airplane Mode.

You also need to activate MacroDroid as Device Administrator so that it can't be force-stopped or uninstalled easily.


Go to Settings &rarr; Security &rarr; Device Administrators and choose MacroDroid in it. 
Also, go to Settings &rarr; Apps &rarr; MacroDroid &rarr; uncheck Show notifications so that its icon and notification doesn't remain visible or persistent.



I've not tested the SMS feature in MacroDroid but I've no reason to believe that it wouldn't work. Give it a try.