Fire TV Stick Device Control via Intents to com.amazon.tv.devicecontrol. - Fire TV Q&A, Help & Troubleshooting

Hi,
I'm looking for a way to control the Fire TV 4K via intents.
I want to issue remote control commands via Intents. For example pressing home key activates the Fire Tv Stick and switches the HDMI Input to the Fire TV's HDMI port.
Just issuing :
adb shell am start -a android.intent.action.MAIN -c android.intent.category.DEFAULT
WIll only return you to home, but not switch HDMI Input.
So I was looking to the logs and found these intents are issued when you press the Keys on the fire tv remote app:
01-04 18:34:37.062 1224 1224 I Vizzini_2.0.14872.0:HomeListener: Received: amazon.intent.action.HOME_PRESSED
01-04 18:34:37.125 1249 1249 I OZ-DCSeviceControlApiService: tryActivate called DCS intent: com.amazon.tv.devicecontrol.ACTION_ACTIVATE received, force: false
Line 8971: 01-04 18:34:37.102 608 622 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.amazon.tv.launcher/.ui.HomeActivity_vNext (has extras)} from uid 1000 on display 0
Ther eis also:
01-04 18:34:37.281 608 680 D hdmi_cec: [HWCEC] ret:0 msg->destination:0 msg->body[0]:0xd msg->body[1]:0x0
But I don't know how to issue hdmi cec commands without root.
If we can use amazons own apps to react to these intents, then we can control the dvice via commandline.
Unfortunately I do not know how to let the Fire TV Stick react to these intents via adb shell.
Why not just issue: adb keyinput? Because you need adb for it and I want to avoid adb allthogether and issue the intents via Tasker.

I don't have enough time to teach you about whole linux security and permissions things but heres a quickie.
You CANNOT pass few intents or receive protected broadcasts without proper permissions.
You use SU privileges to access all root level things on a system.
ADB (Android DEBUG Bridge) is used for DEBUGGING, so a developer can write their code and test it on a device. ADB shells has certain special permissions that a normal process does not.
Tasker is a user app and not a system privileged app so it cannot perform certain action because they are running under different UID.
Amazon system apps are signed with platform certificates, giving them special permissions. All the things that an app does and access of the Android system needs to be declared in its Manifest.

But don't the trusted amazon apps not receive only a command for example to issue the Home Button press for example form third party remote control apps? There are dozens of apps that you can use to replace the Fire TV remote. They somehow communicate with the signed amazon apps, i was assuming through intents.
All I want is to issue those remote control commands programmatically, without having to press any buttons.
This should be possible somehow right?

Spamm00r said:
But don't the trusted amazon apps not receive only a command for example to issue the Home Button press for example form third party remote control apps? There are dozens of apps that you can use to replace the Fire TV remote. They somehow communicate with the signed amazon apps, i was assuming through intents.
All I want is to issue those remote control commands programmatically, without having to press any buttons.
This should be possible somehow right?
Click to expand...
Click to collapse
As i wrote earlier you need "Permissions" to do that.
Read more about it from https://developer.android.com/guide/topics/permissions/overview

Related

[Q] FireTV VNC - Remote access

