yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] iSupakilla:
I'm on a genuine FireTV running everything within the means to at least run the exploits expect for the specifications towards the Televisions. is there anyway I could go about helping this process?

incase it helps/matter:

Home Version: 6440287.1

Model: INSIGNIA_NS-55F301NA22
[Fire TV Original Android Development] HeyImJ:
Damn lol we in same boat. Gonna be patched before we can get rid of the ad infested launcher 😩

I do have warranty on it so am down to break it 👍
[Fire TV Original Android Development] Pro-me3us:
The exploit isn't of Amazon's firmware specifically, it's a vulnerability in the GPU drivers. The exploit program has to account for differences in the driver, kernel and firmware versions, which are different between devices. I'll take a look at one of the FireTV television firmware to get a better idea about the problem, but it is definitely going to be a big hill to climb. I don't think it's something I can commit to.
[Fire TV Original Android Development] iSupakilla:
Fair, I don't miss my days of just looking at code for college so i can get not wanting to stare at something that doesn't really benefit you but if there's something I can go, I will try to still help
[Fire TV Original Android Development] HeyImJ:
Ay it's all good, just got excited to be adfree. It's the most annoying **** ever 🫠 Appreciate ya and respect everything you doing 👍
[Fire TV Original Android Development] psymsi:
Is there a fix for accessibility services?
[Fire TV Original Android Development] Pro-me3us:
What's not working with accessibility services that needs to be fixed?
[Fire TV Original Android Development] boxster03:
@Pro-me3us thanks for everything you are doing.

Can someone point me in the direction where to find info. on: how to make Cube 2 boot to Wolf Launcher (I already have Wolf installed on my Bootloader Unlocked/ rooted Cube 2) and make home button press to go to Wolf Launcher. Still like to have the option to be able to go to the Amazon launcher by pressing some buttons.
[Fire TV Original Android Development] Pro-me3us:
Only for devices with unlocked bootloader exploit

How to use both a custom launcher & Amazon launcher

Make the custom launcher a system app by installing the Magisk module Terminal Systemizer version 1.7.4.1

1) Install Terminal Systemizer in Magisk Manager, and reboot for the module to become active

2) Open an adb shell & start Terminal Systemizer, and select the launcher you want to make a system app.

adb shell
systemize

1 - Systemize Installed Apps (Listed)
Select the number for Wolf Launcher
2 - /system/priv-app

3) Exit Terminal Systemizer, and enable Amazon launcher, but keep FireHomeStarter disabled

pm enable com.amazon.tv.launcher
pm disable-user com.amazon.firehomestarter
pm clear com.amazon.tv.livetv

NOTE: It's important to disable FireHomeStarter, or the Cube will be under constant high CPU usage, and get hot! Don't use Launcher Manager to enable/disable custom launchers again at this point, because it also enables FireHomeStarter.

How to remap the remote buttons

Remote buttons can be completely remapped including adding double press, and long press shortcuts, with Xposed Edge. This app requires LSPosed Magisk module

1) Open Magisk Manager, go to settings, make sure Zygisk is enabled

2) Install LSPosed Magisk module for Zygisk, in Magisk Manager

If you don't see the LSPosed Manager app on your homescreen after install, install it manually, the apk is located here:​

/data/adb/lspd/manager.apk

3) Install Xposed Edge app, then reboot for LSPosed module to become active

4) Open LSPosed Manager app, go to modules tab, and enabled Xposed Edge, make sure System Framework is enabled. Reboot for Xposed Edge to become active.

How to remap remote app buttons

Wipe the default app button functions (thanks to @cityhunter_1919_xyz), and use Xposed Edge to remap app buttons.

1) Install blank_app_buttons.zip in Magisk manager as a module, reboot for module to take effect

2) Use Xposed Edge to remap app buttons
[Fire TV Original Android Development] Pro-me3us:
The info is spread around a couple posts, so I've summarized it in one post, that i can reference

Additionally, the two pro remote customizable buttons menu can be found by running

am start -n com.amazon.tv.settings.v2/.tv.controllers_bluetooth_devices.CustomizableButtonsActivity

The buttons themselves are

input keyevent KEYCODE_188 (KEYCODE_BUTTON_1)

input keyevent KEYCODE_189 (KEYCODE_BUTTON_2)

The bluetooth device switching button is

input keyevent KEYCODE_190 (KEYCODE_BUTTON_3)

