Search This thread

syneoa

Senior Member
Dec 6, 2020
81
26
I decided to purchase tvQuickActions on Google Play today and that turned out to be a great choice. That app is able to remap my remote's buttons with ease and has plenty of versatility and customizability such as different functions for double presses and long presses. It's definitely easier to use than Automate. The video below shows how I was able to remap the PatchWall button.

looks good, beside netflix button can you remap prime video button as well and can I use Mute to a list of available actions?
 

Manzing

Senior Member
Oct 8, 2012
243
104
Hi,
Have someone been able to detect FireTV remote app button (Netflix, Prime...) using Automat with an android TV device? I try to use these buttons with my Shield but I am unable to detect anything in any ways.
I tried but the app does not show anything, not sure I am doing right though.

All other buttons display a keycode, I think I have no luck :(
 
Last edited:

Kiryo24

Senior Member
Feb 21, 2014
239
52
I tried this with my Sony Bravia TV. I checked everything many times but i cant get any keycodes registered.

I can generate toast messages and permissions are ok(except battery optimization). Is there some other kind of log exception for Sony TV:s?
Maby i can use other keywords for log await?

I will post here if i get it to work.
 

Kittybua

Account currently disabled
Feb 12, 2023
45
14
Go this is 100x better than Button mapper

Tvquick
 

Attachments

  • vodik7.tvquickactions-3.1.0.apk
    5.9 MB · Views: 209
  • Like
Reactions: JonW434

JonW434

Member
Jan 23, 2020
38
7
I decided to purchase tvQuickActions on Google Play today and that turned out to be a great choice. That app is able to remap my remote's buttons with ease and has plenty of versatility and customizability such as different functions for double presses and long presses. It's definitely easier to use than Automate. The video below shows how I was able to remap the PatchWall button.

TVQuickActions is a fantastic app.

But does anyone know how to emulate keyboard combo shortcuts via ADB like Ctrl + Z or Ctrl + S? I have tried without any luck, and have also tried emailing the developer without a response.
 
  • Like
Reactions: Kittybua

JonW434

Member
Jan 23, 2020
38
7
looks good, beside netflix button can you remap prime video button as well and can I use Mute to a list of available actions?
I've been able to remap Netflix and Prime buttons only if they are disabled. If they are installed/active, no remapping.

Also the Prime button didn't allow for longpress (only single or double press) but the Netflix button allowed all 3.

It might be different depending on which TV box you have.
 
  • Like
Reactions: syneoa and Kittybua

Kittybua

Account currently disabled
Feb 12, 2023
45
14
New Update 3.2.1 pro

JonW434 try the Leankey Keyboard and remove the gboard Keyboard
 

Attachments

  • vodik7.tvquickactions-3.2.1.apk
    6.4 MB · Views: 76
  • Like
Reactions: JonW434

JonW434

Member
Jan 23, 2020
38
7
New Update 3.2.1 pro

JonW434 try the Leankey Keyboard and remove the gboard Keyboard
Thanks, I'll have a try as soon as I get the chance. I'm using Leankey Keyboard at the moment but I haven't disabled or deleted the Gboard.

I can get emulate single keystrokes, but haven't had any luck with Ctrl + another key. I will try this and see if I have any luck.
 
  • Like
Reactions: Kittybua

Kittybua

Account currently disabled
Feb 12, 2023
45
14
Update 3.2.2 and Here other Apps cool Apps for Smartphone to Android TV

But dolphin best for Android TV

Android TV adb Mouse cant Here Upload sorry - apk+
 

Attachments

  • Dolphin 12.2.9.apk
    17.2 MB · Views: 87
  • vodik7.tvquickactions-3.2.2.apk
    6.4 MB · Views: 80
  • zank.remote-19.4.apk
    3.5 MB · Views: 34

Androidfranco

Member
Apr 7, 2023
18
3
Hi all. I'm trying to back up my mappings in the key mapper app. It tells me I don't have the proper file manager capable o doing this. I have fx and es. So I guess neither o those will do the trick. What manager should I use?


Thanks!
 

LA_

Member
Sep 27, 2009
49
1
@Double_A_92 thanks for the manual.
I tried to use your flow with my TCL TV, but it doesn't capture key press events. Looks like you are trying to find the key code with the regex
Code:
.*interceptKeyTq keycode=(\d+).*
, but I can not find interceptKeyTq in my log. The events look like below:
Code:
08-23 21:34:37.365 25906 25906 W ViewRootImpl[MainActivity]: Cancelling event (no window focus):KeyEvent { action=ACTION_UP, keyCode=4062, scanCode=242, metaState=0, flags=0x28, repeatCount=0, eventTime=473389096, downTime=473389024, deviceId=-1, source=0x301, displayId=-1 }
08-23 21:34:37.366 25906 25906 I chatty  : uid=10051(com.tcl.waterfall.overseas) identical 4 lines
08-23 21:34:37.366 25906 25906 W ViewRootImpl[MainActivity]: Cancelling event (no window focus):KeyEvent { action=ACTION_UP, keyCode=4062, scanCode=242, metaState=0, flags=0x28, repeatCount=0, eventTime=473389096, downTime=473389024, deviceId=-1, source=0x301, displayId=-1 }
08-23 21:34:37.664 31481 31481 I ActivityTaskManager: isPreloadSplashApp = com.netflix.ninja
...
08-23 21:31:34.725 24000 24000 W ViewRootImpl[FlowListActivity]: Cancelling event (no window focus):KeyEvent { action=ACTION_UP, keyCode=4020, scanCode=227, metaState=0, flags=0x28, repeatCount=0, eventTime=473206455, downTime=473206395, deviceId=-1, source=0x301, displayId=-1 }
08-23 21:31:34.725 24000 24000 I chatty  : uid=10109(com.llamalab.automate) identical 4 lines
08-23 21:31:34.726 24000 24000 W ViewRootImpl[FlowListActivity]: Cancelling event (no window focus):KeyEvent { action=ACTION_UP, keyCode=4020, scanCode=227, metaState=0, flags=0x28, repeatCount=0, eventTime=473206455, downTime=473206395, deviceId=-1, source=0x301, displayId=-1 }
...
08-23 21:49:41.981 17387 17387 D T_IME_LOG: TCL_IME********onKeyUp.eventgetKeyCode =4020
08-23 21:49:41.982  2310  2310 V GoogleTVCustomer: :---->Current app has running process : com.tcl.waterfall.overseas
Should I change the regex to capture `onKeyUp.eventgetKeyCode` or `KeyEvent`?

Another question is about tvQuickActions - somehow it is able to stop launching of default app (when button is remapped). Is there any way to achieve the same with Automator?
 

remizik

Senior Member
Sep 24, 2010
687
95
Nantes
Update 3.2.2 and Here other Apps cool Apps for Smartphone to Android TV

But dolphin best for Android TV

Android TV adb Mouse cant Here Upload sorry - apk+
Hi, are you the dev of TVQuickActions ? Because I see you sharing the apk, but the app is a paid app on the playstore.
I'm confused.
Thanks
 

chloeleedow

Senior Member
Jul 29, 2013
383
193
a very well written and comprehensive guide , i found an app that did all this just called re-mapper it probably works a little different as it doesn't have the elevated privileges of your app and guid but it works flawlessly and can use double tap key features etc you just tap the action section hit a button then tell it what you want it to do when it sees this so a little similar this just does it at a higher level of interception perhaps so maybe less lag although i didnt find the way i found too bad at all. You do however need a mouse in your usb port to be able to hit all the programming buttons in the app the remote doesn't navigate accurately enough lol mightt try this way too :) ill post link to app i used as well if you dont mind it may prove useful to someone who may not be comfortable doing thhis slightly more in depth way but it is very well written and concise !
 

