[TOTAL MOD] Playing With Fire (v4) NEW "LazyLeanback" Installer - AndroidTV on FireTV

Search This thread

SimLynks

Senior Member
Sep 30, 2016
69
133
NYC
[TOTAL MOD] Playing With Fire (v4) NEW "LazyLeanback" Installer - AndroidTV on FireTV

This is not another "How-To install GApps on FireTV Thread"
Instead these heavy system modifications will finally allow you to completely control almost every aspect of the FireTV, including:

  • OpenGApps TV-Stock with almost all the main Android TV components working (Live Channels + USB Tuner, Leanback Launcher + Keyboard, Etc)
  • Button / Keycode Remapping + Change Default Launcher, Switch Keyboard IME, Access SuperSU Settings
  • Running Application View + Task Switcher, Foreground/Background Task Killers, Customizable On-Screen Shortcuts to Anything on the System
  • Access BOTH the Stock Amazon Settings Menu AND the Google Android TV Settings Menu at the Same Time (No signature spoofing either!)
  • Run and Install Apps from either the Google Play (Leanback-AndroidTV) Store OR the Official Amazon App Store
  • Automatic Updates to Google Play Services / Play Store / Play installed apps without issues thanks to minor build.prop tweaks
  • and finally Disabling / Using Amazon's own Blacklist against the various components of the Stock FireTV system that you want disabled.
  • Compatibility: Tested on AFTV-v1 running RBox v5.2.4.1 (r1 & r2) but as long as you have root you should be good to go
  • Confirmed working: on FireTV-v1 & FireStick-v1 & FireTV-v2, expected to work on FireStick-v2 once there is root.

UPDATE: v4 "LazyLeanback" -
I am now including two almost totally automated installer scripts for the newest v4 release of Playing with Fire. This NOT ONLY includes two bash scripts that automatically do almost everything for you with getting this installed, but also now includes a working "Updater script" that will stay with the ROM in the /system/addon.d/ folder, and allows you to flash the latest rbox releases over your current software without interfering with this MOD, SuperSU or Xposed Framework which will now all automatically get backed up and then put back into place properly once the new ROM is done installing! I have successfully tested this by wiping my entire system and reinstalling, using the LazyLeanback script to install the MOD, and then flashed the latest rbox [v5.2.4.1_r2] over my previous 5.2.4.1_r1 software. Everything worked and I was up and running on r2 without needing to rerun any MOD commands

As should be expected with such major modifications to basically every aspect of the FireTV System, this is 100% IMPOSSIBLE WITHOUT ROOT + XPOSED + BUILD.PROP MODIFICATIONS + SYSTEM PARTITION CHANGES + PATIENCE AND CAREFUL READING OF ALL INSTRUCTIONS. This Mod is not called "Playing with Fire" for no reason, your literally holding your FireTV's life in your hands, if you don't pay attention YOU WILL GET BURNED! Therefore if anyone asks stupid questions like "can I haz Leanfire TV on my Stick now plz?" you will be laughed at and ignored if not worse.

Screenshots from Completed Mod:
xeCCXkE.jpg

Full Gallery of Completed MOD Screenshots: https://imgur.com/a/3lucP

Installation Instructions:

  1. Step One: Required Files - Download the following files. For some of these I will have listed two versions (ARM) and (ARM64) so make sure you pick the version that's appropriate for the architecture of your CPU. FireTV-v1 (ARM) & FireTV-v2 (ARM64). Additionally as my FireTV is running the latest release v5.4.2.1 I am using API22 binaries in this guide. Everything "should" still work if your running an older release, but you will need to get the API21 binaries if still on Lollipop 5.0. If you don't know what architecture / api level your FireTV is I suggest you do some research, as if you don't know that type of basic information, things can end up quite badly for your FireTV.

    PlayFire_v2.tar.gz - https://www.androidfilehost.com/?fid=817550096634783100
    Obsolete: Use ONLY for Manual Installation as of "v4_LazyLeanback" Contains my PlayFire-TvSettings.apk (modified from Peleg's AFTV2ATV Project) along with the other necessary "universal" files that will be pushed into your system partition.

    XposedInstaller_3.1.1.apk - https://forum.xda-developers.com/attachment.php?attachmentid=3921508&d=1477916609

    xposed-v87-sdk22-arm.zip - http://dl-xda.xposed.info/framework/sdk22/arm/xposed-v87-sdk22-arm.zip
    xposed-v87-sdk22-arm64.zip - http://dl-xda.xposed.info/framework/sdk22/arm64/xposed-v87-sdk22-arm64.zip

    HDXPosed-1.3.apk - https://forum.xda-developers.com/attachment.php?attachmentid=4198322&stc=1&d=1503094312 Created by rbox

    Busybox-(Meefik) - This is my personal preference for Busybox installers, but you can use whichever installer you like. I have also included the TWRP Flashable ZIP which was generated from within the installed APK. Either version will work just fine, so pick whichever you find easier to install.

    Busybox-(Meefik)-v1.27.1 (Updated August 8th, 2017) (APK Installer): https://github.com/meefik/busybox/releases/download/1.27.1/busybox-1.27.1-33.apk
    Busybox-(Meefik)-v1.27.1 (TWRP Flashable ZIP): https://forum.xda-developers.com/attachment.php?attachmentid=4245669&stc=1&d=1503094312

    Chainfire's SuperSU-v2.82-20170528234214 - https://download.chainfire.eu/1113/SuperSU/UPDATE-SuperSU-v2.82-20170528234214.zip

    MAKE SURE YOU USE THIS SuperSU v2.82-20170528234214 and NOT THE CCMT version. One of the recent SuperSU-CCMT releases had a bug that resulted in device crashes and loosing root access when updating the binary. Also as this SuperSU is a Chainfire release, it's signed with a different key than the "official" CCMT versions so it will not show up in Play Store updates once everything has been installed. You can still flash the latest CCMT in TWRP at a later date if you want but it's not going to update automatically if installed using the Chainfire release posted above.

    Note: As OpenGApps is built fresh every day it's possible a future update may break something. If you have issues with the current release, then go ahead and download the Old "Known Good" release posted below. You can always upgrade GApps by re-running the ZIP installer with a later build that hopefully fixes your issue.

    TV-Stock (ARM):
    Current Release (Make sure you download the MD5 along with the ZIP)
    http://opengapps.org/?download=true&arch=arm&api=5.1&variant=tvstock

    Known Working (Old Release)
    https://github.com/opengapps/arm/releases/download/20170202/open_gapps-arm-5.1-tvstock-20170202.zip
    https://github.com/opengapps/arm/re...2/open_gapps-arm-5.1-tvstock-20170202.zip.md5
    https://github.com/opengapps/arm/re...gapps-arm-5.1-tvstock-20170202.versionlog.txt

    TV-Stock (ARM64):
    Current Release (Make sure you download the MD5 along with the ZIP)
    http://opengapps.org/?download=true&arch=arm64&api=5.1&variant=tvstock

    Known Working (Old Release)
    https://github.com/opengapps/arm64/...202/open_gapps-arm64-5.1-tvstock-20170202.zip
    https://github.com/opengapps/arm64/...open_gapps-arm64-5.1-tvstock-20170202.zip.md5
    https://github.com/opengapps/arm64/...pps-arm64-5.1-tvstock-20170202.versionlog.txt

  2. Step Two: Running the "LazyLeanback" Installation Scripts - New improvements as of "v4_LazyLeanback" are the Installation Scripts themselves as well as a brand new "addon.d" Updater script which allows ROM flashing without damaging the MOD installation, even through software upgrades. Both improvements are included in the "PlayFire" archive attached to this post. I have also removed the gapps-config.txt & Xposed Edge Config from the "PlayFire" archive so I can customize it for a different needs I've seen mentioned, now one version defaults to Leanback Launcher, and the other version Defaults to the Stock Amazon Launcher, you can pick whichever you'd like.

    WARNING: While I did test all of this on my own system, and was successfully able to use the scripts to install everything from this MOD's guide AND THEN FLASH THE LATEST RBOX r2 RELEASE WITHOUT NEEDING TO RERUN ANY MOD CONFIGURATION, the LAZYLEANBACK SCRIPTS should STILL BE CONSIDERED "ALPHA-RELEASE" SOFTWARE AND SHOULD NOT (YET) BE FULLY TRUSTED OR RUN BY THOSE WHO DO NOT AT LEAST KNOW THE BASICS ON HOW TO RECOVER FROM UNEXPECTED ERRORS WHEN INSTALLING MODIFICATIONS. Also even if my scripts do work on getting everything installed quickly, they are definitely quite "ugly" (you might see some errors or other weirdness when running them) but they DO work, just ignore the minor errors that may pop up. It will be ironed out once I get a chance to get back to this.

    You have been warned and I am (still) in no way responsible for any bricks that may occur from improper use of these instructions or badly written scripts.

    A VERY very brief run through of EVERYTHING you need to install this MOD is now simply the following:
    • 1) Download the required files listed above (and now including the separate Xposed Edge Configs and gapps-config.txt files)
    • 2) Download the new "PlayFire_v4_LazyLeanback.tar.gz" archive and MOVE EVERYTHING TO THE ROOT OF YOUR SD CARD
    • 3) Rename whichever version of the gapps-config file you want to use to EXACTLY "gapps-config.txt" and place it in /sdcard/gapps-config.txt
    • 4) Connect to your device's ADB terminal and run the following commands. NOTE: You MUST Install the Busybox.apk then open the app and install the Busybox Binary BEFORE YOU RUN the LazyLeanback Scripts, or everything may APPEAR TO INSTALL OK, BUT YOU WILL BE MISSING A CRITICAL step that allows OpenGApps TV-Stock to fully install all required libraries properly.
      Code:
      tar -xzvf /sdcard/PlayFire_v4_LazyLeanback.tar.gz
    • 5) MAKE SURE YOU GO TO A ROOT SHELL AND ONLY ONCE YOU ARE ROOT RUN THE LAZYLEANBACK SCRIPTS
      Code:
      sh /sdcard/PlayFire/LazyLeanback.sh
    • 6) THATS IT, YOU'VE INSTALLED ALL THE HARD PARTS OF THE MOD AT THIS POINT. You still need to reboot into TWRP to install the Updated SuperSU-v2.82 (if you hadn't already) along with Xposed v87 and finally OpenGApps itself. Once you've successfully installed OpenGApps reboot into the system and run the next FINAL command AGAIN FROM A ROOT SHELL (OR IT WILL NOT WORK)
      Code:
      sh /sdcard/PlayFire/LazyNoTouch.sh
    • 7) Go into Xposed and enable Xposed Edge, Then reboot (again) and go into Xposed Edge and Enable "Keys"
    • 8) YOU ARE DONE, ENJOY!.
      After all this you can finally go ahead and log into the Google Play TV (Leanback) Store, should have button mapping configured and can start my Blacklisting procedure.

    However please note that the TV-Stock GApps package is quite large even when many of the useless packages are being ignored via my custom "gapps-config.txt" file which directs the GApps installer and tells it specifically what to install and what to ignore[/B]. For example on my FireTV-v1 after doing a total wipe of System, Data, Internal, Dalvik/Cache, then reinstalling RBox's Prerooted Rom, I only had about 140MB of free space in my /system partition. That's why I have left my gapps-config.txt file in the "Test" mode, so you can attempt to run the TV-Stock installer without it actually writing any files (yet) so you know if you will have enough space in your system partition. NOTE: As my custom gapps-config.txt comes with the TEST option set, you must modify this file with the "sed" command below (or manually edit the file by commenting out the #TEST line) for TV-Stock Installer to actually run in “real-mode” and not "test-mode".

    Now go ahead and do a test-run of the TV-Stock installer. If it finishes without throwing “Error Code: 70 = insufficient storage” your good-to-go for the real-install once you comment out the TEST option. IF you DO get Error Code: 70 run the following line in terminal to view the TV-Stock Installer Logs and Determine what you want to do to free up some space. If you don't get any errors run the Completed Without Errors line.

    Code:
    Test-Run Error Code: 70
    shell@firetv:/ $ cat /sdcard/open_gapps_log.txt

    Code:
    Test-Run Completed Without Errors
    shell@firetv:/ $ sed -i -e 's|^Test|# Test|' /sdcard/gapps-config.txt

    HOWEVER EVEN IF YOU GET NO ERROR CODES ON THE TV-STOCK TEST RUN YOU MUST STILL CHECK THE LOGS TO CONFIRM YOUR FIRETV WAS DETECTED AS “TV” AND NOT “PHONE”. IF YOU DO NOT CHECK THIS, AND YOU HAVE NOT PROPERLY MODIFIED YOUR BUILD.PROP TV-STOCK WILL DETECT A “PHONE INSTALL” AND WILL NOT INSTALL ALL NECESSARY LIBRARIES FOR THE ANDROID-TV (LEANBACK) FUNCTIONS TO WORK!

    Code:
    Device Model | AFTB
    Device Type | tv

    And at long last, with all these steps completed you should get TV-Stock to install successfully!

    Enable Button Remapping via "Keys" in Xposed Edge & Editing the Xposed Edge Custom Configuration:
    Home Button Single Press = Leanback Launcher (Home)
    Home Button Double Press = Running Apps List Overlay + Task Switcher
    Home Button Long Press = On-Screen Menu Options
    Back Button Long Press = Kill foreground app
    Menu Button Long Press = Installed Applications Drawer Overlay + App Launcher
    Voice (Search) Button Single Press = Google Search (Katniss)
    Voice (Search) Button Long Press = TV Voice Input

    These settings along with all other custom button mappings can be edited within the Xposed Edge application. Please see the excellent guide @Y314K has put together (with detailed pictures) for some tips on how to configure more advanced features of this module. You also must ENABLE the "Xposed Edge" module within Xposed AND THEN ENABLE "Keys" from within the main Xposed Edge settings menu before all these configuration options will take effect. Please see Y314K's guide listed above for specific instructions on how to enable the REQUIRED "Keys" setting within Xposed Edge so that the button remapping gets activated.

Known Issues:

  • Leanback Launcher Auto-Start: In order for Leanback Launcher to start automatically upon boot of the system you MUST first disable the default FireTV Launcher "com.amazon.tv.launcher". You can run "pm disable com.amazon.tv.launcher" or follow the steps from post #2 in this thread about how I configure the Amazon Blacklist. Once Xposed Edge is enabled, you can still run the default Launcher (even when it's frozen) through the on-screen menu.
  • No recommendations loading: is a known issue caused by Amazon's "com.amazon.device.sale.service" package. You must disable this either through my method from the 2nd post in this thread or the "traditional" way of "pm disable com.amazon.device.sale.service". Recommendations will only load once you've installed some official "leanback" apps from the Play Store and have run them at least once (and in the case of CableTV apps like FoxNow, ABC, NBC, etc logged in with your network provider)
  • Enabling Xposed Modules without a mouse: I highly recommend Vysor it's most importantly free, and it connects to your device through ADB and mirrors your device display on your computer and therefore allows you to use the mouse on your computer to manipulate your device, and click those check boxes.
  • Chromecast Receiver: Is problematic for a few reasons, A) is at least on my FireTV-v1 there's not enough space in the /system partition to install it as a system app, so I have installed it as a user-app through the Play Store once everything else is working. Issue B) is that NO ONE (at least from the research i've been doing into this) has yet figured out how to properly spoof the proper Google Identification check that the Chromecast Receiver is doing before allowing you to Cast to a TV Box. Over at FreakTab another developer listed the problem as "Cast service can't get a Cast device cert through ClientAuthSigner" but this is something I am also going to try and look into and would very much like to get working, so definitely a work in progress even if I don't really know how feasible it is to expect this functional anytime soon.
  • Google Voice Search: Google Search on the other hand is semi-working and my custom Xposed Edge configuration already contains a button remap of the Search button to the Google Search app instead of the default Amazon Voice Interface. The text-based search part of this works flawlessly, but I seem to run into an issue when trying to actually use the Voice control part at which point the app throws an error about "Not able to connect to Google at this time". I am also working on trying to figure this out, but it's exponentially more likely to be working in the near future than the Chromecast Receiver functions.
  • Google Play Store Apps with Known Issues and/or Root Verification Checks : Currently I am aware of two apps that if installed via Google Play Store WILL NOT WORK on the FireTV, these are Netflix (which is publicly known to be blocking access on rooted devices) and the Showtime App. However as of July 5th, 2017 both these apps works without ANY issues if simply installed from the Amazon AppStore, giving users of the Playing with Fire MOD the best of both worlds. Install any app you can from Google Play (to get more frequent updates & features), but be able to revert to using Amazon AppStore apps when the Play Version does not work, or in the case of many TV:Go apps which do not currently exist in the Play Store at all, but are available on FireTV devices (Includes but is not limited to: USA Network, TruTV, Science Channel, Discovery Channel, ID Network, Animal Planet, TLC Network, among others like "Local NOW" which is actually a LiveStream of the Weather Channel if you can log in with the appropriate CableTV Network Credentials)

