[Samsung Galaxy S9  Guides, News, & Discussion] obedmaleka:
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 8.0, 8.1.x

A root access (preferably MAGISK)

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 :

[IMG="Generic.kl"]https://image.noelshack.com/fichiers/2017/35/7/1504424314-screenshot-20170902-150605.png[/IMG]

Source : https://xdaforums.com/galaxy-s8+/how-to/root-remap-bixby-button-o-app-t3601061

Step 2

Install Xposed

Flash zip Xposed with Magisk, TWRP or FlashFire.

If your phone is rooting with Magisk (

best method

) :

Launch Magisk Manager to search, download and install the "Xposed Framework (SDK 26)" for 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

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://xdaforums.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://xdaforums.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.

The sources that allowed me to realize this guide

Links to threads here:

https://xdaforums.com/showthread.php?t=3034811 rovo89

https://xdaforums.com/galaxy-s8+/how-to/root-remap-bixby-button-o-app-t3601061 redplate

Sorry for mistakes, I speak french