yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] Dak1llah:
Thanks for the info, but even that cannot return info.

I might give it a try over the weekend by removing the shielding frame and shorting DAT0 pin.
[Fire TV Original Android Development] Dak1llah:
No joy with DAT0 pin neither. It all starts fine, but there after with pacman command and fastboot it goes to wait list.

I noticed tho, when I am listing usb devices via separate terminal (lsusb), I can see Fire stick loaded (as Mediatek...phone), but once bootrom step is done the Firestick is no showing up on the usb devices list.

So I kept refreshing that and noticed that it comes up and goes off, almost like it ends up in the reboot loop.

Anyone had similar issues?
[Fire TV Original Android Development] Sus_i:
You could edit the bootrom-step in order to flash the boot.img and the twrp.img... it will take ages to flash (a hour or so) but may fix your issue, idk. Maybe give k4y0z a pm and ask him what lines you need to add into the main.py
[Fire TV Original Android Development] Dak1llah:
Thanks for the tip, that's really appreciated!
[Fire TV Original Android Development] k4y0z:
Try if it's detected on a different OS/Machine, you can also flash the TWRP image using windows.

Also FireISO 2 should have the updated packages already installed.
[Fire TV Original Android Development] Dak1llah:
I have thought of that already, tried it on 3 different systems at work.

When stick is connected on Windows machine, the USB driver is looping on and off. So the only time it actually does not loop is when the bootrom step is running. It's rather wierd.
[Fire TV Original Android Development] Dak1llah:
I think that last resorrt would be uploading boot and twrp image via bootrom. Do you mind telling me what part I need to edit to get ithat uploaded to the stick.
[Fire TV Original Android Development] jdawgx:
Greetings good folks of XDA! I recently purchased a Fire Stick 4K with the end goal of rooting it in order to put a custom DualShock 4 controller configuration on it so that I can play games on my TV via Steam Link with my PS4 controller. (Without root, I don't believe there's a way to remap the way the Fire Stick understands the controller so as to make it useable.)

Using the shorting trick described at the beginning of this thread, I was successful in getting to a point where I can, via adb over my network, tell the stick to reboot into TWRP (using the commands "adb connect 192.168.X.X" and then "adb reboot recovery"). This is as far as I'm able to get though, because, in spite of having an OTG "splitter" cable, TWRP cannot detect either a keyboard or a mouse plugged in, and as such, I am unable to tell TWRP to install Magisk. The Fire Stick itself is, I believe, on software version 6.2.8.1. Within the normal mode of the fire stick, the keyboard and mouse no not work either. (It seems per Googling that there should be a "Enable USB Debugging" option in the Settings that can be toggled in order to get the Stick to "see" the keyboard/mouse, but no such option is available.) I have tried multiple OTG cables, multiple power cables, multiple power bricks, and multiple keyboards/mice. No dice.

Can anyone advise this very inexperienced person what things I can try next? And please be as specific as you're able! I've read through many pages of this thread in hopes of finding a solid step-by-step that can help, but to no avail. Can I control TWRP via adb, and send it a command to install Magisk? But adb doesn't detect my Stick over the network in Recovery mode! Do I connect the Stick back to my laptop and boot from the Linux image linked at the top of this thread and run various commands? Thank you so much for any time and guidance you're willing to give. So much appreciation!
[Fire TV Original Android Development] teephart:
Hello,

after performing the steps on the first page to unbrick my Firestick 4K.

the device works for a while and suddenly the Wifi stop working. excep i use usb otg with ethernet.

when i check the network section, i can see that my WiFi MAC Address is gone.

(Displaying 02:00:00:00:00:00}

what can i do to rectify this? is it normal?
[Fire TV Original Android Development] gojannz:
Hello, enable usb debugging option should be under Settings>My Fire TV>Developer Options>USB debugging.

