Android: Customize which radios to disable in Airplane Mode

There are 5 radios in an Android device: Cellular, WiMax, BlueTooth, WiFi and NFC. It is possible to control which are turned off when going into airplane mode.

The first command (settings get) will list the radios that will be turned off when entering airplane mode.
If you don’t want to turn off WiFi and BlueTooth in airplane mode, the second command (settings put) will do that.

> adb shell
$ settings get global airplane_mode_radios
$ settings put global airplane_mode_radios cell,nfc,wimax

Alternatively you can do the same via content resolver:

> adb shell
$ content query --uri content://settings/global --projection name:value --where "name='airplane_mode_radios'"
Row: 0 name=airplane_mode_radios, value=cell,bluetooth,wifi,nfc,wimax
$ content update --uri content://settings/global --bind value:s:'cell,nfc,wimax' --where "name='airplane_mode_radios'"

Moreover, you can control which radios can be toggled on and off while in airplane mode using the following setting:

$ settings get global airplane_mode_toggleable_radios

Via: StackExchange Android and XDA.

This entry was posted on April 24, 2020, in android, blog.