programming and activating the buttons 1 & 2 is pretty unreliable, there is more to it than just calling the buttons required. Maybe someone else can figure out how to get it working
[Fire TV Original Android Development] boxster03:
@Pro-me3us I am yet to get the hang of magisk/magisk manager. How do I: 1) Install Terminal Systemizer in Magisk Manager ?

Do I push extracted (from zip) files to a specific folder and go to magisk manager to install?
[Fire TV Original Android Development] Pro-me3us:
Save the module zip to your Cube (eg Download folder)

open Magisk Manager

select the modules tab

tap on the install from storage button, select the zip file

Or you can install it from the ADB command line if you prefer, eg

raven:/ # magisk --install-module /sdcard/Download/terminal_systemizer.zip
[Fire TV Original Android Development] boxster03:
@Pro-me3us Appreciate the instructions. I now have Wolf at startup and via remote home button (via Terminal Systemizer). I also enabled amazon launcher and disabled FireHomeStarter. I also uninstalled the launch manager app that I had before. Thank you.

I installed LSPosed magisk module for Zygisk and installed Xposed Edge (I used aptoideTV app for that) but I don't think the LSPosed manager was installed. I see Zygisk LSPosed in magisk turned ON. I got the same "not activated" message for Xposed Edge that @Osaka_23 got posts #73 - #75. I tried:

pm install -r /data/adb/lspd/manager.apk

but got an error message ala, can't open file. The manager.apk is there in lspd. Any ideas how to get LSPosed manager and get Xposed Edge working?
[Fire TV Original Android Development] Pro-me3us:
This should work assuming the file is present

raven:/ # pm install -r /data/adb/lspd/manager.apk

Otherwise you can copy it to the Downloads folder and install it from there with a filemanager

raven:/ # cp /data/adb/lspd/manager.apk /sdcard/Download/manager.apk

You can also unzip the lsposed zip, and you will see manager.apk in there. Use that and install it whichever method you prefer.
[Fire TV Original Android Development] boxster03:
Thanks for the reply.

Yeah it's weird why pm install -r command as you gave didn't go through. I checked it a few times. Anyway, I was able to install LSPosed manager via Downloader after copying manager.apk there. Toggled Xposed Edge and system framework checked. Thanks for the suggestion.

I have the regular Fire TV remote that came with the Cube 2. 4 buttons at bottom.

Left: Prime below it: Disney+

Right Netflix below it: Hulu

I guess pro remote is something different?

I'll now try the remapping part in Xposed Edge from your instructions.

Is there a way to open amazon launcher without programming a dedicated button for it on the remote? I couldn't figure out how to get to amazon launcher home page from wolf launcher. (I was able to go to the amazon app store though -- the reason I wanted to go there anyway. )
[Fire TV Original Android Development] Pro-me3us:
The pro remote is a stand-alone FireTV remote with a number of exclusive features

After enabling the Amazon Launcher, a Home icon will appear on Wolf Launcher, that takes you to the default screen.
[Fire TV Original Android Development] boxster03:
Upon looking further after your reply, I found the tile for amazon launcher but for some reason in my Wolf launcher screen, it is not the pic you posted above. Mine is one of those little yellow chicks (I guess)... same one used for LeakCanary 2.2. But I know which tile to click to go to amazon launcher now. Thank you.
[Fire TV Original Android Development] Pro-me3us:
The developers shouldn't be including the LeakCanary library in production versions of Amazon Launcher, but it's there in some versions, which is why you get that icon.

Wolf Launcher let's you change icon text, the icon and the banner background to whatever you prefer by long pressing on the homescreen icon
[Fire TV Original Android Development] boxster03:
@Pro-me3us Thanks I changed to the correct icon for home.

Don't know if others have come across this but I have a kink in magisk: In magisk /modules -- install from storage, it is stuck in Recent. On the left menu, Open from I can't go down to any of the items with my remote down key (by pressing bottom of circle) or any other button on the remote.

It shows Downloads, Fire Cube, ES File Explorer Pro, Select file -- but none of those are accessible. Also Mouse toggle won't activate on that screen /(or any magisk page) . I have been installing from adb.

Top right menu, all I can do is Hide /Show internal storage using the menu (3 lines) button on my remote.
[Fire TV Original Android Development] Pro-me3us:
That's a common issue for Android apps that are designed for a touchscreen and not a remote. The easiest solution is to use ScrCpy which is also included in ADBLink. There's an Android port you can run on your phone/tablet that's really convenient.

