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).
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 supplyand activate the optionQuick 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 buttonor 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 |
| 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:
- ๐ฅ๏ธ Install ADB tools on your computer (Windows/macOS/Linux).
- ๐ฑ Activate on your phone
USB debugginginSettings โ For developers(if there is no item, tap 7 times on the build number inAbout phone). - ๐ Connect the phone to the PC and enter in the terminal:
adb devicesMake sure that the device is detected (its serial number should appear).
- ๐ง Execute the command to reassign (example for launching the camera when double-clicked):
adb shell settings put secure camera_double_tap_power_gesture_enabled 1Other 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 pressandlong hold. - ๐ด Not compatible with some custom firmware (for example, LineageOS 20+).
Instructions for Button Mapper:
- Download and install the application from Google Play.
- Grant permissions to
Accessibility(in the phone settings). - Select
Power buttonโAction when pressedโ specify an application or system function (for example,Lock screen). - ๐ 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:
- Install Tasker from Google Play and provide all the necessary permissions.
- Create a new profile (
+ โ State โ Plugin โ AutoInput). - ๐ง In AutoInput select
Key โ Power buttonand specify the type of press (single/double/long). - Add a task (for example,
Running an applicationorSending 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:
- Go to
Settings โ System โ Buttons. - Select
Power buttonand specify the action for single/double click. - ๐ง For advanced options, activate
Developer modeand find the itemPower 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:
- Using volume buttons:
- ๐ Install the application Volume Button Power (requires ADB or root).
- ๐ง Set a long press on
Volume uporVolume downto lock the screen.
- Gestures on the screen:
- ๐ Turn on
Double tap to wake upin the screen settings. - ๐ Use applications like WaveUp to unlock with a wave of your hand over the sensor.
- ๐ Turn on
- ๐ฅ๏ธ Connect the phone to the computer and use the commands:
(emulation of pressing the power button).adb shell input keyevent 26
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).