You can send adb commands to the Firestick via TWRP on wired USB connection. I'm not familiar with other OS but on Windows make sure drivers are properly installed. I'm not sure if the latest version of magisk is compatible, it might cause a boot loop after flashing. I think it's better to flash a prerooted stock image instead.
[Fire TV Original Android Development] jdawgx:
Thank you so much for this! Unfortunately, that option you mentioned is not even there in that section of the settings. I'd be happy to flash a pre-rooted image though, that's an excellent idea, but is that doable without being able to control TWRP, since I can't get any input devices to be detected? If so, could you perhaps point me to instructions for doing so? I've run into a dead end trying to find instructions on my own after spending a significant amount of hours. I am able to boot a laptop into the special linux image provided at the beginning of this thread, so if my starting point is that I'm booted into that and have the fire stick hooked up via usb and it's detected, are there a series of commands I can send it once it's booted into TWRP for forcing a rooted image onto it?
[Fire TV Original Android Development] gojannz:
Below are the commands i've used to send and install prerooted image via TWRP without using any input devices. While the firestick is on TWRP and connected via usb, open Command Prompt, type each line and press enter.

adb push C:\<location of image>\<name of image>.zip / sdcard/

adb shell

twrp install /sdcard/<name of image>.zip

twrp wipe cache

twrp wipe dalvik

reboot -p

I hope this helps.
[Fire TV Original Android Development] schuetze.1:
I have the very same problem.

@k4y0z : I would be very pleased if you could tell us how to flash the image via bootrom.
[Fire TV Original Android Development] door_jam:
I read VM190 or above/6.2.8.0 & above are unrootable.

I have just received the Firestick 4k from Amazon with VM242, it is still unopened. I want to learn as much as possible before I open the box.

Does the rootability only depend on the firmware version?

Am I right saying that, as long as the firmware is below 6.2.8.0 (assuming), AND I keep it away from OTA updates before the rooting process, it is good to go?
[Fire TV Original Android Development] HGSC12:
I have a mantis firestick and seem to have found myself stuck. I can load TWRP, but regardless of what I do, the firestick gets stuck at the initial FireStick loading menu. I have tried installing one of the prerooted roms, as well as a full backup from my other Mantis, but nothing seems to be working. Does anyone have any suggestions or ideas on how to get it to fully boot? Thank you!
[Fire TV Original Android Development] Sus_i:
The note in OP is outdated and only valid for the unlock method via shorting.

Since Kamakiri 2 we are able to unlock without shorting, if the OS isn't updated to 6.2.8.7 (this OS patchs the new unlock method).

Keep the stick offline until you are able to try kamakiri 2.0.1 for mantis.

You can use this (up-to-date) guide here:

https://xdaforums.com/t/unlock-root...d-fire-tv-stick-lite-sheldon-p.4410297/unread
[Fire TV Original Android Development] Sus_i:
What kind of menu is that?
[Fire TV Original Android Development] HGSC12:
My apologies, "menu" wasn't a great choice of words. It gets stuck on the static "fire TV" logo screen. The initial one, before the animated version that should play directly afterwards.
[Fire TV Original Android Development] bibikalka:
Wait, but these new instructions are not for a 4K device. Can one unlock a 4K stick with the new instructions???

Nevermind, I found the new instructions here:

[UNLOCK][ROOT][TWRP][UNBRICK] Fire TV Stick 4K (mantis)

NOTE: There have been multiple reports of devices with serial numbers containing VM190 or higher being shipped with DL-Mode disabled in BROM. These devices cannot be unlocked using kamakiri. These devices do not show up at all on USB when...

xdaforums.com

Now, can I restore a 6.2.8.0+ device back to 6.2.7.7, say, via a TWRP image? I forget now the whole downgrade issue. They burned the fuse, but if I have root, I should be able to go back, right?
[Fire TV Original Android Development] Sus_i:
The black white logo, ok.

If you can boot into TWRP, flash a stock rom, wipe data, then flash the kamakiri zip and then magisk if you like.

