4K Max with Tasker to launch Wolf on Home button

Search This thread

ajolly

Senior Member
Aug 24, 2006
94
18
OnePlus 7 Pro
OnePlus 9 Pro
Nice thanks I'll give it a shot tomorrow. I've been using the Maven build previously for my shield.

Once light annoyance I found is it seems to flush logs to the Kodi.log file less frequently then on the stock install, but it makes sense if they're trying to save writes.
 
  • Like
Reactions: xnappo

xnappo

Senior Member
Aug 15, 2003
187
54
Nice thanks I'll give it a shot tomorrow. I've been using the Maven build previously for my shield.

Once light annoyance I found is it seems to flush logs to the Kodi.log file less frequently then on the stock install, but it makes sense if they're trying to save writes.
In case you missed it, you do need one more permission for the checking if the switch happened:
Code:
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
 

cala.hush

New member
Feb 14, 2023
3
1
I was able to expand on it and add some more cool stuff:

There are existing ways to remap remote app buttons following this guide:

https://www.aftvnews.com/how-to-remap-the-app-buttons-on-fire-tv-edition-remotes-with-remapper

But the guide mentions that:

"Important limitations: Buttons for preinstalled apps, like Prime Video, IMDb TV, and Amazon Music, cannot be remapped. This is because there is no way to uninstall preinstalled apps and you cannot remap a button if the button’s app is installed.".

I'm providing an alternative to that:

To re-purpose Amazon Prime remote button with another app I used:
catlog entry filter: KEYCODE_APP_2
for my script I used:
adb shell am force-stop com.amazon.firebat
adb shell am start -n "your app package name"
Only using it once in the Tasks (no repeats needed).

To re-purpose Tv Guide remote button with another app I used:
catlog entry filter: Binding to Prism Service from: com.amazon.tv.livetv
for my script I used:
adb shell am start -n "your app package name"
Only using it once in the Tasks (no repeats needed).

Let me know if you have any additional suggestions or improvements or ideas. Thanks!

@ptstr Can you tell me how you managed to find out the KeyCode for the Prime Video button (KEYCODE_APP_2)?

I would like to remap a few other buttons using your method but I need to first find out their corresponding keycodes :)

Thanks in advance!
 

xnappo

Senior Member
Aug 15, 2003
187
54
@ptstr Can you tell me how you managed to find out the KeyCode for the Prime Video button (KEYCODE_APP_2)?

I would like to remap a few other buttons using your method but I need to first find out their corresponding keycodes :)

Thanks in advance!
Assuming you have already followed the instructions in post 1 (namely granting Tasker the READ_LOGS permission) - it is fairly easy.

  1. Go to the Profile tab and create a new profile by hitting '+' then select 'Event'
  2. Type logcat in the filter box, select 'Logcat Entry'
  3. Hit the magnifying glass, hit ok.
  4. Hit the orange 'click to start logging' button
    NOTE: if you haven't replaced your 'home' with something that allows a mouse, you will need to launch an app that allows mouse input first.
  5. Press the button of interest, then press the 'stop logging' button
  6. Now, back in Tasker you can view the log. In the filter, you can type 'KEYCODE' to narrow it down.

Of course this is SUPER powerful and you can come up with all sorts of stuff to trigger off of...
[EDIT] LOL - you figured it out as I was typing this I guess, hopefully will be useful to someone else!
 
  • Like
Reactions: cala.hush

cala.hush

New member
Feb 14, 2023
3
1
Assuming you have already followed the instructions in post 1 (namely granting Tasker the READ_LOGS permission) - it is fairly easy.

  1. Go to the Profile tab and create a new profile by hitting '+' then select 'Event'
  2. Type logcat in the filter box, select 'Logcat Entry'
  3. Hit the magnifying glass, hit ok.
  4. Hit the orange 'click to start logging' button
    NOTE: if you haven't replaced your 'home' with something that allows a mouse, you will need to launch an app that allows mouse input first.
  5. Press the button of interest, then press the 'stop logging' button
  6. Now, back in Tasker you can view the log. In the filter, you can type 'KEYCODE' to narrow it down.

Of course this is SUPER powerful and you can come up with all sorts of stuff to trigger off of...
[EDIT] LOL - you figured it out as I was typing this I guess, hopefully will be useful to someone else!

Thank you for the detailed explanation. I actually think it will be useful to other users that find this thread.