Kittybua

Account currently disabled
Feb 12, 2023
45
14
Tvquick 3.2.4 pro
 

Attachments

  • vodik7.tvquickactions-3.2.4.zip
    5.2 MB · Views: 57

Kittybua

Account currently disabled
Feb 12, 2023
45
14
3.3.0 Update

+

Zank remote 19.5
 

Attachments

  • vodik7.tvquickactions-3.3.0.zip
    5.2 MB · Views: 167
  • zank.remote-19.5.zip
    3.1 MB · Views: 58

CloseJohn

New member
Sep 18, 2023
2
0
How would you go about intercepting the numpad keys on the remote let's say.

*I want to bookmark my favorite channels to the tv remote's numberpad keys.

Intercept 1
Ouput 123

Also, can you set a conditon statement to check if an app is currently in the foreground ?

If MyTvApp in foreground
Intercept 1
Ouput 123

**** EDIT 1
In your tutorial you said that the original app / action would still go through

So you can't block the original system action and perform a new one? Is there a node(block) for that?

I am looking at the documentation
https://llamalab.com/automate/doc/block/key_send.html
It says that it uses its own keyboard for emulating keys.
So I guess it doesn't need a rooted device either.

But if you can't block the original action it probably wouldn't work for my use case.




========================

I have a question for