If TWRP isn't aviable, re-do the bootrom-step, then fastboot-step and then flash a stock rom + magisk.
[Fire TV Original Android Development] Sus_i:
You can downgrade to any OS you like, in case you wipe data (and skip the initial update) too...

but this won't fix the burned efuse if it's already gone. The new goal for the burned-efuse sticks is to keep the preloader safe, in order to access bootrom ;)
[Fire TV Original Android Development] jdawgx:
This worked to get me where I wanted. Thank you very, very much! I was able to find and install the latest prerooted image from here. Using your same steps, I installed Magisk 20.4 from here. Initially I tried installing the latest Magisk (v24.0), but that didn't allow the "su" command to work from within the OS. I then followed the steps here to get the Dual Shock 4 controller working, but, the "mount" commands provided at that site failed because it couldn't find the referenced folders, so what I had to do, after installing the Android Developer Tools on my PC and connecting the Fire Stick to the same PC via USB) was this (a slight modification of what's on the linked site):

adb shell

su

(NOTE: If you have never run the command su before, your Fire TV will display a popup asking for you to grant permission. Select “Grant” on the popup)

mount -o rw,remount /

mount -o rw,remount /system/

cp /sdcard/Vendor_054c_Product_05c4.kl /system/usr/keylayout/

mount -o ro,remount /

mount -o ro,remount /system/

rm /sdcard/Vendor_054c_Product_05c4.kl

exit

exit

Then, after rebooting the Fire Stick and re-pairing the DS4 controller, the Stick correctly handled the controller, and now I'm able to play games on the TV via Steam Link.

Just wanted to give this info for anyone else looking to accomplish this same thing. Thanks again for all your assistance @gojannz!
[Fire TV Original Android Development] HGSC12:
I booted into TWRP, flashed the stock rom found here, wiped data, and reflashed kamakiri. Unfortunately, there is no difference. I can still boot into TWRP, but if I try to boot to the OS it still gets stuck on the black/white logo. I tried leaving it powered on for a while and different patterns of wiping/reinstalling, but still no dice. Do you have any other suggestions? I really appreciate your help.
[Fire TV Original Android Development] bibikalka:
OK - good to know! I have a perfectly set up 4k - with a custom kernel, EXFAT support, and everything else on 6.2.7.7. So I'll just open up the one I kept in the box, unlock it with kamakiri, clone the other one to it, and will be done! I really bought the new one as a back up in case the remote on the other goes breaks, but it looks like it's another gem that can be unlocked!
[Fire TV Original Android Development] door_jam:
Thanks very much.

I just set up my new 4k stick. I kept it offline, as you instructed, while

- followed post #1 & installed TWRP successfully

- installed Magisk 20.4 via FireISO2 using TWRP install command (successful)

Then I tried to find a way to disable OTA before I head over to boot up the stick. Unfortunately, I could not find any solution.

I then followed this guide from AFTVnews to set up the stick while briefly connecting it to internet.

How to Skip Software Updates during Initial Setup or Factory Reset on a Fire TV, Firestick, or Fire TV Cube

Since the latest software update for Fire TV devices is blocking the ability to use custom launchers, you may want to avoid updating a new or factory reset Fire TV.

www.aftvnews.com

When I went to About My Fire TV (it came with FireOS 6.2.8.1/3387), under Check for Updates, it mentioned the update had been downloaded & will be updated in the next restart. This scared my shxx out.

I then ran these commands:

pm disable com.amazon.tv.forcedotaupdater.v2

pm clear com.amazon.tv.settings.

pm clear com.amazon.device.software.ota

Now back on About My Fire TV, Check for Updates: Last Checked - Never

Is it safe to assume that the last two of the commands above had deleted the OTA update (or just the last one)? I am good to reboot the stick, right?

Or, is it safer to flash rbox's prerooted image 6.2.8.1_r3 ?

[Update] I went back to About My Fire TV & hit Check for Updates (just to see if OTA checking is disabled), it did start to download the OTA again. And I stopped the internet right away.

If I install SweenWolfś Patch-6.2.8.1(No FOTA), will that be sufficient?
[Fire TV Original Android Development] Sus_i:
Disabling OTA for rooted sticks on any fireOS version, this works always:

adb shell
su
pm disable com.amazon.device.software.ota
pm disable com.amazon.device.software.ota.override
pm disable com.amazon.tv.forcedotaupdater.v2
pm clear com.amazon.device.software.ota
exit
exit
[Fire TV Original Android Development] Sus_i:
(y)

I don't know if 'clone stick' will work, but you can try it.

Years ago I did this on a fireOS 5 box, installed a TWRP backup from a different device...

Problem was (if I recall it right), that the second (cloned) box used the serial, macaddress and so on from the first device ;) Ofc it could be that this isn't the case for mediatek devices, idk.
[Fire TV Original Android Development] Sus_i:
You can try to flash a more recent stock rom

