Does the settings menu load for you? For me the settings app crashes instantly but I can access the wifi and about sections oddly. And yes, recommendations is hit and miss
The settings loaded to me but almost every option crashed. So I removed everything and just installed leanback and used xposed edge pro to assign keys and automate to open it at the boot
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 v188.8.131.52 (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 [v184.108.40.206_r2] over my previous 220.127.116.11_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:
Full Gallery of Completed MOD Screenshots: https://imgur.com/a/3lucP
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 v18.104.22.168 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=1503094312Created 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.
Current Release (Make sure you download the MD5 along with the ZIP)
Known Working (Old Release)
Current Release (Make sure you download the MD5 along with the ZIP)
Known Working (Old Release)
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.
5) MAKE SURE YOU GO TO A ROOT SHELL AND ONLY ONCE YOU ARE ROOT RUN THE LAZYLEANBACK SCRIPTS
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)
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.
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!
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 ButtonSingle Press = Leanback Launcher (Home)
Home ButtonDouble Press = Running Apps List Overlay + Task Switcher
Home ButtonLong Press = On-Screen Menu Options
Back ButtonLong Press = Kill foreground app
Menu ButtonLong Press = Installed Applications Drawer Overlay + App Launcher
Voice (Search) ButtonSingle Press = Google Search (Katniss)
Voice (Search) ButtonLong 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 [email protected] 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.
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)
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.
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
@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
@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
I'd like to know too. Now there's a backup ROM available it should be less risky to try (in the event a TWRP backup alone fails). If I hadn't had so much difficulty installing twrp in the first place I'd happily try it. I doubt it's going to do anything that'd mess with BL/TWRP so might give it a go. Will probably wait till my arm heals up though as I'm paranoid I'd have to do the whole rooting process without full functionality - haha!
tar -xzvf /sdcard/PlayFire_v4_LazyLeanback.tar.gz
Test-Run Error Code: 70 [email protected]:/ $ cat /sdcard/open_gapps_log.txt
Test-Run Completed Without Errors [email protected]:/ $ sed -i -e 's|^Test|# Test|' /sdcard/gapps-config.txt
Device Model | AFTB Device Type | tv
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)
~$ adb connect "YOUR IP" ~$ adb shell [email protected]:/ $ exit
~$ adb connect "YOUR IP" ~$ adb pull /system/build.prop ~/
ro.build.version.number=573210520 --> ro.build.version.number=987654321 ro.build.characteristics=default --> ro.build.characteristics=tv
~$ adb connect "YOUR IP" ~$ adb shell [email protected]:/ $ exit
~$ adb shell [email protected]:/ $ cp /system/build.prop /sdcard/default.prop [email protected]:/ $ su [email protected]:/ # mount -o rw,remount /system [email protected]:/ # sed -i 's|ro.build.version.number=.*|ro.build.version.number=987654321|' /system/build.prop [email protected]:/ # sed -i 's|ro.build.characteristics=.*|ro.build.characteristics=tv|' /system/build.prop [email protected]:/ # ! grep -q "ro.com.google.clientidbase=android-xiaomi-tv" /system/build.prop && echo "ro.com.google.clientidbase=android-xiaomi-tv" >> /system/build.prop [email protected]:/ # ! 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
[email protected]:/ # 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 [email protected]:/ # cp /sdcard/PlayFire/whitelist.json /system/etc/whitelist.json && chmod 644 /system/etc/whitelist.json && chown root:root /system/etc/whitelist.json [email protected]:/ # 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)
[email protected]:/ # 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 [email protected]:/ # 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 [email protected]:/ # mv /sdcard/PlayFire/gapps-config.txt /sdcard/gapps-config.txt
[email protected]:/ # 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
[email protected]:/ $ su [email protected]:/ # mount -o rw,remount /system [email protected]:/ # rm /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk [email protected]:/ # cp /sdcard/PlayFire/TV-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk [email protected]:/ # chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk && chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
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?
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.
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?
I was originally on 22.214.171.124 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)
(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 followed the guide and got everything installed on my Fire TV 2 running 126.96.36.199 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!
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