[APP] Button Mapper - Customize your hardware buttons

Search This thread


Recognized Developer
Jun 11, 2012
Southwestern Ontario
Hello, may I share your application on a french Forum ?
I find it usefull and, if you agree, I want make a dedicaded topic on it
The French Forum is Phonandroid Forum

Thank you !

Sorry for double post ! my mistake..... If a moderator could merge them.... Thx !
Yes, you can certainly do that. I would be happy to have more users.
  • Like
Reactions: jbs68


Senior Member
Nov 13, 2009
Samsung Galaxy S21 FE

Thank you for your feedback @flar2 !
I have been using this application for several days as a replacement of bxActions which does not work on Android 12.
But I miss some features and I wonder if you could not add them to this application :)
On BxActions, we can remap the buttons in 2 different modes: screen off or screen on. This is very useful because the need is not the same in these 2 situations. Do you think you could add these functions? even if it's only on the pro version ;)


Dec 1, 2008
On BxActions, we can remap the buttons in 2 different modes: screen off or screen on. This is very useful because the need is not the same in these 2 situations. Do you think you could add these functions? even if it's only on the pro version ;)

That would be fantastic!

Another feature from bxActions I miss in this app:
When screen off you could press and hold the Bixby button to turn on flashlight. When you release the button, the flashlight turns off.


Jan 18, 2022
Could someone post here step by step instructions how to use these adb commands for Button Mapper? I'm a windows user. Phone s10e.


New member
Jan 19, 2022
The manual method doesn't work either. I get '.' is not recognized as an internal or external command

Sorry I'm not a developer and none of this stuff comes intuitively to me.


New member
Jan 19, 2022
You need to skip that first "." And "\", starting from "adb...", That works for me.
Hmm...that doesn't work either it just says 'adb' isn't recognized.

So I download that zip file, I extract its contents, open cmd as admin and CD to the location of that extracted content and then I run the cmd but it just isn't recognized. If I try and open the adb application from the extracted file location nothing happens.


Jan 18, 2022
Hmm...that doesn't work either it just says 'adb' isn't recognized.

So I download that zip file, I extract its contents, open cmd as admin and CD to the location of that extracted content and then I run the cmd but it just isn't recognized.
Try to reconnect USB few times after debug mode on. You should be able to accept permission communicate on your phone then. If still not working, maby someone more experienced will help...


Dec 13, 2018
I'll try that when I get back home. Thanks for your help!
I just did it and had to include "./adb" etc, otherwise I got the adb not recognized error. Have your powershell or cmd in the platform tools folder directory. Then use "./adb" etc like on the manual setup page. Works great.

I also moved from bxactions with the recent Android 12/One UI 4 update. It will take a little getting used to because I had the flashlight set to single press, long press. I wouldn't mind some additional press options like single long press or single press, long press but it works!

I've only used button mapper for a few minutes but I'm happy so far. If it works well for a few days I'll gladly send a treat your way! Many thanks!



Feb 23, 2013
I'm trying to move from BxActions to this app for remapping the bixby button, but I can't get the manual commands to work after moving to Android 12. If I use './adb' nothing works. I get rid of the './' and I get the message "This adb server's $ADB_VENDOR_KEYS is not set" . Doesn't seem to matter what I do, it won't work. I've used adb several times before and never had this issue. Even killing the adb server doesn't work. Any ideas?

Edit: after disabling and re-enabling usb-debugging on my phone the command works. Looks like the app works, but it says to disable bixby in settings... There doesn't seem to be a way to disable bixby in the settings?

I've made bixby the double press and google the single press (via button remapper), but ideally I'd like bixby to not open at all. If I use the adb command to disable bixby ("./adb shell pm disable-user com.samsung.android.bixby.agent"), can I re-enable it later?
Last edited:


Senior Member
Oct 24, 2012
@flar2 I'm a pro user of your great app and one thing that I'm missing in comparison to bxActions is a torch function with enhanced brightness.

In bxActions there are two torch functions to choose, 1. "torch (system)" and 2. "torch (extra strong)", with the latter being about 2x as strong.

Another thing that would be really useful (and that also bxActions doesn't offer) is an additional option to turn on the screen when it's curtently off.

I have the single press of the Bixby button configured as camera shutter button, so it starts the Camera app respectively takes a picture when the Camera app is already started.

Now when I press the Bixby button while the screen is off, the Camera app is actually started, but only shown when I turn on the screen too. So currently I cannot quickly take a picture by simply pressing two times on the Bixby (= shutter) button.

It would be great if you could implement these two feature requests. :) Thanks and keep up the good work!