https://d1s31zyz7dcc2d.cloudfront.net/8a17993ff1335c5546eadfd080546e7b/update-kindle-mantis-NS6281_user_4812_0005940366468.bin
https://d1s31zyz7dcc2d.cloudfront.net/d4966e07e86cfd81861531207dcb4cde/update-kindle-mantis-NS6287_user_3770_0006544079492.bin

You can also try to format data instead of the wipe and you can try the kamakiri GPT-fix if you like (somewhere in this thread).
[Fire TV Original Android Development] bibikalka:
I cloned HD7 2014 vintage before, and recently I cloned Fire stick 2 (tank) in TWRP. It works uneventfully, and the serial is still proper, because it's not stored in any of the cloned partitions. So that's the fastest way to keep all the customizations.
[Fire TV Original Android Development] digobertoldi:
Hello everybody, im new here. I have a fire tv stick 4k updated to the latest version, which prevents the installation of new launchers and I would like to know if I can follow this thread to root my device and install new launchers with it. Can someone help me? thx
[Fire TV Original Android Development] anphabvn:
Found win7 ADB driver for Mantis. Thank people

(srr bad english)
[Fire TV Original Android Development] Noisemaker00:
In your opinion, a device with VM201 (local store item) may have a FireOS version < 6.2.8.7?
[Fire TV Original Android Development] Sus_i:
I've got one with VM2011xxx with 6.2.8.0 on it...
[Fire TV Original Android Development] Noisemaker00:
the script

bootrom-step.sh

keep saying

RuntimeError("donwload failure,giving up")

what does it means? the device is patched?

I do not boot up the device to check the firmware version to avoid any type of update
[Fire TV Original Android Development] Sus_i:
If you mean 'downgrade failure'

then you can try to disable the rpmb recheck in the main.py
[Fire TV Original Android Development] Noisemaker00:
is it safe to bypass that check?

seems related to the old shorting method but I was unsure and I changed nothing
[Fire TV Original Android Development] Sus_i:
You can also try the bootrom-step a few times first, re-do it until it works... lets say five times or so.

I don't know whats the reason for the failure, some people disabled this check and it worked for them.
[Fire TV Original Android Development] anphabvn:
What is your firmware and serial number ?

Mine is Fireos 6.2.8.1 and VM2012

success on first try
[Fire TV Original Android Development] Noisemaker00:
finally I commented out the check and both bootrom and fastboot step completed.

Now it show me the TWRP screen.

How can I block the OTA app package before setup firestick and connecting to internet? I tried using

adb shell

pm ...

to check the exact package name for OTA but it says the command not exist
[Fire TV Original Android Development] Noisemaker00:
another question:

should I install magisk? if yes is this the correct link/guide to install on mantis too?

Magisk - The Magic Mask for Android

Welcome to the Magisk Release / Announcement thread! For all up-to-date info and links, please directly check Magisk's GitHub Page Installation Download count of previously XDA hosted files: 25,490,945 v1: 8746 v2: 2251 v3: 3790 v4...

