[APP] Button Mapper: Remap motion sense (no root)

Search This thread

flar2

Recognized Developer
Jun 11, 2012
18,786
87,756
Southwestern Ontario
elementalx.org
Button Mapper 1.40 introduces support for Motion Sense on the new Pixel 4/4XL.

The way this works is you swipe your hand in the air over the phone to perform an action. You can swipe in any direction, but swiping left or right seems to work best. I originally planned to remap each direction separately, but found this was too unreliable to be practical for most.

Motion Sense must be enabled in System Settings, and the "Reach to check phone" option must be enabled, or this won't work.

The motion gestures will work with the screen off, on the lockscreen and on the homescreen. The sensor is not active within other apps.


Setup
For non rooted devices, requires one-time adb setup to allow Button Mapper to read logcat output.
Rooted devices can work right away.


Options

Turn on screen: For rooted users, there is an option to turn the screen on before performing an action.

Play sound on action: Makes a sound whenever a swipe action is performed. This is helpful to indicate that the swipe was detected, especially when the screen is off.

Disable while music is playing: This will stop Button Mapper from performing the assigned action while music is playing. This allows you to continue using the built-in previous and next track gestures while listening to music. When not listening to music, Button Mapper will resume remapping.


Tips

A good way to test this out is to assign the "Toggle flashlight" action. It's a quick visual to help you get a feel for how the motion sensing works.


Download

XDA Labs (always latest version)
https://labs.xda-developers.com/store/app/flar2.homebutton

Google Play
https://play.google.com/store/apps/details?id=flar2.homebutton

Note: Many users will not yet find the latest Button Mapper 1.40 on the Google Play Store. Download from XDA Labs if you can't wait.
 

wrongway213

Recognized Dev & Contributor / Retired Forum Mod
Jul 27, 2014
5,086
8,855
33
Canton, OH
Awesome, just purchased. Only thing I can't figure out - how to map power button? It doesn't detect it when I press to add button - assuming because it turns screen off? If there's a way to do this that'd be awesome, guessing I'm just missing something
 

StrangerWeather

Recognized Contributor
Jul 18, 2012
3,487
8,011
54
Oxford

Brilliant, many thanks for this! :D:good:

I've given it a try but it doesn't work for me:
- I have "Reach to check phone" enabled
- I ran "Enable Active Edge Remapping" using Button Mapper Setup
- I assigned "Toggle flashlight" as action and toggled on "Play sound on action"
- I went back to my homescreen.
Nothing is happening. Did I forget something?
 

sta3b

Member
Nov 2, 2019
23
10
Brilliant, many thanks for this! :D:good:

I've given it a try but it doesn't work for me:
- I have "Reach to check phone" enabled
- I ran "Enable Active Edge Remapping" using Button Mapper Setup
- I assigned "Toggle flashlight" as action and toggled on "Play sound on action"
- I went back to my homescreen.
Nothing is happening. Did I forget something?

same here, used motion sense to toggle flashlight but its not working, phone is rooted and the app has permissions
edited : actually it works but it needs the soli to be enabled (like when u open spotify and its shows u the light at the top of ur screen, swiping will enable the flashlight)
need an option where u can swipe to toggle flashlight while screen is locked if possible or when you are on your home screen
so technically the motion sense if off when screen is locked or on home screen

---------- Post added at 04:46 PM ---------- Previous post was at 04:32 PM ----------

i noticed too that skipping songs is much more consistent, its like 100% success rate
 
Last edited:
  • Like
Reactions: StrangerWeather

flar2

Recognized Developer
Jun 11, 2012
18,786
87,756
Southwestern Ontario
elementalx.org
Brilliant, many thanks for this! :D:good:

I've given it a try but it doesn't work for me:
- I have "Reach to check phone" enabled
- I ran "Enable Active Edge Remapping" using Button Mapper Setup
- I assigned "Toggle flashlight" as action and toggled on "Play sound on action"
- I went back to my homescreen.
Nothing is happening. Did I forget something?

I have no idea why, but for me it works all the time except when I open an app.
 
  • Like
Reactions: StrangerWeather

StrangerWeather