Excuse me if this is a dumb question (it probably is), but I'm not too versed in the current state of the modding scene for the FTV devices. From what I've seen, TWRP for the FTV devices is available, so what's stopping you guys from creating a flashable image from a TWRP backup? (I know it's possible on regular Android)

A combination of technical, legal and logistical problems. This mod should work on all FireTV devices (I think, confirmation on AFTV1 + Stick1, still waiting on FireTV2 + Stick2) but I only have a FireTV-v1, my TWRP image would most likely brick any other type of FireTV device.

There are also legal / licensing issues to contend with, particularly concerning the OpenGApps packages, but also the modified copy of "PlayFire-TvSettings.apk" (which I had to ask @peleg for permission to distribute which he kindly agreed to), and also the Xposed Edge + Custom Config (which I have PM'd @jozein about but have not gotten a reply yet) among others. Even something as ubiquitous as SuperSU is not a open source package, you must get permission from Chainfire / CCMT before you may include it in a Custom ROM. The way this MOD is currently setup I am only directly distributing the minimal amount of files I need to, everything else is being obtained by the end-user through the official channels and in the way the package owners have specified.

CHANGELOG:
  • June 30th, 2017 (v1): Initial post introducing this MOD and exploring the capabilities that can be added to the FireTV through the Xposed Edge Module
  • July 2nd, 2017 (v2): Updated "PlayFire_v2.tar.gz" archive with a fixed gapps-config.txt and corrected some errors that were included in the initial commands
  • July 6th, 2017 (v3): Confirm MOD is working on AFTV1, AFTV2, and FTV-Stick1. Replace original build.prop edit method with new and improved sed/grep commands, update formatting of the MOD guide and add in final details on how to install and configure everything that is required for this MOD to work successfully
  • July 8th, 2017 (v4_LazyLeanback): Updated "PlayFire_v4_LazyLeanback.tar.gz" archive has been uploaded which contains NEW Auto-Installer Shell Scripts. Also as of v4_LazyLeanback the Playing with Fire MOD also includes a addon.d Updater script which allows you to flash the latest Rbox releases over your current software WITHOUT THEN NEEDING TO RE-RUN ANY MOD COMMANDS

CREDITS:
@peleg for the TvSettings.apk compatible with FireTV and AFTV2ATV Project which inspired this MOD
@rbox for the Prerooted FireTV ROMs and HDXPosed Module without which all this would be impossible
@jozein for the excellent Xposed Edge Module which provides almost 50% of the added features missing from the Stock AmazonTV Interface
@stangri for the contribution of the "sed" commands to edit build.prop directly through terminal

Shoutouts:
@talltree for being the first person brave enough to try this out on any device, and for his patience in helping me discover and fix a few initial flaws that were in the guide.
@tmtprsn and @stangri for confirming a working MOD on FireStick-v1
@f1ux for confirming a working MOD on FireTV-v2
@dewa710 for helping me track down the cause and resolution to the "spinning circle of doom" issue caused by TV-Stock overwriting NoTouchAuth
 

Attachments

  • Busybox-v1.26.2-(ARM).zip
    759.4 KB · Views: 1,847
  • HDXPosed-1.3.apk
    36.8 KB · Views: 5,562
  • PlayFire-TvSettings.apk
    6.2 MB · Views: 2,382
  • TV-NoTouchGsf.apk
    5.7 MB · Views: 2,292
  • gapps-config_LeanbackFULL.txt
    2.1 KB · Views: 4,037
  • gapps-config_PlayStoreONLY.txt
    2.1 KB · Views: 2,391
  • PlayFire_v4_LazyLeanback.tar.gz
    7.9 MB · Views: 5,105
  • XposedEdge-LeanbackHome.tar.gz
    371.3 KB · Views: 2,628
  • XposedEdge-DefaultAFTVHome.tar.gz
    389.7 KB · Views: 1,724
  • PlayFire-TvSettings-v2.0.apk
    6.2 MB · Views: 2,480
Last edited:

SimLynks

Senior Member
Sep 30, 2016
69
133
NYC
Blacklist Configuration: There are many ways in which you can disable the parts of the Stock AmazonTV system you do not want to have running, but I believe my new method is far superior as it uses Amazon's own blacklist technology against itself (which I just find incredibly funny) AND by disabling the components in this manner, every single time you reboot the system, the components will automatically get re-disabled if you happened to enable some function for whatever reason.

Amazon has the potential to use two different systems to "blacklist" certain things. These are "com.amazon.tv.nimh" (Not in my House) and the "com.amazon.tv.settings.tv.AppDisableService" which is currently being used to explictly block (and "soft-disable") the following applications: FiredTV-Launcher, FireStarter, and OnbootKodi. Both blacklisters are explained in depth over at AFTVNews (http://www.aftvnews.com/tag/blacklist/).

If you have followed my entire guide to this point the first blacklist I mentioned "com.amazon.tv.nimh" (Not in my House) has already been totally deleted from your system partition during the OpenGApps TV-Stock installation. I explicitly call this library out in my custom gapps-config.txt file and instruct the TV-Stock installer to delete all it's files. I do this because A) no one knows exactly what this component is capable of once Amazon decides to enable it's functions, and B) It currently has zero negative effect on a running FireTV system, so I fully remove it to prevent any future issues it may cause once Amazon decides to enable it's unknown functions.

The next blacklist included with Stock FireTV systems is the "com.amazon.tv.settings.tv.AppDisableService" which quite simply is a text database listing certain packages Amazon has decided it does not like, and these packages are forcibly "frozen" (aka "soft-disabled") upon boot of the system. Over at AFTVNews they already have great instructions on how to totally disable this functionality and re-enable the blocked apps, but I am going to show you how to use Amazon's AppDisableService to disable Amazon system components instead of the Apps Amazon does not like. This way instead of totally stopping AppDisableService, we remove the Amazon specified apps, and add in Amazon System components that will then automatically be frozen upon boot of the system.

To do this you need to launch the Amazon Settings On-Screen Menu I have included in my Xposed Edge configuration. To access this 1) Hold the Home Button until the On-Screen Menu Appears, 2) Navigate one space to the right, and then one space down in the On-Screen Grid, this will be a box with a bunch of Amazon System apps in it. Once you select the AmazonApps square, navigate to the bottom right most square, and this will launch the Internal Amazon Settings Debug Menu. 3) You want the select the option that is a orange square with the "Amazon Fire" text in white.

QOFjh9v.jpg


Once you have selected the appropriate "Amazon Fire" Settings app from within my preconfigured On-Screen Menu, you will be presented with a Black Screen with a list of options. Scroll down to "com.amazon.tv.settings" and select this option. On the next black screen you will see a two columns, one labeled "Key" and another labeled "value". The only "Key" is DisableApps, while the value is the package names of FiredTV-Launcher, Firestarter, and OnbootKodi. Move your selector to the "Edit" button and go ahead and remove all three packages Amazon has included, and then add in whatever parts of the Amazon System you want disabled (i.e. anything you previously used pm disable on)