xdaforums.com
[Fire TV Original Android Development] Noisemaker00:
I installed magisk 20.3 from the link above, then I followed this guide to skip updates

How to Skip Software Updates during Initial Setup or Factory Reset on a Fire TV, Firestick, or Fire TV Cube

Since the latest software update for Fire TV devices is blocking the ability to use custom launchers, you may want to avoid updating a new or factory reset Fire TV.

www.aftvnews.com

but when I try to run

adb shell
su
pm disable com.amazon.device.software.ota
pm disable com.amazon.device.software.ota.override
pm disable com.amazon.tv.forcedotaupdater.v2
pm clear com.amazon.device.software.ota
exit
exit

it says

WARNING: linker: /sbin/magisk32/: unsupported flag DT_FLAGS_1=0x8000001

and the firestick prompt me a pop-up saying it needs internet connection to finish installation of Magisk Manager

What should I do?

is magisk manager safe to install?
[Fire TV Original Android Development] Sus_i:
Let the app do the magisk manager update... but avoid an update of magisk via the manager app.
[Fire TV Original Android Development] Noisemaker00:
ok, I finished the magisk setup and I was able to disable OTA app packages and some other packages I found in this script (eg. Alexa)

Now I have a couple of questions:

I read Magisk >= 24.0 has no Magisk Hide anymore, so how I can hide root from apps like Netflix, and so on?

Is there a list of suggested packages to disable specific for 4K? Or can I use the packages in the script above safely? In particular I'm interested to block all amazon metrics, data-sniffer and so on

eg: in the script this package is commented out

#pm disable com.amazon.tv.forcedotaupdater.v2 # NEEDED FOR OOBE REG / WI-FI SETUP

but in this thread is suggested to disable to prevent OTA, so I disabled, but is correct?

Is there any suggested androidTV-like launcher to use instead of the amazon default one?

Now firestick have FireOS 6.2.7.7, do I need any upgrade? (obviously any that does not break the exploit and root)
[Fire TV Original Android Development] Sus_i:
You may use an older version of magisk...

You may try it step by step, each disabled package can break something. It's best if you take TWRP backups in between.

The note says that you need this package in order to do the setup of the stick. Doesn't matter, in case you get to the setup screen because you did a factory reset, all packages are enabled by default.

Take a look into @SweenWolf threads...

No
[Fire TV Original Android Development] Noisemaker00:
yesterday I read something about Zygisk and the DenyList to achieve the MagiskHide task in the new Magisk version.

As far I understand zygisk is not enabled by default. Is it safe to enable on firestick?

If I choose to downgrade to magisk 19.x can I simply flash it from TWRP even if is an older version?

Or this may cause issues?
[Fire TV Original Android Development] Sus_i:
You may tell us that... ;)

Doesn't need to be 19 and a downgrade should not be an issue.
[Fire TV Original Android Development] OffsetPikachu55:
my fire stick has a serial number containing VM241 but it was still unlocked
[Fire TV Original Android Development] Sus_i:
Thats fine :)

The note about the serial number refers for kamakiri 1.x, i.e. unlock via shorting.

Kamakiri 2.x works for all serial numbers, without a short, if the installed fireOS build is not 6.2.8.7 or later.
[Fire TV Original Android Development] Oneplus#:
Hey guys.

Big thanks to the dev. I've succesully rooted my firetv with this script and fixed some stuff. So I've made a guide for who need some help https://github.com/daboynb/Root_firestick .
[Fire TV Original Android Development] OffsetPikachu55:
So after 6.2.8.7 shorting method won’t work?
[Fire TV Original Android Development] Sus_i:
No. Shorting (kamakiri 1.x) gets blocked via 6.2.8.0 (or later) or by factory if the serial is VM190 and later.

The new kamakiri 2.x gets blocked with 6.2.8.7 or later.
[Fire TV Original Android Development] Sus_i:
(y)

The script from OP works fine for the most sticks, only a few get the rpmb downgrade issue...