Recognized Contributor
Jul 18, 2012
3,487
8,011
54
Oxford
same here, used motion sense to toggle flashlight but its not working, phone is rooted and the app has permissions
edited : actually it works but it needs the soli to be enabled (like when u open spotify and its shows u the light at the top of ur screen, swiping will enable the flashlight)
need an option where u can swipe to toggle flashlight while screen is locked if possible or when you are on your home screen
so technically the motion sense if off when screen is locked or on home screen

---------- Post added at 04:46 PM ---------- Previous post was at 04:32 PM ----------

i noticed too that skipping songs is much more consistent, its like 100% success rate

Good point, it does work when soli is enabled in Spotify. I like the click as well when changing songs.
@flar2 is there a way of getting this to work outside of Spotify?
 

darfbozo

Senior Member
Sep 7, 2009
136
35
Southampton(ish)
For non rooted devices, requires one-time adb setup to allow Button Mapper to read logcat output. <<<<<<

Could someone let me know the adb command please?

EDIT: got it (I think)
adb shell pm grant flar2.homebutton android.permission.WRITE_SECURE_SETTINGS
adb shell pm grant flar2.homebutton android.permission.READ_LOGS
 
Last edited:

StrangerWeather

Recognized Contributor
Jul 18, 2012
3,487
8,011
54
Oxford
same here, used motion sense to toggle flashlight but its not working, phone is rooted and the app has permissions
edited : actually it works but it needs the soli to be enabled (like when u open spotify and its shows u the light at the top of ur screen, swiping will enable the flashlight)
need an option where u can swipe to toggle flashlight while screen is locked if possible or when you are on your home screen
so technically the motion sense if off when screen is locked or on home screen

---------- Post added at 04:46 PM ---------- Previous post was at 04:32 PM ----------

i noticed too that skipping songs is much more consistent, its like 100% success rate

It works with Pixel 4 XL live wallpapers.
 
  • Like
Reactions: flar2

jamiejames

Senior Member
May 14, 2015
630
329
Just out of curiosity. Is it possible to make the motion sense scroll the page up and down?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Button Mapper 1.40 introduces support for Motion Sense on the new Pixel 4/4XL.

    The way this works is you swipe your hand in the air over the phone to perform an action. You can swipe in any direction, but swiping left or right seems to work best. I originally planned to remap each direction separately, but found this was too unreliable to be practical for most.

    Motion Sense must be enabled in System Settings, and the "Reach to check phone" option must be enabled, or this won't work.

    The motion gestures will work with the screen off, on the lockscreen and on the homescreen. The sensor is not active within other apps.


    Setup
    For non rooted devices, requires one-time adb setup to allow Button Mapper to read logcat output.
    Rooted devices can work right away.


    Options

    Turn on screen: For rooted users, there is an option to turn the screen on before performing an action.

    Play sound on action: Makes a sound whenever a swipe action is performed. This is helpful to indicate that the swipe was detected, especially when the screen is off.

    Disable while music is playing: This will stop Button Mapper from performing the assigned action while music is playing. This allows you to continue using the built-in previous and next track gestures while listening to music. When not listening to music, Button Mapper will resume remapping.


    Tips

    A good way to test this out is to assign the "Toggle flashlight" action. It's a quick visual to help you get a feel for how the motion sensing works.


    Download

    XDA Labs (always latest version)
    https://labs.xda-developers.com/store/app/flar2.homebutton

    Google Play
    https://play.google.com/store/apps/details?id=flar2.homebutton

    Note: Many users will not yet find the latest Button Mapper 1.40 on the Google Play Store. Download from XDA Labs if you can't wait.
    4
    Just out of curiosity. Is it possible to make the motion sense scroll the page up and down?

    Yes

    What is the ADB commands for the non-rooted phones, please? Thank you!

    pm grant flar2.homebutton android.permission.READ_LOGS
    2
    Thanks for this, got the update via play store and sent some coffee your way.
    1
    I swear no matter what device you jump on you always come through with something great!


    Sent from my Pixel 4 XL using Tapatalk
    1
    Awesome, just purchased. Only thing I can't figure out - how to map power button? It doesn't detect it when I press to add button - assuming because it turns screen off? If there's a way to do this that'd be awesome, guessing I'm just missing something

    The power button can't be remapped.