yashsingh1/xdaforums huggingface dataset:
[MTCD  Android Head Units Q&A] Dstruct88:
Hello

Got this same unit, dont like the OS, its not very customizable. Cant even change the widgets on the home page for example, simple stuff like that. Anything I can do? Maybe flash a custom ROM that gives me more control over its features?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Button Mapper on the Play Store:

https://play.google.com/store/apps/details?id=flar2.homebutton&hl=en

If your device is rooted, you have complete ability to remap the Bixby Button. You can disable the Bixby assistant, it does not need to be enabled for this to work. There are no compromises with this method. You can get rid of Bixby and program whatever single, double and long press actions you want.

If your device is not rooted, you can still remap Bixby using an experimental method. This method also works with Bixby disabled, and will allow you to map whatever actions you like to a single press or long press. It requires running a command in adb shell once. After this, the Bixby button can be remapped with Button Mapper. A slight inconvenience, but it works.

If you don't like the stuttering that occurs on Samsung devices with certain Accessibility features enabled, got to Advanced Options and select "Remap Bixby only"

﻿
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
Are you using the Accessibility framework to detect keypresses? If so, that does impact scrolling performance. I also am working on a keymapper for BIxby that doesn't use the Accessibility Framework, and it works very well. If you're not using Accessibility, and you don't have any performance impact, I'd be happy to test this out and provide feedback (and probably stop my work)

EDIT: Yep, looks like Accessibility is used here, which kills scrolling performance (lots of stutters) when you listen for keypresses. I shall continue my work.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I could do it without accessibility. I'm just piggybacking on accessibility service since the rest of the app uses it.

I wish Samsung would fix that stuttering. It's not even when you listen for key presses, even an empty accessibility service causes that stutter. OnePlus used to have the same issue and they fixed it with a system update.
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
That's actually not quite true in my testing. The config that causes the slowdown is...

android:canRequestFilterKeyEvents="true"

If you have that enabled, regardless of anything else, it causes stuttering. Setting that to false causes the stuttering to disappear.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I haven't checked on the latest update, but any accessibility service caused it when I last tested. It was not specific to any setting.
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
On AQF7 with that flag disabled, all scrolling returns to normal.
[Samsung Galaxy S8+ Themes, Apps, and Mods] crayonyes:
does the button remap work when in lockscreen ?

update: Yup, it stutters. even stuttering in Button Mapper setting page.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
The stuttering with Accessibility has been there all along. It's not just with the key filter turned on (I am also on AQF7), it's there with bxActions and other accessibility-based apps I've tried that don't filter keys. But you are correct it's not every Accessibility Service. I have an Accessibility service on another app (DevCheck) that does not cause stuttering.

In the end, there's nothing I can do about that stuttering, it will probably be fixed if Samsung updates to Android 7.1.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I would like to focus on the remapping part and how it works. I can make a Bixby remap that doesn't need accessibility, but first I need feedback on how the remap stuff is working. I can't root my S8, so I'm doing this partially blind and I depend on others to test things. The non-root part works perfectly, but is not easy to set up, so I want to see what kinds of problems people run into and fix them before I push this out of beta.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Does your method need root?
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
It does, yes. I would prefer your method if you could remove the need for accessibility, for sure.

I tested out as much as I could with your solution. Overall, things seem to work. Single, double, and long press all work. However, it doesn't reliably stay working. After screen off, or launching the camera, etc, it seems to stop working. If I relaunch Button Mapper, it works again.
[Samsung Galaxy S8+ Themes, Apps, and Mods] samteeee:
@OP

Thanks for this.

I signed up so that you can do your work,

but hoping once your testing finished, you'd

remove the "Accessibility"!
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Yes, I'll probably just make a separate app, since everything else in Button Mapper is tied to Accessibility.

That'll be next week though, I'm out of town until next Wednesday.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Relaunch, as in just opening the app, or do you have to go to the Bixby screen and tap the switch to turn it back on?

Do you have the "Screen off actions" setting enabled or disabled? It's on the Advanced Options screen.
[Samsung Galaxy S8+ Themes, Apps, and Mods] samteeee:
That'll be awesome, Look forward to beta testing it!
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
Just opening the app, and more specifically, a warm launch of the app (the process was still live and not removed from memory).

I didn't adjust the screen off actions, so whatever your defaults are there was what I had set.
[Samsung Galaxy S8+ Themes, Apps, and Mods] tupac19861013:
Thanks guys, this is the only button mapper which I could use without root, Bixby disabled.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I just pushed version 0.44, with some minor bug fixes and a new option to have smoother scrolling.

This new option can be toggled in Advanced Options->Experimental Options->Remap Bixby only. With this option enabled, you can remap Bixby without suffering from choppy scrolling. However, you will no longer be able to remap the volume buttons (because they require the Accessibility Service settings that cause choppy scrolling on Samsung phones).
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
Thanks, flar! Working well. Scrolling performance has returned to smooth.

One of the last issues I have is the "open recents" option is fairly slow to execute. I find using Accessibility Service that doesn't capture key events still maintains scrolling performance, but allows super quick "open recents" using Accessibility to call it.
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
Hmm, with this enabled, my battery life has significantly dropped and the phone is warm to the touch. Have you noticed any increase in battery life with this method? This may have existed before, I just didn't test it long enough to notice.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Mine is ok, not being held awake and the CPU is not loaded. Do a reboot to test with a clean slate.
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
Restarted. I'll keep an eye on any wakelocks/battery life.
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Uh i got the update for version 0.45 and the remap key stopped working. I have rerun the adb command and it does show it has completed the steps. But when I hit the key nothing happens. Reinstalled the app few times too.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Make sure you don't disable bixby voice

If bixby voice pops up on a long press, go back into the bixby app and turn off voice, or sign out of bixby.
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Oh thanks! Previously I had all of them disabled through package disabler but it still worked though. What changed?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I switched to a slightly different method so you wouldn't have to run the adb command every boot. I suspect we'll be back to the previous method after the next Samsung update.
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Ah good to know thank you!
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
Battery issues were not due to this app, everything is running great. Nice job, Flar! I've stopped work on my rooted version. See no need with this available.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
The good thing about the root method is Samsung will not be able to mess with it.
[Samsung Galaxy S8+ Themes, Apps, and Mods] Kev1000000:
Very true. The code is still there if/when Samsung continues their nonsense. Though, I would imagine it would be easier for you to add a root option to Button Mapper than for me to build all of your functionality on top of my method.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Button Mapper has the root method already and will use it if you are rooted. The current adb method will probably stop working on the next system update. Fortunately I have a backup for that too, but it has a bit more latency and will require the adb command every reboot.
[Samsung Galaxy S8+ Themes, Apps, and Mods] live2playloud:
So do you need to keep the accessibility service turned on after you turn on the experimental option for the bixby button? I see all of the other buttons are grayed out but accessibility service is still on within the phones settings? If I turn off the accessibility service manually even with the experimental option on the bixby button doesn't work after reboot..so is the accessibility service disabled after you turn on the experimental option even though it is still set to on within the phone settings? I hope this makes sense lol!
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Yes, you still need the accessibility service. Quite a few of the remapping options depend on the capabilities of accessibility.
[Samsung Galaxy S8+ Themes, Apps, and Mods] live2playloud:
But the bixby button is not using the accessibility service correct?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
It's not using it to detect the button press
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I guess the latest update won't work with bixby disabled?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
You can disable everything except Bixby Voice.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Works like a charm! Do I need to re run the command every reboot?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
No
[Samsung Galaxy S8+ Themes, Apps, and Mods] v.vecera:
Hi, please fix volume steps... but on the other way everything else is work's good..
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I really don't understand this. Volume steps are always the same for me no matter what settings I choose.

What exactly are you setting to have a problem with volume steps?
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I had problem with volume steps too. The steps are random and not consistent, as in it decreases and increases randomly.

A reboot fix it though.
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Um not sure what happened but I woke up to this message which was pretty weird
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Also the Do Not Disturb option just toggles Silent mode instead of the actual Do Not Disturb mode.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Can you tell me your exact settings in Button Mapper? I see others with this issue but I can't reproduce it.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I no longer have issues with volume after the reboot. Might also be an issue with using 'Mute Volume'.

