Change assistant button function [Root+ lsposed required] - Moto G 5G Plus Themes, Apps, and Mods

I bet everyone is sick of the key on Moto G 5G plus just like me. I have looked for a solution everywhere but I failed to find one.
Few days ago I found Physical Button Master Control (PBMC) and it was the solution. You can find a thread by @Xspeed HERE. He deserves the donation for turning this useless button into anything you want it to be.
Pre-requests:
1- Magisk
2- lsposed
3- PBMC
I'm not gonna go into how to root your phone using magisk as you can find many guides on xda and same for lsposed.
once you have magisk and lsposed, download PBMC from the link in @Xspeed thread and install the app and activate it in lsposed then restart the phone.
1-Open PBMC and press add (plus sign)
2-Enter any name in the (Name this chain) space. Personally I named it bright because I changed the function of the assistant key so it makes the brightness goes up; it helps me when I go outside and it's sunny as I don't activate auto brightness because it's annoying
3-Click on open chain diagram and from here you'll see three boxes.
a) The condition box is something that has to be true in order for the key to do its function. I chose screen state (screen on, lock screen)
b) the second box is add input key. choose basic then single press. you'll see a space says Unknown. click on change then press the assistant button so the app detects it then ok.
c) The last box is add action. From here you can choose the new action of the assistant key. I chose keypress and searched for brightness up.
4-Once you're done, go back and click save ( the button next to the add button).
You should see it in the chain list tab. If it has any problems, swipe it to the left and make a new one.
No need to reboot
Thanks for @Xspeed effort, this key used to bug me a lot as it was too useless and now it serves me very well.

olik2000 said:
4-Once you're done, go back and click save ( the button next to the add button).
You should see it in the chain list tab. If it has any problems, swipe it to the left and make a new one.
No need to reboot
Click to expand...
Click to collapse
thanks !
it works but after each change a reboot was needed for me to work

I failed to make the assistant button launch the camera with this method. Tried Xposed Edge as well. Only thing that works is Buttons Remapper app.
Edit: As of May, 10th 2023 Buttons Remapper no longer works. Shame.

Related

[MOD] - Sleep Mods to compliment Trackpad Wake Mod *UPDATED Sense/Vanilla versions

