sideActions support with Android 13 log Access - Samsung Galaxy Note 20 Ultra Questions & Answers

So, sideActions which is/was the only reliable app that could remap the Bixby key on a Note 20 to a plethora of options is now gimped a bit with OneUI 5 Android 13 due to Google's restrictions through tightening of privacy and security.
The way sideActions works in Full Remapping mode (where Bixby Voice is disabled allowing instant actions) is by reading the logcat generated by system logs. So whenever a long press is generated on the Bixby key, the logcat outputs a command that sideActions picks up on. This is a special permission granted by android.permission.READ_LOGS and WRITE_SECURE_SETTINGS through a one time ADB command.
The problem now is that Android 13 no longer seems to allow logcat access after a reboot, nor does it allow access without explicitly granting that ADB Command and THEN ALSO going in the app and accepting the permission prompt to access logs which I'm still not exactly sure how to get that prompt to appear when I want it to. Without accepting that prompt, sideActions won't recognize a button press on the Bixby key in Full Remapping. I'm sure other apps that rely on logcat reading have the same issues.
Does anybody know the workaround for granting log access permanently? Meaning that it will persist through reboots since currently, the prompt only offers "Allow This Time Only". At the very least, how to get the prompt to re-appear following a system reboot so permission can be given until the next reboot? I can only seem to get it to appear randomly following ADB commands.
The alternative to sideActions is using Bixby Routines (now called Modes and Routines) to remap the Bixby key. However, the response time is much longer due to being unable to shorten the long press action time. If you're like me, holding down a button for 2 to 3 seconds feels like an eternity when you're used to 350 milli-seconds (practically instant and is customizable through sideActions settings menu with a range anywhere from 350ms to 1500ms), especially when you use it frequently.
Edit Solution: Figured it out. Just remove the files permissions for sideActions and accessibility permission and then force close it. When you open sideActions again and enable the Bixby key, it'll prompt you to grant 1 time log access. That'll last until your next reboot.

Figured it out. Just remove the files permissions for sideActions and accessibility permission and then force close it. When you open sideActions again and enable the Bixby key, it'll prompt you to grant 1 time log access. That'll last until your next reboot.

NOTE: The alternative to sideActions is using Bixby Routines (now called Modes and Routines) to remap the Bixby key. However, the response time is much longer due to being unable to shorten the long press action time. If you're like me, holding down a button for 2 to 3 seconds feels like an eternity when you're used to 350 milli-seconds (practically instant and is customizable through sideActions settings menu with a range anywhere from 350ms to 1500ms), especially when you use it frequently.
Click to expand...
Click to collapse
I feel you. Having this exact same issue. Very odd, hopefully we'll find a workaround. I'd really dislike to go back to using Bixby Routines to remap the key. I've been spoiled by sideActions.

even after doing this, volume buttons do not work properly, unfortunately

Found this thread while trying to fix my S22 Ultra so sideactions would work again. I ended up wiping data on side actions and bcactions, then uninstalling both apps. I reinstalled bcactions and sideactions (from APKmirror, since Play said my phone was incompatible). I went through the initial setup again like you do on a new or wipef device, and when you connect to your PC and run sideactions.exe, you get the script permission and are able to map or full remap your buttons. Literally took less than 5 minutes, working again now for me and I'm happy.

Just so everybody is aware, there is a workaround to get sideActions working again but it must be done after every reboot.
Basically, the goal is to get the prompt asking for one time log access. That'll give SideActions the access it needs. To accomplish it on Android 13, make sure sideActions doesn't have file access and accessibility service is disabled. Next time you open the app and toggle the side button key to on, you'll get the prompt. The key things here are accessibility disabled and file access off.
Also, I highly recommend App Ops or similar ADB permission toggler to grant sideActions full remapping access without connecting to PC. All it does is run a few ADB commands.. can be ran anywhere. I like App Ops because you can manually toggle Secure Settings and Read Logs on. I uninstalled Bixby when I got the device but you can do that too.

bingblop said:
Just so everybody is aware, there is a workaround to get sideActions working again but it must be done after every reboot.
Basically, the goal is to get the prompt asking for one time log access. That'll give SideActions the access it needs. To accomplish it on Android 13, make sure sideActions doesn't have file access and accessibility service is disabled. Next time you open the app and toggle the side button key to on, you'll get the prompt. The key things here are accessibility disabled and file access off.
Also, I highly recommend App Ops or similar ADB permission toggler to grant sideActions full remapping access without connecting to PC. All it does is run a few ADB commands.. can be ran anywhere. I like App Ops because you can manually toggle Secure Settings and Read Logs on. I uninstalled Bixby when I got the device but you can do that too.
Click to expand...
Click to collapse
Think my issue was that I was giving bx/side full permissions. I reinstalled and didn't give full access to either, got the prompt immediately. This will keep me working until something can be figured out, but it doesn't sound promising with UI 5.
Thanks!