ScrCpy allows you to navigate FireTV as a touchscreen in those instances when you can't reach certain buttons by remote.
[Fire TV Original Android Development] boxster03:
@Pro-me3us thanks for the solutions. I will get these set up.
[Fire TV Original Android Development] boxster03:
@Pro-me3us scrcpy is a great tool - it's working from my laptop and android phone. On laptop, how to exit scrcpy? just click out of the window? I noticed Windows Powershell showed "Device disconnected" after a few minutes of being idle. Does it detect no activity and disconnect?

I guess scrcpy is not availabe for iOS.
[Fire TV Original Android Development] Pro-me3us:
You can either close the ScrCpy window, or issue a Ctrl+C in the terminal window used to open ScrCpy. I think ScrCpy closing occasionally is normal, and that it stays open as long as the connection is stable. I don't know the specifics. If it closes, you can open a new window.

ScrCpy is available for Linux / Windows / MacOS, so is ADBLink.
[Fire TV Original Android Development] roligov:
Typo in post 3, magisk-manager.apk not magisk_manager.apk.

Bootless Magisk doesn't seem to be working correctly on my Fire OS 7.6.1.4 (PS7614/3227). raven_bootless_magisk_v1.1 installed fine but when running su when in an ADB shell just hangs. Using adb via wifi so not sure what's going on.

I can get a root shell without issue but su doesn't seem to be launching.
[Fire TV Original Android Development] roligov:
Whoops, looks like my device has been bricked. It rebooted and now goes directly to android recovery menu. Need to get a wired keyboard and try the Factory data reset option. I'll see how that goes.
[Fire TV Original Android Development] Pro-me3us:
Was Magisk Manager granting root to apps? Maybe Magisk Manager was waiting for user authorization, and not getting it? I would check the superuser authorization tab in Magisk Manager to make sure that 'ADB Shell' was toggled on and granted authorization.

Do you know what might have led into this? What troubleshooting steps did you take while trying to get su working?
[Fire TV Original Android Development] roligov:
No apps requested root authorization, at least I didn't see any toast notifications. The cube was pretty much stock except for Launch Manager, TDUK Update Blocker and the TDUK OTA Remover. The only app the should have requested root was the adb shell I launched.

I didn't do much that I can think that would have caused it, I looked at logcat logs, Magisk logs and opened multiple shells and tried running SU. I rebooted a few times thinking it was a once off since the Cube Gen 3 worked seemlessly. I didn't install anything else or mess with ADB debugging or make any paritition changes.

What's more odd is the recovery menu itself was broke, the volume up and down on the cube didn't work. So I went and got a USB keyboard and even that wouldn't allow me to select "try again" or "factory reset". Ctrl alt delete rebooted the cube so the keyboard was operational.

If anyone else ends up in the position it would be interesting to know if their stock android recovery menu is functional.

It's not a major issue as it was my spare cube and I accepted all risks etc...it comes with the territory 😁
[Fire TV Original Android Development] Pro-me3us:
Did you check the Magisk Manager superuser tab to see if 'adb shell' was listed, and if so was authorization active?

It would be good to know what caused the Cube to boot into that recovery mode, to avoid any more Cubes from ending up in the same situation. A few things I can think of that could be problematic:

1) Tripping DM-verity, by making any changes to the system/vendor partitions. Or modifying the boot partition causing a signature failure.

2) Running magisk-boot.sh multiple times after boot. This can happen by either running start.sh / magisk-boot.sh more than once from the command line, or multiple starts through Launcher Manager. Starting Magisk init more than once per boot will screw up the overlay setup.

3) Booting the Cube with a USB cable to computer attached, starting Magisk, then allowing the device to go to sleep, which could potentially kill the Magisk daemon. Or toggling USB debugging off and on after the Magisk Daemon had started.

I don't think Amazon finished implementing Android Recovery, it doesn't appear possible to navigate that menu with a keyboard or physical buttons. There are more and more posts from people (FireSticks too) getting stuck in that recovery mode, with nobody able to figure out how to navigate it.
[Fire TV Original Android Development] roligov:
Definitely not 1 or 3. It must have been option 2. I ran the boot-script manually after 15 seconds then Launcher Manager would have run after 30 seconds. I wasn't aware that would break anything, thought all the scripts were idempotent. That would explain it.

