Q: How to start Screensaver activity on rooted Firestick - Fire TV Q&A, Help & Troubleshooting

I'm trying to start the screensaver service with a remote press using 'X edge Pro' on a rooted Firestick.
Can't find the activity that starts the screensaver?
Basically I want to hold down a button to start the screensaver.
Currently the only way I've found is to point to Aerial Dream and start the 'Test Activity'
If anyone knows a way I can do this your help would be greatly appreciated.

You can launch whatever screensaver you currently have active with this:
Code:
ADB shell input keyevent KEYCODE_SOFT_SLEEP
It's case sensitive

Finnzz said:
You can launch whatever screensaver you currently have active with this:
Code:
ADB shell input keyevent KEYCODE_SOFT_SLEEP
It's case sensitive
Click to expand...
Click to collapse
Amazing, thankyou.
Rather than using the ADB command, I found X Edge Pro has a 'inject key event'. I found the KEYCODE_SOFT_SLEEP there.
Thankyou for you swift reply. Really helped

Related

help for command nfc tag

good evening. please help me, i use trigger software and want make one action with 2 commands: set profile vibration + screen off immediately. first command is easy but i don t find screen off.... who can help me? thanks
myabc said:
good evening. please help me, i use trigger software and want make one action with 2 commands: set profile vibration + screen off immediately. first command is easy but i don t find screen off.... who can help me? thanks
Click to expand...
Click to collapse

[Q] KODI Issue

This is a user problem I realize but recently after letting my kids use KODI on the FireTV I know have a persistent readout of menus, associated xml files, and mouse movements on the top of my screen. Example: Window: fullscreenvideo (VideoFullScreen.xml) Mouse: (0,0). Obviously this changes as I change menus, video modes, etc. I'm guessing there's some key combination to enable/disable this but it seems like I've tried every button without any luck. I do have a keyboard as well should that make it easier to explain how to turn it off. Any assistance would be appreciated. Thanks and Happy New Year!
apparently i had to turn off debugging in the addon.xml file for the skin. Thanks.

Options to turn screen off without hardware button that allows you to re-open?