Here's a screenshot using the 'Do Not Disturb' setting.

As you can see, it doesn't toogle do not disturb, only silents the phone (look at the notification icon).
[Samsung Galaxy S8+ Themes, Apps, and Mods] testimony:
Please make it work on the lockscreen. The action is executed but only shows up when you unlock.
[Samsung Galaxy S8+ Themes, Apps, and Mods] Aldo6:
Hello flar2, first of all thanks for this great app, I've been using it since I changed to Xposed-less Nougat. I'm going to mention 2 issues I have so this app can be closer to attaining perfection:

a) The Bixby button remapping works great on my S8+, but when I restart my device, the remapping customization switches off (though the Button Mapper service restarts correctly). This means that every time I reboot my S8+, I have to open your app, go to Bixby Button and then turn on the "Customize" switch. Is there a way to keep it on between reboots? I experienced this problem on both 0.45 and 0.46.

b) More than an issue, this is a quality of life improvement suggestion: when I activate the "Wait for double tap" option it affects all Single taps regardless of their situation, inserting unnecessary delays and reducing user experience dramatically. When a button has Double Tap set to "Do nothing" or "Default" there's no reason to wait for a double tap even if this option is on. Another solution would be to individually add a "Wait for double tap" option for each button for improved user customization (Long Press Delay and Double Tap Delay could also be added individually instead of globally).

Also, I have a new action suggestion :) Adding a toggle for Immersive/Expanded mode (hiding status bar and navigation bar simultaneously) would be great! This allows for clean screenshots of the whole screen. I've been waiting for this to be added since I started using your app.

Thanks for reading and hope you keep in your consideration my suggestions :)
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I can't reproduce the restart issue, it always restarts properly for me.

I will consider your other suggestions
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Any updates on the do not disturb bug flar?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
It's already fixed but I haven't released yet.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Apparently he volume steps issue has something to do with edge gestures or other accessibility services interfering.

It's not a button mapper bug, which is why I've never been able to reproduce the issue.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Alright cheers man, looking forward to the update!
[Samsung Galaxy S8+ Themes, Apps, and Mods] vin4yak:
Hi Flar, good to see you in the s8 forums. Long time ex user!

Is there any possibility that you could achieve triggering actions when the screen is off/locked? I would be really interested in this.

Also, if you don't mind me asking, how does the bixby button remapping functionality differ from the other bixby apps out there since all of them use the accessibility service? Is this implementation better than others?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
With root, you can do actions with the screen off (for volume and bixby)

Bixby mapping uses accessibility if you are on old firmware that allows it, a similar method to other apps if you are unrooted, and a direct hardware method if you are rooted.

The root method is best, it is fastest, works with screen on or off, and can never be blocked by Samsung.
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Has anyone tried on the AQH3 update whether if the remap still works?
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Well it works
[Samsung Galaxy S8+ Themes, Apps, and Mods] jack allen:
Wont let me beta test
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
There is currently no beta, just install the latest release.
[Samsung Galaxy S8+ Themes, Apps, and Mods] jack allen:
There is no link
[Samsung Galaxy S8+ Themes, Apps, and Mods] MINTED7:
nice it works thanks man
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Just find it from the play store
[Samsung Galaxy S8+ Themes, Apps, and Mods] Interceptor777:
Why does it still need me to enable the accessibility service when I'm using it in root mode, I thought it wasn't necessary since we have root?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
No, it's still necessary. Accessibility is the only way to override the default action. With the root method, pressing a button would activate both the default action and your assigned action.
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Anyway to not have bixby voice coming up?