Kittybua


Does the TVquickActions have the ability to do this?
Does it require a rooted device? ( my streaming services may or may not work on rooted devices )

listen for a key and output/simulate many keys/text ?

Input "numpad1" output "123"


*edit fixed typo
 
Last edited:

Kittybua

Account currently disabled
Feb 12, 2023
45
14
How would you go about intercepting the numpad keys on the remote let's say.

*I want to bookmark my favorite channels to the tv remote's numberpad keys.

Intercept 1
Ouput 123

Also, can you set a conditon statement to check if an app is currently in the foreground ?

If MyTvApp in foreground
Intercept 1
Ouput 123

**** EDIT 1
In your tutorial you said that the original app / action would still go through

So you can't block the original system action and perform a new one? Is there a node(block) for that?

I am looking at the documentation
https://llamalab.com/automate/doc/block/key_send.html
It says that it uses its own keyboard for emulating keys.
So I guess it doesn't need a rooted device either.

But if you can't block the original action it probably wouldn't work for my use case.




========================

I have a question for

Kittybua


Does the TVquickActions have the ability to do this?
Does it require a rooted device? ( my streaming services may or may not work on rooted devices )

listen for a key and output/simulate many keys/text ?

Input "numpad1" output "123"


*edit fixed typo

I don't have root! it works without root! I also use the keys 2,5,8,0 for the 4 colors!!

but for numbers you need leanback keyboard from the store
 
  • Like
Reactions: CloseJohn

goodnbad

New member
Jan 8, 2024
1
0
I'm trying to use "setting" button (in remote control) to launch an app.
I've tested "log await" method, but I did not see any popup message at all.
Then I tested "key pressed" method. At first I used "key pressed" and "dialog message" to detect the keycode of "setting" button, then I used this keycode and this script works. Only one drawback: the volume up/down button is influenced a lot, long pressing it lost function, I have to press it repeatedly to change volume.

Now I'm learning to let long pressing volume up send volume up. Also planning to test more about "log await" method.

Could anybody please tell me, will "log await" method has the similar drawback as "key pressed" - influence other buttons e.g. volume up?
will other app, like tvquickactions, has the similar drawback?
 

Goggles44

