-
-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bixby button detection #118
Comments
https://www.xda-developers.com/samsung-galaxy-s10-plus-bixby-button-remapping-update/ create a second launcher intent which when opened sends a broadcast intent telling the accessbility service the bixby button has been pressed. Find tester with S10 and S9. Advertise on XDA? |
Ready to be a tester (rooted S10+), give me instructions. |
Hi, thank you for offering! Right now I'm very busy studying so development is really slow until August. First I want to get the 2.0 release https://github.com/sds100/KeyMapper/projects/4 out, then I can focus on all the little features. Bixby button support will definitely be high priority! I would really appreciate some feedback on this layout for the 2.0 release... #299. Thank you. |
Ok) |
@exili0n Does Samsung offer a way to remap the Bixby button on your phone? |
@sds100 hi, at the moment i'm usin Lineage OS (custom rom), and it has this feature built in, but stock samsung rom allows officially single or double press remap on some apps. With root you can remap single press to som basic features (there is info on XDA) and there are some apps in google store that allow to remap not only single press, but double and long press to lots of actions, but you need eather root or give it permissions via ADB, gues it is running as catch press service... |
Is this what you were referring to? If you remap the Bixby button to another button (e.g the recents button) with this tutorial, does it show up in Key Mapper as the "recents" button? https://forum.xda-developers.com/galaxy-s8+/how-to/root-remap-bixby-button-o-app-t3601061 If so, this would be a great way to do it if people have ADB because then Key Mapper doesn't have to treat the Bixby button in a special way and restrict how it can be used. Downside of this is inexperienced users could break their device and they have to know how to use adb. |
This would be another way to do it: https://www.xda-developers.com/tasker-beta-remap-bixby-button/ |
@exili0n could you join the Discord server so we can easily test and discuss with the other people who have Bixby buttons? I think we have figured out a way with logs to detect when the Bixby button is pressed but I am not sure how reliable it is. |
@sds100, yes, this is the right guide i tried, buti guess it works only with root permissions, in playstore there is app called "Button Mapper" it can do the trick with granting premission via ADB. Momentaly i can not test the thing you are asking, becouse i moved to Lineage OS and don't have root, but i guess next weekend i can flash stock rom on my second samsung and root it. As soon as i test it, i'll report) The second coise is interestig as well, but first one is more functional and clear, the app can give certain instructions how2adb, it made so in app i mentioned, the first option with limited possibilities - remap bixby with samsung stock option on eather single or double press to some limited actions, second - remap with adb, almost everything can be remapped, and third - root method, there you can remap to every option that is present in app, bud i personnaly dont trust closed-source apps to have such permissions...) |
That's fine. This other person in Discord helped me to figure out how to determine when the Bixby button was pressed down and released by reading the logcat. The script Button Mapper runs just gives the app READ_LOGS and WRITE_SECURE_SETTINGS permission and disables the Once you get your stock Samsung device running, let me know. Thank you. |
Hi. Great app! If you do manage to find out how to map the Bixby button I would be more than happy to test it on my non-rooted Galaxy S9, if it would work. Cheers. |
#680 would be of use pertaining to this. Old issue, but new solution. Hope that helps. |
yeah |
Hello, Was this ever completed? I'm using an S9+ with Lineage OS and trying to find a way to remap the bixby button to flashlight. Rooted exynos model. Cheers. |
Hi, I still haven't done this but since you're rooted you can work around this. https://docs.keymapper.club/faq/#can-i-remap-my-bixby-button |
Thanks for the advice. I read the XDA thread suggested on the bottom of the page your linked to but there doesn't appear to be any code indicated for what the flashlight command is. Also the bad news is that apparently it doesn't work with the screen off which would defeat the whole purpose of doing this since you'd have to unlock the screen first anyway. The second option mentioned is bxactions which I have already tried but because lineage OS has no default setting for the bixby button, when the app asks to grant it permission to the key there is no permission present for it other than the volume keys. Still looking for an alternate solution I guess..... |
@Candlemass Oh, you want to detect it when the screen is off. That is pretty much impossible without Xposed unfortunately. |
I have no problem with installing Xposed. The issue is that the install of Xposed listed in my magisk app always fails upon trying to. |
@Candlemass which xposed are you using? I'm not sure if there is already an app that can remap the Bixby button with xposed but I know it is the only (good) way that is technically possible. |
The version that's available to me on Magisk is 58. Every time I try to install it on Lineage it fails. The ROM I'm running is based on Android 11. |
????? |
two options for detection:
read logs which could in theory allow Key Mapper to treat the Bixby button like any other button. Downside is the user has to grant Key Mapper permissions with ADB and this is probably not very reliable and needs a lot of testing.
make a companion app that the Bixby button opens. This is restricted to short presses and double presses. This is probably a laggy way to do it (especially for keyevent actions) so this won't be an option.
only start reading the log if the bixby package is installed and there are remaps for it.
disable the button to remap Bixby if the Bixby package name isn't installed.
empty the log outputstream
Create a separate section of the app for Bixby and other special buttons.
If Key Mapper doesn't have READ_LOGS permission, show a card prompting the user to give it permission via ROOT or ADB. Show this card instead of the usual layout.
When backing up keymaps, also backup Bixby remaps.
make a custom screen with all the action and trigger options and constraints. Have a list of options and a list of constraints.
BixbyKeymap class with these properties: action, constraints, extras and flags
BixbyDetectionDelegate that accepts a logcat outputstream that is filtered to show only one line. The delegate will process the time of every new line to figure out what kind of press it is.
write Unit tests for the BixbyDetectionDelegate.
save a BixbyKeymap for short press, long press and double press to shared preferences using a custom serializer and deserializer. use SerializedName annotations.
logcat options: -v epoch to get epoch time, *:W filterspec, -e option to filter output
The text was updated successfully, but these errors were encountered: