[ROOT] Remap Bixby Button with simple, double and long press

obedmaleka

Senior Member
Jan 2, 2011
62
32
0
The ultimate solution for assigning an action or application to the Bixby button

I found a trick to assign the Bixby button to an action, application and more... Support a single click, double-click and hold (also works the screen off)

Here are the functions you can assign to the Bixby button
  • Navigates: back, home, recent apps...
  • Controls: sleep/wake up, show power menu, shutdown, reboot, expand notifications panel...
  • Rotation control.
  • Media controls: play/pause, next, previous, stop...
  • Fast scroll: scroll to top/ bottom.
  • Edit: copy, paste...
  • Universal copy, one tap copy text every where.
  • Settings: auto brightness, rotation, wifi, mobile data...
  • Start app/shortcut/activity, finish activity, previous app/next app, kill app...
  • Freezer: freeze/thraw app.
  • Input gesture, key event, text...
  • Shortcut panel, app drawer, freezer drawer, side bar...
  • Floating widget.
  • Swipe adjust: swipe on the edge to adjust brightness, screen filter, volume...
  • Gesture pointer, extends your finger.
  • Notification, speech, toast.
  • Screen filter, torch.
  • Conditional: if screen on, keyguard on, wifi connected/disconnected, battery level, time period, wifi connected to, app focused...
  • Multi action, saved multi action.
  • ...

Disclaimer:
I AM NOT RESPONSIBLE FOR ANY DAMAGE DONE TO YOUR DEVICE IF YOU DECIDE TO USE THIS GUIDE. IT'S PRETTY SAFE THOUGH BECAUSE I HAVE HEAVILY TESTED EVERYTHING THAT I WROTE.

Required
All Samsung rom custom Android 7.0, 7.1.x , 8.0, 8.1.x
A root access (preferably MAGISK)
TWRP (Exynos) or TWRP (Snapdragon) optional

Step 1
Remap Bixby Button