I strongly suggest you use this Auto-PackageDisable feature to "soft-disable" the default AmazonFireTV Launcher "KFTV" so that the system will automatically boot into the Leanback Launcher. You can also disable any other Amazon System package, in my following example I also disable the blacklist technologies, KFTV Launcher, and Vizzini (Amazon's Voice Interface so that the Google Voice Interface can take over). My own "blacklist" includes the following, but you do not need to include everything I do, and can add additional packages I do not. My blacklist kills the Amazon OTA service, Amazon "Sale Service" which blocks the Leanback Launcher recommendations, and Amazon Voice Search among others.

My personal blacklist includes:
Code:
"com.amazon.device.software.ota,com.amazon.device.software.ota.override,com.amazon.device.sale.service,com.amazon.tv.launcher,com.amazon.tv.nimh,com.amazon.vizzini"

V5tnMZ3.png

5Q65hbr.png


Manual Installation Instructions: If you want to fully understand what this MOD is actually doing to your system the manual instructions give a much clearer picture of what is being modified and why to achieve a successful Leanback install on the FireTV. These instructions are obsolete as of v4_LazyLeanback but are being retained in the thread as extra information for any other hackers who may want to take this further


Manual Installation - (Part One): Modifying Build.Prop

NOTE: The beginning of the commands is actually an important indicator of "where" your supposed to be inputting the commands.

~$ = the shell or command prompt on YOUR computer. With FireTV Utility you may need to type "exit" to get back to a "computer shell"
shell@firetv:/ $ = the shell on the FireTV device. The "firetv" part will change depending on your device name
root@firetv:/ # = Notice how the last part in red changed from $ --> # this is the difference between a normal user shell and a "root shell"

EDIT: @stangri has provided some terminal commands that expertly accomplish the necessary build.prop modifications without needing to follow my old instructions to pull the file off the device, edit it and then push it back to the filesystem. Thanks to this contribution we can now edit build.prop with the following commands, BUT YOU MUST HAVE BUSYBOX INSTALLED FOR THESE COMMANDS TO WORK. First off make sure your device is powered on and connected to your network and has ADB debugging enabled.

EDIT: This is the OLD BUILD.PROP METHOD. You can use this but it will be much easier to use the "sed" commands above.

There are a few different ways this step can be done so do whatever is easier for you. As my FireTV-v1 has a built-in Ethernet port + USB port I find it convenient to connect via ethernet, use the USB keyboard to enter recovery and then ADB into recovery and edit the build prop with the command-line text editor "vi". However only the FireTV-v1 makes doing it that way easy, and anyone who knows how to use vi can probably figure this part out on their own without any further instructions.

For the rest of you on FireTV-v2 or FireTV-Sticks here's probably the easiest way for you to complete this step. First make sure your device is powered on and connected to your wifi network with ADB Debugging enabled.

Code:
~$ adb connect "YOUR IP" 
~$ adb shell
shell@firetv:/ $ exit

Code:
~$ adb connect "YOUR IP" 
~$ adb pull /system/build.prop ~/

If you get to a terminal prompt great, now type "exit". Now type "adb pull /system/build.prop/ ~/" this command should grab a copy of your build.prop and place it in your user's home directory. Now you need to edit the file using a good text editor (NOT Microsoft Word / WordPad / Any other "fancy" program that will add additional formatting, and wind up destroying the file). If on Windows I recommend NotePad++, if on any other operating system, you should be fine with the default text editor.

NOTE: The first two lines are towards the top of of your build.prop file, while the last two lines should be the VERY BOTTOM. Also the first two lines already exist in the file and need to be modified, while the last two lines DO NOT already exist in your build.prop, you need to add them as the very last two lines.

Code:
ro.build.version.number=573210520 --> ro.build.version.number=987654321
ro.build.characteristics=default --> ro.build.characteristics=tv
^ TOP
BOTTOM ٧
Code:
ro.com.google.clientidbase=android-xiaomi-tv                              
ro.com.google.gmsversion=5.1_r1_TV

Once you have completed the required build.prop modifications, we need to push the edited file back into the FireTV's filesystem

Code:
~$ adb connect "YOUR IP" 
~$ adb push ~/build.prop /sdcard/build.prop
shell@firetv:/ $ su
root@firetv:/ # cp /sdcard/build.prop /system/build.prop && chmod 644 /system/build.prop && chown root:root /system/build.prop

Unfortunately each device's build.prop contains completely different information, and this can even change within the same device between different software versions, so I cannot post an example for this one, as it would be useless and dangerous if someone tried to use it on the wrong device / software version. But this modification is necessary, the "top" edits give the TV-Stock installer the correct information to know this is a TV Device (otherwise it will detect the FireTV as a "Phone" and skip installing some necessary libraries, while the bottom two lines allow the device to register correctly with the Play Store and prevents the issue a lot of us were having with updates to Google Play breaking things.

Code:
~$ adb connect "YOUR IP" 
~$ adb shell
shell@firetv:/ $ exit

If you get to the "FireTV" terminal prompt great, now type "exit" and proceed to the next set of commands. If you dont get to the "FireTV" terminal you need to double check you have ADB debugging enabled and your device is in fact connected to the appropriate network.

Code:
~$ adb shell
shell@firetv:/ $ cp /system/build.prop /sdcard/default.prop
shell@firetv:/ $ su
root@firetv:/ # mount -o rw,remount /system
root@firetv:/ # sed -i 's|ro.build.version.number=.*|ro.build.version.number=987654321|' /system/build.prop
root@firetv:/ # sed -i 's|ro.build.characteristics=.*|ro.build.characteristics=tv|' /system/build.prop
root@firetv:/ # ! grep -q "ro.com.google.clientidbase=android-xiaomi-tv" /system/build.prop && echo "ro.com.google.clientidbase=android-xiaomi-tv" >> /system/build.prop
root@firetv:/ # ! grep -q "ro.com.google.gmsversion=5.1_r1_TV" /system/build.prop && echo "ro.com.google.gmsversion=5.1_r1_TV" >> /system/build.prop


Manual Installation - (Part Two): Putting it all together - You should now have XposedInstaller.apk, XposedFramework.zip, HDXPosed-1.3.apk, SuperSU.zip, PlayFire.tar.gz, Busybox.apk or Busybox.zip TV-Stock.zip and TV-Stock.zip.md5 and a modified build.prop ready to go. Next you need to move all these files onto your device, and I am going to use the root of /sdcard/ and the /sdcard/PlayFire/ directory as defaults. You can use something else, but you will need to modify the following commands.

Get your device up and running and load all the files you have downloaded into the root of your /sdcard/ partition. Once everything is on the root of your /sdcard/ run the following commands, and note that everything on a single line should be copy/pasted as one command.

If running these commands from TWRP recovery, everything will already work as TWRP comes with busybox. If running this connected to adb on a running FireTV system you must install busybox prior to running these commands. Install the ZIP through TWRP then boot into the system or use the APK to install busybox into your /system partition.

Code:
~$ adb connect "YOUR IP" 
~$ adb shell
shell@firetv:/ $ pm install /sdcard/XposedInstaller_3.1.1.apk
shell@firetv:/ $ pm install /sdcard/HDXPosed-1.3.apk
shell@firetv:/ $ tar -xzvf /sdcard/PlayFire_v2.tar.gz
shell@firetv:/ $ su
root@firetv:/ # mount -o rw,remount /system
Code:
root@firetv:/ # cp /sdcard/PlayFire/tv_core_hardware.xml /system/etc/permissions/tv_core_hardware.xml && chmod 644 
/system/etc/permissions/tv_core_hardware.xml && chown root:root /system/etc/permissions/tv_core_hardware.xml

root@firetv:/ # cp /sdcard/PlayFire/whitelist.json /system/etc/whitelist.json && chmod 644 /system/etc/whitelist.json && chown root:root /system/etc/whitelist.json

root@firetv:/ # tar -xzvpf /sdcard/PlayFire/XposedEdge-DataConfig.tar.gz -C / && (chown -R system:system /data/app/com.jozein.xedge-1 && chown -R root:root /data/data/com.jozein.xedge)
Code:
root@firetv:/ # mkdir /system/priv-app/TvSettings && chmod 755 /system/priv-app/TvSettings && cp /sdcard/PlayFire/PlayFire-TvSettings.apk /system/priv-app/TvSettings/TvSettings.apk && chmod 644 /system/priv-app/TvSettings/TvSettings.apk && chown root:root /system/priv-app/TvSettings/TvSettings.apk

root@firetv:/ # mkdir /system/app/NoTouchAuthDelegate && chmod 755 /system/app/NoTouchAuthDelegate && cp /sdcard/PlayFire/TV-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk

root@firetv:/ # mv /sdcard/PlayFire/gapps-config.txt /sdcard/gapps-config.txt

The next command is OPTIONAL, but it disables the Wifi-Direct broadcast "Fire-DIRECT-####" which I found useless and very annoying

Code:
root@firetv:/ # cp /sdcard/PlayFire/android.hardware.wifi.direct.xml /system/etc/permissions/android.hardware.wifi.direct.xml && chmod 644 /system/etc/permissions/android.hardware.wifi.direct.xml && chown root:root /system/etc/permissions/android.hardware.wifi.direct.xml

Manual Installation - (Step Three): The Final Piece of the Puzzle - So the MAIN things that had been messing up installing TV-Stock GApps on FireTV or anything else for that matter is A) No one was editing the /system/etc/permissions files appropriately and B) that the OpenGApps TV-Stock installer includes a broken copy of NoTouchAuth which wont allow you to register with Google Play Services. In one of the above commands we installed a copy of NoTouchAuth I pulled from a Official AndroidTV box (so it actually works) and once you have completed the next steps and reboot, you will be able to log into Google Play without issue. Also at this point we have replaced the stock system build.prop with the modified one to allow a proper TV-Stock installation, and allow for proper authentication with Google Play Services, installed the modified copy of peleg's TvSettings.apk (ATV Settings Widget/Menu) which now does not require signature spoofing due to my removal of the "com.android.shared.uid" value from the Android Manifest, disabled Wifi-Direct broadcasting, and installed XposedInstaller.apk + HDXPosed.apk, along with the ESSENTIAL Xposed Module "Xposed Edge" which is what will allow us to remap Buttons / Keycodes & provides the Running App List + Task Switcher + an unbelievable amount of other useful features and ability to customize just about anything.

So now that all that has been done the last step is to reboot into TWRP recovery (however that is done on your device) and install the final ZIP files of updated SuperSU v2.82, Xposed Framework v87, and finally OpenGApps TV-Stock itself.

EDIT: Due to issues with OpenGApps TV-Stock overwriting NoTouchAuth during installation, you must run the following AFTER finishing the TV-Stock installation to avoid the "spinning circle of doom" issue, which will prevent Google Play login. After running the commands below REBOOT and you should be able to login to Google Play without further problems.

Code:
shell@firetv:/ $ su
root@firetv:/ # mount -o rw,remount /system
root@firetv:/ # rm  /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
root@firetv:/ # cp /sdcard/PlayFire/TV-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
root@firetv:/ # chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk


Work-in-Progress
  • Updater Script: Completed-as-of v4_LazyLeanback
    I am currently in the process of investigating whether it may be possible to write an "Updater Script" that functions as the OpenGApps Updater scripts do, which would allow users to seamlessly flash the latest rbox prerooted ROM releases while keeping all these MOD changes in tact through the upgrade process. I have just starting looking into this, so have no estimate for when or if It might be completed.
  • Update.zip Flashable Installer: Completed-as-of v4_LazyLeanback
    I MAY also attempt to investigate the possibility of creating an "all-in-one" Update.zip package which would be flashed through TWRP and preform as many of the steps of this MOD as possible. In any case DO NOT THINK THIS WILL BE A "FULL" CUSTOM ROM, It will only be exactly what is currently discussed in this thread, It will not at any time include the rbox ROM, OpenGApps installers or any other modules not currently already included within my "PlayFire.tar.gz" archive. I have not even started looking into the first steps of how this may or may not be possible, just something I have in the back of my mind as a possible continuation of this MOD and my learning process. Do NOT ask me when this might be completed, as I have not even begun the most basic of firsts steps, again just something I may consider trying to do at a later date. If you want this MOD installed anytime soon, your going to need to follow current procedure outlined in this guide for the time being.
  • Custom Compiled OpenGApps TV-Stock Installers: Again, this is something I MAY attempt to do at a MUCH LATER DATE, and only AFTER I have created both the Updater Script and the Update.zip package. As there are numerous issues with the OpenGApps built TV-Stock I may try to build the installer from source myself and resolve as many issues as they relate to the FireTV as possible. Again, do NOT ask me when this will be ready, as I honestly have no clue, but again is something I am considering if there is enough interest shown and/or more serious problems with the current OpenGApps TV-Stock installers become apparent.
 
Last edited:

talltree

Member
Feb 20, 2010
15
3
Hi I attempted to get it to work but I am having issues. First of all thanks for making this guide looking forward to getting it to work. I found a small potential error while following instructions the line that says

Code:
oot@firetv:/ # tar -xzvpf /sdcard/PlayFire/XposedEdge-DataConfig.tar.gz -C / && chown -R root:root /data/data/com.jozein.xedge-1

Didn't work for me but it looks like it extracts the files to /data/app instead so I cchanged that part. Also I couldn't find anywhere you said to use the HDXPosed-1.3.apk so I activated it in xposed anyway just in case. Another thing, you mentioned that you had a TEST line in the google gapps-config.txt, the one I downloaded had it commented out with a #.