Has anyone found a good solution to accessing their Fire TV remotely? Basically I'm looking for a VNC or Remote Desktop solution for the Fire TV so I that I can setup / configure from my PC without having to be tied to the Fire TV.
martian21 said:
Has anyone found a good solution to accessing their Fire TV remotely? Basically I'm looking for a VNC or Remote Desktop solution for the Fire TV so I that I can setup / configure from my PC without having to be tied to the Fire TV.
Click to expand...
Click to collapse
This would be nice to have. I remember reading someone trying teamviewer to control it remotely. Haven't tried it been so busy.
Wireless adb? Its not a GUI but I use it to install apps and what not. I even do it from work by using chrome remote desktop to connect to my home computer and adb from there
Hi,
I tried remote droid, but couldn't get it to work over the network. Teamviewer worked for me. Has a bit of delay in it but does the job. Used it to setup XBMC, no issues. You need root access and have the client installed on the FTV.
Would you mind providing a few more details of how you got TeamViewer working? I looks like you need the TeamViewer Quick Support app correct? Did you just sideload it?
martian21 said:
Would you mind providing a few more details of how you got TeamViewer working? I looks like you need the TeamViewer Quick Support app correct? Did you just sideload it?[/QUOTE
Yes you need to side load TeamViewer Quick Support onto FTV and start it. It will give you the session ID which you enter into the PC Teamviewer.
FTV will ask for SU access which you grant.
Once you choose remote access on the PC it will ask again for SU access. Once granted you should see your FTV on the PC session.
Click to expand...
Click to collapse
I tried TeamViewer and it does work but unfortunately doesn't meet my needs. I need something that runs all the time in the background and doesn't require user intervention on the FireTV to connect.
I also tried "VNC Server" and "droid VNC server". VNC Server displayed the screen perfectly but couldn't be controlled. droid VNC server just displayed a black screen and also didn't seem to allow control. There is also VMLite VNC Server but it is $10 and looks like it's based off droid VNC Server (which didn't work). VMLite is a non-starter anyway because you need to connect wia USB adb to start the app the first time.
It's really too bad that there doesn't appear to be any true remote access solution to the Fire TV. Maybe someday.
I'd be interested too...my typical need would be to launch a radio app (Pandora, Songza, etc) WITHOUT having to turn on the TV, only to turn it off afterwards. If I could do it from my phone (which is always around and connected) it would be perfect.
Still using my trusty old Roku M500 for Internet radio, just because of the simplicity.
Use an app called "WebKey". It works over a brower (both http and https) and you can change the ports to non-standard ones in the app. I use Chrome, so not sure of the behavior on IE or Firefox.
You will create an account (userid & password) on each FTV that you install the app and want to control. Thats your authentication. You will also create a name that uniquely identifies your FTV.
It works in 2 ways when you are coming from a public IP.
-- If you are able to punch a hole in your router and open the 2 ports up (any port and you can redirect to the FTV ports) and redirect traffic to your FTV, you can access your FTV straight through by using your public IP (use a dynamic DNS service).
-- If you don't want to do that, the app allows access to your FTV without configuring your router. To access, you go to "http://www.webkey.cc/XXXX" where XXXX is the unique name of your FTV (it is case sensitive).
The second method goes through the app's portal. This is not desirable as your login goes through the app's portal and if the portal is down, you are SOL. Also, the second method only works over http.
Note, if you configure your router to let FTV traffic through, but still go through the app's portal, the app is smart enough to detect that there exists an open path for the FTV to the public internet and it will automatically switch to that method (nice feature, I think)
If everything is set up correctly, you see a complete copy of your FTV on the browser with keys to mimic your remote control, push/pull files, install/uninstall apps... It functions almost the same as any RDP client and you can control your FTV remotely as if you were sitting in front of it.
I have attached the apk that I have running on my 2 FTVs. Its free and runs perfectly fine.
Wow - Thanks dbdoshi! WebKey worked great!
Would have been nice to be able to use VNC but seeing that WebKey only requires a browser it is actually more versatile. I haven't had a chance to really test it out but my initial connection was sucessful.
martian21 said:
Wow - Thanks dbdoshi! WebKey worked great!
Would have been nice to be able to use VNC but seeing that WebKey only requires a browser it is actually more versatile. I haven't had a chance to really test it out but my initial connection was sucessful.
Click to expand...
Click to collapse
Glad it worked out for you. I manage couple of FTVs for a friend and a cousin using this remotely. It can be slow (especially if you go through the webkey portal), but works. If you don't see immediate feedback after you click something, be patient and don't double click stuff. Internally, it rocks and experience is pretty good.
If you plan to use the app's portal, there is an option to "ping" their server through the app and you should enable that option. The main controls are at the bottom (in your browser), especially the arrow keys. The middle button inside the arrow keys in your "SELECT" button. Once you are in any app, simply touching the controls within the app seems to work. If you figure out how to enter text using your keyboard (say in any input box in any app) let me know, the only way I know is to bring up the keyboard on FTV and select each character individually.
Also, if you want to run any app, you don't have to go through the Settings,.... menu on FTV. On the right side, you will see an option for "Run Application" or something and you can start any app from there very easily.
This looks very interesting, I'll be trying it as soon as I get a chance, could be good for people selling preprogrammed devices with XBMC to end users.
How do you
I got it to work but how to you get the mouse to work with the Fire stick? the mouse don't work due to the fire stick using bluetooth?
Smokeysa said:
martian21 said:
Would you mind providing a few more details of how you got TeamViewer working? I looks like you need the TeamViewer Quick Support app correct? Did you just sideload it?[/QUOTE
Yes you need to side load TeamViewer Quick Support onto FTV and start it. It will give you the session ID which you enter into the PC Teamviewer.
FTV will ask for SU access which you grant.
Once you choose remote access on the PC it will ask again for SU access. Once granted you should see your FTV on the PC session.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Controlling amazon fire stick using Vysor
martian21 said:
Has anyone found a good solution to accessing their Fire TV remotely? Basically I'm looking for a VNC or Remote Desktop solution for the Fire TV so I that I can setup / configure from my PC without having to be tied to the Fire TV.
Click to expand...
Click to collapse
Use Vysor for Remote control of fire stick since fire stick use aosp android.

[APP] VMLite VNC Server

This is a trial version of our popular Android VNC Server for fire TV Box and Stick. With this app, you can view and control fire TV using a VNC client or a web browser that is running on another computer or mobile device.
Trial apk download:
http://www.youmap.com/VMLiteVNCServer-firetv-trial.apk
This app is also available from Amazon store as a paid app for $5.99.
It's very easy to use on fire TV, just simply click Start button.
Instructions:
(1) Enable ADB Debugging - go to Amazon TV Box or Stick, Settings, System, Developer Options > tun on ADB Debugging
(2) side load the apk from above link
(3) Launch the app from System > Applications > Manage Installed Applications > VMLite VNC Server, then click Start button, and it will display ip address and port number to connect. You only need to do this once, the vnc server is configured to auto start after subsequent reboots.
(4) Download a vnc client (TightVNC is recommended) to your PC, or use android vnc client on android devices, or use builtin vnc viewer on MAC, or simply use a browser to view and control fire TV.
That's it, and have fun!
Forgot to mention, why you would need this?
(1) use computer display. mouse, keyboard to remote control fireTV. Very good for developers, I personally use vnc server to develop our apps on fireTV. No need for extra display.
(2) Use android phone with this app, act as a remote control, also with display for quick positioning.
huisinro said:
Forgot to mention, why you would need this?
(1) use computer display. mouse, keyboard to remote control fireTV. Very good for developers, I personally use vnc server to develop our apps on fireTV. No need for extra display.
(2) Use android phone with this app, act as a remote control, also with display for quick positioning.
Click to expand...
Click to collapse
When I try to install this app on my Fire TV (4k), it says something to the effect of "This app can only be installed on the Amazon Fire TV".
I have ADB debugging on, and I've made sure that there are no parallel ADB connections.
Any ideas?
It's doesn't work.
When I start the App, they says Update needed.
Not working on the ATV2 running 5.0.4. "This trial version works only on Amazon fire TV"
The pro version complains that it's not licensed, presumably because Google Play services aren't available.
Haven't been in this forum in awhile and missed this. I tried it and it said something it doesn't work or something like that. So what I'd like to know....is this because the trial apk expired? If I purchase the app from amazon will it work on my rooted gen 1 AFTV? and if I update to OS 5 I assume it will also work there too...
any update on this?
is there a working version for firetv
i'll pay but dont want to have that license issue on a firetv that doesnt have the google play services
Hi @huisinro,
Can you upload again the apk test, please?
fastest way for PC / Mac / Linux.. do it with scrcpy
Download latest release release
connect to your stick tv from adb connect for example:
adb connect 192.168.1.105:5555
Click to expand...
Click to collapse
connected to 192.168.1.105:5555
Click to expand...
Click to collapse
After that run scrcpy.exe on windows.. or jar on mac... you will see the display
(this also works for any adb connected android)
Thanks scrcpy devs

Pairing DS3 Bluetooth gamepad

I am wondering if anyone has managed to pair a DS3 to their fire TV / stick since amazon blocked access to the accessibility settings required, when using sixaxis?
I know launcher hijack work around such as the app on techdoctoruk downloads Which enables the setting so hopefully there is a way I can do this for pairing the dual shock 3, maybe there is an adb command?
tried the following in adb shell....
[email protected]:/ # ime enable com.dancingpixelstudios.sixaxiscontroller/.SixaxisIME
Input method com.dancingpixelstudios.sixaxiscontroller/.SixaxisIME: now enabled
[email protected]:/ # ime set com.dancingpixelstudios.sixaxiscontroller/.SixaxisIME
Input method com.dancingpixelstudios.sixaxiscontroller/.SixaxisIME selected
which after rebooting allowed me to select SixAxis when clicking "change IME"
.... progress
now just need it to detect the thing!

Blocking future updates on Fire Stick 4K

I have a Fire Stick 4k that I use only for Kodi and accessing media on my local network. I do not need internet access at all. I have tried blocking updates with the usual methods but have not had any success. I have modified my wifi connection to Network Prefix Length 0 and both DNS to 0.0.0.0. It seems to be blocking access to the internet. Will this be effective at blocking updates and does anyone see any issues with this method?
Thanks
Srimok said:
I have a Fire Stick 4k that I use only for Kodi and accessing media on my local network. I do not need internet access at all. I have tried blocking updates with the usual methods but have not had any success. I have modified my wifi connection to Network Prefix Length 0 and both DNS to 0.0.0.0. It seems to be blocking access to the internet. Will this be effective at blocking updates and does anyone see any issues with this method?
Thanks
Click to expand...
Click to collapse
You can use NoRoot Firewall by Grey Shirts from APKPure or Aptoide TV to block the OTA updates from internet.
You want to completely block the OTA updates. You can delete otacerts.zip in /system/etc/security folder.
NOTE: You cannot modify the entire /system folder unless your Fire TV stick 4K is rooted.
Srimok said:
I have a Fire Stick 4k that I use only for Kodi and accessing media on my local network. I do not need internet access at all. I have tried blocking updates with the usual methods but have not had any success. I have modified my wifi connection to Network Prefix Length 0 and both DNS to 0.0.0.0. It seems to be blocking access to the internet. Will this be effective at blocking updates and does anyone see any issues with this method?
Thanks
Click to expand...
Click to collapse
This guy has blocked the updates with NO ROOT:
https://youtu.be/D0wFs3aGlPM
Intenti0n said:
This guy has blocked the updates with NO ROOT:
Click to expand...
Click to collapse
I know this is an old thread, but wanted to mention I couldn't get his method to work until I connected to the Firestick from my PC. Running the commands from adb on the Firestick didn't work. And otacerts.zip is read-only :
Enable ADB debugging / Apps from unknown sources on the Firestick
Install Remote ADB Shell on the Firestick
Run adb connect <firestick ip>:5555 from your PC (via start > run > cmd)
adb shell from your PC
cd /system/etc/security
pm disable-user --user 0 com.amazon.device.software.ota.override
pm disable-user --user 0 com.amazon.device.software.ota
I'm also now running a custom launcher. Steps at
Srimok said:
I have a Fire Stick 4k that I use only for Kodi and accessing media on my local network. I do not need internet access at all. I have tried blocking updates with the usual methods but have not had any success. I have modified my wifi connection to Network Prefix Length 0 and both DNS to 0.0.0.0. It seems to be blocking access to the internet. Will this be effective at blocking updates and does anyone see any issues with this method?
Thanks
Click to expand...
Click to collapse
I'm intrigued, never seen anyone use a firestick in this manner (not connected to internet)
Regards
The recent FireOS update to the Fire Stick 4K has not been received with positive reviews from the majority of users. The main reason, it seems, involves the substantial changes to the home screen UI. While I don't have info regarding a user's ability to block these types of updates, the Fire Stick development community has brainstormed and the gods have spoken: there are some custom home screen launchers that give the Fire Stick 4K (or any other Fire Stick model) a greatly improved UI versus the newly-updated stock launcher. The best two, in my meager opinion, are Wolf Launcher and Leanback Launcher. Both of these launchers ate available on the official Troypoint app. Also included are several modified Kodi builds, including Xanax and Troypoint Kodi v19.0, which can be installed although other Kodi apps may already be installed. Several IPTV resources are available, as well as a few of the better quality movie and series apps like CinemaHDv2. (Other than verifying the safety and quality of the two launchers I referenced, I cannot confirm the legality of some of the other apps included on Troypoint. I encourage members to do some research in this regard in order to make an informed decision as to whether or not to install these IPTV and media scraper apps. The official Troypoint app is, and will always remain, fully free of charge. To install it on your Amazon FireTV Stick,, Amazon Fire Cube, or Amazon FireTV Stick 4K, use the Downloader app (available from Amazon App Store) and enter this URL for a direct download link to the latest Troypoint APK file: troypoint.com/tpapp Once installed, open the app, grant the permission request prompts, and tap the "Rapid App Installer" menu at the top of the Troypoint main screen. There you will see a full list, with direct download links, of all the included apps. A version of YouTube Vanced for FireTV devices is also included, called Smart YouTube TV. Like Vanced, the FireTV build also blocks all ads and supports background play. On a closing note, any members considering an IPTV service (whether free or paid) or media link aggregator (scraper) apps like TeaTV, CinemaHDv2 or Popcorn Time, a good VPN is essential. As it now stands in the US, some of these apps and services are considered illegal under federal law, as well as laws proscribed in various states (prohibitions are generally categorized under the criminal penalties set forth for copyright violations) Until recently, these types of apps and services were given a blind eye by the majority of law enforcement and prosecuting attorneys throughout the country. Law enforcement in Polk County, Florida, recently arrested four individuals involved in the making and selling of "Jailbroken Firesticks" at a flea market type establishment. To make a showing of strict enforcement, the Polk County Sheriff's Office used a group of undercover deputies to make a number of "Jailbroken Firestick" purchases from the suspects. An undercover sting organized to arrest these hell-bent and dangerous outlaws. As we all know here at XDA, there is no such thing as a jailbroken Firestick. In order to jailbreak a device, it must first be locked by code-based security implementations, typically on the kernel or bootloader level. Because FireOS is not secured in a manner as to prevent the installation of third-party apps (sideloading), there is nothing to jailbreak. The user simply enables the native option to allow apps from unknown sources. Now it's "jailbroken." This is simply a term which sounds very technical and innovative to the inherently naive John Q Consumer (and Suzie Q Consumer). Little do most of those individuals realize, they can buy a FireTV device for normal price and sideload every app package they'll need in under 20 minutes, and that includes initial setup time.
Srimok said:
I have a Fire Stick 4k that I use only for Kodi and accessing media on my local network. I do not need internet access at all. I have tried blocking updates with the usual methods but have not had any success. I have modified my wifi connection to Network Prefix Length 0 and both DNS to 0.0.0.0. It seems to be blocking access to the internet. Will this be effective at blocking updates and does anyone see any issues with this method?
Thanks
Click to expand...
Click to collapse
https://forum.xda-developers.com/attachments/fireos-update-blocker_1-2-apk.5184325/
Download this and block the updates, after that uninstall the app, no need to look at the app ever again. It will block the system level updates for you.

Wifi-Debugging and time-shift to USB-drive

Hello everyone,
I am owning a 65OLED903/12 TV on android 8 and do want to be able to access the ADB interface over Wifi to determine in my ioBroker Smarthome system what kind of service is currently in use (live TV, Netflix, Amazon prime etc.) and to control the device (e.g. switch off when a time-limit is reached, volume control etc.). I am able to perform all the tasks if I am able to access the ADB interface over Wifi.
The downside to this is, that when I enable USB-debugging, the build-in time-shift functionality to pause and resume live-TV stream by utilizing a USB-thumbdrive for bufferung is not available anymore.
Now the question is: how can I use ADB over Wifi with leaving the USB functionality available, explicitly the time-shift functionality? Or: Is there a tool that I can sideload, which offers a similar API or a local ADB availability be able to perform the above tasks via a local HTTP-API or something similar?
Cheers
SEB

Categories

Resources