[Info]:
My only gripe about the trackpad wake mod (while it is awesome), is that we do it in order to avoid reaching for the awkwardly placed power button, but then we still have to reach for it anyway when we want to shut the screen back off. So it only helps us for half of the task.
After trying to find a way to directly map the search soft-key (or any of the soft-keys) to a power button, and failing, I've decided to come at it from a different angle. Attached you'll find a very simple app, that simply turns off the screen when clicked, along with instructions on how to map it to the search soft-key or the rosie button for sense users.
[Options]:
1. Search key short press. This is the method I use, as it is both the fastest and accessible from within any app. It will completely replace the search key. Single-tap it at anytime to turn off the screen. You'll need to install the app, and push the keyboard remapping file that I have also attached. Note that there are 2 different key mapping files, one for Sense ROMs and another for Vanilla. They will make the following changes:
Sense version:
-Search soft-key is now mapped to the user programmable key #2. Set it to open the Kill Screen app.
-www/com key is now TAB.
-USER 3 key, which didn't work anyway, is now BACK.
-USER 2 key, which is now not needed, is HOME.
-USER 1 key (left of the space bar) is left as normal.
Vanilla version:
-Search soft-key is now mapped to the user programmable key #3. Set it to open the Kill Screen app.
-USER 3 key, which is now not needed, is now BACK.
-USER 1 and USER 2 are left as normal.​
2. Rosie's right button. This is for those who want to keep the search key as normal. See my rosie remap thread here for the option to have it launch when you press the right dock button. Keep in mind you still need to install the app, and you'll (obviously) have to be viewing one of the home screens to press it.
NOTICE: Do not post asking me to adapt this key layout to your needs, as we will end up with 500 different files before long. Instead, change it yourself! Editing this file is about as easy as it gets. You don't need anything special installed, or any programing experience whatsoever. Simply open the attached (or your own) vision-keypad.kl in any text editor (Notepad, Notepad++, etc) and change your desired key to your desired function. If you want to know what key corresponds to what number, you can boot to clockworkmod recovery --> advanced --> key test. Touch any key on the phone, and it spits out the number.
NOTICE #2: As with any app that is given administrator permissions, you will need to remove the app from the admin list in order to uninstall it. Menu --> Settings --> Security --> Select Device Administrators --> Uncheck Kill Screen. Then uninstall as normal. You will be reminded to do this when you first give the app the admin permissions.
[How To]:
Method 1 - Install the app, then grab a copy of the modified key layout and then reboot to recovery and enter this code:
adb shell mount /system
adb shell rm /system/usr/keylayout/vision-keypad.kl
adb push [your saved file location]\keypad_owamod_xxxxx.kl.zip /system/usr/keylayout/vision-keypad.kl
Reboot and enjoy.​Method 2 - Install the app first, then see the linked thread for how to get the modified rosie.apk
That's pretty awesome Will definatley try out when I get a Z
Great news but something like that exists already for a few monts:
http://forum.xda-developers.com/showthread.php?t=795811
I used it on the Nexus One and now on the Desire Z.
Works great! Thanks a lot!!
g4rb4g3 said:
Great news but something like that exists already for a few monts:
http://forum.xda-developers.com/showthread.php?t=795811
I used it on the Nexus One and now on the Desire Z.
Click to expand...
Click to collapse
Not quite.
You should read the whole post, people fail to do so far too often on this forum. Of course the app exists, there are multiple versions, both pay and free, on the android market and floating around the forums.
What does not exist, is the remapped key file to make the app launch with a short press of the search key (method #1) and the remapped rosie buttons to launch the app from the right dock button (method #2).
The only method I really cared about is the short-press search button (method #1), which completely replaces the search button, so that it functions to turn off the screen (like it should have been from the factory) like the G1. This also allows it to work while the screen is still locked, so you can single press the trackpad, check the time/messages/missed call, then turn the screen back off without ever unlocking it! But I made this mod and guide, so that you have THREE options: the long-press method (like the one that you linked to) AND two NEW ways.
Using all of the default files while running CM 6.1.1 Colourized, I can get my DZ to sleep only by long-pressing the Search button, not a short-press.
I checked the .kl file and confirmed the USER2 key is 217 and that matches my Key Test number in Recovery.
A short-press of my Search button doesn't do anything.
I've set KillScreen as the default app for the long-press and it works as it should, but I'd like to leave that as a Search (Vlingo) button and have a short-press go directly to KillScreen.
Suggestions?
I tried the Rosie_killscreen.apk , it installs ok i get the little power icon on my Rosie launcher bar but when I press it, it doesn't do anything, I tried to re-download the file in case it was corrupt and re-install it but the same thing happens, nothing. I installed the Rosie_contacts.apk and it work fine but can get the Rosie_killscreen.apk to work. Has anyone gotten the Rosie_killscreen.apk to work?
EDIT- My fault forgot to install the main app..... Sorry, let me try this again.
Update: The app works great on the Rosie_launcher, Just a reminder to install the KillScreen.apk first, then follow the process for pushing the app to the Rosie launcher.
I like this very much!! I have Launcher Pro Paid and I have set it up as one of my swipe options on the dock.
I use cm6.1.1 lockscreen gestures and the "screen off and lock" app. I setup a gesture of "L" and link the gesture to the "screen off and lock" app so when I am on the lockscreen and do a "L" gesture and it shuts off the screen. I also have it set as a shortcut in the dock for adw launcher too so I can lock/screen off just by pressing it. So far it works great.
B73C said:
Using all of the default files while running CM 6.1.1 Colourized, I can get my DZ to sleep only by long-pressing the Search button, not a short-press.
I checked the .kl file and confirmed the USER2 key is 217 and that matches my Key Test number in Recovery.
A short-press of my Search button doesn't do anything.
I've set KillScreen as the default app for the long-press and it works as it should, but I'd like to leave that as a Search (Vlingo) button and have a short-press go directly to KillScreen.
Suggestions?
Click to expand...
Click to collapse
I'm not really sure what the issue is. If you choose the method where Kill Screen acts as the short-press search, you will not have a long press function anymore.
I'm experiencing a problem with the long press method where the screen turns off for a second but immediately turns back on to the lock screen. Manually launching the app shuts off the screen properly. Anyone else getting this?
I am having problems downloading the 2 .zip files
I use the one called "Lock Screen Button" in the market. It's simple and the icon is very clean.
cyricc said:
I'm experiencing a problem with the long press method where the screen turns off for a second but immediately turns back on to the lock screen. Manually launching the app shuts off the screen properly. Anyone else getting this?
Click to expand...
Click to collapse
After a bit of testing I'm pretty sure this has something to do with the capacitive buttons remaining active for a very brief time after the screen shuts off: since the search button is held while the kill screen action runs, it immediately triggers wake. Pressing the power button while holding down any of the capacitive buttons has the same effect (screen turns off then back on to lock screen).
I'm guessing this can be fixed by adding a delay to turning the screen off. Or by setting the capacitive buttons to not wake the screen somehow.
Can't uninstall kill screen app
I installed the KillScreen.apk, however if I try to uninstall the app via the manage applications I get "Uninstall not succesful" and app is still in my applications list.
How can i permanently remove the KillScreen.apk?
As for the app not working properly with the long-press method, you are right, it seems to be bugging. I will take a look and hopefully get a new version up soon. The other two methods work ok, but I don't use that method, so I didn't do enough testing
LQT said:
I installed the KillScreen.apk, however if I try to uninstall the app via the manage applications I get "Uninstall not succesful" and app is still in my applications list.
How can i permanently remove the KillScreen.apk?
Click to expand...
Click to collapse
This is the second time in one thread I've had to quote someone and tell them to READ. Do they not teach you kids to read in school anymore? READ PEOPLE. You are working with rooted phones in a programming development forums, you SHOULD have some smarts to you.
Since you missed the "--WARNING!!!!---:READ:---WARNING!!!!--" text in all caps across the whole screen when you first gave the app permission, allow me to take my time to type it again for you: You need to remove ANY app that has been given administrator permissions from the admin permissions list in order to uninstall it. Since you gave this app administrator permissions, you need to do so. Menu, Settings, Security, Select Device Administrators. Uncheck kill screen. There will be a pop up box. Do not just hit the ok blindly, READ that too. Then uninstall.
the1wingedangel said:
Since you missed the "--WARNING!!!!---:READ:---WARNING!!!!--" text in all caps across the whole screen when you first gave the app permission, allow me to take my time to type it again for you: You need to remove ANY app that has been given administrator permissions from the admin permissions list in order to uninstall it. Since you gave this app administrator permissions, you need to do so. Menu, Settings, Security, Select Device Administrators. Uncheck kill screen. There will be a pop up box. Do not just hit the ok blindly, READ that too. Then uninstall.
Click to expand...
Click to collapse
Dude relax, no reason to get so agitated!
I actually did press the ok blindly, the reason for that was that the phone didn't do anything after the installation. So i tried to tap the screen to make it work and by accident tapped the ok button before reading the warning post.
If you do tell people to read, please give them the information to read. Either put it in first post or put it somewhere inside the app so people can re-read it.
I managed to uninstall the app, thanks for the info.
Relax, cheers
LQT said:
Dude relax, no reason to get so agitated!
I actually did press the ok blindly, the reason for that was that the phone didn't do anything after the installation. So i tried to tap the screen to make it work and by accident tapped the ok button before reading the warning post.
If you do tell people to read, please give them the information to read. Either put it in first post or put it somewhere inside the app so people can re-read it.
I managed to uninstall the app, thanks for the info.
Relax, cheers
Click to expand...
Click to collapse
Actually I do have reason to get agitated! (Even though I wasn't that upset at the time, my posts often just come across that way) Because after 2 years of seeing stuff like this with android users, it gets very tiring! For example: the countless comments on the market for an app that says in the description "ONLY works on Nexus 1" and the commenter says "Does not work on Droid" and rates it 1 star. But I can forgive those, because its the general public. On a development forum, however, I expect nothing less than every member to have their wits about them. Though, realistically, it's probably just wishful thinking.
the1wingedangel said:
Actually I do have reason to get agitated! (Even though I wasn't that upset at the time, my posts often just come across that way) Because after 2 years of seeing stuff like this with android users, it gets very tiring! For example: the countless comments on the market for an app that says in the description "ONLY works on Nexus 1" and the commenter says "Does not work on Droid" and rates it 1 star. But I can forgive those, because its the general public. On a development forum, however, I expect nothing less than every member to have their wits about them. Though, realistically, it's probably just wishful thinking.
Click to expand...
Click to collapse
Lol! I do that same thing in my thread. It's hard to not snap on some people lots of times. I have come to the conclusion that a lot of people just don't have the brain power to read/comprehend certain things. I've had to learn to relax a bit... It's quite useless to argue with them because it just rolls off them with no worries while people like us simply struggle to understand why and end up getting pissed off. It's tough being cynical sometimes
Thanks for the little app! Just some feedback. Wanted to install method 1. Followed the steps. However, it still acts as method 3, long press on search, instead of just the short press. Running Virtuous 0.8.1.

[Request] Take pictures with the side button?

I know development is kinda sparse here for the droid pro...but anyway someone can modify the camera.apk to allow the side button to work for taking pictures?
yea that would be kinda nice.
Ive got it set up now so that the single side button opens the camera, but it doesnt take pics
Had that feature on my old BB Tour before I switched to the Droid Pro. Really miss that feature. Don't miss much of anything else though.
I posted this on droidforums.net. works with stock GB camera as well as MIUI camera apk which i like a bit better.
I have been wanting to use the side button as a shutter button since I got the Droid Proand it can be done using Button Re-Mapper
You must be rooted to use this app so.... First go to settings>applications>Quick Launch and press/hold side button to clear the assigned app, this setting will no longer work once we remap the button. Open button remapper and scroll all the way to the bottom of the list and click on 246 (Side) and change it to Camera with Wake_Dropped state, apply changes and reboot. This way, along with No Lock app installed, your side button will now wake the phone. Once the phone is awake, press/hold the side button and it will bring up the camera. Now press the side button while the camera app is active and it will snap the pic. Yay.
The next coolest thing would be an app that can reprogram button actions the buttons are pressed/held like on BlackBerry. This would allow press/hold button shortcuts from homescreen without using the search soft key as we have to use now.
THANK YOU for posting this, should be made sticky in a mods page. ButtonRemapper http://forum.xda-developers.com/showthread.php?t=850464 and no lock from the matter go straight in my howto on this phone.
Another thing on my 3.8... verizon latest rom on settings, applications, quick launch you can do something similar to what you are saying pressing search + letter are keyboard shortcuts, like on BBs!
I'll also share that Toggle 2g/3g
http://forum.xda-developers.com/showthread.php?t=739530
works great and with widget it extends my battery even more.
Needs resigning of system apps on droid pro, be very careful and do things step by step adding pause in the batch file..
I added this comment http://forum.xda-developers.com/showthread.php?p=17626210&posted=1#post17626210 for procedure with droid pro.s
The app ROCKS!
el6006 said:
I posted this on droidforums.net. works with stock GB camera as well as MIUI camera apk which i like a bit better.
I have been wanting to use the side button as a shutter button since I got the Droid Proand it can be done using Button Re-Mapper
You must be rooted to use this app so.... First go to settings>applications>Quick Launch and press/hold side button to clear the assigned app, this setting will no longer work once we remap the button. Open button remapper and scroll all the way to the bottom of the list and click on 246 (Side) and change it to Camera with Wake_Dropped state, apply changes and reboot. This way, along with No Lock app installed, your side button will now wake the phone. Once the phone is awake, press/hold the side button and it will bring up the camera. Now press the side button while the camera app is active and it will snap the pic. Yay.
The next coolest thing would be an app that can reprogram button actions the buttons are pressed/held like on BlackBerry. This would allow press/hold button shortcuts from homescreen without using the search soft key as we have to use now.
Click to expand...
Click to collapse
Thank you, that worked great!
#G# said:
THANK YOU for posting this, should be made sticky in a mods page. ButtonRemapper http://forum.xda-developers.com/showthread.php?t=850464 and no lock from the matter go straight in my howto on this phone.
Another thing on my 3.8... verizon latest rom on settings, applications, quick launch you can do something similar to what you are saying pressing search + letter are keyboard shortcuts, like on BBs!
I'll also share that Toggle 2g/3g
http://forum.xda-developers.com/showthread.php?t=739530
works great and with widget it extends my battery even more.
Needs resigning of system apps on droid pro, be very careful and do things step by step adding pause in the batch file..
I added this comment http://forum.xda-developers.com/showthread.php?p=17626210&posted=1#post17626210 for procedure with droid pro.s
The app ROCKS!
Click to expand...
Click to collapse
thanks for this

How to trigger dual window

I'm wanting to use an app called LMT which is basically add on pie controls that can replace your navigation bar, it's fully customizable. Here's a link to the app forum.xda-developers.com/showthread.php?t=1330150 it's a great app. Only problem I'm having is getting it to trigger dual window mode. You can customize the various pie slices to trigger anything you want, apps, app shortcuts, bookmarks, keypresses, but with key presses you have to know exactly how to format the command and I haven't a clue how to do that.
Just open the application dual window.
Sent from my phone
ypsmav said:
Just open the application dual window.
Sent from my phone
Click to expand...
Click to collapse
That doesn't do anything, that app I believe is just the framework for dual window, it actually has no activities when checked with system tuner.
Sent from my awesome LG G3
dginsd said:
I'm wanting to use an app called LMT which is basically add on pie controls that can replace your navigation bar, it's fully customizable. Here's a link to the app forum.xda-developers.com/showthread.php?t=1330150 it's a great app. Only problem I'm having is getting it to trigger dual window mode. You can customize the various pie slices to trigger anything you want, apps, app shortcuts, bookmarks, keypresses, but with key presses you have to know exactly how to format the command and I haven't a clue how to do that.
Click to expand...
Click to collapse
Your answer is in thew link you provided.
You have to set a comand "100+Back" this will press and hold back for 100 milliseconds (Pressing and holding back button launches split window.
or 200+Back = 200 milliseconds and so on.
dginsd said:
FAQ
Setting key actions:
With LMT's key action you can not only send simple key presses, but also simultaneous presses, long presses and key chains. See the following examples:
"keycode" -> Just a simple key press and release
"500+keycode" or "1000+keycode" or "2000+keycode" -> press and hold the key for 100ms/600ms/1000ms and then release it
"keycode1 keycode2 keycode3" -> Execute keycode1, then keycode2, then keycode3
"keycode1,keycode2" -> press and release keycode1 and keycode2 simultaneously
"keycode1,keycode2 keycode3" -> press and release keycode1 and keycode2 simultaneously and afterwards keycode3
"2000+keycode1,keycode2 keycode3" -> press and hold keycode1 and keycode2 simultaneously for 1000ms and afterwards press and release keycode3
Click to expand...
Click to collapse
I actually haven't tried that yet, but the pie slices can be set to back, and back longpress' stock function, that didn't work, but I'll give your idea a try and see how it goes.
I have an idea that I'll have to specify the command that launches dual window, but I have no idea how to determine what that is.
Sent from my awesome LG G3

How to AVOID accidental HOME click while typing

I've resorted to this because...
1. Modifying "kl" files doesn't work for me.
2. I don't like using softkeys
*PROCEED AT YOUR OWN RISK. I AM NOT LIABLE IF YOU SOMEHOW DAMAGED YOUR PHONE.
*EVERYTHING IS REVERSIBLE by just removing the apps listed below.
Hi everyone,
If you are just like me, wanting to mitigate from accidentally clicking home button while supposedly trying to click space bar while typing, here is my suggestion.
1. You need root
2. Install xposed app
3. Install xposed gravityboxLp module (NO NEED FOR THIS - EVERYTHING CAN BE DONE ON Xposed Addition Module)
4. Install xposed additions module
Xposed additions: you need to remap each button to your preference.
My current setup:
BACK button:
click = go back
click+hold = forcekill foreground app
HOME button:
click = disabled
click+hold = go home (this may not work, so you might need to call your launcher activity instead)
RECENT button:
click = show recent apps
click+hold = screenshot
Don't forget to click thanks and, if not so burdensome, reply here if this has helped you. thanks
BTW, if you guys have simpler/better solution that this, please do share. thanks.
xgneilx said:
BTW, if you guys have simpler/better solution that this, please do share. thanks.
Click to expand...
Click to collapse
Change keyboard to Google keyboard...
Oh, and stop eating all those sweets and lollies that are making your fingers pudgy...
ultramag69 said:
Change keyboard to Google keyboard...
Oh, and stop eating all those sweets and lollies that are making your fingers pudgy...
Click to expand...
Click to collapse
thanks for this suggestion. however, it didn't get the job done
One way to temporary disable the home and task switch key is to use screen pinning:
http://www.howtogeek.com/202841/how-to-pin-screens-in-android-5.0-for-more-security-and-privacy/
Back key still work, and it last until you quit the app. I only use it for running Asphalt 8, since my left thumb tends to hit those keys when playing.
cf18 said:
One way to temporary disable the home and task switch key is to use screen pinning:
http://www.howtogeek.com/202841/how-to-pin-screens-in-android-5.0-for-more-security-and-privacy/
Back key still work, and it last until you quit the app. I only use it for running Asphalt 8, since my left thumb tends to hit those keys when playing.
Click to expand...
Click to collapse
I tried this one too. But pinning foreground apps just just to mitigate from accidentally clicking the home won't work for me. thanks for this though.
xgneilx said:
In gravitybox, manage the behavior of your capacitive buttons by appropriating each purpose to meet your requirements
In xposed additions, you need to remap your home button and set a condition that will disable it's click functionality.
Click to expand...
Click to collapse
It works. I only installed the xposed additions, and set the home button to respond to long click on screen-on.
"RECENT button:
click = show recent apps
click+hold = screenshot "
I am sure that there are some applications where the default "click+hold" function of recent apps button, i.e. calling up the app menu, may come handy as those apps don't have the three dots in upper right corner or that hype design....yes, "material" they call it
How would you proceed to call up the menu in such cases?
Just my observation/warning for users, otherwise your solution is a good one, I used to have similar settings through Gravity Box.
Heh, my thumb still keeps hitting a "." key on my favourite keyboard instead of spacebar due to ZF2 having a slightly larger screen than my previous device )
mp3comanche said:
"RECENT button:
click = show recent apps
click+hold = screenshot "
I am sure that there are some applications where the default "click+hold" function of recent apps button, i.e. calling up the app menu, may come handy as those apps don't have the three dots in upper right corner or that hype design....yes, "material" they call it
How would you proceed to call up the menu in such cases?
Just my observation/warning for users, otherwise your solution is a good one, I used to have similar settings through Gravity Box.
Heh, my thumb still keeps hitting a "." key on my favourite keyboard instead of spacebar due to ZF2 having a slightly larger screen than my previous device )
Click to expand...
Click to collapse
Good that you've mentioned the possible issue with app menu. I honestly haven't experienced the issue with any app that i use to call upon app menu, but i think we can still add double tap in gravity box on recent key to do that.
So far, i am still mistyping due to big hands, but at least I no longer experience being brought back to home accidentally.
great one
does anybody here have better solution than this?

Button remap - Long Press "back" = kill, Single Tab "app switch" = open menu

Button remap - Long Press "back" = kill, Single Tab "app switch" = open menu
Hey, i have always configured my phones with a specific button behavior, which i am currently missing on the OP3 with nougat.
Single press "back" = back
Long press back = kill currently used app
single press "recent apps" = open menu
Long press "recent apps" = recent apps
thats the way i'd like to configure my buttons, which isnt possible by the default oxygenOS options. under marshmallow it worked great with gravitybox. but since nougat and the missing xposed i couldnt find anything that allows me this button remaps.
i knows it needs modded system settings file for this, but maybe someone knows a little mod package or something.
PS.: i'm on freedomOS and i'd like to stay on it. i know other ROMs might have this remap options by default.
I also missed this a LOT when coming to Nougat and used flars' button mapper?
https://play.google.com/store/apps/details?id=flar2.homebutton&hl=en
The thing is that if you use tasker with accesibility then they conflict and BM kills tasker. If you don't then it is perfect for what you need.
Hope this helps-
pablo216 said:
I also missed this a LOT when coming to Nougat and used flars' button mapper?
https://play.google.com/store/apps/details?id=flar2.homebutton&hl=en
The thing is that if you use tasker with accesibility then they conflict and BM kills tasker. If you don't then it is perfect for what you need.
Hope this helps-
Click to expand...
Click to collapse
ohh nice. will definitely take a look at it. thank you very much!

Categories

Resources