Another arguably simpler way is to go into app info and force quit the app. When you open the app again, it prompts for log permissions.

After the March security update it is no longer able to intercept the Power button but is OK for Volume on S23U??? Weirdest part is that it keeps working for both buttons on S22U after same update. Both phones still need the kill + give log permission routine after each restart but on S23U the Power button no longer seems to be intercepted

Because of how unreliable and flimsy the logcat prompt was, I decided it was time to move on. Now I'm using RegiStar, coupled with Tasker to achieve my goal.
The RegiStar response time is a little bit longer, but not as long as Routines+. That's really the only downside if you couple with Tasker. If you're not familiar with Tasker, it's an automation application that allows you to accomplish anything you want on phone that doesn't require root access. The latest Tasker beta also includes a flashlight action that is twice as bright as the native built in flashlight setting. So I created a task to vibrate for 25ms followed by toggling the flashlight. That's my long press.
Double pressing the power button is customizable from advanced settings. Can use Tasker action for this too if you want.
The slightly longer delay in triggering long press I've gotten used to and I've come to find that remapping the power key without sideActions isn't so bad.
If you need help with Tasker, PM me. It can be overwhelming at first but I've been using it for a few years now and I love it. Otherwise, RegiStar also includes native actions that you can use instead.
If you're someone who uses double press and hold option within sideActions often, then sideActions is you're only option. Nothing else offers that level of integration. For volume key remapping, almost any third party application supports this. Only power key remapping is limited with Galaxy devices.

My problem is that s22 ultra keeps turning of in my pcket.
Long press power works
But press power + volume down still pops ppwr of menu and i think this ks why my phone power of every day at work (tight pocket lot of crouching).
I though samsun had poclet check and disabled buttons but doesnt seem like it and bx.and side doesnt help on this last issue

Is there a solution don't have to give this one time permission every reboot, if we are rooted?
Isn't any root command to bypass this?
Thanks

Related

[TUT] Tasker - Hardware Button Control | Screen Off Media Player [BETA]