Might be worth adding that to the warnings in post 3 👍
[Fire TV Original Android Development] Pro-me3us:
@diplomatic only warned against running the magisk-bootless script twice on the same boot, I don't know that it will actually lead to a brick since I never tested that. That may have nothing to do with what happen to your Cube. Also, if the shrinker script fails, the magisk-bootless script won't fully execute in any case.

Included a warning to not run the magisk script more than once per boot, along with the others, and tried to make them more prominent.
[Fire TV Original Android Development] ooftymcgoofty:
Hello-I was hoping to confirm with you your progressio as it seems similar to mine-just got the pro remote but cannot connect to my cubes (7.2.1.2 and 7.2.9.2).

So, I understand you used the bootloader and twrp method(#1) on your 7.2.4.2 devices, flashed to 7.6.2.4 and now are able to use the remote and retained root and twrp? Thank you!
[Fire TV Original Android Development] Pro-me3us:
The shrinker and older DFU-based bootloader unlocked Cubes can flash any OTA firmware bin (up to PS7624/3337) from within TWRP, and the Cube will maintain root. Be sure to re-flash Magisk immediately after flashing any OTA firmware bin, in TWRP.

More detailed firmware flashing instructions here.

Keep track of which unit was on PS7212. It will maintain DFU access and that's worth a few extra bucks if you ever sell it :)

@Osaka_23 will have to speak to the pro remote.
[Fire TV Original Android Development] ooftymcgoofty:
Thanks for that info-the process worked great; thank you for making such a clear guide. One thing I've noticed is that rather than show startup screens-like the nexus splash screen for kodi-the screen is black for a few seconds. Is that to be expected? Don't think startup time is affected though.

Also-I ran the code you provided to safeguard against resets-how can I check that it is in effect? I'm afraid to go anywhere near it. Does it give an extra warning? Thanks again!
[Fire TV Original Android Development] Pro-me3us:
Only Kodi is affected? I only use Kodi for occasional testing. I started up Kodi 20.1 on PS7624/3337 and the splash screen loaded without any blackout period. Maybe backup your Kodi user settings, and clear the app data to see if the issue is still present?

That script just renames /dev/block/misc (location of bootloader unlock code) to /dev/block/misc_real, and creates a decoy misc. This prevents FireOS processes like Amazon OTA updates or a factory reset from writing to misc_real. If you check ls /dev/block/ and see misc_real listed, then the script is working.
[Fire TV Original Android Development] ooftymcgoofty:
Thank you! Syncler also does the same thing-dark screen while it logs in to trakt, etc. Have not tried all other apps. I was thinking to reverse disabled apps from tduk debloater, clean valdik/cache and apps cache and see what happens with that. Thanks for the information!
[Fire TV Original Android Development] ooftymcgoofty:
Hi, wiping data for kodi as you suggested cleared the blank screen issue, so thanks for that. Thanks again!
[Fire TV Original Android Development] Pro-me3us:
Minor update, added support for firmware PS7206/1098 in the OP

thanks to @roligov for the firmware info
[Fire TV Original Android Development] Osaka_23:
Hi,

I used the #3 method.

Bootloader unlock, install TWRP & Magisk

Once I was rooted with TWRP and Magisk both installed, downloaded Fire OS from this link

FireTV 2nd gen Cube Firmware links

List of official Amazon firmware URLs for the FireTV 2nd gen Cube (raven - 2019). Visit the github mirror for additional stock apps, source code, and firmware links. Downloader app code for this page: 111590 Read here for instructions on how...

xdaforums.com

Once I downloaded the firmware, I dragged it onto my desktop and changed the file extension from .bin to .zip. I than transferrred the zip file to my Cube, rebooted in to TWRP and installed the update. I then reinstalled Magisk. Remember to not delete any of your data. I would suggest using a mouse and keyboard for this if you have a micro usb OTG adapter. It's much easier to navigate TWRP than using a the fire tv remote.

Once the updated has been completed, reboot into system and wait for everything to load up. Once the Cube takes you to the UI, go into setting and add your remote. It worked for me right away.

EDIT: All credit goes to @Pro-me3us. Thank you for your hard work and for the help.
[Fire TV Original Android Development] ooftymcgoofty:
Thank you so much!👍
[Fire TV Original Android Development] ooftymcgoofty:
Anyone seen this issue? Bootloader unlocked , rooted, xposed edge and blank button magisk module exposed to allow for remapping app buttons at bottom of remote pro. I would like to remap prime video to prime button, but it does not appear in list of apps in xposed edge. I tried uninstalling prime video app and reinstalling from aptoide, but still no luck. Does not appear in list of apps in lm 1.1.8 either. But it is in the app list in device settings, and works fine. Any ideas? Thank you!
[Fire TV Original Android Development] Pro-me3us:
Use 'Inject Key Events' rather than 'App' for the action to remap the Prime Video app

KEYCODE_APP_1 = Top right button (Netflix)

Code: 290

KEYCODE_APP_2 = Top left button (Prime Video)

Code: 291

KEYCODE_APP_3 = Bottom left button (Disney+)

Code: 292

KEYCODE_APP_4 = Bottom right button (Hulu)

Code: 296
[Fire TV Original Android Development] cityhunter_1919_xyz:
What I am doing may be silly, but some of the installed apps cannot be selected by "xposed edge", so I install "remap apps" corresponding to the apps I do not use.

Assign that "remap app" to "xposed edge".

Select the app to use on the remap app side.
[Fire TV Original Android Development] ooftymcgoofty:
That worked perfectly thank you! I haven't used that app before.

Could I ask a question about twrp backups? I have 2 cubes, after rooting, could I just use a backup from 1 to the other? Should I avoid using certain partitions from another device, such as boot or recovery? Thank you!
[Fire TV Original Android Development] boxster03:
@blodgettmike probably not recommended, see post #83 (@Pro-me3us reply to #81)
[Fire TV Original Android Development] ooftymcgoofty:
I missed that the first time through. Thanks👍
[Fire TV Original Android Development] boxster03:
Hi how did you all add the 4 preset buttons on the regular remote to Xposed Edge?

In Exposed Edge, >>Keys menu >> +add.. it asks me to press the button to add but won't register the press of any of the 4 buttons. It recognized the other buttons but not those 4 at bottom of the remote (prime, disney, netflix, hulu).

They are already blanked off in magisk module blank_app_buttons @Pro-me3us made available so the first step has worked as they no longer open the preset apps when pressed. (Without blanking, it will just open those apps when trying to add.) Those buttons are not a big deal but I am trying to figure this out.

Xposed-edge-v8.0.1
[Fire TV Original Android Development] Pro-me3us:
What FireOS firmware version are you running? I did notice that the blank buttons overlay doesn't work on older firmware. Amazon has changed how they manage buttons a number of times. I don't think it's a reason to upgrade, firmware updates don't bring a lot of user benefits most of the time.

I can look back at my older unit to see if I can get something working. It may just be that I need to use different buttons other than red, green, blue, yellow, for the overlay.
[Fire TV Original Android Development] boxster03:
@Pro-me3us Didn't think mine is old OS. It is on 7.2.9.2 (PS7292/2984). No worries if too much trouble for you. You've done so much already and appreciate the great work.
[Fire TV Original Android Development] ooftymcgoofty:
I am guessing your issue is different, but I thought I would mention when I did it I did not notice at first that the button press was being shown faintly i.the background through an overlay with ok/cancel button options. To select ok or cancel I needed to use a usb keyboard or scrncpy; if I used the remote it would take the additional button presses as intended remap buttons. Could this be what is happening?
[Fire TV Original Android Development] Pro-me3us:
It's not very old (August 2022), but there have been a few changes since then. I don't see FireTVKeyPolicyManager in logcat in PS7624/3337, which is there pre PS7273 (probably there in PS7292 too). I don't know much about the remote button management policies, my guess is that FireTVKeyPolicyManager is blocking the app buttons from triggering any events unless they are mapped to APP_1, APP_2, etc. And this service isn't present anymore in PS7624. Don't quote me on any of this :)

You can still use the AFTVNews remap buttons in PS7292 that @cityhunter_1919_xyz mentioned. The one limitation is that you can't remap system app buttons like PrimeVideo and Amazon Music. You could with root, but AFTVNews didn't make the proxy buttons for any system apps
[Fire TV Original Android Development] boxster03:
Thanks for the reply. Yeah I had the same experience -- Initially, I didn't notice the black on dark grey text to select the key to add. Then I realized the first press is to select the key and then the OK press to add it. (I also tried scrcpy, just in case). I guess you are running OS later than 7.2.9.2. Will try the cityhunter AFTVNews method.
[Fire TV Original Android Development] boxster03:
That makes sense. I will try AFTVNews via XPosed Edge as @cityhunter_1919_xyz is doing. (I have my 4K Max Disney button remapped to Wolf Launcher via AFTVNews method). Since cube 2 is rooted may try this via XPosed Edge and be silly myself.