Btw this is the thread for mantis, the 4k stick...

Though some mantis sticks are also affected, but maybe post it again in the sheldon thread ;)
[Fire TV Original Android Development] Oneplus#:
Oh, my bad ahah. Wrong thread. Got confused.

Btw maybe the other things in the guide will help someone ahaha. Now I'll post on the right thread.
[Fire TV Original Android Development] lazo41:
Is it possible to unlock Fire OS 6.2.8.9 (NS6289/3905) ?
[Fire TV Original Android Development] Noisemaker00:
I'm trying to use custom launcher on my rooted firestick, so I tried to disable

pm disable com.amazon.tv.launcher
pm disable com.amazon.firehomestarter

and I installed

GitHub - tsynik/LeanbackLauncher: Leanback on Fire - Google Leanback Launcher on steroids

Leanback on Fire - Google Leanback Launcher on steroids - tsynik/LeanbackLauncher

github.com

but Amazon Prime Video (com.amazon.avod) seems not working with those 2 packages disabled.

Why this happening? The prime video app require the stock launcher to be executed?
[Fire TV Original Android Development] Wizard_bg:
Hello I've been trying to follow your steps but i always end up with error message.

First time I tried to flash twrp my Fire TV Stick 4K (not rooted) with FireOs 6.2.8.1with Ubuntu 22.04 LTS and kamakiri-mantis-v2.0.1.

My second try was with

fireiso-2.0.0-amd64.iso and kamakiri-mantis-v2.0.1, again the same error. Please any suggest to fix it.

[root@fireiso ~/kamakiri2/kamakiri]# sudo ./bootrom-step.sh

[2022-06-14 19:20:48.079382] Waiting for device

[2022-06-14 19:21:16.707858] Found port = /dev/ttyACM0

[2022-06-14 19:21:16.732793] Handshake

[2022-06-14 19:21:16.753991] Load payload from ../brom-payload/pl/pl.bin = 0x3A04 bytes

[2022-06-14 19:21:19.261159] All good

[2022-06-14 19:21:19.757150] Check device_type_id

[2022-06-14 19:21:19.757429] Detected mantis (AKPGW...GI9..)

[2022-06-14 19:21:19.757577] Check GPT

[2022-06-14 19:21:20.299945] gpt_parsed = {'lk': (1024, 2048), 'tee1': (3072, 10240), 'tee2': (13312, 10240), 'boot': (23552, 32768), 'recovery': (56320, 32768), 'logo': (89088, 7168), 'kb': (96256, 2048), 'dkb': (98304, 2048), 'MISC': (100352, 2048), 'vendor': (102400, 307200), 'system': (409600, 2252800), 'cache': (2662400, 1048576), 'userdata': (3710976, 11558879), '': (0, 1)}

[2022-06-14 19:21:20.300154] Check boot0

[2022-06-14 19:21:20.782851] Check rpmb

[2022-06-14 19:21:20.813066] Downgrade rpmb

[2022-06-14 19:21:20.814502] Recheck rpmb

[2022-06-14 19:21:20.930679] rpmb downgrade ok

[2022-06-14 19:21:20.931270] Flash tz

[7265 / 7265]

[2022-06-14 19:22:24.273383] Flash lk

[613 / 613]

[2022-06-14 19:22:30.105779] Flash lk-payload

[7 / 7]

[2022-06-14 19:22:30.650295] Inject microloader

Traceback (most recent call last):

File "/root/kamakiri2/kamakiri/modules/main.py", line 135, in <module>

main(dev)

File "/root/kamakiri2/kamakiri/modules/main.py", line 95, in main

switch_user(dev)

File "/root/kamakiri2/kamakiri/modules/functions.py", line 111, in switch_user

block = dev.emmc_read(0)

File "/root/kamakiri2/kamakiri/modules/common.py", line 212, in emmc_read

raise RuntimeError("read fail")

RuntimeError: read fail

[root@fireiso ~/kamakiri2/kamakiri]#