Modify long press on home button - Xiaomi Mi A1 Questions & Answers

Hello,
I have modified Xiaomi A1 as I want, but there is a last thing missing. I want to lock the phone by holding the home button in the navigation bar.
I am on stock version so far and I want to use it for some time. Is there a magisk module or any app that modifies the actions on the buttons at navigation bar?
Thank you
Sent from my Mi A1 using Tapatalk

Have you tried Gravitybox? You can map hardware keys (tap, long press and double tap) You'll need Xposed.

Thanks man.
I have used gravity on my previous phone but solved my question through Tasker . But tasker doesn't do the same here in xiaomi a1.
I need a simpler solution than that of gravity. Hope someone gets an idea.

You can use button mapper app. I have remapped all navbar keys and it works without any issues.

_mysiak_ said:
You can use button mapper app. I have remapped all navbar keys and it works without any issues.
Click to expand...
Click to collapse
Where have you been my friend? Great. This get things done and I am using. I wish there was a slightly simpler way like a magisk script, but I got the correct reply.

The only annoying thing that I can't get rid in this phone, is that when I restart, it does not ask for my Pin. I know it has something to do with the magisk script I use to unlock phone by a fingerprint, but haven't solved it yet.

Remove and re-apply your PIN in security settings and enable secure start-up again. As soon as you enable app with accessibility service (as for example button mapper), secure start-up is automatically disabled (there is some vague warning, but very easily missed or misinterpreted). Accessibility service was designed to help visually impaired people and this service is available only after phone has booted up, so this is why PIN/pattern can't be requested at boot time for them.

Related

Closed

...................
I use Widget Locker by TeslaCoil. While it's a couple of dollars, it will give you whatever kind of lockscreen you want, and you set it to wake with any hardware button. You can also set it to unlock with a second press of a hardware button, or only a specific button (including the N1's capacitive buttons). I've got mine to wake with any button, and unlock with a custom on-screen slider.
Plus, I can put whatever I want on the lockscreen. If you want it too look like the default screen? You can do that. Widget it up? Perfectly fine. I also like the ability to make your own slider. I've got mine set so the left->right slider is unlock, and the other one launches the camera app, for those quick-or-you'll-miss-it shots.
I used to use MyLock (one of the free betas that was uploaded before the app was abandoned), but WL is more stable. Probably because you can pin it to the notification bar so Android won't kill it from time to time when it needs the memory. Or maybe because it's not beta code. I don't know, I'm not a dev, I only know the basic workings of the OS.
This sounds interesting.
But we still need something to lock the phone without using the power button.
I will purchase your suggested app and put Mixzing widget and the lock screen wigdet on it to search through music without unlocking the phone.
Thanks
If you put Widget Locker in your status bar (or launch it from app tray/homescreen, but for this purpose the status bar works better), you can go down and click it to put it in "Tool Mode" which is basically where you add all the widgets and such, as opposed to "Lock Mode" which can limit interaction (if you set it up that way). Neat trick is that you can go into the settings menu->Screen Timeout and select "Use Timeout in Tool Mode."
So you pull up WL in Tool Mode, it times out in 10 seconds, which puts the phone in lock mode, so you never have to touch the power button if you don't want to.
Neat little app eh?
..........
What if we need security a.k.a a pin code on the lockscreen?
Widgetlocker doesn't have a code system itself, so you slide to unlock then slide again then enter your pin. Pretty annoying.
Any way around this?

Fingerprint Unlock not enough - OOS 3.0.2 requires pin when locked unconventionally