So the problem I am having that after activating Xposed Edge and enabling the keys(took me a while to figure out I had to long press to do it) the keys don't seem to activate from what you preset. I did find leanback by going to the Xposed Edge button key configuration and using the activites option. But it seems when I visted lean back there is no data to display. A biger problem, the Google play store just gets stuck on its background with a blue cirlce spinning. Any idea what would cause those to go wrong? While in leanback I went to settings and tried to add a google account but that screen comes up blank. Thanks a million for your help.

UPDATE: I went back and imputed the commands again looks like the settings are working now. Is it possible that flashshing the TV-Stock after everything overwrote some of the files or settings? Seems to be working okay now.

Update 2: It seems I ran into some more issues. When I restart the button mappings go away. Also I tried to install some apps from the play store but they get stuck on pending installation. Any help appreciated.
 
Last edited:

SimLynks

Senior Member
Sep 30, 2016
69
133
NYC
Hi I attempted to get it to work but I am having issues. First of all thanks for making this guide looking forward to getting it to work. I found a small potential error while following instructions the line that says
Code:
oot@firetv:/ # tar -xzvpf /sdcard/PlayFire/XposedEdge-DataConfig.tar.gz -C / && chown -R root:root /data/data/com.jozein.xedge-1
UPDATE: I went back and imputed the commands again looks like the settings are working now. Is it possible that flashshing the TV-Stock after everything overwrote some of the files or settings? Seems to be working okay now.
Update 2: It seems I ran into some more issues. When I restart the button mappings go away. Also I tried to install some apps from the play store but they get stuck on pending installation. Any help appreciated.

Hi talltree, first off thanks for essentially being the brave soul to "beta test" this for me! Also thanks for pointing out the issue with the Xposed Edge command, tuns out I did mess that one up a bit, mixed up the permissions / group ownership and some directories.

For now please try the following and let me know if this resolves your issue (so I can then go back and update the "official" command above)

Code:
shell@firetv:/ $ su
root@firetv:/ # tar -xzvpf /sdcard/PlayFire/XposedEdge-DataConfig.tar.gz -C /

data/app/com.jozein.xedge-1/
data/app/com.jozein.xedge-1/base.apk
data/app/com.jozein.xedge-1/lib/
data/data/com.jozein.xedge/
data/data/com.jozein.xedge/prefs/
data/data/com.jozein.xedge/prefs/prefs
data/data/com.jozein.xedge/prefs/collection
data/data/com.jozein.xedge/prefs/panels
data/data/com.jozein.xedge/local_prefs
data/data/com.jozein.xedge/lib
data/data/com.jozein.xedge/cache/
data/data/com.jozein.xedge/cache/com.android.opengl.shaders_cache

root@firetv:/ # chown -R system:system /data/app/com.jozein.xedge-1 
root@firetv:/ # chown -R system:system /data/data/com.jozein.xedge

That "should" fix your Xposed Edge mapping issues (I hope), but let me know so I can try and revise the commands again if not. However you previously said that the original command only extracted files to /data/app, but the "tar -xzvpf" command should extract files to both /data/app & /data/data (/data/app is the actual APK installed into your system, and /data/data/ holds my custom configurations for Xposed Edge). So if my prior mangled command was only dropping files into /data/app, that might have been part of your problem.

As for the Google Play "Spinning Circle of Doom" issue, thats has previously been the bane of my existence (and through way too much trial and error I discovered it was generally due to the faulty NoTouchAuth installed by the OpenGApps TV-Stock installers for all platforms).

As you also noticed my gapps-config.txt files did not have Test commented out (accidentally), as this was a modified version in which I attempted to prevent OpenGApps TV-Stock from overwriting my working "TV-NoTouchGsf.apk" which is "NoTouchAuthentication". However as I preformed all these commands from within TWRP (after installing TV-Stock) it's possible running them on a live system BEFORE installing TV-Stock may change some minor things.

If you continue having issues either initially registering with Google Play ("Spinning Circle of Doom") or have issues with Google Play actually installing Applications, please try to reinstall my attached working copy of NoTouchAuth (TV-NoTouchGsf.apk) with the following commands and again please let me know if this fixes your issues.

Code:
shell@firetv:/ $ su
root@firetv:/ # mount -o rw,remount /system
root@firetv:/ # mkdir /system/app/NoTouchAuthDelegate/ && chmod 755 /system/app/NoTouchAuthDelegate/
root@firetv:/ # cp /sdcard/PlayFire/TV-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
root@firetv:/ # chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk

Expected output from "correct" NoTouchAuthDelegate being installed:
Code:
root@bueller:/ # ls -la /system/app/NoTouchAuthDelegate
-rw-r--r-- root     root      5935368 2017-06-23 18:48 NoTouchAuthDelegate.apk

After fixing both these items, reboot and let me know if that squashes the bug. Also please keep an eye on this thread, the RESERVED post is going to be updated shortly (tomorrow most likely) with the final bits of this guide including the full instructions for configuring Xposed Edge and (my favorite part of guide) using Amazon's own Blacklist technology against the Amazon System itself. For now I just wanted to get the initial steps of the guide posted and make sure it worked (kinda) before moving on to the next steps.

Finally if you dont mind can you please attach a copy of your open_gapps_logs.txt file and let me know which model (AFTV1, AFTV2, AFTV-Stick) you've run my MOD on, along with the output from the following command so I can get a sense of the free space in /system on other devices (if you dont have a FireTV-v1 like myself).
Code:
root@firetv:/ # df -h /*
 
  • Like
Reactions: blue1978

peleg

Member
Oct 28, 2016
46
37
Wow , really love your work and how you take it forward. Your guide is accurate and detailed. Let me know if you need some help regarding to tvsetting.apk or you if you like to get its source code. This post can be officially continues to AFTV2ATV project! And much more . Next step can be to make a recovery zip file of all those installations for noobies that would like to experience the mod without involving all those configurations.

peleg.
 
  • Like
Reactions: Kramar111

Axecaster

Senior Member
Jan 23, 2011
115
13
Fantastic work. I hope to apply this to an AFTV-Stick once the snags get smoothed over.
 

talltree

Member
Feb 20, 2010
15
3
Glad to help, the project is really cool. I have a firetv1 5.4.2.1. Yeah sorry just the data/data files did extract correctly just was the data/app folder that was off. I ran the commands and rebooted, I still cannot install anything from play store it just gets stuck on "Install Pending." Any suggestions for this? As for the button mapping. Strangely when I rebooted the first time that mappings worked but then I rebooted again to see if they would stay and it went back to default amazon mappings which is what I was experiencing before. Anything else you want me too look at?

Here are the results of what you wanted:

Code:
root@bueller:/ # df -h /*
Filesystem               Size     Used     Free   Blksize
-h: No such file or directory
/acct                    0.0K     0.0K     0.0K   4096
/cache                 755.2M   214.7M   540.5M   4096
/charger                 0.0K     0.0K     0.0K   4096
/config                  0.0K     0.0K     0.0K   4096
/d                       0.0K     0.0K     0.0K   4096
/data                    5.6G     2.0G     3.5G   4096
/default.prop            0.0K     0.0K     0.0K   4096
/dev                   973.3M    64.0K   973.3M   4096
/etc                   755.2M   741.5M    13.7M   4096
/file_contexts           0.0K     0.0K     0.0K   4096
/firmware               64.0M     7.9M    56.0M   16384
/fstab.qcom              0.0K     0.0K     0.0K   4096
/init                    0.0K     0.0K     0.0K   4096
/init.base.rc            0.0K     0.0K     0.0K   4096
/init.build.rc           0.0K     0.0K     0.0K   4096
/init.class_main.sh      0.0K     0.0K     0.0K   4096
/init.environ.rc         0.0K     0.0K     0.0K   4096
/init.qcom.class_core.sh     0.0K     0.0K     0.0K   4096
/init.qcom.early_boot.sh     0.0K     0.0K     0.0K   4096
/init.qcom.rc            0.0K     0.0K     0.0K   4096
/init.qcom.sh            0.0K     0.0K     0.0K   4096
/init.qcom.syspart_fixup.sh     0.0K     0.0K     0.0K   4096
/init.qcom.usb.rc        0.0K     0.0K     0.0K   4096
/init.qcom.usb.sh        0.0K     0.0K     0.0K   4096
/init.rc                 0.0K     0.0K     0.0K   4096
/init.target.rc          0.0K     0.0K     0.0K   4096
/init.trace.rc           0.0K     0.0K     0.0K   4096
/init.usb.rc             0.0K     0.0K     0.0K   4096
/init.zygote32.rc        0.0K     0.0K     0.0K   4096
/mnt                     0.0K     0.0K     0.0K   4096
/ota.sh                  0.0K     0.0K     0.0K   4096
/ozwpan.sh               0.0K     0.0K     0.0K   4096
/persist                 7.8M     4.3M     3.5M   4096
/proc                    0.0K     0.0K     0.0K   4096
/property_contexts       0.0K     0.0K     0.0K   4096
/root                    0.0K     0.0K     0.0K   4096
/sbin                    0.0K     0.0K     0.0K   4096
/sdcard                  5.6G     2.0G     3.5G   4096
/seapp_contexts          0.0K     0.0K     0.0K   4096
/selinux_version         0.0K     0.0K     0.0K   4096
/sepolicy                0.0K     0.0K     0.0K   4096
/service_contexts        0.0K     0.0K     0.0K   4096
/set_eth_mac.sh          0.0K     0.0K     0.0K   4096
/storage                 0.0K     0.0K     0.0K   4096
/sys                     0.0K     0.0K     0.0K   4096
/system                755.2M   741.5M    13.7M   4096
/tmp-mksh                0.0K     0.0K     0.0K   4096
/tombstones              5.6G     2.0G     3.5G   4096
/ueventd.qcom.rc         0.0K     0.0K     0.0K   4096
/ueventd.rc              0.0K     0.0K     0.0K   4096
/usbdisk                 0.0K     0.0K     0.0K   4096
/vendor                755.2M   741.5M    13.7M   4096

Thanks a million!
 

Attachments

  • open_gapps_log.txt
    4.8 KB · Views: 87

SimLynks

Senior Member
Sep 30, 2016
69
133
NYC
Fantastic work. I hope to apply this to an AFTV-Stick once the snags get smoothed over.

Axecaster, thanks for the interest, but if you want to help get this moving along for the FireTV-Sticks I need you to get me some information.

I might ask some "obvious" questions, but want to double-check any of my assumptions are correct.

1) What device (FireTV-Stick v1 / FireTV-Stick v2)
2) What version of the RBox ROM are you running?
3) Have you previously installed Google Play anything into your System Partition? (Need to know this so I know if the next command is of a "fresh" system, or one that already has some space taken up by other applications outside of the Stock AmazonTV stuff.
4) Need you to run the following commands and please attach the output##.txt files (trying to avoid this thread becoming a giant wall of debug info, these are the same type of commands I had talltree run, just stuffing the output into a txt file for connivence for me).

Code:
shell@firetv:/ $ su
root@firetv:/ # df -h /* > /sdcard/FireStick-outputDF.txt
5) Finally I also would like to see the results from this "new" command again so I can determine the potential amount of free space in a Stick's System Partition
Code:
shell@firetv:/ $ su
root@firetv:/ # (du -h /system/priv-app && du -h /system/app)  > /sdcard/FireStick-outputDU.txt


Anything else you want me too look at?

Thanks again for helping me out with this! Not sure what's causing your issues but would like to see the same info Im asking for from Axecastor so I can compare the output to my own (working) system and try to figure out how to resolve your issues. Please run the following and attach the resulting output so I can analyze it.

Code:
shell@firetv:/ $ su
root@firetv:/ # (du -h /system/priv-app && du -h /system/app)  > /sdcard/FireTV1-outputDU.txt
root@firetv:/ # ls -laR /system  > /sdcard/FireTV1-outputLS.txt
 

Axecaster

Senior Member
Jan 23, 2011
115
13
Axecaster, thanks for the interest, but if you want to help get this moving along for the FireTV-Sticks I need you to get me some information.

I might ask some "obvious" questions, but want to double-check any of my assumptions are correct.

1) What device (FireTV-Stick v1 / FireTV-Stick v2)
2) What version of the RBox ROM are you running?
3) Have you previously installed Google Play anything into your System Partition? (Need to know this so I know if the next command is of a "fresh" system, or one that already has some space taken up by other applications outside of the Stock AmazonTV stuff.
4) Need you to run the following commands and please attach the output##.txt files (trying to avoid this thread becoming a giant wall of debug info, these are the same type of commands I had talltree run, just stuffing the output into a txt file for connivence for me).