I did it a little different. I opened Termux and typed:

Code:
adb logcat | grep "KEYCODE"

Afterwards I pressed whatever key I want to map and the keycode was shown in Termux.

It's definitely very powerful. I'm an iOS user that just started mingling with Android. I wish we had something like Tasker in iOS. It's a powerhouse.

Anyways, thanks for taking the time to respond @xnappo . Much appreciated!
 
  • Like
Reactions: xnappo

xnappo

Senior Member
Aug 15, 2003
187
54
Thank you for the detailed explanation. I actually think it will be useful to other users that find this thread.

I did it a little different. I opened Termux and typed:

Code:
adb logcat | grep "KEYCODE"

Afterwards I pressed whatever key I want to map and the keycode was shown in Termux.

It's definitely very powerful. I'm an iOS user that just started mingling with Android. I wish we had something like Tasker in iOS. It's a powerhouse.

Anyways, thanks for taking the time to respond @xnappo . Much appreciated!
No problem! I like your method actually, it is much easier if you know your way around ~Linux than dealing with the Tasker GUI.

Indeed Tasker is addictive once you get used to it. I am using it to send home automation commands etc too..
 

ajolly

Senior Member
Aug 24, 2006
94
18
OnePlus 7 Pro
OnePlus 9 Pro
No problem! I like your method actually, it is much easier if you know your way around ~Linux than dealing with the Tasker GUI.

Indeed Tasker is addictive once you get used to it. I am using it to send home automation commands etc too..
If you want addictive home automation, look at Home Assistant if you have not already O:)

Anyone know If you can downgrade the firmware on the Max? I *thought* I had updates blocked, but did not, so it upgraded itself.
 

xnappo

Senior Member
Aug 15, 2003
187
54
If you want addictive home automation, look at Home Assistant if you have not already O:)

Anyone know If you can downgrade the firmware on the Max? I *thought* I had updates blocked, but did not, so it upgraded itself.
Yeah, I use HA too, I have a Tasker menu screen overlay I can bring up for lights etc...
 
