The power button on an Android smartphone is one of the most popular controls, but its standard functions (turning the screen on/off, rebooting, calling the power menu) are not always convenient. For example, owners of devices with a rear-mounted fingerprint scanner often accidentally press the physical button, while users with limited motor skills want to simplify interaction. Fortunately, Android allows to reassign the power button both programmatically and using system tools.

In this article we will look at all the current methods: from built-in manufacturer settings (Samsung, Xiaomi, Google Pixel) to using ADB commands and applications with root access. You'll learn how to make the power button open Google Assistant, launch the camera, lock the screen, or even execute custom scripts via Tasker. Important: not all methods are universal - some require an unlocked bootloader or superuser rights, and new versions of Android (13+) may have security restrictions.

Before you begin, check:

  • ๐Ÿ“ฑ Android version: path Settings โ†’ About phone โ†’ Android version. On Android 10+, some functions may be blocked.
  • ๐Ÿ”ง Having root access: if you plan to use Button Mapper or similar utilities.
  • ๐Ÿ”Œ ADB support: command line methods require a computer and USB debugging enabled (Settings โ†’ For developers โ†’ USB debugging).

๐Ÿ“Š Why do you want to reassign the power button?
To avoid accidental presses
To quickly launch applications
Because of a broken button
Just for the sake of experimenting

1. Built-in manufacturer settings: Samsung, Xiaomi, Google. Pixel

Many brands add options to customize buttons in the firmware. This is the safest method, but it only works on branded shells (One UI, MIUI, Pixel Launcher).

On devices Samsung (Galaxy S/A/Note series with One UI 4.0+):

  • ๐Ÿ”„ Go to in Settings โ†’ Additional functions โ†’ Buttons.
  • ๐Ÿ“ฑ Select Button power supply and activate the option Quick camera launch (double tap will open the camera even on a locked screen).
  • โšก On some models (for example, Galaxy S22 Ultra) reassignment to Bixby or Google Assistant is available.

To smartphones Xiaomi/Redmi/Poco (MIUI 12+):

  • ๐Ÿ”ง Open Settings โ†’ Accessibility โ†’ Power button.
  • ๐Ÿ”˜ Here you can enable End call with the power button or assign a double press to start Google Assistant.

On Google Pixel (Android 12+):

  • ๐Ÿค– Go to Settings โ†’ System โ†’ Gestures โ†’ Quickly press the power button.
  • ๐Ÿ“ธ Select an action: launch the camera, activate Google Assistant or open an application (for example, Flashlight).

โš ๏ธ Attention: On some models Huawei and Oppo Similar settings may be missing or hidden in the developer menu. If you do not find the option, check for firmware updates or use alternative methods from the following sections.
Brand Model/Firmware Available actions Limitations
Samsung Galaxy S21+ (One UI 5.1) Double tap: Camera/Assistant No support for custom applications
Xiaomi Redmi Note 11 (MIUI 13) Double tap: Assistant, end call No single tap reassignment
Google Pixel 7 (Android 13) Double/long press: camera, Assistant, flashlight Google account required
OnePlus OnePlus 10 Pro (OxygenOS 13) Long press: Assistant or shutdown No options for single press

2. ADB commands: universal method without root

If your firmware does not have built-in options, you can use Android Debug Bridge (ADB) a debugging tool that allows you to change system settings without superuser rights. This method works on most devices with Android 7.0+, but may require enabling developer mode.

Step-by-step. instructions:

  1. ๐Ÿ–ฅ๏ธ Install ADB tools on your computer (Windows/macOS/Linux).
  2. ๐Ÿ“ฑ Activate on your phone USB debugging in Settings โ†’ For developers (if there is no item, tap 7 times on the build number in About phone).
  3. ๐Ÿ”Œ Connect the phone to the PC and enter in the terminal:
    adb devices

    Make sure that the device is detected (its serial number should appear).

  4. ๐Ÿ”ง Execute the command to reassign (example for launching the camera when double-clicked):
    adb shell settings put secure camera_double_tap_power_gesture_enabled 1

    Other commands see the table below.

Action ADB command Notes
Launch the camera by double-clicking settings put secure camera_double_tap_power_gesture_enabled 1 Works on Pixel, Samsung, some Xiaomi
Open Google Assistant with a long press settings put secure assistant_power_long_press 1 Requires installed Google App
Lock the screen with a single press settings put secure power_button_end_call 1 May conflict with other gestures
Disable the power menu with a long press pressed settings put global power_menu_long_press_duration_ms 0 Danger! May block access to reboot