New member
Jan 24, 2022
ATTENTION: I'm new here so I don't know if it's customary to edit or remove posts that are as utterly f...... stupid as this one.. The actions listed below are OF COURSE not missing, I'm just a moron. Thanks again for this app.. I'll see myself out..

Hello there, you wonderful person who made my Bixby button into something that's actually useful..

On my S10e I used to have a lot more actions to choose from that are now missing after a factory reset and OneUI update..

Remapping still works flawlessly (with Bixby disabled via packagedisabler), but at least two important actions are missing:

toggle portrait

What gives?

Is this an Android 12 thing? Any hope for me getting those two actions back?

In the meantime toggle flashlight is still available, which is genius!

Thank you for doing good work, much appreciated!
Last edited:


Nov 3, 2008
Riverview, NB
Another issue I'm experiencing is that it doesn't always overwrite the action, but rather adds it on top of the default one, thus making the button execute both upon press. This was visible with Netflix button.
Try going to the troubleshooting section of Button Mapper. Enable alternate button handling.

This worked for me with an 2017 NVidia Shield using a 2019 remote. The Shield is using Android 11.
  • Like
Reactions: eqagunn

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Can i remap the volume keys on my amazon tv? I installed the app but after opening the app and confirming the closing of the popup it closes, I deleted the chace, restarted the devise, reinstalled but nothing, some sfix?
    I honestly don't know. Try granting WRITE_SECURE_SETTINGS via adb, this will allow the app to start the service.

    adb shell pm grant flar2.homebutton android.permission.WRITE_SECURE_SETTINGS
  • 142

    Button Mapper allows you to remap any action you want to physical or capacitive hardware buttons. This includes volume buttons, camera button, home button on Samsung devices and capacitive home, back and recents, Bixby, Active Edge, LG assistant button and many buttons on game controllers and other hardware. It does NOT work with onscreen home, back and recents buttons (i.e. soft keys or the navigation bar).

    You can launch shortcuts, apps or actions to single press, double tap and long press for hardware buttons.

    Download on XDA Labs:

    -does not work when the screen is off (unless rooted)
    -only works with hardware buttons, not onscreen buttons (i.e. navigation bar)
    -power button cannot be modified
    -there can be quirks with some devices due to non-standard hardware and software implementations by various manufacturers. I try to fix them, but sometimes it's difficult if I don't have the device to test.

    Examples of things you can do with this app:

    -Lockscreen peek: press and hold the home button to quickly check your lockscreen messages, release to turn off the screen (requires PRO VERSION)
    -Launch an app by long pressing the home button
    -Swap the back and recents buttons (capacitive buttons only, like on Samsung Galaxy or Asus Zenfone or One Plus One)
    -Use the home button to the turn the screen off from the homescreen on your Samsung Galaxy (requires PRO VERSION)
    -Control the button lights on your Samsung Galaxy. Turn them on or off, or change the length of time they light up
    Big update!

    After many weeks of work, I've released an update that adds many new features and improvements, and fixes some longstanding bugs.

    The new version is rolling out to a small number of users on the Google Play Store.
    You can download the new version now on XDA Labs.

    Download on XDA Labs:

    Pixel 2 Active Edge
    The Pixel 2 battery drain was caused by remapping Active Edge with root and not enabling screen off actions. It has nothing to do with the method that I use to remap the Edge squeeze, it was caused by a typo in the options logic. There are a lot of myths about how this app handles Active Edge. First of all, it does not consume battery and does not slow down your system. Such claims are false (notwithstanding the bug, which is now fixed). The method for remapping Active Edge does not scan through every logcat message. With root, it's 100% reliable and you will never see the Assistant and will remain in your current app. Without root, you will occasionally see the Assistant and it may bring you to the homescreen. The only limitation is you need to use English language until Google enables the Assistant for other languages.

    Root Command
    You can now remap buttons to a root command. This offers unlimited possibilities for power users. Obviously this requires root! It's available in the Pro version only

    Custom Key Codes
    You can also remap buttons to custom key codes. This means you can fully remap game controllers, tv remotes and other hardware attached to your device. I've compiled a list of key codes that are recognized by Android here. This requires root, unfortunately. It's available in the Pro version only.

    MIUI does some really stupid things to Android. In order for Button Mapper to work correctly, you need to grant the "Autostart" permission and disable battery optimization. If you do not grant the autostart permission, swiping Button Mapper away in recents will kill the service. If you do not set battery optimization to "No restrictions", then Button Mapper's service will be killed every 10 minutes or so.

    To grant these permissions, in go to the menu at upper right in Button Mapper and select "Introduction." Swipe to the screen title Permissions and follow the instructions.

    Samsung volume bug
    I tracked down a few obscure bugs on Samsung phones, including the volume scaling bug that I could never reproduce. This occurred when the volume buttons were remapped and then later the "Bixby only" option was selected without rebooting.

    Pirating this app
    Don't install pirated versions of this app (or any app that uses Accessibility or root), even just to try for a few minutes. Because it uses Accessibility Service and root, you must fully trust the developer. Using a pirated version of any root app gives hackers carte blanche on your device.

    • New actions:
      -toggle BlueTooth
      -headset key press
      -change keyboard
      -root command (requres root and PRO)
      -custom keycodes (requires root and PRO)
    • Android TV support
    • Screen off only option (requires root and PRO)
    • Fix battery drain on rooted Pixel 2
    • Update translations
    • Fix volume change for screen off actions
    • Improve Bixby handling
    • Fix volume bug on S8/Note8
    • Improve UI
    • Add 180 rotation to swap volume orientation setting
    • Improve root handling
    • Improve MIUI behaviour
    • New intro
    • Add feedback form
    • Speed and memory optimizations
    • Many other bug fixes and improvements

    Button Mapper update!

    There is an awesome new update for Button Mapper rolling out. You can get it on XDA Labs now, and on the Play Store in the coming days. This update improves volume button behavior, has fixes for Android Pie, improves Bixby remapping, lots of updates for Blackberry devices and adds a bunch of new actions, such as fullscreen mode, invert colors, toggles for NFC, airplane mode and mobile data, broadcast intents, Greek and Arabic languages, plus the usual bugfixes.

    Download on XDA Labs:

    I want to highlight two important new features.

    First, the broadcast intent action (pro version only!). With this action, you can use a button press to broadcast an intent, which is Android's way of communicating between apps. This opens up literally endless possibilities. For example, if you have my High Brightness Mode app installed, you could enter flar2.hbmwidget.TOGGLE_HBM for long-press of volume button to toggle high brightness mode.

    The second feature is a new option to disable volume button remapping when the volume panel is showing. For example, if you have long press volume down mapped to toggle the flashlight, when the volume panel is showing, holding down volume will turn the volume down rather than turning on the flashlight. Once the volume panel disappears, holding the volume button will once again toggle the flashlight. I think this makes the volume button behavior more intuitive, so it's enabled by default. This can be turned off if you don't like it, the option is in Advanced options->Volume panel bypass.

    Please enjoy, and don't forget to leave a positive review if you find Button Mapper useful.
    Version 0.66 is now released. It will roll out slowly on the Play Store, if you want it now, get it from XDA Labs

    This version has tons of small fixups: volume button behavior is vastly improved, activities open right away after pressing home, everything is faster, and there are more options. Also quite a few UI improvements. New actions include toggle mobile data (root only), toggle wifi hotspot (Nougat and lower only), toggle autobrightness and clearn notifications. There is a new option to enable pocket detection, so actions won't occur while the phone is in your pocket (requires pro version).

    For Android P users, I've fixed the volume buttons to default to media and added an option to force them to control ring volume like older versions of Android.

    There is now an option to lock the screen in a way that allows you to unlock with the fingerprint. Rooted users could always do that, now unrooted users can too.

    I've also added an option to force audio routing through the speaker while Pressy, MiKey or other headphone jack buttons are plugged in. I don't have one of these devices, but it should all work.

    Pocket detection (pro)
    Toggle auto brightness
    Toggle Wifi hotspot (Android 7 and lower)
    Toggle mobile data (root)
    Clear notifications
    Compatibility with Android P
    Option to use speaker with Pressy, MiKey, etc
    Global bypass option
    More long press duration options
    Receive incoming phone calls with home button (Samsung)
    Add Spanish
    Update translations
    UI improvements
    Optional lock method that allows fingerprint unlocking
    Fix AOD crash with screenshot action (Samsung)
    Optimizations and bugfixes