Dec 29, 2022
26
12
Therefore we could use Easer (https://f-droid.org/packages/ryey.easer/). It's opensource and is capable to start Termux Commands (https://codesti.com/issue/renyuneyun/Easer/415)

@ptstr I'm on version 6.0.10 of tasker and 7.6.1.4 of FireOS. Did you start tasker before you run the command? Stupid question, are you connected to your Fire TV Stick via AdbLink or any other ADB shell?
Is this possible with the combination of Easer and Termux?
Has anyone tried this?
 

xnappo

Senior Member
Aug 15, 2003
187
54
Just realized it is totally allowed to create a Tasker app and distribute it without Tasker being installed. Would take some work but this might be a solution for easier install. Not sure about making it autostart etc. Will look into it a bit.
 
  • Like
Reactions: Kramar111

xnappo

Senior Member
Aug 15, 2003
187
54
FYI there is another tool called Macrodroid that may be worth looking at, it does have logcat triggers as well as Termux integration.

The free version appears to have 5 free macros. Obviously the price of either is no big deal, but installing and using the fake Google stuff is a bit of a pain.
 

xnappo

Senior Member
Aug 15, 2003
187
54
Hey guys, I took a hint from Wolf's new launch manager and tried using 'adb wifi' in Tasker instead of all the Termux stuff. It is much faster and so far stable!

I think Wolf's new manager will be best for most people, but I am using Tasker for a bunch of other stuff so will probably stick with it.

XfJx1BH.png
 

HipHopAnonymous3

Senior Member
Dec 29, 2012
86
34
@xnappo I'm trying to set up Tasker on my fire tv and I can't seem to get past the "Before we get started" portion that makes you tick "battery optimization". I'm unable to tick that option, or disable battery optimization through settings for the Tasker app. Suggestions?

Update: Nevermind, I was able to add the permission using this adb command:
adb shell dumpsys deviceidle whitelist +net.dinglisch.android.taskerm
 
Last edited:
  • Like
Reactions: xnappo

xnappo

Senior Member
Aug 15, 2003
187
54
@xnappo I'm trying to set up Tasker on my fire tv and I can't seem to get past the "Before we get started" portion that makes you tick "battery optimization". I'm unable to tick that option, or disable battery optimization through settings for the Tasker app. Suggestions?

Update: Nevermind, I was able to add the permission using this adb command:
adb shell dumpsys deviceidle whitelist +net.dinglisch.android.taskerm
That is useful, I had just been closing it and it ignoring it. It didn't seem to cause any problems but thanks for the command. It is getting to the point we need to either rewrite post 1 or start a new one.

You hanging around @Falcon_X ?
 

HipHopAnonymous3

Senior Member
Dec 29, 2012
86
34
That is useful, I had just been closing it and it ignoring it. It didn't seem to cause any problems but thanks for the command. It is getting to the point we need to either rewrite post 1 or start a new one.

You hanging around @Falcon_X ?
As was the issue with wolf's launcher manager, this method also stops working after a period of time and I need to relaunch Tasker and back out to get it to function again. I'm assuming because fire OS is still closing out background apps?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello,

    Through a BT keyboard by typing command lines 1 by 1, I was able to configurate Termux and Tasker to launch Wolf when the Home button is pressed !

    Many thanks to @xnappo and also @cityhunter_1919_xyz for the support !
    1
    Used This and Loved It. Its so much more stable and reliant I feel. Tip: In the Profiles: you can select Application > then click on the "All" button > there will be A "profileactivity" or some sort of profile thing as an app > Click that and enable Wolf Task with it.
    This way you directly jump into wolf Launcher once it starts up
    1
    Do you mean this skips having to select the stupid profile? If so - THANK YOU!
    Yes! It does and most of you had a problem that when you go into settings or the quick actions(you hold the home button) It was pushing you to the wolf, this was so because you were selecting the package/app "KFTV Launcher". instead do the following -> Profiles: you can select Application > then click on the "All" button > there will be an app/activity "Home" > Click that and enable Wolf Task with it.

    This way only when the Home activity of the KFTV Launcher runs the trigger will be activated instead of the Launcher itself
  • 2
    Hey guys, I took a hint from Wolf's new launch manager and tried using 'adb wifi' in Tasker instead of all the Termux stuff. It is much faster and so far stable!

    I think Wolf's new manager will be best for most people, but I am using Tasker for a bunch of other stuff so will probably stick with it.

    XfJx1BH.png
    2
    I was able to expand on it and add some more cool stuff:

    There are existing ways to remap remote app buttons following this guide:

    https://www.aftvnews.com/how-to-remap-the-app-buttons-on-fire-tv-edition-remotes-with-remapper

    But the guide mentions that:

    "Important limitations: Buttons for preinstalled apps, like Prime Video, IMDb TV, and Amazon Music, cannot be remapped. This is because there is no way to uninstall preinstalled apps and you cannot remap a button if the button’s app is installed.".

    I'm providing an alternative to that:

    To re-purpose Amazon Prime remote button with another app I used:
    catlog entry filter: KEYCODE_APP_2
    for my script I used:
    adb shell am force-stop com.amazon.firebat
    adb shell am start -n "your app package name"
    Only using it once in the Tasks (no repeats needed).

    To re-purpose Tv Guide remote button with another app I used:
    catlog entry filter: Binding to Prism Service from: com.amazon.tv.livetv
    for my script I used:
    adb shell am start -n "your app package name"
    Only using it once in the Tasks (no repeats needed).

    Let me know if you have any additional suggestions or improvements or ideas. Thanks!
    2
    And yet another method. I have found this to be quite stable and maybe a bit more consistent speed-wise. Also slightly easier to set up.

    Instead of doing a Profile based on Logcat, I use:
    Profile->Event->App Changed

    Then in the task, I check to see if:
    %app_name EQ KFTV Launcher

    And if so, then run the Termux launch script.
    1
    Do you mean this skips having to select the stupid profile? If so - THANK YOU!
    Yes! It does and most of you had a problem that when you go into settings or the quick actions(you hold the home button) It was pushing you to the wolf, this was so because you were selecting the package/app "KFTV Launcher". instead do the following -> Profiles: you can select Application > then click on the "All" button > there will be an app/activity "Home" > Click that and enable Wolf Task with it.

    This way only when the Home activity of the KFTV Launcher runs the trigger will be activated instead of the Launcher itself
    1
    I think AuroraStore should work too (I'm not sure if google maybe blacklists your account if you use this). But you still have to buy it. Or you find a way to use Easer :)

    @xnappo I'm not for or against opensource, I was just naming an alternative.