WARNING! THIS PROFILE IS IN BETA. DO NOT INSTALL UNTIL YOU HAVE READ BELOW!
Beta
When creating this profile I experienced bootloops and splash-screen freezes. If you are not comfortable with how to restore your device from these states, then please wait until it has been thoroughly tested before applying the profiles and tasks.
Testers
If there are any of you left after reading the above I was unable to totally identify what caused the crashes. I hope that through my own testing I have removed the probable causes, but I cannot promise. Read on if you’re still game and post below to let me know you’re in!
New to Tasker? Download your free trial from here
Theory
Have full media control using your device’s hardware buttons when the screen is off. Normal functionality restored when the screen is on.
Current Shortfalls/Work-in-progress
Fast reboot required to allow for system changes (15 second reboot).
- To my knowledge, system changes require this to take effect. Please tell me if you know different? As a consequence, the profiles take about 25 seconds from start to finish to activate and deactivate.
Hardware keys control media at all times, not just when the screen is off.
- A revert profile currently takes care of this, so it’s still more than usable.
Unable to configure hardware keys to only perform actions on long-hold
- I’m working on this, but I think it may be down to Gingerbread/kernel restrictions?
Unable to get trackpad click to perform an action
- Again, Gingerbread/kernel/ROM restrictions?
Ability to skip music folder commands unknown
- I’m working on this
Pop up menu tasks are ugly
- I’ll sort out a suitable background image and work out how to change the icons.
Preparation
This may look like another mammoth, ball-ache of a tutorial, but it’s pretty simple really – make yourself a coffee and by the time you’ve finished it, you’ll be done.
You must have full root read/write access.
1) Ensure you are running the latest version of busybox free from the Market. Even if your current ROM comes with it preinstalled, the Market version allows for this and will update it according. This is essential, as a probable cause of the bootloops I experienced. Reboot after updating it.
2) Install the Locale Execute Plugin free from the Market
3) Download Button Saviour Root free from the Market. We will be messing with the hardware keys, so if you lose control of them, this application will save you by displaying them on the screen. Have a play with this application and make sure you are fully versed with using it just in case.
4) Nandroid backup after you’ve done the above so you don’t have to reinstall everything again should things go wrong {We will be mounting the system for full write access}.
Installing and Customisation
Basically, we will be creating a file with the media controls in and asking Tasker to overwrite the existing file when we want to use it – simple.
Using a file explorer, create a folder within the sdcard/Tasker folder called ‘mediacon’. Within this folder, create another called ‘orig’. Navigate to
Code:
system/usr/keylayout/
Take a copy of the file bravo-keypad.kl (bravo will be replaced with your device name (unless you have a bravo!)). Paste it in the ‘mediacon’ folder you created. Paste another copy in the ‘orig’ folder. Open the file in the mediacon folder with a text editor on your phone (or alternatively copy/push it to your pc and view it there).
From the .zip file below, view the bravo-keypad.kl file on your pc using an application such as Notepad ++ (download free from here) or a simple text editor (although the layout may be a little confusing).
You’ll need to compare the two and see what the differences are. The most important additions to the bravo-keypad.kl to enable the media actions on the hardware keys are:
Code:
key 139 MENU WAKE_DROPPED
key 158 BACK
key 217 SEARCH
To:
Code:
key 139 MEDIA_PLAY_PAUSE WAKE
key 158 MEDIA_PREVIOUS WAKE
key 217 MEDIA_NEXT WAKE
The hardware key numbers and the remaining content of the file will no doubt be different from device to device, I assume it will also be different betweens ROMs and user settings too. You will need to preserve the remainder of the file.
Please can I ask you to post the contents of this file in ‘code’ tags if you can’t see that someone has done this for your device already. Could you also detail your ROM and Kernel. It will help others to quickly edit the file with the correct settings without scratching their heads too much – community spirit and all of that.
As you can see all we are doing is changing the three hardware buttons (menu, back and search) to perform media controls instead. You’ll need to edit the file in the ‘mediacon’ folder (either on your device or drag/push to your pc and then back again) to reflect this. Make sure you do not change the file in the ‘orig’ folder! Remember, your device may have different key numbers for the hardware buttons, this won’t matter, just edit the ones listed as menu, back and search and not the ones that have a # before them.
So, now you have your edited file done and your original file stored safely. We’re nearly there!
Install the profiles and tasks and make sure they are unchecked until you have edited them for your needs. The Tasker Media Control V1.zip folder contains the following two profiles:
MediaBoot
MediaControl
It contains the following 8 tasks:
ResetMedVar
MediaMenu
MediaContBoot
MediaContOff
MediaContOn
FastReboot
FastBootConfirm
ContState
The triggers for the tasks are:
Device Boot
Headset Plugged
If you currently have any other profiles that load music apps or perform other tasks when the headset is connected, please disable these.
Firstly, open the task MediaContOn. Click on action 4 (execute action) and select edit. You’ll see two mentions of the bravo-keypal.kl. Replace ‘bravo’ with your device name, or alternatively with whatever the original file was named in system/usr/keylayout/ (I assume it is your device name?). You’ll need to press the back button once you’re done.
Secondly, do exactly the same in the task MediaContOff.
Finally, open the task MediaContBoot and alter action number 2 to the music application you use (if you don’t use the stock android player).
That’s it! You’re done!
Terminal Command Information
There will be a number of terminal commands running, to copy and overwrite files which will mount the /system as read/write. This of course always has its risks, so ensure you have that nandroid backup just in case….
In the task FastReboot, there is the terminal command
Code:
Killall system_server
This command is not without its risks too, but it is the only way to avoid a full reboot in order to apply the system changes.
Running the task for the first time.
In the profiles and tasks, two variables are created:
%EARP – This is set to 2 when the headset is connected and 1 when it is disconnected. By removing the headset (%EARP =1), you will trigger the exit task which will begin to revert the media button changes.
%MEDIACONT – It was necessary to create this variable to avoid Tasker reacting to the headset plugged trigger after the reboot and wanting to start copying the files all over again. If %MEDIACONT = 2, Tasker will therefore know you are already controlling the hardware buttons and it will prevent the headset profile running again. The variable is changed to a value of 1, once the button controls are returned to normal. Simple hey…
When testing, sometimes these variables were showing the wrong value, due to the options to ‘cancel’ at various stages of the tasks. Before you connect your headset and run the profiles for the very first time only, you will need to open the task ResetMedVar and click on ‘test’. This will set both values to 1. At any point, if your variables go out of sync, you can repeat this exercise so the headset connected/disconnected will trigger the profile/exit task accordingly.
So, open ResetMedVar and click test to set the variables to 1. Tick the MediaBoot and MediaControl profiles to activate them and apply to exit Tasker. Insert your headset!
You’ll be prompted with the first pop-up asking if you want to active the media controls. Click to activate (it will disappear in ten seconds and cancel otherwise). Shortly after, a confirmation pop-up will confirm the files have been copied correctly. Shortly after that, another pop up will confirm you wish to proceed with the fast reboot. Click to activate and you’re device will reload the system. It should take around 15-20 seconds.
When the device boots back up, the Button Saviour application will be loaded, to ensure you have button control if things go wrong. Pressing the little arrow on the right hand side of the screen will enable a back button that you can press to back out of the screen. You media player should then load. Choose a happy tune (from a folder/album/artist that has more than one song) (not forgetting you can’t use the back button other than on the screen!) and turn the screen off.
Hopefully, search will skip forward a track, back will skip back a track and menu will play/pause the playback. WHOOP!
When you’ve finished testing, switch the screen back on, unlock it if necessary and then remove the headset. Tasker will then perform the above steps again, replace the files back to the original ones before confirming the fast reboot.
15-20 seconds later, hopefully all of your hardware buttons will then perform as normal!
Job done.
Extras
I couldn’t get the trackpad/optical joystick to perform an action on my device. There is an entry at the very end of MediaContOn and MediaContOff after the STOP. These entries copy and reversely delete a curcial-oj.kl file to /system/usr/keylayout/ that is supposed to enable the trackpad to work. Drag these to position 5 if you’d like to test them on your device to see if they work. Let me know!
Credits
localh0st for the curcial-oj.kl file here
Decad3nce for his key remapping guide here
The mass of other threads I read through on XDA to gain the knowledge to do this and the devs of the free apps mentioned above - I'm sure they'd appreciate a donate.
Oh and of course the dev of Tasker! What an application.... (I'm not on commission I promise!)
FAQ
Q) I have many other Tasker questions, can I post them here??
A) To avoid clutter, probably best to use this official Google group
Q) Where can I learn more about Tasker?
A) The manual and Profiles and step-throughs on the Tasker wiki and you’ll be up to speed in no time.
Change Log
Confirming pop up tasks may be removed in V2.
Bugs
Let me know...
Future Changes/Requests
Find another way to apply system changes without the need of fast reboot.
Hardware keys to only control media when the screen is off.
Configure hardware keys to only perform actions on long-hold to avoid 'pocket-presses'.
Get trackpad/optical joystick click to perform an action
Enable the ability to skip music folders and/or directories.
Pop up menu tasks need sprucing up.
Installation Instructions
In menu options/profile data 'Import One Task':
ResetMedVar
MediaMenu
MediaContBoot
MediaContOff
MediaContOn
FastReboot
FastBootConfirm
ContState
In menu options/profile data 'Import One Profile':
MediaBoot
MediaControl
The thanks meter lets me know I'm appreciated!
Heh, looks like Brandall is taking Tasker to new heights.
Nice work mate, but I just have to add something though...
Using this can help, BUT, it can also "cripple" those Tasker scripts you've posted about battery saving.
Using Tasker for zipping files and extracting them loads my CPU to the max, also, anything that uses notifications and file reads/writes does that too, eventually, using more battery...
Using this I can see a situation where some user might just lock/unlock their screen very often and rapidly, this might cause a major stress on the CPU, ultimately, nulling and voiding your battery saving scripts and potentially causing harm to CPU/battery/device.
And in any case, turning the screen on to switch tracks is really not that much of a hassle, for me anyway.
This is how I see it, just my 2cents.
But keep up the good work buddy, you seem to have been able to utilize Tasker to a MUCH greater extent than what I was able to, will definitely follow your posts.
Gramlengo said:
Heh, looks like Brandall is taking Tasker to new heights.
Nice work mate, but I just have to add something though...
Using this can help, BUT, it can also "cripple" those Tasker scripts you've posted about battery saving.
Using Tasker for zipping files and extracting them loads my CPU to the max, also, anything that uses notifications and file reads/writes does that too, eventually, using more battery...
Using this I can see a situation where some user might just lock/unlock their screen very often and rapidly, this might cause a major stress on the CPU, ultimately, nulling and voiding your battery saving scripts and potentially causing harm to CPU/battery/device.
And in any case, turning the screen on to switch tracks is really not that much of a hassle, for me anyway.
This is how I see it, just my 2cents.
But keep up the good work buddy, you seem to have been able to utilize Tasker to a MUCH greater extent than what I was able to, will definitely follow your posts.
Click to expand...
Click to collapse
Hi Gramlengo, I guess I can count you out as a Beta Tester!?
The logcat/zipping entries should be deleted from the other profiles if you aren't analysing them anymore to see what your phone is up to. As you said, you will use much less resource that way (they will be removed in next release)!
I do a lot of running, so being able to skip track through my pocket (without waking the phone) is essential = my motivation for working this out. For me, being in screen off state therefore won't clash with the other profiles... although saving battery power wasn't a consideration in this profile - there is plenty to spare these days The notifications are for testing and user interaction - I don't use them in my profile, it just overwrites the file and reboots...
I'm running out of ideas for the next profile, I'm open to suggestions! Good to hear you're following my posts, I'll look forward to your feedback - now sign up for this beta, you know you want to....!
Heh, I'd love to be beta testing your ideas!
Gramlengo said:
Heh, I'd love to be beta testing your ideas!
Click to expand...
Click to collapse
Looks like you might be alone there!!
Alright, finally got a time to test this one:
First, I plugged in my headset and got the two pop-up questions which I clicked activate on. Then, nothing happened. After about 10-15 seconds I got a superuser request for the locale execution plugin which i clicked allow and remember my choice on. Still nothing happened. After another 10-15 seconds I got another superuser request from busybox and quickly after a superuser request from locale execution plugin, both which I clicked allow and remember my choice on.
Then the phone finally fast-rebooted. When it was back up and fully loaded, the music application started. I started a tune, switched off my phone screen, and clicked the back button, nothing happened. I clicked the search button, nothing happened. I turned the screen back on, and hey, the back button still functioned as a back button, and the search button still worked as a search button.
What did I do wrong?
My device is a desire HD running leedroid Hd (latest version and kernel).
Does this have something to do with the Desire HD having capacitive buttons?
Will try again, but this time by remapping the physical volume buttons and the physical power button.
I have also attatched the original keymapping file, and my modified one.
Edit: That didn't work. Opened root explorer to see if the values were right, and they were. I also noticed another keymapping file called "spade-keypad-v0.kl" (without the "). Will try to edit the values in this file to see if that will work.
Edit2: Editing the back,menu and search button in spade-keypad-v0.kl didn't work. Will try to remap the volume and power keys.
Edit3: Ok, two more combinations to test: Editing the capacitive buttons in both files, and afterwards editing the physical keys.
Edit4: No luck, I have attatched the other spade-keypad-v0.kl for you to look at. Hope you can fix this!
torsrex said:
I have also attatched the original keymapping file, and my modified one.
Edit: That didn't work. Opened root explorer to see if the values were right, and they were. I also noticed another keymapping file called "spade-keypad-v0.kl" (without the "). Will try to edit the values in this file to see if that will work.
Edit2: Editing the back,menu and search button in spade-keypad-v0.kl didn't work. Will try to remap the volume and power keys.
Edit3: Ok, two more combinations to test: Editing the capacitive buttons in both files, and afterwards editing the physical keys.
Edit4: No luck, I have attatched the other spade-keypad-v0.kl for you to look at. Hope you can fix this!
Click to expand...
Click to collapse
Appreciate your testing torsrex. Nothing's ever simple is it... Did you fast reboot every time you applied changes to the files?
In the file spade-keypad-v0.kl, did you set them like this:
Code:
key 102 HOME WAKE_DROPPED
key 139 MEDIA_PLAY_PAUSE WAKE
key 158 MEDIA_PREVIOUS WAKE
key 217 MEDIA_NEXT WAKE
Check they had applied with a file explorer first and then fast rebooted?
Let me know!
I checked that the files were changed every time with root explorer. I also tried a normal reboot if the fast reboot didn't work (Did this all the times I had changed a file), and I tried copying the files manually with root explorer.
I tried to change the values of the spade-keypad-v0.kl to what you typed, but that didn't work either. Maybe I should also mention that after I changed the back-key, menu-key and the search-key to media controlls, the home button also won't work.
Does this have something to do with having capacitive buttons and not physical buttons (I think the button turns them self off when I put on the screen lock)?
torsrex said:
I checked that the files were changed every time with root explorer. I also tried a normal reboot if the fast reboot didn't work (Did this all the times I had changed a file), and I tried copying the files manually with root explorer.
I tried to change the values of the spade-keypad-v0.kl to what you typed, but that didn't work either. Maybe I should also mention that after I changed the back-key, menu-key and the search-key to media controlls, the home button also won't work.
Does this have something to do with having capacitive buttons and not physical buttons (I think the button turns them self off when I put on the screen lock)?
Click to expand...
Click to collapse
Ok, sounds like you've been pretty thorough. I knew the set-up would be different device to device, but didn't think it would be difficult to establish how.
I guess all we can do is use an app to discover the changes that need to be applied on your device. Check out ButtonRemapper and after it applies the updates, take copies of the files it has adjusted (assuming the app works for you!). Let me know!
Tried the buttonRemapper application from the market, and It worked! The buttons (menu, back and search) got remapped, but I noticed that the screen needed to be turned on before I could press them (no need to enter any pin code or dragging down the slider, just pressing the unlock button). I have atattched all of the kl-files.
torsrex said:
Tried the buttonRemapper application from the market, and It worked! The buttons (menu, back and search) got remapped, but I noticed that the screen needed to be turned on before I could press them (no need to enter any pin code or dragging down the slider, just pressing the unlock button). I have atattched all of the kl-files.
Click to expand...
Click to collapse
Ok, I'm confused now... I can't see any difference between what you did to what the app has done...? Can you?
When the changes are applied in the app, it must take a copy of the original files it's about to change and store them somewhere. Is there a ButtonMapper folder on the SD card? Perhaps have a look in there when the controls are changed for media? See if there is just one file, or if there's an additional one we haven't considered..?
Then we'll solve the screen off use!
Hm, can't find the backup folder, it isn't on the sd card and it's not in the keylayout folder.
torsrex said:
Hm, can't find the backup folder, it isn't on the sd card and it's not in the keylayout folder.
Click to expand...
Click to collapse
Damn it! I'm going to have a search around and see what I can come up with... I'll be back...
Is your device fine after the fast reboots? That's why I put this as a beta as I didn't know how stable it would be compared to a full reboot...
Using the buttonremapper application, I didn't face any issues. Using the tasker-profiles (editing the files manually) caused the home button, back button, menu button and search button to not function any more and I had to restore a nandroid backup. Maybe you should get the correct setup files for each phone before you take it out of beta
By the way, I sent a message to the developer asking him where the buttonremapper application saves it's backup-files, hopefully I will get a quick answer!
torsrex said:
Using the buttonremapper application, I didn't face any issues. Using the tasker-profiles (editing the files manually) caused the home button, back button, menu button and search button to not function any more and I had to restore a nandroid backup. Maybe you should get the correct setup files for each phone before you take it out of beta
By the way, I sent a message to the developer asking him where the buttonremapper application saves it's backup-files, hopefully I will get a quick answer!
Click to expand...
Click to collapse
Good work! And thanks for testing... I need a lot more volunteers like you for each different device, but I don't see them flocking!
Just got a reply from the developer: "in its data directory in the subdirectory files: /data/data/com.beansoft.buttonremapper/files."
So here you go.
torsrex said:
Just got a reply from the developer: "in its data directory in the subdirectory files: /data/data/com.beansoft.buttonremapper/files."
So here you go.
Click to expand...
Click to collapse
Good work again Sir! I'll take a look at the files and see what else is needed for devices with capacitive buttons (which I'm hoping is the only difference...).
Someone just released a trackpad wake for all AOSP ROMs (without messing with the kernel?) over in the Desire forum, so I'm currently looking at that too...
Always something to do... speaking of which, I need you over here next
So I was bored tonight and thought I'd try and revive this project.
What I've got is still a work in progress, but it basically involves using Buttonremapper to reassign volume_up and volume_down to fast_forward and rewind, then use Tasker's 'state: media button pressed' to forbid any other apps from responding to those two buttons and have them act out Tasker tasks only.
One button is set to play/pause media (if screen is off) and raise volume (if screen is on) and the other set to skip forward media (if screen is off) and lower volume (if screen is on). The end result is almost full media control from hardware buttons without having to look at the phone or take it out of your pocket: use the volume up and down buttons to skip and pause tracks, or press power to turn the screen on and change their function to volume up or down temporarily before reverting back to skip and pause as the screen times out. You don't need to be looking at the screen while this is happening.
The problems at the moment are:
1) While two buttons have effectively been made into four, there are five necessary functions - volume up, volume down, play/pause, next track, previous track. I figured previous track was the least important but it would be nice to have it as well.
2) Normally the volume buttons in Android are context-sensitive, changing media or system or whatever volume depending on where you are. With this they're always assigned to media volume, so you'd need an app like Audiomanager or something to change the volume of other things.
3) Other problems that I haven't realised yet.
One other thing, Tasker's 'state: media button pressed' lets you set both long presses and short presses, but they don't seem to play nice together. I think both the long press and short press tasks activate and conflict when the button is held down, but I haven't had a look at this yet.

