[MOD][MAGISK] Mi AI Button Remapper

Search This thread

Serbinhio

Senior Member
Feb 8, 2013
56
39
cr0wsplace.com
OnePlus Watch 2
Description:
This module remaps the functionality of the AI button. There are several options available until now but with your help and testing we can enrich the functionality.

Screenshot-2019-04-05-00-14-06-422-com-topjohnwu-magisk.png


Requirements:
- Magisk Installed

Installation:
- Flash in Magisk or TWRP
- If you want to reassign a new functionality to the button reinstall the module.

To uninstall:
- Uninstall from the modules section in Magisk Manager

Bugs
- Only single press for now! Basically this mod changes the functionality of the button so it is not recognized by the system as the AI button anymore and you cannot assign long press or double tap functions! Searching for a solution :)
- Maybe more ;)

Download

Module is in testing phase. Use at your own risk. :D
 
Last edited:

Serbinhio

Senior Member
Feb 8, 2013
56
39
cr0wsplace.com
OnePlus Watch 2
I using single tap for music player. Working very well but when u want use double tap u can't coz music player is open immediately and second tap isn't recognised.
The problem is that remapping the single tap functionality results in miui not recognizing the button as "AI" button so it cannot perform the double and long press functions! This means that you have to use some 3rd party app to assign these functionalities :)
 

paulo boë

Senior Member
Dec 30, 2015
1,348
257
Enschede
Huawei Nexus 6P
Xiaomi Mi Mix 3
Nice. Also works on my Mi MIX 3. One thing. Im running Pixel Experience GSI, and single tap works, double not (Yes i know its in beta). Also, the the fingerprint scanner thinks its a mouse pad or something. Cus if i tap the scanner it click things on screen.
 

Serbinhio

Senior Member
Feb 8, 2013
56
39
cr0wsplace.com
OnePlus Watch 2
If you use tasker you can assign double tap, trible tap and even more. I wrote down some actions I programmed for my AI button https://xdaforums.com/showpost.php?p=78523778&postcount=38
I can share my tasker events if anyone is interested.
@Serbinhio: Does your module work if screen is off?

Thanks for your input. I mainly edit the /sdcard/Downloads/gpio-keys.kl as you describe in your post so I think that the combination of this mod and tasker is the best bet here! I have also posted in the Mi Mix 3 forum but you can include me in your post if you want and you find the mod handy, cause you do not mess up with files and editing (for new users).

For your other question Yes the button works when screen is off. For example, when I set the "Next Media" function, the song changes when I press the button even if the screen is off :)
 

doggydog2

Senior Member
Easy solution: Xposed Edge, the must have tool.. Register this hardware key in "Keys" section and easily configure tap, double tap, and long tap.. Nothing special required for this phone (Samsungs often need enablers first, then again you remap it with Edge). Even can mix with XIAOMI settings if you want. And can remap much more (volume keys, headphone insertion event and tons more). No brainer.
 

Chad_Petree

Senior Member
Apr 2, 2009
3,315
486
I'd wish Xiaomi would give us the option to just completely turn off the button :crying:
 
Last edited:
  • Like
Reactions: macky250

Mohammed779

Senior Member
Dec 28, 2012
1,260
553
QS Panel drop down doesnt work, only setting i really want, nothing happens when i click AI Button :/
 

arddy1

Senior Member
Jun 18, 2016
175
191
Jakarta
Is it possible to add an option to enable/disable waking up screen when click the button? Regardless of any shortcut function..
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Description:
    This module remaps the functionality of the AI button. There are several options available until now but with your help and testing we can enrich the functionality.

    Screenshot-2019-04-05-00-14-06-422-com-topjohnwu-magisk.png


    Requirements:
    - Magisk Installed

    Installation:
    - Flash in Magisk or TWRP
    - If you want to reassign a new functionality to the button reinstall the module.

    To uninstall:
    - Uninstall from the modules section in Magisk Manager

    Bugs
    - Only single press for now! Basically this mod changes the functionality of the button so it is not recognized by the system as the AI button anymore and you cannot assign long press or double tap functions! Searching for a solution :)
    - Maybe more ;)

    Download

    Module is in testing phase. Use at your own risk. :D
    4
    Here another idea , AI BUTTON to mute phone or DND MODE
    3
    Possible to add an Ring switcher (one press -> vibrate another press -> silent -> another press sound on
    2
    Very nice.

    Any chance of adding flashlight to the AI button functionality?
    2
    Very nice! Any way to toggle between silent/dnd modes?