As in the article :
1. Go with any root Explorer (I'm using Solid Explorer) to /system/usr/keylayout
2. Rename the Generic.kl to Generic.txt
3. Open this file with an text editor
4. Search for 703 to get following entry: # input_fw Intelligent Key for Dream key 703 WINK
5. Change it to whatever you want. I simply tried following: # input_fw Intelligent Key for Dream key 703 ASSIST
6. Rename it back to Generic.kl (otherwise you won't be able to press any hardware button after reboot)
7. Check permissions
8. Restart your device
For now, Bixby is used Google Assitant with item display on the screen

Other order :

HOME - Homebutton
POWER - Powermenu
MUSIC - Starts your favorite music player
MEDIA_PLAY_PAUSE - Play pause media
VOLUME_UP - Sets volume up
VOLUME_DOWN - Sets volume down
VOLUME_MUTE - Volume media (set default media volume in phone setting)
CAMERA - Starts camera app
APP_SWITCH - Recent apps button
ASSIST - Google Assistant (with item display on the screen)
VOICE_ASSIST - Google Assistant (fast)
QPANEL_ON_OFF - Notification area
EXPLORER - Favorite internet browser
SYSRQ - Screenshot
PAGE_UP
PAGE_DOWN
CALCULATOR
CALENDAR
CONTACTS
CALL
If you want to be able to use more features such as double-clicking, long-clicking, launching an application, adjusting the vibrator or other, leave "ASSIST" and continue the steps.

Picture with the SEARCH function :
Source : https://forum.xda-developers.com/galaxy-s8+/how-to/root-remap-bixby-button-o-app-t3601061

Step 2
Install Xposed

Flash zip Xposed with Magisk Manager, TWRP or FlashFire.

If your phone is rooting with Magisk (best method) :
Launch Magisk Manager to search, download and install the "Xposed Framework (SDK 24)" for Android 7.0 and SDK25 is Android 7.1.x,for Oreo, SDK26 is Android 8.0 and SDK27 is Android 8.1.

or

How-to flash with TWRP :
1. Transfer the zip and apk to your phone.
2. Now boot into TWRP by pressing bixby+volume up+power on while phone is turned off
3. Go to "Install" menu of TWRP select the zip and flash the zip.
4. Restart the phone and Install the apk and run the application to verify that everything is green

or

How-to flash with FlashFire :
1. Transfer the zip and apk to your phone.
2. Install FlashFire
3. Start the application and press "+"
4. Choose "Flash ZIP or OTA" and select the zip
5. Select "Auto-Mount" and "Mount / system read / write" and validate
6. Press "Flash" and "ok" then wait until the phone restarts
7. Install the apk and run the application to verify that everything is green

Picture Xposed properly installed :


The link for the ZIP to flash (xposed) for 7.0
http://dl-xda.xposed.info/framework/sdk24/arm64/xposed-v89-sdk24-arm64.zip

The link for the ZIP to flash (xposed) for 7.1
http://dl-xda.xposed.info/framework/sdk25/arm64/xposed-v89-sdk25-arm64.zip

The link for the ZIP to flash (xposed) for 8.0
https://dl-xda.xposed.info/framework/sdk26/arm64/xposed-v90-sdk26-arm64-beta3.zip

The link for the ZIP to flash (xposed) for 8.1
https://dl-xda.xposed.info/framework/sdk27/arm64/xposed-v90-sdk27-arm64-beta3.zip

The link for the "Xposed Installer apk"
https://forum.xda-developers.com/attachment.php?attachmentid=4393082&d=1516301692

A link to uninstall Xposed in case of problem (zip to flash with TWRP):
https://dl-xda.xposed.info/framework/uninstaller/xposed-uninstaller-20180117-arm64.zip

Source Xposed Nougat :
https://forum.xda-developers.com/showthread.php?t=3034811


Step 3
Customize the Bixby Button

This module provides you Gesture control, Key control and other smart triggers. to trigger actions you want.

Next, download "Xposed edge" or "Xposed edge pro" from the Play Store and activate the "Xposed edge" module in "Xposed Installer" and then restart the phone.


1. Launch the Xposed Edge module and activate "Keys" and access it
2. Press Add and click on the Bixby button
3. Activate the newly assigned Bixby button (KEYCODE_ASSIST)
4. And with the arrow on the side assign an action for a single click, double-click and hold down
Do not forget to activate key control and the button assign

And now it will work

Bonus
Gesture for navigation with Xposed Edge:
https://www.youtube.com/watch?v=DkAGCtbJr-U&feature=youtu.be
You have the possibility to choose a side of the screen, and to assign an action with a slide in the desired direction

Device testing
Galaxy S8
Galaxy S9
Galaxy Note 8
Galaxy Note 9 (Not tested)

The sources that allowed me to realize this guide
Links to threads here :
https://forum.xda-developers.com/showthread.php?t=3034811 rovo89
https://forum.xda-developers.com/galaxy-s8+/how-to/root-remap-bixby-button-o-app-t3601061 redplate

Sorry for mistakes, I speak french
 

Attachments

Last edited:

obedmaleka

Senior Member
Jan 2, 2011
62
32
0
I'm running snapdragon, G950U, and tried flashing your zip and it froze my phone, gets stuck at the end of the boot screens
The zip to uninstall Xposed if it still causes you problem :
http://fastkit.org/xposed/classic/Uninstaller/xposed-uninstaller-20170719-arm64.zip

Have you tried on which ROM and what version of Android?
And with what you flasher it TWRP or FlashFire?
Because it should not pose any problem even under the model on Snapdragon.
If you want to try again to install Xposed here is another threads :
https://forum.xda-developers.com/galaxy-s8+/how-to/unofficial-xposed-guide-snapdragon-s8-t3663728

This is the same procedure.
 

xDMONEYx

Senior Member
Sep 23, 2010
344
186
0
31
I'm running snapdragon, G950U, and tried flashing your zip and it froze my phone, gets stuck at the end of the boot screens
Which carrier model do you have and on what firmware version? I have heard there are some issues with Xposed on perhaps the Sprint models? I have the Verizon S8+ and Xposed installed just fine for me.
 

tychsy89

New member
Sep 6, 2017
4
0
0
I am using the AQGL sprint system file provided by sammobile and flashfire to install the zip. I haven't had the time to retest this, but was able to remap the bixby button with just a root explorer.
Sprint seems to be the last to get cool updates, so I wouldn't be surprised if this doesn't work for some reason just on our phones.

The zip to uninstall Xposed if it still causes you problem :
http://fastkit.org/xposed/classic/Uninstaller/xposed-uninstaller-20170719-arm64.zip

Have you tried on which ROM and what version of Android?
And with what you flasher it TWRP or FlashFire?
Because it should not pose any problem even under the model on Snapdragon.
If you want to try again to install Xposed here is another threads :
https://forum.xda-developers.com/galaxy-s8+/how-to/unofficial-xposed-guide-snapdragon-s8-t3663728

This is the same procedure.
 

obedmaleka

Senior Member
Jan 2, 2011
62
32
0
Works great for me. Too bad I can't remap the navbar buttons with this, but also well that ends Bixby for good!

I'm on SM-G955U1

EDIT: Got the navbar buttons remapped using GravityBox (N). Many thanks to all the great devs it there!
Do you have the Sprint model?
 

MrDusan

Senior Member
Jun 21, 2014
192
46
0
Novi Sad
Hm, i did just the first step with changing the generic file, and it launches camera (like I wanted), but it doesn't work with screen off. Is there anything else i should do, or it works just with screen on?
 

obedmaleka

Senior Member
Jan 2, 2011
62
32
0
Hm, i did just the first step with changing the generic file, and it launches camera (like I wanted), but it doesn't work with screen off. Is there anything else i should do, or it works just with screen on?
There is a possibility to make it work, but you have to buy the Xposed edge pro app for that. After you have to program a condition that I put on video. I made the condition assuming you have a password to disguise the screen.
https://www.youtube.com/watch?v=HsBSFBOlP3U&feature=youtu.be