yashsingh1/xdaforums huggingface dataset:
[Fire TV Android Development] SweenWolf:
Here, I patched this file so it would return "No Update Available" on OOBE because OOBE was calling it. This file is from 6.2.8.0. I checked that OOBE calls this and then this calls OTA also, so I have done few things, but i have no idea how it will affect OOBE.
[Fire TV Android Development] SweenWolf:
What do you think, should we fix widgets too? [Try to fix]
[Fire TV Android Development] nomobytes:
Latest firmware download -

(NS6281/3385)

https://d1s31zyz7dcc2d.cloudfront.net/2505e32d634eb38b303e08b3341b0140/update-kindle-mantis-NS6281_user_3385_0005604456836.bin
[Fire TV Android Development] SweenWolf:
Now who's gona test the update patch? At least tell me if it worked or not :)
[Fire TV Android Development] Skel40:
Here's a pre-rooted (NS6281/3385): The efuse is removed and there's no old ui yet with this release. Thank you for publishing the stock image @nomobytes

@SweenWolf to answer your question, no I haven't yet. I've been busy with things outside the xda community.

Also there's nothing too different with this new update. The new interface is not that responsive as 6.2.8.0 (the animator speeds). Other than that, nothing much has changed.
[Fire TV Android Development] 0815hoffi:
Boot time is fixed with disable launcher now on 6.2.8.1.

Playstore also is working 😀

opengapps - Google Drive
[Fire TV Android Development] Skel40:
Does this work with the old UI mod I just created?
[Fire TV Android Development] 0815hoffi:
Playstore works for me with

mantis-6-2-8-1-r1.zip
[Fire TV Android Development] Skel40:
@SweenWolf your patched APK works on 6.2.7.7. It doesn't even show the checking updates screen and just skips to the account sign in page. There's a bug where I have to setup IR twice in a row after pairing my tv. But it does go through to the interface
[Fire TV Android Development] SweenWolf:
Great.

About the bug it can be from any reasons.