[APP][WIP][DEVS NEEDED] Hands Free Now [ALPHA]

HANDS FREE NOW​
Hands Free Now is an attempt to fix the bug in Google Now that Google itself never fixed.
As most of you know, as of Android 4.1+, our headsets are configured to work as follows:
1. Single press for play/pause
2. Double press for next
3. Long press for Google Now
However, the long press option does not work when the screen is off. It works only when screen is on. This is a bizarre lack of feature because if the screen is on and unlocked, you might as well click the mic on the desktop widget to launch Google Now. Why would you need the long press option anyway?!
Several attempts were made by many people to bring Googler's attention to this lack of feature, but all of em were conveniently turned down.
So I guess it's up to us to fix it.
I have started making this app but being the newbie that I am, I'm not sure if I can finish it alone. That's why I request you guys to help me out with this.
Uploaded below is the first apk
Concept in brief:
1. Launch Audio service that intercepts media KeyEvents
2. Once KeyEvents are triggered, create an empty StandOut window that blocks the entire display.
3. Wake up device, disable keyguard and launch Google Now
4. Release wakelock immediately. and reenable keyguard
5. Kill process in 10 seconds
Steps to use:
1. Install app
2. Open app from launcher once. You can go back to Home after this if you want
3. Lock screen.
4. Jack in the head set and triple press the button.
5. Device should unlock itself and in some time will launch Google Now
6. Fire your voice command and wait for response.
7. In 10 seconds, the screen will lock again.
8. For these 10 seconds, your phone will not respond to touches (this is intentional and by design, because you would not want your phone to "pocket dial" while travelling)
Release Notes:
1. App is currently incompatible with music players
2. Battery effectiveness is unknown; you might have to uninstall it once you have tested it
If you can help, the source code can be found on GitHub.
Installed app, but it wont launch after 3 presses of the button, I get a double beep sound when doing so.
I can help out with testing if you want but as far as coding goes im not very useful xD
Bluetooth too?
Will it work with Bluetooth headsets as well or only wired ones?
THANK YOU!
I registered just to say thank you, your little app allowed me to have the kind of music control I alway longed for since i passed from iPhone to Nexus 5. I'm truly grateful.:good:
I had the problem when the screen was off. After when I long press the little button on my headset. Then comes a black screen with a message: please wait (initializing) but nothing does.
But this app solve my problem!
Now I can use Google Now over my Headset.
Thank you very much! ?
Seems an old thread, but nevertheless: Thank you! Finally it works!
I'm just curious if it would be possible to change add long-press functionality. The app AutoVoice is capable of receiving a long press (also with locked screen). But it doesn't help because it relies on the not working Google Search.
Possible idea: your App could register as a service capable of receiving the VOICE_SEARCH_HANDS_FREE intent, it could receive the long press and start its procedure. It won't work immediately because Android will display the "Choose default app" prompt, that obviously doesn't work when the screen is locked/off. In order to choose the default app one has to wake the screen and manually override the keyguard/lock (for example via Secure Settings Plugin and Tasker). The override is somewhat buggy, and even though the screen is on, the phone still 'thinks' it's locked. Now: long-press to receive the command for long-press while locked, see menu and select default app. ..Hope my explanation isn't too bad.
I'm investigation another workaround to get it working with music player.
Best regards, Grtschnk

[APP/TOOL] Android 7+ / Nougat Menu Key [ROOT]

This is a simple workaround created with Tasker for the missing menu key since Android Nougat that makes some old apps without software-key nearly useless or unconfigurable.
It sends an adb terminal command to emulate the menu key (82).
You need root, else it's useless.
After installing you get a new app called "Menu Button".
I used the app "All in one Gestures" to link my recent apps key to this app and it works perfectly on my Galaxy A5 2017.
The opening of the menu is a little bit delayed but acceptable.
Its taking longer on the first key press (2-3 seconds for gaining root and app start) and takes around 0.5-1 second the next time.
Should work on any rooted Android 7+ Device.
I'm not a developer, just an advanced user.
Please give feedback if it's working for you or if there is a better workaround I couldn't find in days of intense searching.

Enabling Android 10's screen recording on the Edge

Fail.
I looked for the feature flags in the developer menu, but, they were gone. SHo nuff, removed at or after Android 10 beta 3 I learned. So, it was up to adb.
Code:
adb shell settings put global settings_screenshot_long_press true
The proceedure failed quietly, which, of course, merely means no errors, just; nuh.
I tried the feature out by then pressing power button for the menu, and trying to long-press screenshot. The utility on the phone popped up instantly, so, long-press was out. I turned the utility off to which the normal screenshot routine took over. Again, no long-press action at all, just instant screenshot.
Meh. It's the moto kung-fu, right? ANyone bother with this? ANy success?