Important: ADB commands are reset after resetting the settings or updating the firmware. To return the standard behavior, replace the "1" in the command with a "0".

โš ๏ธ Attention: On some devices. (for example, Huawei c EMUI 12+) ADB commands for reassigning buttons may be blocked for security reasons. In this case, root access will be required.

Install Platform Tools on your PC|

Enable USB debugging on your PC. phone|

Connect the phone with the original cable|

Check for drivers (for Windows)-->

3. Applications for remapping: Button Mapper, Power Button Remapper

If ADB seems complicated, you can use specialized applications. They offer a more user-friendly interface, but often require root-rights or an unlocked bootloader. Let's look at two of the most popular tools:

Button Mapper (Google Play):

  • ๐ŸŽ›๏ธ Allows you to reassign the power, volume, and even touch gestures.
  • ๐Ÿ”„ Supports conditional actions (for example, launching the application only when headphones are connected).
  • โš ๏ธ On Android 10+ it is unstable without root.

Power Button Remapper (requires Xposed Framework or Magisk):

  • ๐Ÿ”ง Works at the system level, so it is not reset after reboot.
  • ๐Ÿ“ฑ Supports single press, double press and long hold.
  • ๐Ÿ”ด Not compatible with some custom firmware (for example, LineageOS 20+).

Instructions for Button Mapper:

  1. Download and install the application from Google Play.
  2. Grant permissions to Accessibility (in the phone settings).
  3. Select Power button โ†’ Action when pressed โ†’ specify an application or system function (for example, Lock screen).
  4. ๐Ÿ”„ Reboot your phone to apply the changes.

๐Ÿ’ก

If the application does not see the power button, try turning on the "Use" option in its settings ADB" (you will need to first run the command adb shell pm grant flar2.homebutton android.permission.WRITE_SECURE_SETTINGS).

4. Reassigning the power button using Tasker

Tasker is a powerful automation tool that allows you to create complex scripts based on triggers, including button clicks. Disadvantage of the method: it requires configuration and does not always work stably with the power button on new versions of Android.

How to set it up:

  1. Install Tasker from Google Play and provide all the necessary permissions.
  2. Create a new profile (+ โ†’ State โ†’ Plugin โ†’ AutoInput).
  3. ๐Ÿ”ง In AutoInput select Key โ†’ Power button and specify the type of press (single/double/long).
  4. Add a task (for example, Running an application or Sending SMS).

Examples scenarios:

  • ๐Ÿ“ท Double press โ†’ launch the camera with shutter sound turned off.
  • ๐Ÿ”ฆ Long press โ†’ turn on the flashlight + send an SMS with coordinates (useful in emergency situations).
  • ๐Ÿ”’ Single press โ†’ lock the screen + launch the sleep tracking application.

โš ๏ธ Attention: On Android 12+ Tasker may not see the power button pressed due to security restrictions. In this case, the module will help Tasker Power Plugin (requires Magisk).
How to bypass restrictions. Android 12+?

To work with the power button on new versions of Android you will need:

1. Install Magisk and the "Tasker Power Plugin" module.