Like some incompatibility (but i don't think thats the case, although its from 6280). I think the main culprit is the ExitOTAFlow function of the FOTA. I may look into it but its not a big issue, and I'm also busy.

But IR has nothing to do with FOTA unless its also downloading a firmware for the remote, i think there was a function for that also.
[Fire TV Android Development] SweenWolf:
THIS FILE DEPENDS ON OTHER SYSTEM FILES SO DO NOT USE THIS FILE WITH ANY OTHER VERSION, THIS IS ONLY COMPATIBLE WITH 6.2.8.0

I have "tried" to fix AppWidget and Wallpaper. I am not 100% sure if this will work, but here's my first try on this.

Make a backup first.

File path /system/framework/services.jar

and delete its odex also /system/framework/oat/arm/services.odex
[Fire TV Android Development] SweenWolf:
Update patch for 6.2.8.1 (TWRP Flashable)

Requirements: Unlocked Bootloader ,Patched Boot Image (Use magisk to patch, comes preloaded with OP's ROM)

Contents:

com.amazon.tv.forcedotaupdater.v2: Forced OTA updator (It will not show any update screen on the OOBE)

fosservices.jar: Fixes Accessibility

services.jar: Fix AppWidget

My last work for this month on XDA, have to finish many pending stuff now, Enjoy.

[Edit]

Before going, here is a patched boot image with efuse removed and verity (for system partition only) removed, vender is untouched.

this is not a magisk patched image, for those who don't use Magisk.

Updated boot.img on This Post
[Fire TV Android Development] kihmathi:
Thanks for these patch, but before you leave could you kindly do the same for the last version before the new ui came through, 6.2.77, I am of the opinion that 6.2.80 and above are very unstable and erratic, sometimes from nowhere it goes into a boot loop
[Fire TV Android Development] SweenWolf:
updating TZ fixes the DRM, so 6.2.8.1 should be fine now.
[Fire TV Android Development] SweenWolf:
I've myself reverted to 6.2.7.1 but i will flash 6.2.8.1 later on when i get some free time.

In the meantime can anyone test this OTA patch.

I may have deleted one additional thing which i will patch, but this should disable the OTA, will anyone try?

Its for 6.2.8.1

[EDIT 1]

And i haven't patched all of the functions, just some of it, ill patch the whole file later on but it should be good to test. Do not worry if it fails if you have TWRP it will not flash the partitions, and if it still downloads the ota, then either you can delete the file or you can use adb for that

pm clear com.amazon.tv.settings.v2

It will clear out the downloaded image also

[EDIT 2]

Merely changing the signatures should break the OTA, don't if thats the case with this file
[Fire TV Android Development] Skel40:
I forgot that. Ok I'm testing it rn.

Edit. What is this edit supposed to do since the forced ota updater actually fully skips the update? Is this a test to see whether the ota fully disables the servers where the updates are that start downloading automatically?
[Fire TV Android Development] SweenWolf:
I have tested it, and it works on 6.2.8.1

Important thing is that because we are modifying the system then it fails dm-verity, which is why magisk is used or if not using magisk i provided a patched magisk image (its full stock just efuse service and verity is removed)

If you do not use patched image then the system itself will not boot.
[Fire TV Android Development] Skel40:
"App not installed. The package conflicts with an existing package by the same name." it says.
[Fire TV Android Development] SweenWolf:
With what?

Its a replacement of OTA in priv-app

I do not have any Amazon keys to sign the apk.

So you have to replace it you cannot just install it.

Wait few minutes i will elaborate
[Fire TV Android Development] Skel40:
After installing the test, I get the following after removing DeviceSoftwareOTA from priv-app said below with adb

Exception occurred while dumping:

java.lang.IllegalArgumentException: Unknown package: com.amazon.device.software.ota

at com.android.server.pm.Settings.isOrphaned(Settings.java:4165)

at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18609)

at com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:16012)

at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:904)

at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)

at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)

at android.os.ShellCommand.exec(ShellCommand.java:94)

at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18869)

at android.os.Binder.shellCommand(Binder.java:468)

at android.os.Binder.onTransact(Binder.java:367)

at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)

at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3141)

at android.os.Binder.execTransact(Binder.java:565)

To make sure it uninstalls. Wait I should've installed it on top of the existing stock app. Will do more testings. I'm 100% sure it was because of editing the .apk
[Fire TV Android Development] SweenWolf:
Do you have root?

If yes then just replace the files that way

Else use twrp, you can use the above twrp flashable zip as template
[Fire TV Android Development] Skel40:
Yes I have root. I'm doing this outside of TWRP. Should have thought of that. Thanks.

Edit. As it turns out I'm getting the same message when updating the app with the patch and when removing the system app. Don't know what I'm doing wrong here. I tried copying the package in TWRP and that didn't work.
[Fire TV Android Development] SweenWolf:
I clean flashed 6.2.8.1

OOBE went smoothly, had no issues. It showed IR profile screen only once, like normal setup does.

AppMarket is downloading updates normally.

OTA Screen is either showing "Your FireTV is up to date" or its throwing "Update Error".

DRM is not crashing the stick.

[NOTE]

DO NOT USE THIS BOOT.IMG IF YOU ARE ALREADY HAVE MAGISK INSTALL, IF YOU DO THEN YOU WILL LOSE ROOT.

AND ONLY UPDATE USING TWRP, DO NOT USE FASTBOOT TO FLASH.