I've tried various screen off apps and they all require secondary security to turn back on when using the fingerprint scanner. Any ideas?
Would love for an option where the fingerprint scanner can also turn the screen off or even an OK Google command, but then allows the fingerprint scanner to reopen without secondary security.
+1
Sent from my Nexus 5X using Tapatalk
hmmm, you can try to use command 'input keyevent 26' , for tasker task...
this will required root though.
Jackpot! A widget pointing to a tasker task that uses secure settings to run command 'input keyevent 26' as root works like a charm!
Sent from my Nexus 5X using Tapatalk
minnemike said:
I've tried various screen off apps and they all require secondary security to turn back on when using the fingerprint scanner. Any ideas?
Would love for an option where the fingerprint scanner can also turn the screen off or even an OK Google command, but then allows the fingerprint scanner to reopen without secondary security.
Click to expand...
Click to collapse
I was just going to post a similar question. I don't have the phone yet, but i thought maybe someone can create something that allows the fingerprint scanner to turn off the screen. The finger is already in that area so it would be cool to either hold fingerprint scanner for a second to turn screen off or double tap the scanner.
jpen said:
I was just going to post a similar question. I don't have the phone yet, but i thought maybe someone can create something that allows the fingerprint scanner to turn off the screen. The finger is already in that area so it would be cool to either hold fingerprint scanner for a second to turn screen off or double tap the scanner.
Click to expand...
Click to collapse
Any solutions yet?
scottfreeze said:
Jackpot! A widget pointing to a tasker task that uses secure settings to run command 'input keyevent 26' as root works like a charm!
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
Thanks for this! Added it as a Tasker shortcut for double-tap gesture in Nova and it works like a charm.
Great tip. Got tasker set to Nova pinch out to turn off. But also have option to run task from Notification menu as well.
For those who have never used tasker before like me here is a quick note on how to set it up:
Select TASKS tab at top, select + button at bottom, give it a name (screen off) and press check mark.
You will then enter Task Edit. Press + to add an action, then select Code as your action category, then choose Run Shell.
Paste in the text: 'input keyevent 26' under the Command field. Check the Use Root option. Back out once and choose an icon for it if you want at the right lower corner. You can now place a widget for the task or launch the task with Nova etc. And/or go into Preferences and under the Monitor tab you can add it to the Notification Action Buttons.
solara1973 said:
Great tip. Got tasker set to Nova pinch out to turn off. But also have option to run task from Notification menu as well.
For those who have never used tasker before like me here is a quick note on how to set it up:
Select TASKS tab at top, select + button at bottom, give it a name (screen off) and press check mark.
You will then enter Task Edit. Press + to add an action, then select Code as your action category, then choose Run Shell.
Paste in the text: 'input keyevent 26' under the Command field. Check the Use Root option. Back out once and choose an icon for it if you want at the right lower corner. You can now place a widget for the task or launch the task with Nova etc. And/or go into Preferences and under the Monitor tab you can add it to the Notification Action Buttons.
Click to expand...
Click to collapse
Thanks for this detailed description. I've never used Tasker before either, so I'll give it a try. It's a shame such a step is required.
How was it determined that "input keyevent 26" would solve the problem? Will doing this interfere with OTA updates, since it may change a system setting?
Can I use Soft Lock Screen to turn the screen off?
Pumpino said:
Thanks for this detailed description. I've never used Tasker before either, so I'll give it a try. It's a shame such a step is required.
How was it determined that "input keyevent 26" would solve the problem? Will doing this interfere with OTA updates, since it may change a system setting?
Can I use Soft Lock Screen to turn the screen off?
Click to expand...
Click to collapse
There's a known list of Android commands that software can use to simulate some hardware presses, etc.: http://thecodeartist.blogspot.com/2011/03/simulating-keyevents-on-android-device.html
Tasker or using the keyevent 26 will not interfere with the system in any way. By sending the keyevent 26 you are doing exactly what pressing the Power button does - only with software. It does nothing to change any system settings. Not sure about the Soft Lock Screen app, but I suspect that like other software, if you use that, you will prob need to re-enter your password/pattern/pin and the fingerprint won't work. By sending the keyevent 26, you can still unlock it using the fingerprint sensor.
solara1973 said:
Great tip. Got tasker set to Nova pinch out to turn off. But also have option to run task from Notification menu as well.
For those who have never used tasker before like me here is a quick note on how to set it up:
Select TASKS tab at top, select + button at bottom, give it a name (screen off) and press check mark.
You will then enter Task Edit. Press + to add an action, then select Code as your action category, then choose Run Shell.
Paste in the text: 'input keyevent 26' under the Command field. Check the Use Root option. Back out once and choose an icon for it if you want at the right lower corner. You can now place a widget for the task or launch the task with Nova etc. And/or go into Preferences and under the Monitor tab you can add it to the Notification Action Buttons.
Click to expand...
Click to collapse
Thank you for explaining it. Does this require a root? And does it require Nova Launch?
minnemike said:
Thank you for explaining it. Does this require a root? And does it require Nova Launch?
Click to expand...
Click to collapse
It does require root to be able to let Tasker run a shell command. You would not need Nova launcher as you can easily put a widget to launch the Task within Google Now Launcher or any other launcher. Nova launcher is nice because it enables gestures and double tap to do certain actions. I have Nova to launch my phone app when I tap the Home button on the main home screen. Double tap runs my Task to turn off the phone. Pinch in, pinch out, two finger swipe down/up, etc.
Could you have something trigger Tasker to temporarily change the screen timeout to 1 second (and then change it back after the screen is off)?
solara1973 said:
It does require root to be able to let Tasker run a shell command
Click to expand...
Click to collapse
I guess I won't be using this technique then, as I don't want to root at this stage.
Is it possible to get Nova to turn the screen off by something like double-tapping on the status bar (without root and Tasker)?
Pumpino said:
I guess I won't be using this technique then, as I don't want to root at this stage.
Is it possible to get Nova to turn the screen off by something like double-tapping on the status bar (without root and Tasker)?
Click to expand...
Click to collapse
Nova launcher does not have a function to send keyevents or turn off the screen etc.
You can always try some of the Screen Off apps on the playstore and see if anyone of those allow you to unlock the phone again using Imprint. Swipe-Lock, Screen Off and Lock, Screen Lock, etc.
this one works (experimental) https://play.google.com/store/apps/details?id=com.iglint.android.screenlockpro&hl=en
it is paid one