How To Guide Android 13 OneUI 5.0 sideActions Logcat Fix and Workarounds

sideActions Workaround​Due to a logcat permission change with Android 13, apps that rely on the logcat like sideActions to get system events are broken. To get sideActions running like normal, it requires enabling one time log access after every reboot. To force the one time log access prompt for sideActions:
1. Download and install Power Button Remapper for Samsung - sideActions. Since the app is incompatible with devices upgraded to Android 13 on the Play Store, the apk will need to be sideloaded manually. Click here to download directly from Apkmirror
2. Launch the app and grant all on screen permissions to get to the Full Remapping setup screen.
3. Either connect to PC and run the .exe file or just run the following ADB commands to unlock full remapping:
pm grant com.jamworks.sidekeybuttonremap android.permission.WRITE_SECURE_SETTINGS
pm grant com.jamworks.sidekeybuttonremap android.permission.READ_LOGS
am force-stop com.jamworks.sidekeybuttonremap
IF Bixby is still installed or enabled on your device then also run:
pm disable-user com.samsung.bixby.agent
4. After running the ADB commands or the .exe file from a PC, you will notice Full Remapping is enabled next time you run sideActions. Force Stop sideActions and DISABLE all file access permissions! File access for sideActions is only needed to access the .exe file during remapping. Once you disable it, you shouldn't have to touch it again. Workaround doesn't work while app has file access.
5. Force stopping an app also disables accessibility services. While accessibility is disabled and file access denied/revoked, launch sideActions and enable the power button. You should get a prompt to enable one time access to logs. Accept the prompt and sideActions will be up and running at full. Accessibility services are turned on automatically when you enable power button and grant log access.
​NOTE: If the above step doesn't work, restart your device and that should fix it. Step 5 must be completed after every device reboot to grant one time log access. Force Stop the app to stop accessibility services, launch app, toggle button on, prompt: enable one time access. Doesn't take more than 10 seconds. If you don't get the prompt to enable one time access, verify all file access is disabled!
​ALTERNATIVE OPTIONS​If taking a few seconds to enable log access after every reboot isn't your cup of tea then your best options are using RegiStar (Good Lock Module) for side button long presses which is a decent alternative. The downside of RegiStar is no double tap action or haptic feedback to indicate when a long press is recognized (sideActions exclusive) which doesn't sound like much, but you'll be surprised by how much you miss it. In addition to side key long press remap, RegiStar also includes Settings Menu reordering and optional double/triple tap actions for back taps (doesn't work well with covers). Another side key remapping option is Routines+ (Good Lock Module) which adds long press and double tap button remapping to Modes and Routines. Routines+ is slow registering key commands and actions compared to all other options listed here. The easiest way to add custom double tap remapping of the side key is through the native Side Key menu under Advanced Settings which is great for launching the camera or any application. You can extend the actions available to you under the Advanced Settings Side Key menu to pretty much anything by launching the Tasker Secondary App on double press which will trigger a profile and launch a task of your choosing within Tasker. I don't know of any support for double tap and hold key combinations outside sideActions. To remap the volume buttons, any 3rd party app including Routines+ can accomplish that.
Is there any alternative application where you don't have to do step 5 after every reboot?
Thank you for the instruction. I think it should be Samsung standard.
_Floyd said:
I think it should be Samsung standard.
Click to expand...
Click to collapse
Agreed. I don't see how anyone who has tried it doesn't like it. Especially since they got rid of the "Bixby button".
Thank @Dougmeister and @bingblop for now its work perfectly, with the guide.
I am just a newb; @bingblop deserves all of the credit.
I should note for any other folks in my predicament... if you have experimented (and been disappointed) by Samsung's recent attempt to address this via "Good Lock" and "RegiStar", then make sure you have disbled that functionality or the above steps may not work until you do disable them.
(RegiStar: "Side-Key press and hold action", etc.)
Edit: also, I had to navigate to the folder where my adb tools were 'installed' to execute the commands. Plus, I had to add "adb shell " before each of them. Maybe that is obvious to everyone else, but it wasn't to me.
Unfortunately no. No other third party apps have come out that alter the power button on Samsung devices anywhere near as well as sideActions did.
The granting after every reboot is the best we have right now for Android 13 users. It's Googles way of being more privacy and security conscious and Samsung never provides decent alternatives with their software. I personally wouldn't mind using RegiStar if there was a way to speed up the activation time. I like being able to turn flashlight on and off in 350mS which is only that fast in sideActions. Otherwise, it's like a 1000mS.
In fact, if anybody knows how to control the Bixby button long press activation time without sideActions, I'm all ears. I'd love to understand how to alter that time for use with Samsung native apps.

Categories

Resources