So I just upgraded to the OOS 3.0.2 MM build, and there's a new issue that's greatly annoying me. If you lock the phone with the power button, the fingerprint scanner will unlock it fine. However, if you lock it with something else (as I do with both shake-to-lock and Nova's lock actions), it will insist on ALSO asking for the pin/pattern unlock once your fingerprint has been scanned.
Anyone find a way to disable this security feature while still having a fingerprint unlock in place? Neither Gravity Box nor the security settings are presenting any obvious options
That's a feature of Android MM, not OOS. It can't be disabled.
baw2607 said:
That's a feature of Android MM, not OOS. It can't be disabled.
Click to expand...
Click to collapse
There is no way to disable it? Even rooted? No xposed or system level hack?
It seems to be an error in design of Nova launcher and other solutions. They don't use the correct way of locking the phone hardlocking instead of softlocking, and therefore the phone will ask for pin just as if you restarted your phone.
Artemicion said:
So I just upgraded to the OOS 3.0.2 MM build, and there's a new issue that's greatly annoying me. If you lock the phone with the power button, the fingerprint scanner will unlock it fine. However, if you lock it with something else (as I do with both shake-to-lock and Nova's lock actions), it will insist on ALSO asking for the pin/pattern unlock once your fingerprint has been scanned.
Anyone find a way to disable this security feature while still having a fingerprint unlock in place? Neither Gravity Box nor the security settings are presenting any obvious options
Click to expand...
Click to collapse
I had same issue when i used double tap to sleep in nova launcher prime.... i is because it uses device administrator to lock phone! I fixed by using root to lock my mobile....
Long story short you need your application to use root to lock your device!
But what if the shakelock app I use (and love!) doesn't use root....? It's sounding like I'm out of luck here. How have you managed to make Nova use root to lock?
I guess I'm more of an Apex guy, don't fancy Nova launcher even though I bought it a couple of years ago. I just double tap on top part of screen to lock, or press the power button, or let it timeout. For unlocking, I just use fingerprint, no fuss, no asking for code.
I was happy with Nova Launcher (which is currently on sale for $0.99 on the Play store), until I found out that it has a bug in voice searches from the Home Screen's search bar. It annoyed the heck out of me as it kept on complaining "App not installed" when clicking on the little mic. I had to click on the search bar and THEN click on the other mic that appeared, inorder to access voice search. Defeats the purpose of the voice search b/c I use it a lot while driving and I cant be bothered to be clicking through so many hoops. So I switched my homescreen launcher to Google Now Launcher, while keeping everything else Nova Prime.
For anyone interested, I have found a sort-of solution. Using a combo of Xposed Maxlock and Lockscreen Disabler, it's possible to have a lockscreen up that you can dismiss by using the fingerprint sensor. There's a fairly obvious downside in that it doesn't matter what fingerprint hits the sensor, as anything at all unlocks the screen (which is Lockscreen Disabler's function) but it works as a way to use a non-root lock method that still allows you to unlock the screen with just a touch. Until such a time as someone finds a better solution
I'm pretty sure that it's easy to write a simple apk that uses the root method to call the screen off function. Only if someone would write that
Why I tell that - because if You double tap the status bar - the screen locks and You can easily unlock it just with the fingerprint sensor... therefore, that function does exist already in the ROM.
Yeah, I've got the Nova rooted lock function working, so those actions or GravtiyBox stuff like double tap status bar will work and not require pin+fingerprint, but my specific ask is this way to lock the screen by quickly flicking/shaking the phone (which is GREAT and I don't understand what hasn't been included in stock) - none of those seem to use root to lock so this workaround is a way to have that convenient screen off + convenient fingerprint on.

Immersive Mode Tasker Profile For Nougat

Hey guys. I recently updated to Nougat on my 6p, and was disappointed to find a lack of immersive mode. With our screen being OLED, and susceptible to burn in, I wanted to find a solution. After some digging, I discovered a fix that could be implemented using Tasker, and wanted to share the profile in case anyone else out there found themselves in my position. You will need Tasker, and you will need to be rooted. Load up the profile, and then click on the event trigger, and select the apps you want to use immersive mode with. As it's setup now, opening the designated apps will enable immersive mode, and exiting the app will disable it. Let me know if you need any help getting this up and running.
https://drive.google.com/file/d/0B7TzRfrotbIcVk1wbHNPcUZLeUk/view?usp=drivesdk
OneNutShort said:
Hey guys. I recently updated to Nougat on my 6p, and was disappointed to find a lack of immersive mode. With our screen being OLED, and susceptible to burn in, I wanted to find a solution. After some digging, I discovered a fix that could be implemented using Tasker, and wanted to share the profile in case anyone else out there found themselves in my position. You will need Tasker, and you will need to be rooted. Load up the profile, and then click on the event trigger, and select the apps you want to use immersive mode with. As it's setup now, opening the designated apps will enable immersive mode, and exiting the app will disable it. Let me know if you need any help getting this up and running.
https://drive.google.com/file/d/0B7TzRfrotbIcVk1wbHNPcUZLeUk/view?usp=drivesdk
Click to expand...
Click to collapse
Just what I was missing in Nougat, except the volume - press to skip tracks.
Once the navbar is hidden, can just swipe up to get it back, or do I need pie controls to have this work?
any workaround for not exiting immersive mode when opening the keyboard inside a designated app?
Mikegrmn said:
Just what I was missing in Nougat, except the volume - press to skip tracks.
Once the navbar is hidden, can just swipe up to get it back, or do I need pie controls to have this work?
Click to expand...
Click to collapse
Happy to help. You can just swipe up to get the navbar back. I've been trying to figure out a solution to the volume button media controls, but so far have been unable to figure anything out. There's an app called Button Mapper that is currently in beta that allows you to define button long presses. Two big caveats are the screen must be on, and the current build still seems a bit janky. It's entirely possible that it's my rom that isn't playing nice, but occasionally I'd get a situation where my volume just wouldn't change. Maybe give it a try, perhaps you'd have better luck.
OneNutShort said:
Happy to help. You can just swipe up to get the navbar back. I've been trying to figure out a solution to the volume button media controls, but so far have been unable to figure anything out. There's an app called Button Mapper that is currently in beta that allows you to define button long presses. Two big caveats are the screen must be on, and the current build still seems a bit janky. It's entirely possible that it's my rom that isn't playing nice, but occasionally I'd get a situation where my volume just wouldn't change. Maybe give it a try, perhaps you'd have better luck.
Click to expand...
Click to collapse
I've downloaded the xml and installed tasker again. I've added a profile and selected chrome beta as trigger. How do I make it call the xml. Sorry for the dumb question, but since most roms provide what I need today, I haven't used tasker for a while. Thanks for the help.
OK, found it. Long press on profile tab and choose import option.

Button Mapper: Remap Bixby and other buttons (no limitations if rooted)

If the Bixby button is bothering you, I present an alternative method for remapping it to whatever you want using Button Mapper. On the Note 9 specifically, there are some differences in the way Button Mapper works compared to other Bixby remappers. I am the developer of this app and intentionally made it work differently so you have a choice. Button Mapper version 0.75 or later is required for the Note 9, check links at bottom of post.
Please note that if you have rooted your Note 9, Button Mapper allows single, double and long press native Bixby remapping that works perfectly with no limitations whatsoever.
​
Advantages:
-Bixby never appears, it can be completely disabled and remapping still works
-Single press and long press actions available
-native remapping, meaning it's faster. No polling involved, it reacts to the button press input event
-far more actions and features available than other remapping apps
​
Disadvantage:
-must run adb shell command after every boot
​
The disadvantage is not that bad, because you don't need to restart your device very often. I often let my phones run for weeks without reboot.
Please don't complain about having to do the adb command after every boot. I'm simply presenting this as an alternative method for interested users who would like to put in a little extra effort to get a better experience. If this is not for you, just move on and use something else.
​
Button Mapper is free on Google Play or XDA Labs (version 0.75 or later is required for Note 9 support)
XDA Labs (latest version always available)
https://labs.xda-developers.com/store/app/flar2.homebutton
Google Play (version with Note 9 support may not be available yet)
https://play.google.com/store/apps/details?id=flar2.homebutton
I almost never reboot my device unless I have something to flash. I am very familiar with debloating my devices via ADB. I will give it a try. Thank you for offering a way for non-root users to remap the Bixby button.
This is the best app for remapping the Bixby button to something useful. Works perfectly on my Note 9 even with Bixby 2.0. People shouldn't even bother with any other app.
It takes a 30-second ADB session and you're all set. No lag, no Bixby popups. The only niggle is it needs to be restarted every reboot but that's not a big deal.
I've used BXActions but I prefer this a whole lot more. Just a cleaner experience.
Whoa.. thanks man.
This is just like I remapped the button on my rooted S8. Cant wait to try it.
I have a question though. Is it possible to run the adb from within the phone itself? I know theres a terminal app, but I believe it needs root? I can't remember.
Thanks.
Not sure what I did wrong. I was able to remap both the single press and long press, but it does the customized action as well as launch Bixby voice at the same time.
I'm happy with just disabling Bixby voice really. My device is not rooted.
Edit: Just figured out what I missed. I forgot to add "-d" to the adb command to disable Bixby assistant. Now it works perfectly. Sorry for being a dumbass. lol
MasK said:
Whoa.. thanks man.
This is just like I remapped the button on my rooted S8. Cant wait to try it.
I have a question though. Is it possible to run the adb from within the phone itself? I know theres a terminal app, but I believe it needs root? I can't remember.
Thanks.
Click to expand...
Click to collapse
It's impossible to run the command from the phone, unfortunately.
Thanks flar2!! I really appreciate all of the work that you do. This is my 3rd app that I've purchased from you, and it won't be the last! I was using bxActions, but that app pales in comparison to this button mapper. I'm just glad I stumbled across this thread. Button Mapper Pro has made my Note 9 complete, thanks again for everything you do. I look forward to what ever is next.
Hi @flar2,
In note 9, there's a system default option to control media volume using the vol buttons. See attached pic.
But when I enable vol buttons on the mapper, it results to controlling the ringtone. And even if the toggle is on for the media control, the app still overrides the action.
I see there's a pro setting to gain back the media volume.
otaconremo said:
Hi @flar2,
In note 9, there's a system default option to control media volume using the vol buttons. See attached pic.
But when I enable vol buttons on the mapper, it results to controlling the ringtone. And even if the toggle is on for the media control, the app still overrides the action.
I see there's a pro setting to gain back the media volume.
Click to expand...
Click to collapse
The app has no way of knowing about that setting, so it is ignored. You can use the default to media option in Button Mapper
Any way to get it working by pressing whilst screen is off?
poczynek said:
Any way to get it working by pressing whilst screen is off?
Click to expand...
Click to collapse
Bixby works with the screen off by default
After using bxactions for a few days, I decided to try this app instead, and it works ALOT better! Thank you OP.
I almost never reboot my phones, so the adb thing is no big deal for me.
As much as I like bxActions, I even ended up buying the pro version, I can't help but say this just works better. I made the adb command into a batch file that I can just double click so that's not much of an issue, but I do have a couple questions/requests:
Is it normal for double tap to be greyed out? Can you add an immersive toggle to the list of available commands?
One thing I liked about bxActions is the ability to change what the button does while locked/lockscreen vs unlocked, is it possible to implement that here too?
Thanks!
rejectedjs said:
As much as I like bxActions, I even ended up buying the pro version, I can't help but say this just works better. I made the adb command into a batch file that I can just double click so that's not much of an issue, but I do have a couple questions/requests:
Is it normal for double tap to be greyed out? Can you add an immersive toggle to the list of available commands?
One thing I liked about bxActions is the ability to change what the button does while locked/lockscreen vs unlocked, is it possible to implement that here too?
Thanks!
Click to expand...
Click to collapse
I'm looking into double tap. Currently it's not available for Bixby on the N9.
Note 9 lock and home
Note nine lock and home
Hey there, using this app on my Note 9 instead of bxActions. I can say its working much better but Im missing a few features. Is it possible to have a Sound/Vibrate Toggle like bxActions without going though DND mode, like on IOS? A fullscreen mode toggle action would also be really useful.
Also having different actions for buttonpresses while locked vs. unlocked would be great. Thank you!
Azizamiri796 said:
Note nine lock and home
Click to expand...
Click to collapse
cool, but how does this relate to the button mapper in any way?
@flar2:
Whenever I use USB tethering, button mapper stops working until I run the adb command again, do you know what causes this? So apparently its not only a phone reboot that deletes the adb settings but also usb tethering
destz0r said:
@flar2:
Whenever I use USB tethering, button mapper stops working until I run the adb command again, do you know what causes this? So apparently its not only a phone reboot that deletes the adb settings but also usb tethering
Click to expand...
Click to collapse
I have no idea about this
Note 9. Same to me. Phone reboot deletes the adb settings. And if i use toggle flashlight then bixby startscreen goes ON

Navigation Buttons Mod?

Call me a bit old fashioned, but I have a specific set of "keybinds" that I always work to achieve one way or another on my android devices.
The "Menu" button of old is more important to me than a "Recents" button - really just hoping to achieve inverted behavior of the square button: short press for menu, long press for recents.
Long pressing the "Back" button should kill the foreground app.
Any other bind to quickly toggle the torch light.
Using the menus in OxygenOS, I can't seem to achieve this. Any suggestions or secrets I've yet to find out about?
In Oxygen os you can set LONG PRESS RECENT BUTTON to perform MENU Action. I use it all the time.
About long press back button to kill app, I think this feature was removed in PIE.
Me too was looking for it but didn't find a solution.
Anyway I quickly realized that I don't need it. Op6t can keep a lot of app in memory so there's no need to kill.
When i want to kill one or all i use Recents.
Not a big deal for me.
Yep that's how I'm using everything now. It gets the job done, though I find myself reverting to old habits absent-mindedly. I'm sure I'll be perfectly adapted in a matter of days.
bigcc32 said:
Call me a bit old fashioned, but I have a specific set of "keybinds" that I always work to achieve one way or another on my android devices.
The "Menu" button of old is more important to me than a "Recents" button - really just hoping to achieve inverted behavior of the square button: short press for menu, long press for recents.
Long pressing the "Back" button should kill the foreground app.
Any other bind to quickly toggle the torch light.
Using the menus in OxygenOS, I can't seem to achieve this. Any suggestions or secrets I've yet to find out about?
Click to expand...
Click to collapse
Try this app: https://play.google.com/store/apps/details?id=xyz.paphonb.systemuituner
dannejanne said:
Try this app: https://play.google.com/store/apps/details?id=xyz.paphonb.systemuituner
Click to expand...
Click to collapse
Permissions granted using root. It won't get past the compatibility check (The screen says "If you don't see anything your device is incompatible," and I certainly dont see anything). Thanks for the suggestion, though.
bigcc32 said:
Permissions granted using root. It won't get past the compatibility check (The screen says "If you don't see anything your device is incompatible," and I certainly dont see anything). Thanks for the suggestion, though.
Click to expand...
Click to collapse
It can be granted access with ADB (PC). It should work I've had it work even on LG phones and such.
dannejanne said:
It can be granted access with ADB (PC). It should work I've had it work even on LG phones and such.
Click to expand...
Click to collapse
I don't think the permissions are the problem. The app doesn't complain about that, it just doesn't do anything to the nav bar during setup, and according to the app that's indicative of incompatibility.

Categories

Resources