How to Remap the LG V50 Assistant Key [NO ROOT]

I recently switched over to this phone from a Note 8. I've been happy with it except I don't use the Google Assistant. It's not entirely useful for me and I miss being able to remap the Bigsby Button on the Note 8, so I looked for a method of trying to remap it on the LG V50. I found this thread by cavalloz which used Tasker to remap they key, so all credit goes to him. I figured I would let you guys know about it, and then lay out a tutorial-like post in case some people needed more guidance.
First, you will need to disable the google assistant. Settings->General Tab-> Apps & Notifications->Default Apps->Assist & Voice Input. At the bottom, I turned off the open assistant (one press), talk to google (two presses), show visual snapshot (three presses). I have not tested to see if you can disable only the first button press method, because I don't use any of them, but you can try it because I know some of you like Google Lens.
Second, you will need Tasker. It is a paid app, but I feel like it is well worth it for what it provides.
Third, you will need to give Tasker some permissions. You can follow this guide they provide here.
Once Tasker has been closed, you can disconnect your phone from the computer, and then reopen the app. In the Profiles Tab, click the plus button at the bottom to create a new Event in the dropdown menu.
You will need to select System->Logcat Entry, select No in the popup, and you should have an Event Edit screen that says Output Variables, Component and Filter. Click the little magnifying glass icon, grant permissions for writing over other apps, and select OK in the Tasker pop-up.
Now try to be quick to minimize what is captured, but click the orange floating play-button on your screen to start recording, and press the assistant button. Then press the orange button again(now a square) which will stop recording. Tasker will pop-up again, and you will be given a panel containing everything that was recorded, including a response to you pressing the assistant button. In the filter text box field, start typing InputReader and the panel will be reduced to the relevant 'key events' we need.
It should read like
Code:
InputReader: Key event: device=4 type=0x0001 value=0x00000000 when=2087698767908
with the numbers being dependent on your phone (I think).
Select one of the events in the pop-up panel, and it will be loaded into the filter portion of the previous Event Edit screen. You should only keep
Code:
device=4 type=0x0001 value=0x00000000
in the filter text-field.
Click the back arrow in the top left-hand corner of the screen. You may get a small little box next to the new entry New Task +. Click it, and just click the check mark of the small box that appears at the bottom.
Now in the Task Edit panel, you should be able to click the plus button and add a response to the button press. I used Alert->Torch to toggle the flash-light. In the Action Edit panel, you should be able to change the action from Off to Toggle. Click the back button in the top-left again
Your button should now be able to toggle the flash-light. Let me know if this has worked for you guys. You could get more advanced and set it up for single press, double press, hold, etc.
Any other app than Tasker that can be used? Can it be used with force widemode application
I am only able to get this to work with the screen on... Is there a way to do this with the device locked and the screen off?
That's pretty cool, thanks for the guide. Works well on my LG G8. Also works when screen is off.
Played around with it a bit on my V60
Fantastic guide! Couldn't get the dual screen working at first, but I was eventually able to track down a log that corresponded to the button in all states (Locked/Unlocked, Case On/Off)
Honestly not 100% what I'm doing, so if anyone has any input that would be great! I can't post the URL yet because I just registered here, but I just linked to this thread on reddit /r/LGV60
TLDR; I found that using the Component "LGPhoneWindowManager" and Filter "hotKeyRelease count= : 0" works as a trigger while the phone is both locked and unlocked, and whether the case is on or off. Let me know if there's anything else I should know!
Do we need to add this for Tasker to read logs?
Code:
adb shell pm grant net.dinglisch.android.taskerm android.permission.READ_LOGS
Well I don't seem to be able to narrow down what actually works with this.
Code:
InputReader: Key event: device=5
was working ok to start with then I rebooted and device changed to 4!?
I've also tried
Code:
LGPhoneWindowManager hotKeyRelease count= : 2
for double tap and
Code:
HotKeyController HOTKEY_LONG_PRESS
for long press and they seemed to work initially but something stops them from working with the screen off after a while.
Just got my V50. I can't make it to work with your instructions
Done everything step by step.
Edit: Nevermind, now it works.
Morphy99 said:
Well I don't seem to be able to narrow down what actually works with this.
Code:
InputReader: Key event: device=5
was working ok to start with then I rebooted and device changed to 4!?
I've also tried
Code:
LGPhoneWindowManager hotKeyRelease count= : 2
for double tap and
Code:
HotKeyController HOTKEY_LONG_PRESS
for long press and they seemed to work initially but something stops them from working with the screen off after a while.
Click to expand...
Click to collapse
Double tap works for me, but it still keeps trying to open google assistant (even if its disabled from assistant itself and phone settings)
Does this also happens to you?
Anyway, ended using Button Remapper Pro from the Playstore. It also needs a PC and ADB, but it worked for long press with screen off.
Thanks XP_2, your instructions are impeccable! This worked well on my LG G8S - I used the Google Assistant button to launch my SatNav.
thanks a lot. I did all steps but, I have a problem. I can't turn off the snapshot (three clicks)
Make the video tutorial please
Sorry to revive an old thread. But can you remap the button to open a specific app, such as UAPP? By the way I own a V60, not V50.
I'm sorry but I can only get to the moment when I record my button press and go back to tasker.
Then I,m completely stuck. Please help.
What I can see is:
Code:
%lc_text
Text
The text that corresponds to the matched logical entry
COMPONENT [arrow button and magnifying glass button]
ViewRootlmpl
FILTER [arrow button]
ViewRoot's touch event: action down
GREP FILTER (check help) [tick place where I can turn it on or off]
And what to do now???
Clicking back button pops up missing permissions screen - but I can't grant any from this screen
Please help