As in not have the icon popping up and pausing music etc
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I never have the bixby icon appear before.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Re-enable Bixby temporarily and either sign out or turn off Bixby voice. Then you can disable Bixby again and nothing will pop up.
[Samsung Galaxy S8+ Themes, Apps, and Mods] louis.liu324:
Thanks
[Samsung Galaxy S8+ Themes, Apps, and Mods] dogredwing1:
I removed all bixby related apps, And remapped the button. Any way to just add long press function without Google assistant opening.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
The Google assitant doesn't open on mine, must be something else you have set up.
[Samsung Galaxy S8+ Themes, Apps, and Mods] dogredwing1:
I remap the key to open Google Assistant by editing generic.kl. When I add long press with your app it it opens both google Assistant and my custom action. If that makes sense.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Yes, because the app can't override the action you've assigned in keylayout.
[Samsung Galaxy S8+ Themes, Apps, and Mods] DarknightAlpha:
Working like a charm. But how to disable bixby amd stop ot from poppimg up. I've got OCD and I'm really annnoyed. I tried using package disabler pro but with the new update, Samsung doesn't even let it start!!! Any solutions?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Use adb shell to do it

pm disable [name of package]
[Samsung Galaxy S8+ Themes, Apps, and Mods] DarknightAlpha:
Thanks alot man!
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Stopped working after the latest update.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
You need to be more specific
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I have to re-enable everything, the service permission and the toggles to make it work again. But now the long press action won't work if the single press option is being used

For example, I have long press to turn on Do Not Disturb and Single Press to launch Assistant. But now when I long press it will launch Assistant instead of Do Not Disturb.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Not sure how that could be, I did not change the way Bixby works. You should not need to redo permissions or anything.

I would suggest completely uninstalling and starting over.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I tried re-installing and setting up everything again. Everything works except for long press. When I long press it's registered as a normal single press.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
This is due to the new Bixby update. I've fixed the behaviour in version 0.50, which I just pushed to the Play Store.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Yup it works great now, thanks!
[Samsung Galaxy S8+ Themes, Apps, and Mods] GialanG:
My S8+ usually wakes up itself, following a voice command tone. Very uncomfortable when it's in my pocket
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Now whenever I use the long press option I keep getting a pop up saying ' Can't use Bixby Voice without Bixby Home'. The action still works but I keep getting this popup it's a little annoying :( Is this a bug?

Single press & double press is still fine btw, only long press will have that popup.
[Samsung Galaxy S8+ Themes, Apps, and Mods] Sennep:
Thanks, worked great without rooted device. Only using adb worked.

I have two questions though, could be that this is not connected to button mapper at all.

1. When I use volume button to change volume it's changing volume in high steps at one time. 3 steps from mute to full. Is this s8+ standard or did this happen after remapping bixby button?

2. Is it possible to get the sound off when activating Google assistance when tapping bixby button? Now its one for open and one for start recording voice command for Google assistance. Would be cool to not have double sound but only one when opening it :)

(I have only remapping bixby button and activated bixby only under advanced settings)
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
1. Some people report that problem with volume steps, it doesn't happen on my S8. Since I can't reproduce the problem, I have no idea why it occurs.

2. That sound is built-in, I don't think there's anything I can do about.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
What about the bug that I reported?
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Which bug?
[Samsung Galaxy S8+ Themes, Apps, and Mods] dogredwing1:
I keep getting button mapper needs to be restarted

whenever I try to turn on bixby remap? I'm using oreo beta, if that makes a difference
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Now when I long press the bixby button I will get a pop up saying 'Cant use bixby without bixby home'. It never shows any popup in the past.

ps: I use long press to toggle mute
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
I haven't tried oreo yet

Never seen this before, try setting up with defaults
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I'm not on Oreo, still on 7.0 on S8+.

What do you mean setting up as default?
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
I tried setting up different actions for long press, some actions like long press to home works fine and no popup. But most actions like long press to enable do not disturb or toggle silence will trigger the popup.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
There is no such popup related to Button Mapper.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Am I supposed to enable Bixby Home? Cause I disabled it using Package Disabler Pro. Enabling it seems to fix the problem.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
Apparently you do need to enable it. But that message was not from Button Mapper. If it's working, I guess there's nothing to worry about.
[Samsung Galaxy S8+ Themes, Apps, and Mods] ace-user:
Alright, I previously have it disable and did not get such popup. Maybe it was from the latest bixby home update.
[Samsung Galaxy S8+ Themes, Apps, and Mods] flar2:
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:

https://labs.xda-developers.com/store/app/flar2.homebutton

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.