Code:
shell@firetv:/ $ su
root@firetv:/ # df -h /* > /sdcard/FireStick-outputDF.txt
5) Finally I also would like to see the results from this "new" command again so I can determine the potential amount of free space in a Stick's System Partition
Code:
shell@firetv:/ $ su
root@firetv:/ # (du -h /system/priv-app && du -h /system/app)  > /sdcard/FireStick-outputDU.txt

1) Gen 1 stick
2) Prerooted 5.2.4.1 (Never beyond stock 5.0.5)
3) No Google Play attempts yet for this specific install/stick. Xposed framework is already flashed and a few modules installed to access and update the built-in supersu binary.
4) attached
5) attached
 

Attachments

  • FireStick-outputDF.txt
    2.5 KB · Views: 104
  • FireStick-outputDU.txt
    8.3 KB · Views: 89

SimLynks

Senior Member
Sep 30, 2016
69
133
NYC
1) Gen 1 stick
2) Prerooted 5.2.4.1 (Never beyond stock 5.0.5)
3) No Google Play attempts yet for this specific install/stick. Xposed framework is already flashed and a few modules installed to access and update the built-in supersu binary.
4) attached
5) attached

Awesome, thanks for that info Axecaster. Turns out (much to my surprise) that the FireStick-v1 actually has more space in the /system partition than even my FireTV-v1 does. Everything in my guide is written to be "cross-device compatible" so you should be able to use the same info as everyone else.

I have uploaded a new "PlayFire_v2.tar.gz" archive with an updated and fixed gapps-config.txt (that's actually in TEST MODE this time) and have corrected the Xposed Edge extract and permissions commands to what I believe should fix the issues @talltree was experiencing. Also because you HAVE NOT previously installed any Play Services your actually in the best possible position for this to work correctly as when I was testing this MOD I was constantly wiping my entire box to keep starting off from a fresh slate (as you are). Any Xposed modules you have already installed should have no effect as those are not installed into your system partition anyway.

If you would like to try out this mod, you should now be good to go. Please let me know how it turns out if you take the plunge! Also if your feeling adventurous you could even use gapps-config to install some items I cannot on a FireTV-v1 due to space limitations in /system. I'd recommend Play Music as that one seems to always update to a non-leanback version (and not just on FireTV people all over even with official AndroidTV boxes are running into that issue). All the other Leanback apps can easily be installed through the Play Store once that is working.

Good luck and let me know how it goes.

EDIT: One last tip. If after you've installed the MOD you have ANY issues either registering with Google Play and/or Installing Apps from Google Play, install the working copy of "TV-NoTouchGsf.apk" i've included. After digging through some of the logs I've been sent from talltree it appears the OpenGApps TV-Stock installer is ignoring my instruction to leave the working NoTouchAuth package alone and may be overwriting it. Even just to be on the safe side once you've completed everything and gotten TV-Stock to install without issue, just overwrite whatever NoTouchAuth exists with my known working good copy, then reboot and profit!
 
Last edited:

puppinoo

Senior Member
Jun 14, 2008
183
35
Really impressive.
Any chance to have a Complete modified / rooted image ready to flash using twrp? (I know I'm lazy but I think it's the logical solutioin once stuff is working fine).

Regards and thanks for your work.
 

AFTVnews.com

Senior Member
Jul 22, 2014
487
371
www.AFTVnews.com
Very interesting stuff! I look forward to playing with it soon. @SimLynks please enable your XDA donation option or provide a donation link so I can ask people to throw money at you if I write my own guide for this.
 

SimLynks

Senior Member
Sep 30, 2016
69
133
NYC
So if I'm understanding correctly this is for FireTV box not stick, right?

No, this should work on any FireTV (FireTV1, FireTV2, FireTV-Stick) you just need to be rooted already.

From the info Axecastor has provided me, the FireTV-Stick on v5.4.2.1 actually has MORE free space than my FireTV-v1 box so can even try to install some more things into system than I currently can.
 

talltree

Member
Feb 20, 2010
15
3
Thanks again for helping me out with this! Not sure what's causing your issues but would like to see the same info Im asking for from Axecastor so I can compare the output to my own (working) system and try to figure out how to resolve your issues. Please run the following and attach the resulting output so I can analyze it.

Code:
shell@firetv:/ $ su
root@firetv:/ # (du -h /system/priv-app && du -h /system/app)  > /sdcard/FireTV1-outputDU.txt
root@firetv:/ # ls -laR /system  > /sdcard/FireTV1-outputLS.txt

Attached is the result of those commands. Thanks!
 

Attachments

  • FireTV1-outputDU.txt
    9.3 KB · Views: 29
  • FireTV1-outputLS.txt
    189.2 KB · Views: 21

nightfireblaze8

Senior Member
Jul 27, 2013
240
77
This looks amazing! Since the FireTV Stick 2nd Gen can't be rooted on any firmware, it would never work on it, right?
 

SimLynks

Senior Member
Sep 30, 2016
69
133
NYC
Attached is the result of those commands. Thanks!

So the good part is that from what I can tell going through your logs, you appear to have done everything correctly, all files appear to be in place and with the proper permissions set. The not so good part is the possible issue I thought might be causing your Play Store issue cannot be the reason, as all the necessary libraries are the same as what I have on my system...

I have two suggestions for you to finally resolve the issue. One is going to be a bit of a pain the other relatively painless, so I'd recommend the painless one first, if that does not resolve your issue, then the annoying option definitely will do the trick.

Painless Option: As you mentioned you originally had issues registering with the Play Store im thinking that maybe something wonky is going on when the Play Services is trying to authenticate your account to permit the installs. To (hopefully) resolve this just go into the Android-TvSettings from the Leanback Launcher, and completely delete your Google Account. After you have deleted the Google Account reboot into TWRP, clear your Cache & Dalvik Cache and reboot. Once the system has rebooted, open Play Store and sign back into your account and try to install something. If at this point you keep running into the same issue, please run the following logcat command (you will not see any output, it's being placed into a text file) and while logcat is running try to install a different app, then another and another for about 5 minutes. Once that has been done I should be able to pinpoint in your logs whatever is causing the issue but hopefully we wont need to get to that part anyway, as signing out, clearing the cache and reboot will fix the issue.

Code:
~$ adb connect "YOUR IP" 
shell@firetv:/ $ exit 
~$ adb logcat > ~/FireTV1-TvStoreLOG.txt

Painful Option: Im 95% certain this option WILL fix your issue, but is going to be a bit of a pain admittedly. This option is 1) Reboot to TWRP and Wipe your System Partition. 2) After you wipe system DO NOT REBOOT UNTILL YOU HAVE REINSTALLED RBOX's PREROOTED ROM. I can not stress that last part enough, if you reboot after the wipe but before you reinstall Rbox's ROM you will not be happy and will end up with a brick at worst, definitely loosing root access at best. To do this you'll want to have the RBox Prerooted ROM already moved onto USB or somewhere else in the filesystem. On the bright side if you ONLY WIPE SYSTEM, all your "normal" apps and settings will be intact in your data partition, so you wont need to redoing everything. You will however need to rerun all my commands to install the components from this MOD as all those changes (except Xposed Edge) are writting into /system.

Finally addressing your Xposed Edge Issue: I have updated (again) the XposedEdge extract and permissions commands. Please totally clear all data from Xposed Edge while still installed from the Amazon App Management Interface (including Cache and Data), then totally uninstall Xposed Edge. After you have done this, then reinstall XPosed Edge using the updated commands from the first post of this thread.

