Airplane Mode Helper

From Projects by Davis Mosenkovs
Jump to: navigation, search

Airplane Mode Helper (formerly called Jelly Bean 4.x Airplane Mode Helper) for Root Users only. This application allows other applications to control airplane mode on Jelly Bean 4.2/4.3, KitKat 4.4, Lollipop 5.0/5.1 and Marshmallow 6.0 (Android 4.2+) devices/ROMs exactly the way it was possible before Android 4.2.

This application works as Xposed module - it requires Xposed framework to be fully installed and Airplane Mode Helper enabled in Modules section of Xposed Installer. Airplane Mode Helper must also be configured via it's launcher icon.

Airplane Mode Helper is successor of Jelly Bean 4.2 Airplane Mode Helper.

This is generic helper - most applications capable of toggling airplane mode on pre-4.2 versions of Android are supported. The only unsupported applications are those that explicitly detect Android 4.2+ and disable/hide settings that control airplane mode (and usually show some kind of notice about Android 4.2+) in GUI. If you encounter such applications, please notify their developers about this workaround (ask them to bring airplane mode options back and display a warning on Android 4.2+).

Additionally Airplane Mode Helper offers Locale/Tasker plugin for airplane mode control (since Airplane Mode Helper version 1.0.3 the plugin must be explicitly enabled in Airplane Mode Helper settings, otherwise it won't be able to control airplane mode).


Xposed Module Repository:   XDA developers forum:





Airplane Mode Helper is distributed "as is" without any form of warranty. It is user's sole responsibility to obey all regulatory rules about usage of airplane mode and not use this application in places/situations where such rules exist.

This application requires and uses Xposed framework.

Author of application icon is Raitis Linde.


Applications that change airplane mode on pre-4.2 versions of Android does two things - changes setting and sends broadcast. Starting from Android 4.2 setting change silently fails and generates a warning in logcat. On Android 4.2 broadcast still is sent, but starting from Android 4.3 attempt to send broadcast fails with SecurityException. Airplane Mode Helper looks for airplane mode change broadcasts by intercepting broadcast sending API. When it encounters airplane mode change broadcast it adjusts system setting, delivers the broadcast and reports success to broadcast sending application.

Airplane Mode Helper hooks broadcast sending API in system process using Xposed framework.

Notes for developers

To work with Airplane Mode Helper an application should use the usual pre-4.2 method (code) for controlling airplane mode (described, for example, here and here), preferably surrounded by try/catch, because sending airplane mode change broadcast on Android 4.3+ (without Airplane Mode Helper installed) will throw SecurityException. With Airplane Mode Helper set up pre-4.2 method will toggle airplane mode without any delay (system setting will be adjusted before sendBroadcast() returns), without duplicate broadcasts and with no exception being thrown. The only difference of Airplane Mode Helper from native pre-4.2 behavior is that airplane mode system setting is changed (written to global system settings) during broadcast sending.

To work with Airplane Mode Helper application should have (use) android.permission.WRITE_SETTINGS permission (permission required to control airplane mode on pre-4.2 systems). NB Prior to version 1.0.3 this requirement was mandatory and also applied to callers of Locale/Tasker plugin. Since version 1.0.3 android.permission.WRITE_SETTINGS permission is never required for callers of Locale/Tasker plugin, and is required for pre-4.2 method (code) only if setting Require WRITE_SETTINGS permission is enabled.

On Android 6.0 (API level 23) for applications with targetSdkVersion less than 23 it is enough to request android.permission.WRITE_SETTINGS in Manifest to be able to use pre-4.2 method (code) for controlling airplane mode (regardless of Require WRITE_SETTINGS permission setting).

Explicit detection of this application is lightly discouraged. If detection is absolutely necessary it is recommended to try detecting both - Jelly Bean 4.2 Airplane Mode Helper and Airplane Mode Helper - if at least one of them is present it may be possible to control airplane mode.

Settings explained

Enabled determines whether this application will do it's work. Broadcast sending API is hooked even when Enabled is not checked. To stop hooking broadcast sending API, deactivate Airplane Mode Helper in Modules tab of Xposed Installer.

Xposed framework displays status of Airplane Mode Helper as Xposed framework module. It should state Xposed module setup is OK. (for this app to work) or notify about issues and provide basic instructions for fixing them.

Check WRITE_SECURE_SETTINGS permission (checked by default) determines whether broadcasts from applications having android.permission.WRITE_SECURE_SETTINGS permission will be ignored (passed through unprocessed). Only system applications can have this permission, so most likely there is no need to disable this setting.

Require WRITE_SETTINGS permission (added in version 1.0.3; checked by default) determines whether broadcasts from applications lacking android.permission.WRITE_SETTINGS permission will be ignored (prior to version 1.0.3 broadcasts from such applications were always ignored). This setting has no effect on Locale/Tasker plugin. Disabling this setting allows any application (without any requested permissions) to control airplane mode.

Enable Locale/Tasker plugin (added in version 1.0.3; unchecked by default) determines whether Locale/Tasker plugin is operational (plugin will be displayed and configurable anyway, but it will not enable/disable airplane mode when executed). Enabling this setting allows any application (without any requested permissions) to control airplane mode. Prior to version 1.0.3 Locale/Tasker plugin was always operational, but required android.permission.WRITE_SETTINGS permission.


v 1.0.3

  • Name changed from Jelly Bean 4.x Airplane Mode Helper to Airplane Mode Helper (all references to Airplane Mode Helper plugin in Locale/Tasker might need to be re-created due to this change).
  • Fixed Locale/Tasker plugin on Marshmallow:
    • Removed requirement for android.permission.WRITE_SETTINGS permission for callers of Locale/Tasker plugin.
    • Added Enable Locale/Tasker plugin setting.
  • Added Require WRITE_SETTINGS permission setting.

v 1.0.2

  • Fixed Xposed module detection on Lollipop.
  • Improved logging.
  • Minor cosmetic improvements.

v 1.0.1

  • Fixed compatibility with Xposed framework v2.6+.

v 1.0

  • Initial release.

Discussion & Support

XDA developers forum: