Themes / Apps / Mods Assistant button remapper module (magisk/xposed)

Search This thread

tardis_42

Senior Member
Dec 9, 2014
156
97
Sony Xperia 1 III
I've created a very simple Magisk module to allow Xposed Edge to properly remap the Google Assistant button. You'll need Magisk and a Magisk-based Xposed implementation (I use LSPosed) for this to work.

Xposed Edge is the only remapping tool I've found so far that can properly detect the assistant button being pressed. The problem is, while you can assign it to an action using Xposed Edge, it will ALSO launch the assistant. What I've done is built a Magisk module that alters the gpio-keys.kl file in /vendor/usr/keylayout to change the keycode the system receives when the assistant button is pressed. Currently I've used PROG_BLUE, which is a keycode used in Android-powered smart TVs with programmable remote buttons.

To use, just download and use the "install from storage" option on the modules screen in Magisk. Once the module's installed and activated, reboot.

Once rebooted, you can open Xposed Edge, and under "Keys", tap "Add...". It will tell you to click the button you want to add, and if all goes well, you can press the assistant button and it will detect a press of PROG_BLUE. Then you'll be able to assign any Xposed Edge action or shortcut to it, and the assistant won't show up.

Usual disclaimers, works for me but not responsible if your phone blows up, etc.

Right now the module tested with the Xperia 1 III. If you own another device with a hardware assistant key and want to let me know what GPIO key number is associated with it (probably under /vendor/usr/keylayout, look for the number on the line with ASSIST), I might be able to expand it to other devices.

It's possible it may work in its current state for other Xperia devices, but there's a risk the changes to gpio-keys may mess up your other hardware buttons including power - so if you try it on, eg, an Xperia 5 III make sure you have another way to reboot if it breaks your power button and you need to uninstall the module!
 

Attachments

  • XperiaGAButtonRemap.zip
    2.4 KB · Views: 945
Last edited:
Update: I figured out how to make it installable through Magisk Manager, new zip in first post.
Thanks for the fine works, I was able to remap the GA key successfully here!!!

Model: XQ-BC72
Build: 61.0.A.11.23

Just listing out things needed to be installed for your module to work.

Magisk module:
Riru
Riru - LSPosed
XperiaGAButtonRemap (install from storage .zip provided on this thread)

Google Play
Xposed edge

As all above modules/apps in place
finally in the Xposed edge adding key, app was able to recognize GA button as "PROG_BLUE", there user should be able to program it however they like (attach is my configuration, and all working smoothly)


Screenshot_20210827-093056.png
 

tardis_42

Senior Member
Dec 9, 2014
156
97
Sony Xperia 1 III
you need root for this?
Yes, Magisk root and systemless Xposed. See @SonySteve's post above for the full list of modules.

There's an app that works for remapping the assistant button on last year's Xperia models without root, and might soon be updated for the 1 iii, but as I understand it it works basically the same way as Bixby non-root remappers, using accessibility services to track when the assistant is opened via a button press and then immediately close it and do something else.

The root approach lets you skip that process and directly reassign the button, which makes it faster and less susceptible to errors.
 

tukes

Senior Member
Jan 15, 2010
175
13
if i root, i can't use my banking app anymore :-(
hopefully Sony will fix this in the next update...
 

tukes

Senior Member
Jan 15, 2010
175
13
i'm in Belgium, all banking apps stop working if you root your phone here :-(
few years ago this wasn't so....
 
Update: I figured out how to make it installable through Magisk Manager, new zip in first post.

i'm in Belgium, all banking apps stop working if you root your phone here :-(
few years ago this wasn't so....

I was flashing / locking / unlocking to test on DRM / finance app protection etc.


The good news is after re-locking my device, I was able to return back to Widevine L1 status, for streaming platform that requires it. (certainly stay L3 in unlock / rooted state). Banking apps wise no gurantee even after I relock the phone somehow (for my Taiwan based fiance/bank related apps).

I already have MagiskHide Props / SafetyNet passed etc., all in place and some banking apps still would detect device been compromised / unable to launch.

But, since I'm more accustomed to rooted device, I'm ultimately currently stay rooted.
I was able to get the finance app to run via install this Shelter app from Google PS, able to launch and log in all right for me.

Hope my above experience help there.
 
  • Like
Reactions: steso90

tukes

Senior Member
Jan 15, 2010
175
13
I was flashing / locking / unlocking to test on DRM / finance app protection etc.


The good news is after re-locking my device, I was able to return back to Widevine L1 status, for streaming platform that requires it. (certainly stay L3 in unlock / rooted state). Banking apps wise no gurantee even after I relock the phone somehow (for my Taiwan based fiance/bank related apps).

I already have MagiskHide Props / SafetyNet passed etc., all in place and some banking apps still would detect device been compromised / unable to launch.

But, since I'm more accustomed to rooted device, I'm ultimately currently stay rooted.
I was able to get the finance app to run via install this Shelter app from Google PS, able to launch and log in all right for me.

Hope my above experience help there.
gonna try this later this week! Thx
 
  • Like
Reactions: SonySteve

kms108

Senior Member
Sep 16, 2007
6,330
1,108
I've also removed GA from my xperia 1III, with out installing and modifying my phone, my GA button is also disabled, also removed all these app which is labelled in black and white, some of this app when installed are hidden.
Screenshot_20210908-055536.png
 

jaseman

Senior Member
Aug 27, 2012
851
304
Spring
I was able to remap my assistant button. I do not know if my previous uninstall of Google as well as the Google assistant App(s) had any bearing on the results...but I did use ADB to uninstall those things and it did disable the button, because when the phone was unlocked pressing the button did nothing at all. However, I did notice that when the phone was locked if I pressed the assistant button it would call up the login screen, so evidently it was still doing something!
At any rate this is how I did it:


I want to thank each and every person who provided all this information as well as for the technical know-how to make this work!!!

I just wanted to add that when I press the assistant button the app I chose (for now the settings app) opens immediately with no hesitation at all.
 
I've created a very simple Magisk module to allow Xposed Edge to properly remap the Google Assistant button. You'll need Magisk and a Magisk-based Xposed implementation (I use LSPosed) for this to work.

Xposed Edge is the only remapping tool I've found so far that can properly detect the assistant button being pressed. The problem is, while you can assign it to an action using Xposed Edge, it will ALSO launch the assistant. What I've done is built a Magisk module that alters the gpio-keys.kl file in /vendor/usr/keylayout to change the keycode the system receives when the assistant button is pressed. Currently I've used PROG_BLUE, which is a keycode used in Android-powered smart TVs with programmable remote buttons.

To use, just download and use the "install from storage" option on the modules screen in Magisk. Once the module's installed and activated, reboot.

Once rebooted, you can open Xposed Edge, and under "Keys", tap "Add...". It will tell you to click the button you want to add, and if all goes well, you can press the assistant button and it will detect a press of PROG_BLUE. Then you'll be able to assign any Xposed Edge action or shortcut to it, and the assistant won't show up.

Usual disclaimers, works for me but not responsible if your phone blows up, etc.

Right now the module tested with the Xperia 1 III. If you own another device with a hardware assistant key and want to let me know what GPIO key number is associated with it (probably under /vendor/usr/keylayout, look for the number on the line with ASSIST), I might be able to expand it to other devices.

It's possible it may work in its current state for other Xperia devices, but there's a risk the changes to gpio-keys may mess up your other hardware buttons including power - so if you try it on, eg, an Xperia 5 III make sure you have another way to reboot if it breaks your power button and you need to uninstall the module!
thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    I've created a very simple Magisk module to allow Xposed Edge to properly remap the Google Assistant button. You'll need Magisk and a Magisk-based Xposed implementation (I use LSPosed) for this to work.

    Xposed Edge is the only remapping tool I've found so far that can properly detect the assistant button being pressed. The problem is, while you can assign it to an action using Xposed Edge, it will ALSO launch the assistant. What I've done is built a Magisk module that alters the gpio-keys.kl file in /vendor/usr/keylayout to change the keycode the system receives when the assistant button is pressed. Currently I've used PROG_BLUE, which is a keycode used in Android-powered smart TVs with programmable remote buttons.

    To use, just download and use the "install from storage" option on the modules screen in Magisk. Once the module's installed and activated, reboot.

    Once rebooted, you can open Xposed Edge, and under "Keys", tap "Add...". It will tell you to click the button you want to add, and if all goes well, you can press the assistant button and it will detect a press of PROG_BLUE. Then you'll be able to assign any Xposed Edge action or shortcut to it, and the assistant won't show up.

    Usual disclaimers, works for me but not responsible if your phone blows up, etc.

    Right now the module tested with the Xperia 1 III. If you own another device with a hardware assistant key and want to let me know what GPIO key number is associated with it (probably under /vendor/usr/keylayout, look for the number on the line with ASSIST), I might be able to expand it to other devices.

    It's possible it may work in its current state for other Xperia devices, but there's a risk the changes to gpio-keys may mess up your other hardware buttons including power - so if you try it on, eg, an Xperia 5 III make sure you have another way to reboot if it breaks your power button and you need to uninstall the module!
    2
    Update: I figured out how to make it installable through Magisk Manager, new zip in first post.
    2
    Update: I figured out how to make it installable through Magisk Manager, new zip in first post.
    Thanks for the fine works, I was able to remap the GA key successfully here!!!

    Model: XQ-BC72
    Build: 61.0.A.11.23

    Just listing out things needed to be installed for your module to work.

    Magisk module:
    Riru
    Riru - LSPosed
    XperiaGAButtonRemap (install from storage .zip provided on this thread)

    Google Play
    Xposed edge

    As all above modules/apps in place
    finally in the Xposed edge adding key, app was able to recognize GA button as "PROG_BLUE", there user should be able to program it however they like (attach is my configuration, and all working smoothly)


    Screenshot_20210827-093056.png
    2
    I was able to remap my assistant button. I do not know if my previous uninstall of Google as well as the Google assistant App(s) had any bearing on the results...but I did use ADB to uninstall those things and it did disable the button, because when the phone was unlocked pressing the button did nothing at all. However, I did notice that when the phone was locked if I pressed the assistant button it would call up the login screen, so evidently it was still doing something!
    At any rate this is how I did it:


    I want to thank each and every person who provided all this information as well as for the technical know-how to make this work!!!

    I just wanted to add that when I press the assistant button the app I chose (for now the settings app) opens immediately with no hesitation at all.
    1
    Update: I figured out how to make it installable through Magisk Manager, new zip in first post.

    i'm in Belgium, all banking apps stop working if you root your phone here :-(
    few years ago this wasn't so....

    I was flashing / locking / unlocking to test on DRM / finance app protection etc.


    The good news is after re-locking my device, I was able to return back to Widevine L1 status, for streaming platform that requires it. (certainly stay L3 in unlock / rooted state). Banking apps wise no gurantee even after I relock the phone somehow (for my Taiwan based fiance/bank related apps).

    I already have MagiskHide Props / SafetyNet passed etc., all in place and some banking apps still would detect device been compromised / unable to launch.

    But, since I'm more accustomed to rooted device, I'm ultimately currently stay rooted.
    I was able to get the finance app to run via install this Shelter app from Google PS, able to launch and log in all right for me.

    Hope my above experience help there.