As always please let me know if you have any further issues (and attach the logcat if the above does not resolve your Play Store issue), and thanks again for all your input and testing thus far. As you've been quite helpful please feel free to PM me if you continue to have any issues so I can work with you personally and work to fix the remaining problems you seem to be experiencing.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 50
    [TOTAL MOD] Playing With Fire (v4) NEW "LazyLeanback" Installer - AndroidTV on FireTV

    This is not another "How-To install GApps on FireTV Thread"
    Instead these heavy system modifications will finally allow you to completely control almost every aspect of the FireTV, including:

    • OpenGApps TV-Stock with almost all the main Android TV components working (Live Channels + USB Tuner, Leanback Launcher + Keyboard, Etc)
    • Button / Keycode Remapping + Change Default Launcher, Switch Keyboard IME, Access SuperSU Settings
    • Running Application View + Task Switcher, Foreground/Background Task Killers, Customizable On-Screen Shortcuts to Anything on the System
    • Access BOTH the Stock Amazon Settings Menu AND the Google Android TV Settings Menu at the Same Time (No signature spoofing either!)
    • Run and Install Apps from either the Google Play (Leanback-AndroidTV) Store OR the Official Amazon App Store
    • Automatic Updates to Google Play Services / Play Store / Play installed apps without issues thanks to minor build.prop tweaks
    • and finally Disabling / Using Amazon's own Blacklist against the various components of the Stock FireTV system that you want disabled.
    • Compatibility: Tested on AFTV-v1 running RBox v5.2.4.1 (r1 & r2) but as long as you have root you should be good to go
    • Confirmed working: on FireTV-v1 & FireStick-v1 & FireTV-v2, expected to work on FireStick-v2 once there is root.

    UPDATE: v4 "LazyLeanback" -
    I am now including two almost totally automated installer scripts for the newest v4 release of Playing with Fire. This NOT ONLY includes two bash scripts that automatically do almost everything for you with getting this installed, but also now includes a working "Updater script" that will stay with the ROM in the /system/addon.d/ folder, and allows you to flash the latest rbox releases over your current software without interfering with this MOD, SuperSU or Xposed Framework which will now all automatically get backed up and then put back into place properly once the new ROM is done installing! I have successfully tested this by wiping my entire system and reinstalling, using the LazyLeanback script to install the MOD, and then flashed the latest rbox [v5.2.4.1_r2] over my previous 5.2.4.1_r1 software. Everything worked and I was up and running on r2 without needing to rerun any MOD commands

    As should be expected with such major modifications to basically every aspect of the FireTV System, this is 100% IMPOSSIBLE WITHOUT ROOT + XPOSED + BUILD.PROP MODIFICATIONS + SYSTEM PARTITION CHANGES + PATIENCE AND CAREFUL READING OF ALL INSTRUCTIONS. This Mod is not called "Playing with Fire" for no reason, your literally holding your FireTV's life in your hands, if you don't pay attention YOU WILL GET BURNED! Therefore if anyone asks stupid questions like "can I haz Leanfire TV on my Stick now plz?" you will be laughed at and ignored if not worse.

    Screenshots from Completed Mod:
    xeCCXkE.jpg

    Full Gallery of Completed MOD Screenshots: https://imgur.com/a/3lucP

    Installation Instructions:

    1. Step One: Required Files - Download the following files. For some of these I will have listed two versions (ARM) and (ARM64) so make sure you pick the version that's appropriate for the architecture of your CPU. FireTV-v1 (ARM) & FireTV-v2 (ARM64). Additionally as my FireTV is running the latest release v5.4.2.1 I am using API22 binaries in this guide. Everything "should" still work if your running an older release, but you will need to get the API21 binaries if still on Lollipop 5.0. If you don't know what architecture / api level your FireTV is I suggest you do some research, as if you don't know that type of basic information, things can end up quite badly for your FireTV.

      PlayFire_v2.tar.gz - https://www.androidfilehost.com/?fid=817550096634783100
      Obsolete: Use ONLY for Manual Installation as of "v4_LazyLeanback" Contains my PlayFire-TvSettings.apk (modified from Peleg's AFTV2ATV Project) along with the other necessary "universal" files that will be pushed into your system partition.

      XposedInstaller_3.1.1.apk - https://forum.xda-developers.com/attachment.php?attachmentid=3921508&d=1477916609

      xposed-v87-sdk22-arm.zip - http://dl-xda.xposed.info/framework/sdk22/arm/xposed-v87-sdk22-arm.zip
      xposed-v87-sdk22-arm64.zip - http://dl-xda.xposed.info/framework/sdk22/arm64/xposed-v87-sdk22-arm64.zip

      HDXPosed-1.3.apk - https://forum.xda-developers.com/attachment.php?attachmentid=4198322&stc=1&d=1503094312 Created by rbox

      Busybox-(Meefik) - This is my personal preference for Busybox installers, but you can use whichever installer you like. I have also included the TWRP Flashable ZIP which was generated from within the installed APK. Either version will work just fine, so pick whichever you find easier to install.

      Busybox-(Meefik)-v1.27.1 (Updated August 8th, 2017) (APK Installer): https://github.com/meefik/busybox/releases/download/1.27.1/busybox-1.27.1-33.apk
      Busybox-(Meefik)-v1.27.1 (TWRP Flashable ZIP): https://forum.xda-developers.com/attachment.php?attachmentid=4245669&stc=1&d=1503094312

      Chainfire's SuperSU-v2.82-20170528234214 - https://download.chainfire.eu/1113/SuperSU/UPDATE-SuperSU-v2.82-20170528234214.zip

      MAKE SURE YOU USE THIS SuperSU v2.82-20170528234214 and NOT THE CCMT version. One of the recent SuperSU-CCMT releases had a bug that resulted in device crashes and loosing root access when updating the binary. Also as this SuperSU is a Chainfire release, it's signed with a different key than the "official" CCMT versions so it will not show up in Play Store updates once everything has been installed. You can still flash the latest CCMT in TWRP at a later date if you want but it's not going to update automatically if installed using the Chainfire release posted above.

      Note: As OpenGApps is built fresh every day it's possible a future update may break something. If you have issues with the current release, then go ahead and download the Old "Known Good" release posted below. You can always upgrade GApps by re-running the ZIP installer with a later build that hopefully fixes your issue.

      TV-Stock (ARM):
      Current Release (Make sure you download the MD5 along with the ZIP)
      http://opengapps.org/?download=true&arch=arm&api=5.1&variant=tvstock

      Known Working (Old Release)
      https://github.com/opengapps/arm/releases/download/20170202/open_gapps-arm-5.1-tvstock-20170202.zip
      https://github.com/opengapps/arm/re...2/open_gapps-arm-5.1-tvstock-20170202.zip.md5
      https://github.com/opengapps/arm/re...gapps-arm-5.1-tvstock-20170202.versionlog.txt

      TV-Stock (ARM64):
      Current Release (Make sure you download the MD5 along with the ZIP)
      http://opengapps.org/?download=true&arch=arm64&api=5.1&variant=tvstock

      Known Working (Old Release)
      https://github.com/opengapps/arm64/...202/open_gapps-arm64-5.1-tvstock-20170202.zip
      https://github.com/opengapps/arm64/...open_gapps-arm64-5.1-tvstock-20170202.zip.md5
      https://github.com/opengapps/arm64/...pps-arm64-5.1-tvstock-20170202.versionlog.txt

    2. Step Two: Running the "LazyLeanback" Installation Scripts - New improvements as of "v4_LazyLeanback" are the Installation Scripts themselves as well as a brand new "addon.d" Updater script which allows ROM flashing without damaging the MOD installation, even through software upgrades. Both improvements are included in the "PlayFire" archive attached to this post. I have also removed the gapps-config.txt & Xposed Edge Config from the "PlayFire" archive so I can customize it for a different needs I've seen mentioned, now one version defaults to Leanback Launcher, and the other version Defaults to the Stock Amazon Launcher, you can pick whichever you'd like.

      WARNING: While I did test all of this on my own system, and was successfully able to use the scripts to install everything from this MOD's guide AND THEN FLASH THE LATEST RBOX r2 RELEASE WITHOUT NEEDING TO RERUN ANY MOD CONFIGURATION, the LAZYLEANBACK SCRIPTS should STILL BE CONSIDERED "ALPHA-RELEASE" SOFTWARE AND SHOULD NOT (YET) BE FULLY TRUSTED OR RUN BY THOSE WHO DO NOT AT LEAST KNOW THE BASICS ON HOW TO RECOVER FROM UNEXPECTED ERRORS WHEN INSTALLING MODIFICATIONS. Also even if my scripts do work on getting everything installed quickly, they are definitely quite "ugly" (you might see some errors or other weirdness when running them) but they DO work, just ignore the minor errors that may pop up. It will be ironed out once I get a chance to get back to this.

      You have been warned and I am (still) in no way responsible for any bricks that may occur from improper use of these instructions or badly written scripts.

      A VERY very brief run through of EVERYTHING you need to install this MOD is now simply the following:
      • 1) Download the required files listed above (and now including the separate Xposed Edge Configs and gapps-config.txt files)
      • 2) Download the new "PlayFire_v4_LazyLeanback.tar.gz" archive and MOVE EVERYTHING TO THE ROOT OF YOUR SD CARD
      • 3) Rename whichever version of the gapps-config file you want to use to EXACTLY "gapps-config.txt" and place it in /sdcard/gapps-config.txt
      • 4) Connect to your device's ADB terminal and run the following commands. NOTE: You MUST Install the Busybox.apk then open the app and install the Busybox Binary BEFORE YOU RUN the LazyLeanback Scripts, or everything may APPEAR TO INSTALL OK, BUT YOU WILL BE MISSING A CRITICAL step that allows OpenGApps TV-Stock to fully install all required libraries properly.
        Code:
        tar -xzvf /sdcard/PlayFire_v4_LazyLeanback.tar.gz
      • 5) MAKE SURE YOU GO TO A ROOT SHELL AND ONLY ONCE YOU ARE ROOT RUN THE LAZYLEANBACK SCRIPTS
        Code:
        sh /sdcard/PlayFire/LazyLeanback.sh
      • 6) THATS IT, YOU'VE INSTALLED ALL THE HARD PARTS OF THE MOD AT THIS POINT. You still need to reboot into TWRP to install the Updated SuperSU-v2.82 (if you hadn't already) along with Xposed v87 and finally OpenGApps itself. Once you've successfully installed OpenGApps reboot into the system and run the next FINAL command AGAIN FROM A ROOT SHELL (OR IT WILL NOT WORK)
        Code:
        sh /sdcard/PlayFire/LazyNoTouch.sh
      • 7) Go into Xposed and enable Xposed Edge, Then reboot (again) and go into Xposed Edge and Enable "Keys"
      • 8) YOU ARE DONE, ENJOY!.
        After all this you can finally go ahead and log into the Google Play TV (Leanback) Store, should have button mapping configured and can start my Blacklisting procedure.

      However please note that the TV-Stock GApps package is quite large even when many of the useless packages are being ignored via my custom "gapps-config.txt" file which directs the GApps installer and tells it specifically what to install and what to ignore[/B]. For example on my FireTV-v1 after doing a total wipe of System, Data, Internal, Dalvik/Cache, then reinstalling RBox's Prerooted Rom, I only had about 140MB of free space in my /system partition. That's why I have left my gapps-config.txt file in the "Test" mode, so you can attempt to run the TV-Stock installer without it actually writing any files (yet) so you know if you will have enough space in your system partition. NOTE: As my custom gapps-config.txt comes with the TEST option set, you must modify this file with the "sed" command below (or manually edit the file by commenting out the #TEST line) for TV-Stock Installer to actually run in “real-mode” and not "test-mode".

      Now go ahead and do a test-run of the TV-Stock installer. If it finishes without throwing “Error Code: 70 = insufficient storage” your good-to-go for the real-install once you comment out the TEST option. IF you DO get Error Code: 70 run the following line in terminal to view the TV-Stock Installer Logs and Determine what you want to do to free up some space. If you don't get any errors run the Completed Without Errors line.

      Code:
      Test-Run Error Code: 70
      shell@firetv:/ $ cat /sdcard/open_gapps_log.txt

      Code:
      Test-Run Completed Without Errors
      shell@firetv:/ $ sed -i -e 's|^Test|# Test|' /sdcard/gapps-config.txt

      HOWEVER EVEN IF YOU GET NO ERROR CODES ON THE TV-STOCK TEST RUN YOU MUST STILL CHECK THE LOGS TO CONFIRM YOUR FIRETV WAS DETECTED AS “TV” AND NOT “PHONE”. IF YOU DO NOT CHECK THIS, AND YOU HAVE NOT PROPERLY MODIFIED YOUR BUILD.PROP TV-STOCK WILL DETECT A “PHONE INSTALL” AND WILL NOT INSTALL ALL NECESSARY LIBRARIES FOR THE ANDROID-TV (LEANBACK) FUNCTIONS TO WORK!

      Code:
      Device Model | AFTB
      Device Type | tv

      And at long last, with all these steps completed you should get TV-Stock to install successfully!

      Enable Button Remapping via "Keys" in Xposed Edge & Editing the Xposed Edge Custom Configuration:
      Home Button Single Press = Leanback Launcher (Home)
      Home Button Double Press = Running Apps List Overlay + Task Switcher
      Home Button Long Press = On-Screen Menu Options
      Back Button Long Press = Kill foreground app
      Menu Button Long Press = Installed Applications Drawer Overlay + App Launcher
      Voice (Search) Button Single Press = Google Search (Katniss)
      Voice (Search) Button Long Press = TV Voice Input

      These settings along with all other custom button mappings can be edited within the Xposed Edge application. Please see the excellent guide @Y314K has put together (with detailed pictures) for some tips on how to configure more advanced features of this module. You also must ENABLE the "Xposed Edge" module within Xposed AND THEN ENABLE "Keys" from within the main Xposed Edge settings menu before all these configuration options will take effect. Please see Y314K's guide listed above for specific instructions on how to enable the REQUIRED "Keys" setting within Xposed Edge so that the button remapping gets activated.

    Known Issues:

    • Leanback Launcher Auto-Start: In order for Leanback Launcher to start automatically upon boot of the system you MUST first disable the default FireTV Launcher "com.amazon.tv.launcher". You can run "pm disable com.amazon.tv.launcher" or follow the steps from post #2 in this thread about how I configure the Amazon Blacklist. Once Xposed Edge is enabled, you can still run the default Launcher (even when it's frozen) through the on-screen menu.
    • No recommendations loading: is a known issue caused by Amazon's "com.amazon.device.sale.service" package. You must disable this either through my method from the 2nd post in this thread or the "traditional" way of "pm disable com.amazon.device.sale.service". Recommendations will only load once you've installed some official "leanback" apps from the Play Store and have run them at least once (and in the case of CableTV apps like FoxNow, ABC, NBC, etc logged in with your network provider)
    • Enabling Xposed Modules without a mouse: I highly recommend Vysor it's most importantly free, and it connects to your device through ADB and mirrors your device display on your computer and therefore allows you to use the mouse on your computer to manipulate your device, and click those check boxes.
    • Chromecast Receiver: Is problematic for a few reasons, A) is at least on my FireTV-v1 there's not enough space in the /system partition to install it as a system app, so I have installed it as a user-app through the Play Store once everything else is working. Issue B) is that NO ONE (at least from the research i've been doing into this) has yet figured out how to properly spoof the proper Google Identification check that the Chromecast Receiver is doing before allowing you to Cast to a TV Box. Over at FreakTab another developer listed the problem as "Cast service can't get a Cast device cert through ClientAuthSigner" but this is something I am also going to try and look into and would very much like to get working, so definitely a work in progress even if I don't really know how feasible it is to expect this functional anytime soon.
    • Google Voice Search: Google Search on the other hand is semi-working and my custom Xposed Edge configuration already contains a button remap of the Search button to the Google Search app instead of the default Amazon Voice Interface. The text-based search part of this works flawlessly, but I seem to run into an issue when trying to actually use the Voice control part at which point the app throws an error about "Not able to connect to Google at this time". I am also working on trying to figure this out, but it's exponentially more likely to be working in the near future than the Chromecast Receiver functions.
    • Google Play Store Apps with Known Issues and/or Root Verification Checks : Currently I am aware of two apps that if installed via Google Play Store WILL NOT WORK on the FireTV, these are Netflix (which is publicly known to be blocking access on rooted devices) and the Showtime App. However as of July 5th, 2017 both these apps works without ANY issues if simply installed from the Amazon AppStore, giving users of the Playing with Fire MOD the best of both worlds. Install any app you can from Google Play (to get more frequent updates & features), but be able to revert to using Amazon AppStore apps when the Play Version does not work, or in the case of many TV:Go apps which do not currently exist in the Play Store at all, but are available on FireTV devices (Includes but is not limited to: USA Network, TruTV, Science Channel, Discovery Channel, ID Network, Animal Planet, TLC Network, among others like "Local NOW" which is actually a LiveStream of the Weather Channel if you can log in with the appropriate CableTV Network Credentials)

    Excuse me if this is a dumb question (it probably is), but I'm not too versed in the current state of the modding scene for the FTV devices. From what I've seen, TWRP for the FTV devices is available, so what's stopping you guys from creating a flashable image from a TWRP backup? (I know it's possible on regular Android)

    A combination of technical, legal and logistical problems. This mod should work on all FireTV devices (I think, confirmation on AFTV1 + Stick1, still waiting on FireTV2 + Stick2) but I only have a FireTV-v1, my TWRP image would most likely brick any other type of FireTV device.

    There are also legal / licensing issues to contend with, particularly concerning the OpenGApps packages, but also the modified copy of "PlayFire-TvSettings.apk" (which I had to ask @peleg for permission to distribute which he kindly agreed to), and also the Xposed Edge + Custom Config (which I have PM'd @jozein about but have not gotten a reply yet) among others. Even something as ubiquitous as SuperSU is not a open source package, you must get permission from Chainfire / CCMT before you may include it in a Custom ROM. The way this MOD is currently setup I am only directly distributing the minimal amount of files I need to, everything else is being obtained by the end-user through the official channels and in the way the package owners have specified.

    CHANGELOG:
    • June 30th, 2017 (v1): Initial post introducing this MOD and exploring the capabilities that can be added to the FireTV through the Xposed Edge Module
    • July 2nd, 2017 (v2): Updated "PlayFire_v2.tar.gz" archive with a fixed gapps-config.txt and corrected some errors that were included in the initial commands
    • July 6th, 2017 (v3): Confirm MOD is working on AFTV1, AFTV2, and FTV-Stick1. Replace original build.prop edit method with new and improved sed/grep commands, update formatting of the MOD guide and add in final details on how to install and configure everything that is required for this MOD to work successfully
    • July 8th, 2017 (v4_LazyLeanback): Updated "PlayFire_v4_LazyLeanback.tar.gz" archive has been uploaded which contains NEW Auto-Installer Shell Scripts. Also as of v4_LazyLeanback the Playing with Fire MOD also includes a addon.d Updater script which allows you to flash the latest Rbox releases over your current software WITHOUT THEN NEEDING TO RE-RUN ANY MOD COMMANDS

    CREDITS:
    @peleg for the TvSettings.apk compatible with FireTV and AFTV2ATV Project which inspired this MOD
    @rbox for the Prerooted FireTV ROMs and HDXPosed Module without which all this would be impossible
    @jozein for the excellent Xposed Edge Module which provides almost 50% of the added features missing from the Stock AmazonTV Interface
    @stangri for the contribution of the "sed" commands to edit build.prop directly through terminal

    Shoutouts:
    @talltree for being the first person brave enough to try this out on any device, and for his patience in helping me discover and fix a few initial flaws that were in the guide.
    @tmtprsn and @stangri for confirming a working MOD on FireStick-v1
    @f1ux for confirming a working MOD on FireTV-v2
    @dewa710 for helping me track down the cause and resolution to the "spinning circle of doom" issue caused by TV-Stock overwriting NoTouchAuth
    20
    Blacklist Configuration: There are many ways in which you can disable the parts of the Stock AmazonTV system you do not want to have running, but I believe my new method is far superior as it uses Amazon's own blacklist technology against itself (which I just find incredibly funny) AND by disabling the components in this manner, every single time you reboot the system, the components will automatically get re-disabled if you happened to enable some function for whatever reason.

    Amazon has the potential to use two different systems to "blacklist" certain things. These are "com.amazon.tv.nimh" (Not in my House) and the "com.amazon.tv.settings.tv.AppDisableService" which is currently being used to explictly block (and "soft-disable") the following applications: FiredTV-Launcher, FireStarter, and OnbootKodi. Both blacklisters are explained in depth over at AFTVNews (http://www.aftvnews.com/tag/blacklist/).

    If you have followed my entire guide to this point the first blacklist I mentioned "com.amazon.tv.nimh" (Not in my House) has already been totally deleted from your system partition during the OpenGApps TV-Stock installation. I explicitly call this library out in my custom gapps-config.txt file and instruct the TV-Stock installer to delete all it's files. I do this because A) no one knows exactly what this component is capable of once Amazon decides to enable it's functions, and B) It currently has zero negative effect on a running FireTV system, so I fully remove it to prevent any future issues it may cause once Amazon decides to enable it's unknown functions.

    The next blacklist included with Stock FireTV systems is the "com.amazon.tv.settings.tv.AppDisableService" which quite simply is a text database listing certain packages Amazon has decided it does not like, and these packages are forcibly "frozen" (aka "soft-disabled") upon boot of the system. Over at AFTVNews they already have great instructions on how to totally disable this functionality and re-enable the blocked apps, but I am going to show you how to use Amazon's AppDisableService to disable Amazon system components instead of the Apps Amazon does not like. This way instead of totally stopping AppDisableService, we remove the Amazon specified apps, and add in Amazon System components that will then automatically be frozen upon boot of the system.

    To do this you need to launch the Amazon Settings On-Screen Menu I have included in my Xposed Edge configuration. To access this 1) Hold the Home Button until the On-Screen Menu Appears, 2) Navigate one space to the right, and then one space down in the On-Screen Grid, this will be a box with a bunch of Amazon System apps in it. Once you select the AmazonApps square, navigate to the bottom right most square, and this will launch the Internal Amazon Settings Debug Menu. 3) You want the select the option that is a orange square with the "Amazon Fire" text in white.

    QOFjh9v.jpg


    Once you have selected the appropriate "Amazon Fire" Settings app from within my preconfigured On-Screen Menu, you will be presented with a Black Screen with a list of options. Scroll down to "com.amazon.tv.settings" and select this option. On the next black screen you will see a two columns, one labeled "Key" and another labeled "value". The only "Key" is DisableApps, while the value is the package names of FiredTV-Launcher, Firestarter, and OnbootKodi. Move your selector to the "Edit" button and go ahead and remove all three packages Amazon has included, and then add in whatever parts of the Amazon System you want disabled (i.e. anything you previously used pm disable on)

    I strongly suggest you use this Auto-PackageDisable feature to "soft-disable" the default AmazonFireTV Launcher "KFTV" so that the system will automatically boot into the Leanback Launcher. You can also disable any other Amazon System package, in my following example I also disable the blacklist technologies, KFTV Launcher, and Vizzini (Amazon's Voice Interface so that the Google Voice Interface can take over). My own "blacklist" includes the following, but you do not need to include everything I do, and can add additional packages I do not. My blacklist kills the Amazon OTA service, Amazon "Sale Service" which blocks the Leanback Launcher recommendations, and Amazon Voice Search among others.

    My personal blacklist includes:
    Code:
    "com.amazon.device.software.ota,com.amazon.device.software.ota.override,com.amazon.device.sale.service,com.amazon.tv.launcher,com.amazon.tv.nimh,com.amazon.vizzini"

    V5tnMZ3.png

    5Q65hbr.png


    Manual Installation Instructions: If you want to fully understand what this MOD is actually doing to your system the manual instructions give a much clearer picture of what is being modified and why to achieve a successful Leanback install on the FireTV. These instructions are obsolete as of v4_LazyLeanback but are being retained in the thread as extra information for any other hackers who may want to take this further


    Manual Installation - (Part One): Modifying Build.Prop

    NOTE: The beginning of the commands is actually an important indicator of "where" your supposed to be inputting the commands.

    ~$ = the shell or command prompt on YOUR computer. With FireTV Utility you may need to type "exit" to get back to a "computer shell"
    shell@firetv:/ $ = the shell on the FireTV device. The "firetv" part will change depending on your device name
    root@firetv:/ # = Notice how the last part in red changed from $ --> # this is the difference between a normal user shell and a "root shell"

    EDIT: @stangri has provided some terminal commands that expertly accomplish the necessary build.prop modifications without needing to follow my old instructions to pull the file off the device, edit it and then push it back to the filesystem. Thanks to this contribution we can now edit build.prop with the following commands, BUT YOU MUST HAVE BUSYBOX INSTALLED FOR THESE COMMANDS TO WORK. First off make sure your device is powered on and connected to your network and has ADB debugging enabled.

    EDIT: This is the OLD BUILD.PROP METHOD. You can use this but it will be much easier to use the "sed" commands above.

    There are a few different ways this step can be done so do whatever is easier for you. As my FireTV-v1 has a built-in Ethernet port + USB port I find it convenient to connect via ethernet, use the USB keyboard to enter recovery and then ADB into recovery and edit the build prop with the command-line text editor "vi". However only the FireTV-v1 makes doing it that way easy, and anyone who knows how to use vi can probably figure this part out on their own without any further instructions.

    For the rest of you on FireTV-v2 or FireTV-Sticks here's probably the easiest way for you to complete this step. First make sure your device is powered on and connected to your wifi network with ADB Debugging enabled.

    Code:
    ~$ adb connect "YOUR IP" 
    ~$ adb shell
    shell@firetv:/ $ exit

    Code:
    ~$ adb connect "YOUR IP" 
    ~$ adb pull /system/build.prop ~/

    If you get to a terminal prompt great, now type "exit". Now type "adb pull /system/build.prop/ ~/" this command should grab a copy of your build.prop and place it in your user's home directory. Now you need to edit the file using a good text editor (NOT Microsoft Word / WordPad / Any other "fancy" program that will add additional formatting, and wind up destroying the file). If on Windows I recommend NotePad++, if on any other operating system, you should be fine with the default text editor.

    NOTE: The first two lines are towards the top of of your build.prop file, while the last two lines should be the VERY BOTTOM. Also the first two lines already exist in the file and need to be modified, while the last two lines DO NOT already exist in your build.prop, you need to add them as the very last two lines.

    Code:
    ro.build.version.number=573210520 --> ro.build.version.number=987654321
    ro.build.characteristics=default --> ro.build.characteristics=tv
    ^ TOP
    BOTTOM ٧
    Code:
    ro.com.google.clientidbase=android-xiaomi-tv                              
    ro.com.google.gmsversion=5.1_r1_TV

    Once you have completed the required build.prop modifications, we need to push the edited file back into the FireTV's filesystem

    Code:
    ~$ adb connect "YOUR IP" 
    ~$ adb push ~/build.prop /sdcard/build.prop
    shell@firetv:/ $ su
    root@firetv:/ # cp /sdcard/build.prop /system/build.prop && chmod 644 /system/build.prop && chown root:root /system/build.prop

    Unfortunately each device's build.prop contains completely different information, and this can even change within the same device between different software versions, so I cannot post an example for this one, as it would be useless and dangerous if someone tried to use it on the wrong device / software version. But this modification is necessary, the "top" edits give the TV-Stock installer the correct information to know this is a TV Device (otherwise it will detect the FireTV as a "Phone" and skip installing some necessary libraries, while the bottom two lines allow the device to register correctly with the Play Store and prevents the issue a lot of us were having with updates to Google Play breaking things.

    Code:
    ~$ adb connect "YOUR IP" 
    ~$ adb shell
    shell@firetv:/ $ exit

    If you get to the "FireTV" terminal prompt great, now type "exit" and proceed to the next set of commands. If you dont get to the "FireTV" terminal you need to double check you have ADB debugging enabled and your device is in fact connected to the appropriate network.

    Code:
    ~$ adb shell
    shell@firetv:/ $ cp /system/build.prop /sdcard/default.prop
    shell@firetv:/ $ su
    root@firetv:/ # mount -o rw,remount /system
    root@firetv:/ # sed -i 's|ro.build.version.number=.*|ro.build.version.number=987654321|' /system/build.prop
    root@firetv:/ # sed -i 's|ro.build.characteristics=.*|ro.build.characteristics=tv|' /system/build.prop
    root@firetv:/ # ! grep -q "ro.com.google.clientidbase=android-xiaomi-tv" /system/build.prop && echo "ro.com.google.clientidbase=android-xiaomi-tv" >> /system/build.prop
    root@firetv:/ # ! grep -q "ro.com.google.gmsversion=5.1_r1_TV" /system/build.prop && echo "ro.com.google.gmsversion=5.1_r1_TV" >> /system/build.prop


    Manual Installation - (Part Two): Putting it all together - You should now have XposedInstaller.apk, XposedFramework.zip, HDXPosed-1.3.apk, SuperSU.zip, PlayFire.tar.gz, Busybox.apk or Busybox.zip TV-Stock.zip and TV-Stock.zip.md5 and a modified build.prop ready to go. Next you need to move all these files onto your device, and I am going to use the root of /sdcard/ and the /sdcard/PlayFire/ directory as defaults. You can use something else, but you will need to modify the following commands.

    Get your device up and running and load all the files you have downloaded into the root of your /sdcard/ partition. Once everything is on the root of your /sdcard/ run the following commands, and note that everything on a single line should be copy/pasted as one command.

    If running these commands from TWRP recovery, everything will already work as TWRP comes with busybox. If running this connected to adb on a running FireTV system you must install busybox prior to running these commands. Install the ZIP through TWRP then boot into the system or use the APK to install busybox into your /system partition.

    Code:
    ~$ adb connect "YOUR IP" 
    ~$ adb shell
    shell@firetv:/ $ pm install /sdcard/XposedInstaller_3.1.1.apk
    shell@firetv:/ $ pm install /sdcard/HDXPosed-1.3.apk
    shell@firetv:/ $ tar -xzvf /sdcard/PlayFire_v2.tar.gz
    shell@firetv:/ $ su
    root@firetv:/ # mount -o rw,remount /system
    Code:
    root@firetv:/ # cp /sdcard/PlayFire/tv_core_hardware.xml /system/etc/permissions/tv_core_hardware.xml && chmod 644 
    /system/etc/permissions/tv_core_hardware.xml && chown root:root /system/etc/permissions/tv_core_hardware.xml
    
    root@firetv:/ # cp /sdcard/PlayFire/whitelist.json /system/etc/whitelist.json && chmod 644 /system/etc/whitelist.json && chown root:root /system/etc/whitelist.json
    
    root@firetv:/ # tar -xzvpf /sdcard/PlayFire/XposedEdge-DataConfig.tar.gz -C / && (chown -R system:system /data/app/com.jozein.xedge-1 && chown -R root:root /data/data/com.jozein.xedge)
    Code:
    root@firetv:/ # mkdir /system/priv-app/TvSettings && chmod 755 /system/priv-app/TvSettings && cp /sdcard/PlayFire/PlayFire-TvSettings.apk /system/priv-app/TvSettings/TvSettings.apk && chmod 644 /system/priv-app/TvSettings/TvSettings.apk && chown root:root /system/priv-app/TvSettings/TvSettings.apk
    
    root@firetv:/ # mkdir /system/app/NoTouchAuthDelegate && chmod 755 /system/app/NoTouchAuthDelegate && cp /sdcard/PlayFire/TV-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
    
    root@firetv:/ # mv /sdcard/PlayFire/gapps-config.txt /sdcard/gapps-config.txt

    The next command is OPTIONAL, but it disables the Wifi-Direct broadcast "Fire-DIRECT-####" which I found useless and very annoying

    Code:
    root@firetv:/ # cp /sdcard/PlayFire/android.hardware.wifi.direct.xml /system/etc/permissions/android.hardware.wifi.direct.xml && chmod 644 /system/etc/permissions/android.hardware.wifi.direct.xml && chown root:root /system/etc/permissions/android.hardware.wifi.direct.xml

    Manual Installation - (Step Three): The Final Piece of the Puzzle - So the MAIN things that had been messing up installing TV-Stock GApps on FireTV or anything else for that matter is A) No one was editing the /system/etc/permissions files appropriately and B) that the OpenGApps TV-Stock installer includes a broken copy of NoTouchAuth which wont allow you to register with Google Play Services. In one of the above commands we installed a copy of NoTouchAuth I pulled from a Official AndroidTV box (so it actually works) and once you have completed the next steps and reboot, you will be able to log into Google Play without issue. Also at this point we have replaced the stock system build.prop with the modified one to allow a proper TV-Stock installation, and allow for proper authentication with Google Play Services, installed the modified copy of peleg's TvSettings.apk (ATV Settings Widget/Menu) which now does not require signature spoofing due to my removal of the "com.android.shared.uid" value from the Android Manifest, disabled Wifi-Direct broadcasting, and installed XposedInstaller.apk + HDXPosed.apk, along with the ESSENTIAL Xposed Module "Xposed Edge" which is what will allow us to remap Buttons / Keycodes & provides the Running App List + Task Switcher + an unbelievable amount of other useful features and ability to customize just about anything.

    So now that all that has been done the last step is to reboot into TWRP recovery (however that is done on your device) and install the final ZIP files of updated SuperSU v2.82, Xposed Framework v87, and finally OpenGApps TV-Stock itself.

    EDIT: Due to issues with OpenGApps TV-Stock overwriting NoTouchAuth during installation, you must run the following AFTER finishing the TV-Stock installation to avoid the "spinning circle of doom" issue, which will prevent Google Play login. After running the commands below REBOOT and you should be able to login to Google Play without further problems.

    Code:
    shell@firetv:/ $ su
    root@firetv:/ # mount -o rw,remount /system
    root@firetv:/ # rm  /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
    root@firetv:/ # cp /sdcard/PlayFire/TV-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
    root@firetv:/ # chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk


    Work-in-Progress
    • Updater Script: Completed-as-of v4_LazyLeanback
      I am currently in the process of investigating whether it may be possible to write an "Updater Script" that functions as the OpenGApps Updater scripts do, which would allow users to seamlessly flash the latest rbox prerooted ROM releases while keeping all these MOD changes in tact through the upgrade process. I have just starting looking into this, so have no estimate for when or if It might be completed.
    • Update.zip Flashable Installer: Completed-as-of v4_LazyLeanback
      I MAY also attempt to investigate the possibility of creating an "all-in-one" Update.zip package which would be flashed through TWRP and preform as many of the steps of this MOD as possible. In any case DO NOT THINK THIS WILL BE A "FULL" CUSTOM ROM, It will only be exactly what is currently discussed in this thread, It will not at any time include the rbox ROM, OpenGApps installers or any other modules not currently already included within my "PlayFire.tar.gz" archive. I have not even started looking into the first steps of how this may or may not be possible, just something I have in the back of my mind as a possible continuation of this MOD and my learning process. Do NOT ask me when this might be completed, as I have not even begun the most basic of firsts steps, again just something I may consider trying to do at a later date. If you want this MOD installed anytime soon, your going to need to follow current procedure outlined in this guide for the time being.
    • Custom Compiled OpenGApps TV-Stock Installers: Again, this is something I MAY attempt to do at a MUCH LATER DATE, and only AFTER I have created both the Updater Script and the Update.zip package. As there are numerous issues with the OpenGApps built TV-Stock I may try to build the installer from source myself and resolve as many issues as they relate to the FireTV as possible. Again, do NOT ask me when this will be ready, as I honestly have no clue, but again is something I am considering if there is enough interest shown and/or more serious problems with the current OpenGApps TV-Stock installers become apparent.
    5
    This looks amazing! Since the FireTV Stick 2nd Gen can't be rooted on any firmware, it would never work on it, right?

    Never say never. If the FireTV-Stick 2nd Gen ever gets rooted this should absolutely be possible on that device (assuming @rbox continues his amazing work of providing a TWRP environment to install ZIPs), but even if RBox decides not to continue supporting newer FireTV Devices it may be possible through something like @Chainfire's FlashFire, but that is theoretical at this point obviously.

    Also I may or may not still have a trick or two up my sleeve for the FireTV community, but that's definitely not ready for the limelight just yet (or even confirmed working, just a theory at this point) so i'd keep checking around here and AFTVNews to see if your 2nd Gen Stick is still unrootable :cool:
    3
    Is it necessary to wipe the FTV to a clean state before doing this?

    I've only got about 615MB free according to to the system status report.

    Speaking of which, will this mod make it possible to mount an external storage to the /data partition as we were able to do with the jmandawg scripting or Link2SD methods, back in the old days with FireOS 3?

    Thanks.

    If you KNOW WHAT YOU'RE DOING, and you ABSOLUTELY MAKE SURE TO REINSTALL RBOX's ROM BEFORE YOU REBOOT AFTER WIPING SYSTEM then Yes I very highly recommend starting off from a fresh reset. However this MOD mainly effects things inside the /system partition of your device, not the /data/ partition which is what you are saying only has a limited amount of space left in it, so it should install just fine as long as you have not messed around with things in /system.

    As for external storage enhancements, it's possible, but I have never really looked into it. Ill try to find out and let you know.
    3
    The crash happens if you try to pair another remote or Bluetooth. As soon as you click to add a device or remote, I get the logcat output I posted about Bluetooth. I think the pairing screen for both remotes and Bluetooth use the same activity since some third party remotes and input devices use Bluetooth. Once it crashes, it takes you back to the generic settings screen (not the specific screen for controllers and Bluetooth devices). It never displays a list of devices at all.

    Please run the following and see if maybe this can help you diagnose the problem, and please let me know what happens.
    The Amazon Bluetooth Debug menu should let you see some more detailed info on what your FireTV is seeing with controller pairing.

    Code:
    am start com.amazon.bluetoothinternals/.ui.eight_seven.BTStatusActivity

    I am guessing this will not include USB right. Like we where able to do on FireOS 3. Combining a fast enough external HDD/USB Flash drive to internal for game/app installs ? Or am I reading to much into the "/data/local/ --> /system/priv-app" parts. Any chance of getting this option as a stand alone for us that are keeping the FireOS UI for now?

    Actually Yes bind mounts should allow me to recreate this type of setup on FireOS5. I've PM'd you to get some more details on exactly what you'd like to see done with this kind of configuration and will create a new thread if successful at reviving this and enough interest is shown.

    I was originally on 5.2.1.1 with working FireStarter on my old Gen1 Stick and intended to just update it it to the latest ROM. Then playing around I realized I hadn't got the Leanback Keyboard and when I change over to it, it just reverts back to FireIME (noticed someone else with the same issue, not looked at the fix yet)

    Did notice though, that as its spoofed as a MiBox (I think I saw), PlayStore Web doesn't list it as I already have a MiBox on the account (just a note really to the rare few people that have one). This is really just to say thanks for the time and effort you've put in to the mod and the continual updates. Ill be doing this to all my Fire devices at some point (used Gen1 Stick as a test) :)

    Thanks Dude! Always nice to see another painless success story, and the round about way you preformed the MOD steps is basically how I always do it myself as well.

    Please run the following from a ROOT SHELL to fix the Leanback Keyboard issue, i've been running into the same problem myself on the latest r2 builds not sure why, but the following fixes it pretty easily anyway. As for your Mi Box spoofing issue, damn did not expect that to pop up, but think you might be a pretty rare case on that one, if you want you can try to edit the Mi Box spoofing in build.prop to a Sony AndroidTV if you want to see a separate device in your Play Account, but obviously I have not tested this but don't think it should cause issues.
    Sony AndroidTV build.prop device spoof: android-sony-tv

    Leanback Keyboard Fix (Which is incorporated into my in-progress v5 Installer):
    Code:
    (pm disable com.amazon.tv.ime ; sleep 1 ; am start com.android.tv.settings/.system.KeyboardActivity ; sleep 5 ; pm enable com.amazon.tv.ime)

    I have Bluetooth crashes when i look for device, firetv remote says offline. Same issues on both FireTV 2 (sloane) Prerooted Stock Images 5.2.4.2_r2 and 5.2.4.0_r1.

    Bluetooth crash (from Leanback TvSettings) is a known issue, still trying to work that one out, but BT pairing should work from the Amazon Settings Menu (at least it does for me on a FireTV-v1). Also if you ran the v4 scripts you need to re-enable Wifi Direct on FireTV-v2, please see post #140 for more info on how to do this. I have significantly changed the way the new v5 scripts i'm working on deal with this, but until I release the new version you need to manually correct this problem.

    I followed the guide and got everything installed on my Fire TV 2 running 5.2.4.2 r2 and everything works great with the exception of not being able to use my remote, as others have reported. Just curious but is there any progress with getting it to work again? I love it and want to use it but my wife doesn't like using the USB keyboard remote I have so I had to remove the MOD until the remote works again. Thanks for all of your hard work!

    Thanks, and yes you need to re-enable Wifi Direct on the FireTV-v2 to get your remote working again...my bad on that, thought others had confirmed disabling wifi direct did not cause issues on your device, but that was incorrect and wifi direct needs to be enabled for the v2 remote to work.

    Thanks for the reply and I will have to try that. Just wondering though, why was it important to include that in the mod?

    Is not "important", but is something that I personally found annoying with the Fire-DIRECT-#### broadcast, and which no one else ever seemed to figure out how to disable. At least on v1 devices the remote works via Bluetooth so disabling Wifi Direct did not cause any problems, but apparently the v2 remotes use Wifi Direct to communicate with the FireTV.

    The android.hardware.wifi.direct.xml is why the remote is not working. Delete the that file when you extract or from the script. Remote and accessories would crash until I added android.hardware.bluetooth.xml. Hopefully the op can add that on his next release. Aft keyboard wouldn't work, but lean back keyboard would. If it's saying incorrect password it might have fixed one problem, but added another

    DO NOT DELETE android.hardware.wifi.direct.xml, you need to edit this file and remove the #'s i added in commenting out the three lines. This issue is dealt with very differently in my v5 scripts, but Im still making sure everything works 100% before I release the new version to prevent any issues like this from popping up in the future. In total the new scripts are closer to 1000 lines of code (from around 100 for the v4 scripts) so it's taking a while to fully code and test everything i've added to the MOD for the new release.

    What device do you have and what do you mean you needed to "add" android.hardware.bluetooth.xml? Does the FireTV-v2 not already include this file? If that's the case I was entirely unaware of this and will absolutely add that file into my newest release, just never knew that was even an issue until now.