How to properly remap 3rd party select buttons

**Update**
Added a filter for hulu only because this was causing double data entry in almost every other app.. you can also add a pipe for additional applications that need this fix.
For anyone wondering why not use "Xposed Edge" instead? Well I tried just now and there's a severe delay in emitting keyevent 23 when done via root or it is not accepted at all by hulu if it is not done on the su level sending it over shell. So either way it falls apart. Button Mapper appears to be best solution for the Enter key to become select in specific apps.
Code:
grep -E 'mCurrentFocus.*(hulu|dream|otherAppNameHere)' > /dev/null 2>&1 && /system/bin/input keyevent 23
So I recently came across a pretty awesome little remote from Amazon, the Rii MX8 Air mouse remote.
https://smile.amazon.com/gp/product/B07MHKMQ7J
Only problem was that some apps, particularly hulu, don't care for the enter key and only want to operate with the dpad_center or keycode 23. Remapping this key in the various button remappers don't work well unless it can execute an adb shell command and even then.. you better be rooted and be able to run that command as the shell user (at least for the case of Hulu).
Here is how I managed to do it. If you know of other ways then please share as this application does require that you purchase it for the pro features - adb shell commands.
https://play.google.com/store/apps/details?id=flar2.homebutton&hl=en_US
# Install Button Remapper
# Set Accessibility
adb shell pm grant flar2.homebutton android.permission.WRITE_SECURE_SETTINGS
adb shell settings put secure enabled_accessibility_services flar2.homebutton/flar2.homebutton.a.ai
adb shell settings put secure accessibility_enabled 1
# Add Button
# Remap Enter (66) to DPAD_Center (23)
# Single tap
su shell -c "dumpsys window windows | grep -E 'mCurrentFocus.*(hulu|dream)' > /dev/null 2>&1 && /system/bin/input keyevent 23"
If typing all that in looks daunting then just get to the text field and then do this over adb.
adb shell input text "string%sof%stext%sbelongs here"
ex.
Code:
adb shell input text "su%sshell%s-c%s\"dumpsys%swindow%swindows%s|%sgrep%s-E%s'mCurrentFocus.*(hulu|dream)'%s>%s/dev/null%s2>&1%s&&%s/system/bin/input%skeyevent%s23\""
You can also script it just fine via this method.
https://android.stackexchange.com/q...ble-to-write-to-a-devices-clipboard-using-adb
Just remember those WFD remote are Wifi magnets. I have just a few devices on Wifi and Ive been through several of those remotes. The remote alone killed my range, connection quality, etc. Just a heads up.
CEC is the way to go IMO. The new Roku TVs all have a secret menu that enable full CEC control that controls the FS\FTV fully.
TimmyP said:
Just remember those WFD remote are Wifi magnets. I have just a few devices on Wifi and Ive been through several of those remotes. The remote alone killed my range, connection quality, etc. Just a heads up.
CEC is the way to go IMO. The new Roku TVs all have a secret menu that enable full CEC control that controls the FS\FTV fully.
Click to expand...
Click to collapse
Unless I missed something, and I doubt that I have given the sheer amount of time I have spent on this, the RokuTV with CEC enabled via hidden menu is next to useless. The back button and home button collide with the device itself - there's no intelligence built in to prevent it from interacting and doing what it would normally do for the RokuTV itself. That would also be expected because otherwise you'd get stuck inside your hdmi device.
Personally I have not been experiencing any wireless interference with this remote and given the amount of wifi I am actually around atm I'd say that is fairly impressive. That is not to say I am not interfering with a neighbor in reality, but my 2.4 and 5ghz networks appear to be operating fine.
In fact I had to switch my TV over from 5ghz to 2.4ghz because 2.4ghz penetrates walls better, this device is 2.4ghz as well but I am sure it is in a frequency that is outside the wifi range.
glitchbit said:
Unless I missed something, and I doubt that I have given the sheer amount of time I have spent on this, the RokuTV with CEC enabled via hidden menu is next to useless. The back button and home button collide with the device itself - there's no intelligence built in to prevent it from interacting and doing what it would normally do for the RokuTV itself. That would also be expected because otherwise you'd get stuck inside your hdmi device.
Personally I have not been experiencing any wireless interference with this remote and given the amount of wifi I am actually around atm I'd say that is fairly impressive. That is not to say I am not interfering with a neighbor in reality, but my 2.4 and 5ghz networks appear to be operating fine.
In fact I had to switch my TV over from 5ghz to 2.4ghz because 2.4ghz penetrates walls better, this device is 2.4ghz as well but I am sure it is in a frequency that is outside the wifi range.
Click to expand...
Click to collapse
Home button is only for the TV to return to its home. There is no CEC home button.
Back button works absolutely perfectly via IR. Not a single problem. Done this on 2 TCLs and one Hisense.
The menu Im talking about is Home 5x rw,down,ff,down,rw.
I dont know where you got that idea of the devices colliding, they just limit CEC functionality on these TVs to keep people away from the ability to add and fully operate the TV and FS without ever going into the TV itself.
Update: Ignore this musing, the hulu app does not experience any further issue with the command mentioned in the first post. There is a potential for other apps to misbehave if it listens to both Enter and Select, but given the filter you'd have to add it to the command before finding out and even then there appears to be ways to mitigate the issue if it occurs.
--------------------------------------------
I may need to revise this more still & add in a filter to detect either a soft keyboard or text input field. I suspect the above fix may still result in double entry in the Hulu app.
This really needs to be fixed in the Button Mapper app as double input on that key shouldn’t happen if it’s remapping correctly, but being android inconsistency always abound.
adb shell dumpsys window InputMethod | grep "mHasSurface"
https://stackoverflow.com/questions...-keyboard-is-visible-on-android-device-or-not
TimmyP said:
Home button is only for the TV to return to its home. There is no CEC menu button.
Back button works absolutely perfectly via IR. Not a single problem. Done this on 2 TCLs and one Hisense.
The menu Im talking about is Home 5x rw,down,ff,down,rw.
I dont know where you got that idea of the devices colliding, they just limit CEC functionality on these TVs to keep people away from the ability to add and fully operate the TV and FS without ever going into the TV itself.
Click to expand...
Click to collapse
I own 2 RokuTVs myself, sold one of them due to a move, but I really do like them tbh. Where I got the idea was from personal experience. The home button kicks me out to the home screen any time it is used (Initially w/ a 5 second delay before going back in - now it just sits there), the select button shows the input I am on overlaid on the bottom half & the select button also kicks me out to the home screen w/ my hdmi input device highlighted.
The feature is hidden because it naturally collides.. maybe they fixed it in your version & I need to update mine, but in my current version it’s completely unusable when it’s fully enabled via the hidden menu. And I know what menu you’re talking about - we’re on the same page - it just doesn’t work on my RokuTV.

Categories

Resources