There’s always been a fear that a phone’s radio frequencies can cause issues with airplane equipment. Before the smartphone era, airplane passengers were instructed to turn off all electronics just as a precaution. Smartphones introduced Airplane Mode so that we could still use them for other things like playing a game or watching a video. Some users even use Airplane Mode outside of travel to save a little battery life or as a way to go cold turkey from the Internet. When you enable Airplane Mode, it disables all radios on the device such as cellular, WiFi, NFC, and Bluetooth. However, Bluetooth is generally permitted on a plane and some even allow WiFi use. Here’s a tutorial on how to prevent WiFi, Bluetooth, or any other radio from being disabled when you turn on Airplane Mode.
How to Prevent Airplane Mode from Disabling Certain Radios
- Install the USB drivers for your device manufacturer (Google provides a list of some universal USB drivers here).
- Download the ADB binary for your operating system (Windows, Mac, Linux). These links will always point to the latest version of ADB.
- Extract the contents of the ADB binary ZIP file into a folder on your PC.
- Launch the Settings app on your device and tap on the About Phone option.
- Find the Build Number and tap on it 7 times so we can enable Developer Mode.
- Go back to the Settings main menu and enter Developer Options then toggle USB Debugging on.
- Plug your phone into the computer and change it from “charge only” mode to “file transfer (MTP)” mode. Some devices require this step as a security measure before permitting ADB to work.
- Go back to the PC and bring up the directory where you extracted the ADB binary.
- Launch a Command Prompt or Terminal in your ADB directory. For Windows users, this can be done by holding Shift and Right-clicking then selecting the “open command prompt here” option. (Some Windows 10 users may see “PowerShell” instead of “command prompt”.)
- Once you’re in the Command Prompt or Terminal environment, execute the following command:
- This will start the ADB daemon if it hasn’t been launched already. You may even see a prompt on your phone asking you to authorize a connection with the computer. Allow USB Debugging access here.
- Now if you re-run the adb devices command from step 10, the command prompt/terminal will print the serial number of your device. If so, then you’re ready to move on. If not, then the USB drivers are likely not installed properly.
- Execute the following command in the command prompt or terminal:
- Then run the following command to prevent Airplane Mode from turning off WiFi:
settings put global airplane_mode_radios cell,bluetooth,nfc,wimax
- Alternatively, you could do this command to prevent Airplane Mode from turning off WiFi and Bluetooth:
settings put global airplane_mode_radios cell,nfc,wimax
- Each item we remove from the list tells Android to leave that radio on when Airplane Mode is toggled on.
- If you ever want to return things back to how they were, you can execute the following command in an ADB shell prompt:
settings delete global airplane_mode_radios
So as you can see from the steps above, we’re using ADB commands to manually customize exactly what radios are shut off when we hit that Airplane Mode button. Normally, Airplane Mode will shut off cellular, WiFi, NFC, Bluetooth and WiMAX (if it exists) radios, but removing one or more of these from the list with the ADB command shown in Step 14 makes it so that it’s ignored. In the example I gave above in step #15, I chose to have both WiFi and Bluetooth stay on when I enable Airplane Mode.
This is why the command only includes cellular, NFC, and WiMAX options. Since we’re leaving those two radios out of the ADB command in step #15 (WiFi and Bluetooth in this case), Android will leave those radios alone when you toggle Airplane Mode on. You can use any combination here by leaving out any of these options, and even make it so that cellular radios stay on when you turn Airplane Mode on. Just make sure you know what you’re doing because keeping the cellular radio on could get you in trouble with an airline.
As mentioned above, you can toggle some radios back on after you have turned on Airplane Mode. I know that I will often turn WiFi and Bluetooth back on after I turn off all other radios with a device I’m not actively using.
So you may want to know that there’s also a way to stop a device from turning on one of these radios when Airplane Mode has been enabled. The preference is controlled by changing the values in the global preference “airplane_mode_toggleable_radios”. For example, you can make it so that you are unable to turn WiFi back on if you choose by entering this command:
settings put global airplane_mode_toggleable_radios bluetooth,nfc
By default, the options given to this command are WiFi, Bluetooth, and NFC. But if you leave one of them out when executing the command above then you stop the device from turning that radio back on. This can be a good idea for a child’s smartphone or tablet, or even used as a fail safe to make sure the radio isn’t turned back on when Airplane Mode is on. This feature will likely be less useful than the one detailed in the big guide above, but it’s something that you may want to be aware of.
from xda-developers http://ift.tt/2vwCa4r