With the advent of Bluetooth earphones, and in-flight WiFi, I’ve had multiple experiences of having my music listening and WiFi connection interrupted by switching on airplane mode. Fortunately, there is a trick to keep airplane mode from turning off those services!
Here are the full instructions courtesy of Doug Lynch on XDA Developers, but I’ll summarize the steps.
The setting for which radios turn off in airplane mode is controlled by a global system setting, which can be modified using the Android Debug Bridge, or adb
. To connect to the Android Debug Bridge, you must enable Developer Mode.
To enable Developer mode:
- 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.
Next, you need the adb
executable. If you haven’t already, download the latest ADB binary for your operating system (Windows, Mac, Linux). Extract this to a folder on your system.
You need to install system drivers for your device, so that it is visible to your computer. Google provides a list of some universal USB drivers here.
Now, for the meaty part!
- Plug your phone into the computer and change the USB connection type to “file transfer (MTP)” mode.
- Open up Terminal or the Command prompt in the folder where you extracted the
adb
executable. - Run the command
adb devices
(Linux and Mac users may need to prefix with./
). This will launch theadb
daemon if it isn’t launched already, and your phone may prompt you to allow connections from your computer.
- Re-run
adb devices
, and it should print out the serial number of your device if it is ready (if it already did so previously, you don’t have to re-run the command.) If not, you probably didn’t install the correct drivers or set the right USB connection mode. - Once ready, run
adb shell
to drop into the ADB shell. - Pick which radios you want to turn off in Airplane mode. For example, if you want to turn off Bluetooth, but not WiFi, you would run
. Or excludesettings put global airplane_mode_radios cell,bluetooth,nfc,wimax
bluetooth
andnfc
from that list if you don’t want to turn those off. - You may need to restart your phone to have these settings take effect.
- Enjoy!
If you ever want to restore things to how they are, launch adb shell
again, and run settings delete global airplane_mode_radios
to remove that global setting.
[…] 📲 Per impedire disattivazione Wifi / Bluetooth in modalità provvisoria: https://www.demflyers.com/2019/12/05/prevent-airplane-mode-on-android-from-turning-off-wifi-bluetoot… […]