New member
Jan 13, 2024
1
0
nothing is working for me at all, i used the template and i dont have a bookmark button nor an HBO button on my remote, i have a paramount+ button so idk if that changes anything but it just doesnt do anything at all
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Remapping Android TV remote buttons
    In this guide I will explain a way to remap to the shortcut buttons on the remotes of Android TV devices which cannot simply be remapped by e.g. Button Mapper.
    I will use the Walmart Onn Box as example for this guide, but it should also work for devices like the Xiaomi Mi Box.

    The general idea is to install an Android automation app which analyzes the system logs of you device and starts your desired apps when it sees the button press log messages.


    Enabling ADB
    To install the automation app and give it permissions it needs, you must enable developper mode on your Android TV device and connect to it from your computer.
    Those two turorials should explain you how to do it:

    Easy way to control your Android TV device
    Since it is very cumbersome or impossible to do everything with the remote control I recommend to use ScrCpy.
    This allows you to easily control your device from your computer using mouse and keyboard.

    After installation you can connect to your device with adb and enter 'scrcpy' in your console. You should instantly see the screen of your TV on your computer.


    Installing 'Automate'
    The app I recommend for the automation is called 'Automate'. It is free, but sadly can't be directly installed from the app store on Android TV (because of compatibility).

    To avoid this limitation you can download the APK from e.g. Apkmirror and install it manually via ADB.
    adb install .\path\to\the\downloaded\apk\Automate_v1.32.6.apk

    While you are at it you can also give the app some privileges which it needs later to read the system logs and to start the apps.

    adb shell pm grant com.llamalab.automate android.permission.SYSTEM_ALERT_WINDOW
    adb shell pm grant com.llamalab.automate android.permission.READ_LOGS

    To start Automate you need a launcher that can see sideloaded apps. I recommend the X-plore File Manager since it's also a good file manager and can be easily installed from the app store.

    ( There are also other alternatives like 'Tasker' instead of 'Automate', but since that is not free and activation doesn't work properly on a sideloaded app I can't recommend that. )


    Configuring 'Automate'
    After starting Automate you can create a new 'flow'. The goal of that flow is to monitor the system logs, and start your desired apps everytime it sees a button press message.

    That can be done mainly with a 'Log await' node that contains following configuration:
    Tag: WindowManager
    Message: .*interceptKeyTq keycode=(\d+).*
    Priority: Debug
    Logged message (array): keycode

    You can then use "Expression true?" nodes to check for the found value in keycode (e.g. for the Live TV button) ...
    Formula: =keycode[1] = "172"
    ... and start your desired app with "App start" nodes.
    Package: com.google.android.tv

    An example of a full flow can be found here: 📺🎛️ Remap Onn. Android TV remote buttons


    Conclusion
    After setting all this up the apps should start when you press the buttons.
    However the original app (or its installation view) also starts before it, so if you press the back button you will return to that app instead of the previously running app. To avoid that just use the home button instead.

    The Automate app will not automatically start if you reboot your Android TV device. If you want that you can activate that in the settings: 'Run on system startup'. But make sure that everything works perfectly before you do that!

    If you get stuck in a loop where you can't use other apps and also can't open and configure Automate anymore, you can use this command via ADB to disable all flows:
    adb shell am broadcast -a com.llamalab.automate.intent.action.STOP_FLOW -n com.llamalab.automate/.StartServiceReceiver
    5
    As a one-off, in case you don't want to install another app, you can always run:

    Code:
    adb shell am start -n com.llamalab.automate/.FlowListActivity

    I went to Settings > Apps > See all apps and then scrolled down and clicked 'Show system apps'. You can find Automate, and then click open to launch.
    2
    To start Automate you need a launcher that can see sideloaded apps.

    As a one-off, in case you don't want to install another app, you can always run:

    Code:
    adb shell am start -n com.llamalab.automate/.FlowListActivity
    2
    Thanks for your guide. Now my Xiaomi Stick 4K remotes Netflix, Prime Video and Patchwall buttons are changed to open other apps.

    Can you make Automate flow work like Button Mapper having also double click and long press open different apps.
    2
    what is different between this way and others way like "Button Mapper" or tvQuickActions?
    This is for devices where the vendor buttons are not even registered as button presses by the system. So if you tried to use ButtonMapper or other apps, it wound't let you select the button and instead always open the app written on the button.

    But yeah, if ButtonMapper works for your device that's obviously a much better way of doing it.