(FLASHING ANY BOOT.IMG FROM FASTBOOT (HACKED BL) WILL RESULT IN A LOSS OF TWRP AS WHEN THE DEVICE BOOTS WITH ITS STOCK BOOT IMAGE (AFTER FLASHING IT VIA FASTBOOT) IT WILL RESTORE YOUR TWRP WITH THE STOCK ONE BY RUNNING "install-recovery.sh". IF IT IS SUCCESSFUL IN RESTORE STOCK RECOVERY AND YOU ALSO HAS STOCK ROM INSTALLED WITH EFUSE BURNER IN /system/bin THEN IT WILL BLOW THE EFUSE.

IF IT IS UNSUCCESSFUL IN RESTORING THE RECOVERY THEN YOU WILL FACE A BOOTLOOP AND YOU WILL HAVE TO UNLOCK YOUR STICK AGAIN, CONSIDERING YOUR FUSE IS INTECT.

That was bit of info about this stuff, that i know and have personally tested.
[Fire TV Android Development] SweenWolf:
Patch - 6.2.8.1 (NO FOTA)

V2 of this patch can be downloaded from here

Contents:

forcedotaupdator.apk : Disables updates on OOBE

fosservices.jar: Fixes Accessibility

services.jar: Fixes AppWidget

DeviceSoftwareOTA.apk: Disables OTA updates inside System

Requirements for this patch:

Unlocked Bootloader

Patched Boot Image (If you are using any prerooted images or you manually installed magisk then you already have a patched boot image, if you don't have any if them then download the patched image from here. It is extremely important or you'll get a bootloop.

To flash it just open TWRP select "Install Images" and select this image as boot and flash.)

TZ update - (TWRP)

It updates the TZ and also removes efuse related files.

I've extracted the TZ image from @rbox rom.

It fixes the DRM issue on newer roms

IMPORTANT NOTE

Do not flash any Stock Rom which contains efuse burner i.e. 6.2.8.0 or higher,

use a modified one which has the files removed and disable OTA updates also.
[Fire TV Android Development] bluejaysrs:
Thanks for doing this, what’s the steps to install this?

Also does it block ads from IMDb tv and YouTube ?
[Fire TV Android Development] Skel40:
You download the rom file and flash it via TWRP recovery. It doesn't block ads. Use Adguard or Blokada as your main adblocker
[Fire TV Android Development] Skel40:
@SweenWolf mind if you patch DeviceSoftwareOTA on firmware 6.2.7.7 3033?
[Fire TV Android Development] SweenWolf:
Send me the apk, if i get some free time I'll patch it.
[Fire TV Android Development] Skel40:
Here's DeviceSoftwareOTA and the stock fosservices.jar from 6.2.7.7 3033. I dont know if the patched forced ota from the zip you provided above would be useful on this version. With testings I've made, it bypasses it on oobe.
[Fire TV Android Development] Skel40:
I updated my old ui rom with the tz video fix. Report any issues here.
[Fire TV Android Development] SweenWolf:
This is what I use, you might know I don't use Magisk, so you will not find it in here, you can add that manually.

(getprop("ro.product.device") == "mantis" || getprop("ro.build.product") == "mantis") || abort("This package is for \"mantis\" devices
this is a \"" + getprop("ro.product.device") + "\".");
ifelse(is_mounted("/system"), unmount("/system"));
ui_print("NS6281 (With Patches)");
ui_print("Copying system image...");
block_image_update("/dev/block/platform/soc/11230000.mmc/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
ui_print("Copying vendor image...");
block_image_update("/dev/block/platform/soc/11230000.mmc/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat", "vendor.patch.dat");
mount("ext4", "EMMC", "/dev/block/platform/soc/11230000.mmc/by-name/system", "/system", "");
ui_print("Deleting efuse burner");
delete("/system/bin/efuse_check.sh",
"/system/bin/ewriter");
unmount("/system");
ui_print("Updating TZ...");
package_extract_file("images/tz.img", "/dev/block/platform/soc/11230000.mmc/by-name/tee1_real");
package_extract_file("images/tz.img", "/dev/block/platform/soc/11230000.mmc/by-name/tee2_real");
mount("ext4", "EMMC", "/dev/block/platform/soc/11230000.mmc/by-name/system", "/system", "");
ui_print("Patching System Files");
delete("/system/priv-app/com.amazon.tv.forcedotaupdater.v2/com.amazon.tv.forcedotaupdater.v2.apk",
"/system/priv-app/DeviceSoftwareOTA/DeviceSoftwareOTA.apk",
"/system/framework/fosservices.jar",
"/system/framework/services.jar",
"/system/framework/oat/arm/fosservices.odex",
"/system/framework/oat/arm/services.odex");
package_extract_dir("system", "/system");
set_metadata("/system/priv-app/com.amazon.tv.forcedotaupdater.v2/com.amazon.tv.forcedotaupdater.v2.apk", "uid", 0, "gid", 0, "mode", 0644);
set_metadata("/system/priv-app/DeviceSoftwareOTA/DeviceSoftwareOTA.apk", "uid", 0, "gid", 0, "mode", 0644);
set_metadata("/system/framework/fosservices.jar", "uid", 0, "gid", 0, "mode", 0644);
set_metadata("/system/framework/services.jar", "uid", 0, "gid", 0, "mode", 0644);
unmount("/system");
ui_print("Copying kernel...");
package_extract_file("boot.img", "/dev/block/platform/soc/11230000.mmc/by-name/boot");
ui_print("OS Installation Complete");
ifelse(is_mounted("/system"), unmount("/system"));
[Fire TV Android Development] Skel40:
Thank you so much! This is exactly what I was looking for! I'll test out the script and make an experimental .zip soon
[Fire TV Android Development] tokoam:
So just to be clear if i install mantis-6.2.8.1-r2-tz-video-error fix-old-interface-pre-rooted.zip on main OP section I should be good ? I'm currently on rbox firmware 6.2.8.0 . It should not effect efuse doing so ? also would there be anything else I would need to flash after flashing ? I see this post and not quite sure if I need these files its all sorta confusing to me .
[Fire TV Android Development] SweenWolf:
I will try to make it less confusing,

it depends on what you want with the system

rbox's latest prerooted firmware is 6.2.8.1_r2 which contains updated TZ (why TZ update is needed? If you are on older OS like 6.2.7.1 which is compatible with tz then almost all aps will work except Prime Video, if you are on newer OS like 6.2.8.0 but are using older TZ then they will be incompatible with each other and you will not be able to watch any DRM contents, it will cause the Device to freeze)

I have not checked what OP has in the ROM, so Skel40 will better tell you about it.

About my post that you quoted, it contains files which will patch 6.2.8.1 only (assuming that the user has only updated the system partition, all of the prerooted images only updates system), you don't need to update other partitions,

The NOFOTA zip will disable System updates on the system, meaning that your stick will not check for update, even after factory resetting or when you are setting your device for the first time (in OOBE), your stick will skip any update and will always tell you your system is up to date (or will throw an error) every time you click on check for update in the "My FireTV Section".

It also enables "AppWidget" which is missing on our stick from ever.

It also fixed Accessibility so that you can use LauncherHijack/FireTVSettings/FTVLaunchX/AnyDesk/MATVT etc.

Accessibility allows you to have Custom launcher (without disabling amazon stock launcher), MATVT allows you to use remote as mouse (its alternative to Mouse Toggle).

It does not uses magisk so it doesn't matter if the system is rooted or not (it is flashed via TWRP)

Now because you are not disabling your stock launcher you can access all the settings

This zip will work on any 6.2.8.1 system (you need to have TWRP to flash it)

It needs the patched boot image so it can boot properly (the boot.img I provided is not patched by magisk so there will be no root, you can install magisk.zip to root if you want)

The TZ update is only for those who are on 6.2.8.0 or 6.2.8.1 and whose Netflix and prime are crashing and do not want to download the full system image. it will patch the OS (it will update the TZ and then remove the files which burns the efuse).

The boot image i provided has some things removed, It does not check if the system is tempered (magisk also removes that and is required to removed, if not removed them only stock images will run on your system and any modification to the system will make it non bootable)

Efuse and recovery service are removed, meaning system will not execute these commands

the function of efuse checker is to check and blow the efuse (my and pretoriano80's boot image will not run it even its present in the system).

the function of recovery is to check if the recovery is stock or not, if it is not stock then the system replaces it(TWRP) with stock (amazon)

as long as you have TWRP installed, recovery script will not do anything but i have removed it just to be safe.

This boot.img is taken from 6.2.8.1
[Fire TV Android Development] Skel40:
Yes you should be good. The r2 is from rboxs rom to ensure the tz images are set. It won't effect the efuse when doing so because specifically in rbox's script, there's a script referenced in the first page of my OP that states the script to fully remove the efuse_check.sh and ewriter files before flashing so it's safe to flash. I don't just create flashable .zips with the efuse in place. I hope this doesn't confuse you more. If you have any questions, I'd be glad to respond back
[Fire TV Android Development] tokoam:
Thank you for taking the time to answer my questions . So I’m a nut shell the main difference between your rom and rbox is essentially nofota and removal of efuse data ?
[Fire TV Android Development] Skel40:
Yes. And no problem. Yeah. On the accessibility version I removed the files to ensure it doesn't burn the efuse while the other rom without the accessibility/fota has it in place until the script is recognized in TWRP to remove the efuse so it's basically the same thing on both
[Fire TV Android Development] tokoam:
How do I uninstall Amazon live shopping it came up after installing the rom . Never had it previously any help would be helpful .
[Fire TV Android Development] emkorial:
This is pretty confusing..

If I currently have a rooted stick, with TWRP installed, and want to upgrade to 6.2.8.1 with the old UI, which file do I download to flash in TWRP? Like step by step instructions
[Fire TV Android Development] m1s73r:
@SweenWolf Is it possible to flash this via adb/commandline, i.e.

twrp install 'TZ Update - (TWRP).zip'
twrp install 'mantis-6.2.8.1-rooted_r2.zip'
[Fire TV Android Development] SweenWolf:
yes it is possible

move the file to the device however you like

adb push file.zip /sdcard/

then you can use

adb shell twrp install /sdcard/file.zip

here file.zip can be any file and /sdcard/ is the internal directory

and remember the latter is twrp command, enter this while the device is in recovery

to enter recovery use this command

adb reboot recovery

If you rom is 6.2.8.1_r2 from rbox then you dont have to flash my TZ Update, the zip already has this (r2 has TZ update)

if you are flashing another rom then flash the TZ update after flashing the ROM and not before

because my zip also removes efuse related files so if the ROM has those files then it will remove them.
[Fire TV Android Development] m1s73r:
Thank you so much @SweenWolf - I followed your steps, flashed the patch first, then the TZ update (I'm on stock 6.2.8.1) and Netflix and Prime Video works again, which was my main concern. Working flawlessly! Thanks!
[Fire TV Android Development] XDAUsernewbigone:
Hi, how i can update from 6.2.7.7 (unlocked+root) to 6.2.8.1 without lost all settings (Wolf Launcher, Apps, Screensaver, Debloat, Root, Magisk...). I have to remove some efuse files first and which Firmware i should use and do some preparatory work?

Greets and big Thanks
[Fire TV Android Development] SweenWolf:
(You don't have to format your stick for following this guide)

Download 6.2.8.1 from this post,

flash this using TWRP, you will be updated to 6.2.8.1

your launcher configuration will not be affected but you mill have to use launcher manager to set it again.

some apps will be added so you will have to hide them in custom launcher

you will have to debloat again because system update will re enable them

by using this update your Prime and netflix will not work, so you will have to update your TZ (download TZ update zip from this post.)

Install the rom first and the install the TZ update zip (DO NOT REBOOT YOUR STICK BEFORE FLASHING TZ UPDATE,

INSTALL THE TZ UPDATE RIGHT AFTER UPDATING THE ROM)
[Fire TV Android Development] XDAUsernewbigone:
Great. Big Thanks for this good Instruction. I will ty it and and report. Greets and Thanks
[Fire TV Android Development] XDAUsernewbigone:
Works great, Thanks. I update Firmware + TZ and i only have to Install Xposed and Magisk again. All settings are remained after reboot (debloat, no auto update, Wolf Launcher...). Only Amazon Music won't boot and the new Amazon live shopping App do not want to start because of some Update fail.
[Fire TV Android Development] XDAUsernewbigone:
Hi, what is the difference between 6.2.8.1_r1 and 6.8.2.1_r2 ? I can flash r2 over r1 ? Greets
[Fire TV Android Development] Skel40:
R1 is without the updated tz and r2 is the updated version to ensure the streaming apps work without freezing
[Fire TV Android Development] XDAUsernewbigone:
OK, and can i flash R2 with TZ over R1 with old TZ?
[Fire TV Android Development] Skel40:
Yeah go ahead
[Fire TV Android Development] SweenWolf:
TWRP doesn't have a package manager, a format isn't necessary, it will re-generate code caches causing it to take a longer to boot the first time.
[Fire TV Android Development] SweenWolf:
Anyone needs a modded FireTV IME which supports voice input on unsupported region?
[Fire TV Android Development] SweenWolf:
Patch - 6.2.8.1 v2 (NO FOTA)

FireTV IME:

Enables voice search

Requirements:

v2 Patch

Alexa (Latest)

Package Installer:

Fix white Action Bar

Requirements:

v2 Patch

Instructions:

Flash Patch (6.2.8.1) v2 using TWRP and reboot.

When the system is booted install the apps normally using any file manager.
[Fire TV Android Development] Skel40:
Is this v2 patch for the upcoming

(NS6281/4054)

update-mantis-diff-NS6281_3385_0005604456836-to-NS6281_user_4054_0005940172420.bin? Just to avoid my confusion with this patch. Smh it's for this release
[Fire TV Android Development] Skel40:
@SweenWolf I'd like to say thanks again for the patches you made for the 4K. It's definitely very helpful and comes in handy when efuse issues are sadly affecting unlocked devices.
[Fire TV Android Development] SweenWolf:
Its for 3385, but this patch should be compatible with any 6.2.8.1 release.
[Fire TV Android Development] Skel40:
It works with the new release!
[Fire TV Android Development] Skel40:
@SweenWolf I'm currently having issues with the iMDB app on 6.2.7.7. Would I need to downgrade the tz?
[Fire TV Android Development] SweenWolf:
What kind of issues?
[Fire TV Android Development] Skel40:
A black screen when playing iMDB content. The ad at the beginning still works. Any fix?
[Fire TV Android Development] SweenWolf:
It depends, iMDB is connected with Amazon launcher, i don't know what TZ are your using right now.

It can also be caused by Older version of Amazon Launcher.

Does your stick hangs and reboot or its just a black screen.

If it freezes and restart than its the issue with TZ.

If not then you'll have to check the logcat if it just shows black screen or if the "APP" crashes.
[Fire TV Android Development] Skel40:
It freezes and reboots. Is there any way to downgrade the tz?
[Fire TV Android Development] SweenWolf:
You can downgrade the TZ, not getting why you wanna do that, pull the TZ.img from older update and replace it in my TWRP flashable TZ Updator.

It should work it.
[Fire TV Android Development] Skel40:
That worked successfully thank you
[Fire TV Android Development] SweenWolf:
I removed Image Patching Functions from this Magisk Manager, if anyone wants it can use it.
[Fire TV Android Development] Sus_i:
May I ask why you removed the patching? For brick protection (i.e. prevent magisk updates from OS)?
[Fire TV Android Development] SweenWolf:
Exactly.
[Fire TV Android Development] Skel40:
@SweenWolf so if I happen to update the manager in the app and reboot, would that prevent it from bricking once I install this?