2. In the Tasker settings, enable the "Use root" option (in the "Settings โ†’" section. Monitoring").

3. Reboot the device.

This method does not work on all firmware (for example, on some versions of MIUI you may need to disable MIUI Optimization in Magisk).

5. Reassigning the power button on custom firmware (LineageOS, Pixel Experience)

Custom firmware like LineageOS, Pixel Experience or Paranoid Android often offer advanced button settings that are not available in stock versions. For example, in LineageOS 20 you can reassign the power button to:

  • ๐Ÿ”„ Switching sound profiles (silent/vibration/sound).
  • ๐Ÿ“ฑ Launch the last application (analogous to the "swipe up" gesture on Pixel).
  • โšก Quickly opening the notification panel.

How to set up LineageOS:

  1. Go to Settings โ†’ System โ†’ Buttons.
  2. Select Power button and specify the action for single/double click.
  3. ๐Ÿ”ง For advanced options, activate Developer mode and find the item Power button ends call (allows you to end calls with the power button).

On Pixel Experience the path may differ: Settings โ†’ Device โ†’ Buttons โ†’ Power button actions.

โš ๏ธ Attention: On some custom firmware, reassigning the power button may conflict with the screen lock functions. Before applying the changes, create a backup via TWRP or OrangeFox Recovery.

6. Reassigning the power button on devices with a broken button

If the physical power button does not work, but the phone turns on (for example, through charging or ADB), you can reassign its functions to other controls. This is relevant for devices with:

  • ๐Ÿ’” Mechanical damage (the button cannot be pressed or is stuck).
  • ๐Ÿ”‹ Software failures (the button works, but does not respond to pressing).
  • ๐Ÿ“ฑ Lack of a button (for example, on some tablets or devices with touch panels).

Bypass methods:

  1. Using volume buttons:
    • ๐Ÿ”Š Install the application Volume Button Power (requires ADB or root).
    • ๐Ÿ”ง Set a long press on Volume up or Volume down to lock the screen.
  2. Gestures on the screen:
    • ๐Ÿ‘† Turn on Double tap to wake up in the screen settings.
    • ๐Ÿ”„ Use applications like WaveUp to unlock with a wave of your hand over the sensor.
  • USB debugging + PC:
    • ๐Ÿ–ฅ๏ธ Connect the phone to the computer and use the commands:
      adb shell input keyevent 26
      (emulation of pressing the power button).

    Critical: If the power button is completely inoperative and USB debugging is not enabled, you can only unlock the device through Fastboot (command fastboot oem unlock) or a service center. This will lead to a data reset!

    7. Risks and limitations: what you need to know before. reassignment

    Reassigning the power button can lead to unexpected consequences, especially if you use unofficial methods. Main risks:

    • ๐Ÿ”ด Losing access to the power menu: If you reassign a long press, you will not be able to turn off or restart the phone in the standard way.
    • ๐Ÿ”„ Conflicts with system gestures: On Android 10+, some actions (for example, calling Assistant) may be blocked by the OS.
    • ๐Ÿ“ต Unstable operation: Applications like Button Mapper may consume additional battery or lag.
    • โš ๏ธ Resetting settings: After updating the firmware, all changes via ADB or applications will be reset.

    How to minimize risks:

    • ๐Ÿ”ง Create a backup copy via TWRP or Swift Backup (if there is root).
    • ๐Ÿ“ฑ Test the changes step by step: Assign actions one at a time and test them.
    • ๐Ÿ”„ Use reliable sources: Download ADB tools and applications only from official sites (Google, XDA Developers).

    โš ๏ธ Attention: On devices with Samsung Knox (for example, Galaxy S23) use ADB or root to reassign buttons may cause the flag to be triggered Knox 0x1which will void the warranty and block operation Samsung Pay, Secure Folder.
    ๐Ÿ’ก

    If you are not sure of your actions, start with safe methods (built-in manufacturer settings) and only then go to ADB or root.

    FAQ: Frequently asked questions about button reassignment power

    โ“ Is it possible to reassign the power button without root and ADB?

    Yes, but the choice of actions will be limited. On some devices (for example Google Pixel or Samsung Galaxy) there are built-in settings for double pressing. You can also use applications like Button Mapper, but they are unstable without root.

    โ“ Why did the power button stop blocking the screen after reassigning?

    Most likely, you reassigned single press, which is responsible for the lock by default. Return the standard action or assign the lock to another button (for example, volume) via Tasker.

    โ“ How to return the power button to default settings?

    The method depends on the reassignment method:

    • ๐Ÿ”ง If you used ADB: run the same command, replacing "1" with "0" (for example, settings put secure camera_double_tap_power_gesture_enabled 0).
    • ๐Ÿ“ฑ If you used application: open it and reset the settings or delete.
    • ๐Ÿ”„ If you changed the settings in custom firmware: perform a reset in the menu Settings โ†’ System โ†’ Reset settings (does not affect user data).

    โ“ Does reassigning the power button work on Android 13/14?

    Partially. Google has tightened restrictions on access to system buttons, so:

    • ๐Ÿ”ด ADB commands may not work or require confirmation after each reboot.
    • ๐Ÿ“ฑ Applications like Button Mapper need root or special modules (Magisk).
    • ๐Ÿ”ง Built-in settings manufacturers (Samsung, Xiaomi) still work.

    On Android 14 for reassignment may require disabling MIUI Optimization (on Xiaomi) or installing a patch via Magisk.

    โ“ Is it possible to reassign the power button to call Siri/Alice?

    Technically yes, but with reservations:

    • ๐ŸŽ For Siri you will need an iPhone (on Android this is impossible without jailbreaking the iOS device).
    • ๐Ÿค– For Alice (Yandex) you can use Tasker + plugin AutoVoice, but the voice assistant must be installed and configured separately.
    • ๐Ÿ”Š For Google Assistant the easiest way is to use the ADB command or built-in settings (see section 1).