Amazon FireTV Launch on Start UP

Amazon FireTV Digital Signage

Applicable to devices: Fire TV 4K 2nd generation (2023), Fire TV 4k Max 2nd generation (2023)

Starting from Android 10, apps that need to launch at startup need to be granted permission SYSTEM_ALERT_WINDOW (also often called “drawing over other apps”). Generally, this has not been a problem, since our app detects the missing permission and directs the user to grant the permission. With the release of generation 2 for Fire TV 4k and 4K max (rounded corners), they run now on FireOS 8 (which is built on Android 11), and the devices require the same permission. The problem is that FireOS 8 does not have the user interface to grant the permission, therefore the only way to get our signage app to launch on startup is to grant the permission via the developer tools command.

Navigate to settings (gear icon) and down to “My Fire TV

Go to About
Click 10 times on the device name, you should see a message pop up stating “Developer mode enabled”
Navigate back one time and open “Developer options
Turn ON ADB debugging

If you are setting up more than 1 device, consider using a computer to send the commands.

Go back to home, open appstore and search for an app “Downloader”
Install the app
Navigate to Settings -> My Fire TV -> Developer Options -> Install unknown apps and grant the permission, the Downloader app must state ON
Go back to home, find Downloader app and open it, grant the requested permissions.
Navigate to the field “Enter a URL or Search Term” and type in 2201 (it is a shortcut)
Proceed to install Remote ADB shell app
After the app is installed, click “Open” and “Okay” to the message about key pairs.
Navigate to the IP field and type 127.0.0.1, leave port to 5555 and click “connect”
Click “Always allow from this computer” and “Allow” when the USB debugging message pops up
You should see a terminal window. Move cursor to the last row, press OK to type text. Enter appops set dk.fadeit.play SYSTEM_ALERT_WINDOW allow
When the command has executed, the terminal should show the last command. Now we have granted our app the required permission. Go back to settings -> My Fire TV -> Developer options and turn ADB debugging off. Open Play Digital Signage app, turn on “Launch player on startup” option and restart your Fire TV

Need to set up many Fire TV devices?

Typing on the virtual FireTV keyboard becomes tedious if you several devices to set up. Instead we recommend installing adb (Android Debug Brigde) on your computer so you can grant the permission much easier. This process requires computer and installing adb command on it.

  • Make sure developer options are enabled and ADB is turned on as in the previous tutorial.
  • Both the Fire TV and your computer must be connected to the same Wifi
  • Note down your FireTV’s IP address, go to settings -> My Fire TV -> About -> Network and find the IP Address field.

Mac OS:

  1. Download platform-tools.zip file.
  2. Double click on the downloaded .zip file to unzip it
  3. Enter the folder and in the bottom where the navigation breadrcumb is, right-click and select “Open in terminal”
  4. Execute following command to connect to your fire TV: ./adb connect <device-ip-here>, for an example ./adb connect 192.168.1.115
  5. You should see a screen pop up on the FireTV asking to trust device, select “allow”.
  6. To verify that the device is connected, execute command ./adb devices, you should see the device listed.
  7. To grant the permission, execute following command:./adb shell appops set dk.fadeit.play SYSTEM_ALERT_WINDOW allow
  8. Permission is now granted

 

Windows

  1. Download adb.zip
  2. Unzip the folder and enter the folder
  3. Activate the address bar of the file explorer, delete the path there and type cmd
  4. A command prompt window will pop open in the current path
  5. Execute following command to connect to your fire TV: adb connect <device-ip-here>, for an example adb connect 192.168.1.115
  6. You should see a screen pop up on the FireTV asking to trust device, select “allow”.
  7. To verify that the device is connected, execute command adb devices, you should see the device listed.
  8. To grant the permission, execute following command:adb shell appops set dk.fadeit.play SYSTEM_ALERT_WINDOW allow
  9. Permission is now granted