yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] SweenWolf:
You have already unlocked and rooted your stick so i think you know the basics.

If you are already rooted that means you have magisk installed on your firestick (theres no other meaning of root in this case) then boot up your firestick normally, open "Magisk Manager" click on three dots menu (on top right of the screen) and then choose reboot to recovery.

If you don't have magisk installed (means you don't have root) then you can use adb to reboot into TWRP (do not boot into Fastboot if you don't want to brick your stick) now in order to do that follow one of the Options.

Option 1 (if you dont have a pc)

Download "Remote ADB Shell" on your Firestick (watch on youtube on how to do that)

Open remote adb shell and in the IP address field enter "localhost" or "127.0.0.1" and in the port enter "5555" and connect.

Your stick will show a popup, click on allow.

Once in shell, type "reboot recovery"

It will reboot into TWRP, from there you can flash any rom of your choice.

Option TWO (if you have a pc)

Get "Minimal ADB and Fastboot" from XDA or get "platform tools" from Android developers site, then install it.

Once installed open the command prompt and type

"adb devices" this will start adb server and show list of devices.

Make sure your pc and firestick is connected to same wifi, get the ip address of your stick.

Type in the ip address along with port like

"adb connect 192.168.22.40:5555"

Change 192.168.22.40 to ip address of your stick.

Allow the debugging prompt on your firestick.

And then type

"adb reboot recovery"

You will reboot into TWRP

Option 3 (from stick itself with the help of OTG)

Connect a Y type OTG to your Firestick, boot your firestick, you will be greeted with an option to reboot into recovery for 5 seconds, you can press cancel to "reboot to recovery" you will need a mouse connected to OTG to do that.
[Fire TV Original Android Development] emkorial:
Thanks, this is much more comprehensive.

I do have Magisk installed. So I just launch Magisk (I have never done this) and select reboot into recovery, and that will reboot me into TWRP and I can flash 6.2.6.6? I already copied the ROM file up to the stick. Do you use the fire TV remote to navigate Magisk and TWRP?

And if I do that, how to I access adb afterwords to run the commands to disable OTA updates? Or do I even need to? The ROM I am flashing is the 6.2.6.6 rooted one from https://xdaforums.com/t/fire-tv-stick-4k-mantis-prerooted-stock-images-6-2-8-1_r3.3983091/, does that have OTA disable already?

Or, could I just skip using MAgisk and try one of the options you listed. I think option 2 would be the best for me, so basically to reflash 6.2.6.6 I would do the following:

Get "Minimal ADB and Fastboot" and install it.

Once installed open the command prompt and type "adb devices" this will start adb server and show list of devices.

Make sure your pc and firestick is connected to same wifi, get the ip address of your stick.

Type in the ip address along with port like "adb connect [ip address of my stick]:5555"

Allow the debugging prompt on your firestick.

And then type the following

adb reboot recovery

After it reboots type

adb devices (I should see the SN of my stick)

adb shell

twrp install /sdcard/mantis-6.2.6.6_r1.zip

twrp wipe cache

twrp wipe dalvik

reboot -p

Following either method, Magisk to TWRP or flashing via adb commands, after the reboot is complete, once it gets to the setup screen, to disable OTA updates (assuming I still need to, if the ROM does not have them disabled already), I connect adb per the instructions above then run

adb shell

su

pm disable com.amazon.tv.forcedotaupdater.v2

pm disable com.amazon.device.software.ota

pm disable com.amazon.device.software.ota.override

And I would be back in business? It's insane, I went to watch a freaking Thursday football game, it tells me I need to update an app, and because of THAT it screws up the display on my Firestick (it is like 300% brightness now), I need to go through all this

One question, do I need to deregister my FireStick before doing all this?
[Fire TV Original Android Development] SweenWolf:
Just flash, if ota packages are reenabled then disable them.

Just do this.

Pull out the data cable from your TV/Power brick and connect it to your computer.

Your stick will be powered by the usb ports of the computer and will start booting. Once its booted, open cmd/ps/terminal

Type "adb devices"

Accept prompt on your tv

Then type command to push with (adb push)

Reboot to recovery using (adb reboot recovery)

Get into shell by using (adb shell)

Flash the zip using (twrp install)

Reboot using (reboot)
[Fire TV Original Android Development] emkorial:
OK, so just to try and make this as idiot proof as possible for me:

Plug the USB cable that I currently have going to the power strip into my Windows laptop. This will boot the stick

Once it is booted, open a cmd prompt

Run "adb devices"

I will get some prompt on the TV, click OK using the Fire TV Remote

(I don't think I need to push anything since I have the ROM already on the /sdcard of the stick)

Type "adb reboot recovery", this will reboot me into TWRP

Type "adb shell"

Type "twrp install /sdcard/mantis-6.2.6.6_r1.zip" (this file is already there)

Type "twrp wipe cache"

Type "twrp wipe dalvik"

Type "reboot -p"

At that point I should have a stick that is freshly flashed to 6.2.6.6, that may have OTA re-enabled

Two final questions before I dive into this:

If OTA is re-enabled, how do I prevent it from updating before I get a chance to disable OTA?

Do I need to deregister my firestick before I do this? I would prefer not to if it is not needed but if it has to be done, that's OK

Thanks again for the excellent help!
[Fire TV Original Android Development] SweenWolf:
You do not have to deregister anything.

If OTA is reenabled, before rebooting go to network section and forget the network, or just turn off your router, simple as that
[Fire TV Original Android Development] emkorial:
OK I will unplug my router and be trying this tonight. Wish me luck!
[Fire TV Original Android Development] emkorial:
OK, this is not good. Here is what happened:

I plugged the USB cable that I currently have going to the power strip into my Windows laptop. This booted the stick

Once it is booted, I opened a cmd prompt

Run "adb devices". NO DEVICES WERE FOUND

So I Googled and saw I needed to connect to the stick. (This step was missing from the instructions)

So I typed "adb connect 192.168.68.104", and it connected.

I typed adb devices, and it found the device!

I clicked OK on the prompt that came on the TV

I then typed "adb reboot recovery", and the stick rebooted me into TWRP

This is where it failed.

I was at the TWRP screen asking me if I wanted to keep things read only and the slide bar to modify settings,

I typed "adb shell" and got "error: no devices/emulators found"

So I typed "adb connect 192.168.68.104" and I got "unnable to connect to 192.168.68.104:5555: cannot connect to 192.168.68.104:5555: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)"

I could not use the FireTV remote to navigate the TWRP screen, so I was just stuck

So I unplugged the stick from the laptop, plugged it back into the power strip, I got the two boot up screens, then a black screen for a while, before the Fire Stick home screen finally came up

So I got rebooted to TWRP, but at that point I am unable to communicate with the stick to issue the abd shell command and flash the ROM. And I cannot navigate TWRP to do anything via the UI. What am I doing wrong?
[Fire TV Original Android Development] emkorial:
Possibly when the Fire Stick rebooted into TWRP mode, did it get assigned a different IP address, and that why the adb connect failed? Just grasping at straws here
[Fire TV Original Android Development] SweenWolf:
SMH, Bluetooth and Wifi does not work in TWRP, you don't have to type the ip address as there won't be any.

The reason why i told you to connect using the cable is that it doesn't need any ip to connect, its a direct connection. You will have to type everything in the Console.

And make sure you are using a data cable i.e. it should have 4 wires in it
[Fire TV Original Android Development] emkorial:
OK, that explains that

The firestick was directly plugged into the PC. I am used a USB data cable I just checked the pins with a flashlight and they are in there. Why would my laptop not be seeing the Firestick over the cable? Is there a Firestick "driver" I need installed?

Edit: SweenWolf, you da man, when you mentioned not needed to go over the network, it made me think that the laptop was just providing power and not seeing the stick. I checked device manager and saw it wasn't reading the stick properly! So I google for a driver and found one on xda and installed it (https://xdaforums.com/t/fire-stick-4k-mantis-driver-adb-for-win7-x64.4445315/), and now it shows up in Device Manager. And, I ran adb devices, and it saw the stick, WITHOUT having to connect to the IP Address first!! Which means (to me) the direct connection to the laptop is working! Progress!!

Thanks so much for the continued help, I feel like I am stumbling towards eventual success. I'm going to try the whole process again tomm, I have other things to attend to now. Stay tuned!! Looks like i need to get the driver set up for TWRP mode but the thread ha instructions on that so hopefully it goes smoothly
[Fire TV Original Android Development] emkorial:
OK, this is weird.

I plugged in the stick, rebooted to recovery, flashed the ROM, wiped cache, wiped dalvik, disabled OTA, an then rebooted the stick.

The stick came back, but all my apps were still there. And then about a minute after that it rebooted on it's own, and the brightness issue came right back (this was caused by an issue with the Prime Video app, so if it is keeping the apps, the problem is not getting fixed)

How do I do a FULL wipe of the stick so nothing carries over? What would the adb commands be to do that?
[Fire TV Original Android Development] emkorial:
Anyone? Was the stick still in some read only mode?
[Fire TV Original Android Development] Sus_i:
Boot into TWRP (via usb cable connected to your PC), then run something like this:

adb shell
twrp wipe data
twrp wipe cache

You can run 'twrp format data' too, if you like.

Done.

Full list of commands:

TWRP Commandline Guide

</style>CLIENT SIDE/SCRIPTinstall FILENAME :	install FILENAME zip file.

twrp.me
[Fire TV Original Android Development] emkorial:
Thanks, I thought I missed a wipe command in there somewhere!

Would I run "twrp wipe data" before or after, I flash the ROM? Or does it not matter? Would these be the steps, in this order?

Type "adb shell"

Type "twrp install /sdcard/mantis-6.2.6.6_r1.zip" (this file is already there)

Type "type wipe data"

Type "twrp wipe cache"

Type "twrp wipe dalvik"

Type "reboot -p"

Any risk of a brick or losing the remote pairing by wiping data ? Now that I have the driver issue worked out I am much more comfortable accessing the stick over USB and running the commands.

Thanks for the assist!
[Fire TV Original Android Development] Sus_i:
Yep, but you won't need to flash a rom if you wipe only data, dalvik and cache.

It won't brick, but ofcourse you will lose all kind of data, incl. the remote pairing, wifi, adb dev. settings and the amaz. account... i.e. at the reboot the logon setup oobe waits for you.

You would need to skip the update thing too, or your 6.2.6.6 OS is gone.
[Fire TV Original Android Development] emkorial:
If I recall correctly, I might have to have it auto update to the latest version, then reflash 6.2.6.6 since you can't connect via ADB to disable OTA updates until you get to a home screen, and you can't get to a home screen until it updates. I think I had to do that before. But it is safe to do since the unlock blocks the efuse from blowing, correct?

So it would be :

Connect to stick

Wipe data, cache, and dalvik

Reboot and it will act like a brand new out of the box fire stick

Pair remote and go through setup, which will upgrade to whatever the latest FireOS version is

Once that it done, connect via ADB and enable ADB debugging

Reboot to TWRP

Flash 6.2.6.6, clear cache, clear dalvik

Disable OTA updates

That should leave me with a fresh 6.2.6.6 stick, and I then proceed from there.

We'll see what happens!
[Fire TV Original Android Development] Sus_i:
A messed up stick is what happens ;)

You may just skip the initial update... which is way better and very easy if you follow this guide:

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
[Fire TV Original Android Development] emkorial:
Why would mess up the stick? I went through that process before, but that was back when the latest OS was (I believe) 6.2.8.0, which would blow the eFuse if applied, but if you unlocked the stick via the short, you could safely upgrade to that version without blowing the eFuse and you could then downgrade after that. Has that changed?

I'm not a fan of trying to perfectly time yanking an ethernet cable to avid the upgrade, are there any more reliable methods? Do the modified build prop version still work? As described at https://www.aftvnews.com/how-to-blo...k-by-setting-a-custom-fire-os-version-number/
[Fire TV Original Android Development] emkorial:
I found the original post, and it turns out it was you that said it was ok to upgrade and then downgrade :)

https://xdaforums.com/t/unlock-root...stick-4k-mantis.3978459/page-72#post-84832395

However that was back when the OS upgrade version was 6.2.8.0, has there been later OS releases that do screw it up and prevent downgrading?
[Fire TV Original Android Development] emkorial:
duplicate
[Fire TV Original Android Development] Sus_i:
Yes, you are right.

Back then this was ok, however nowadays I would just skip the update...

Maybe yes, idk, I guess it's best and easiest if you skip the update.
[Fire TV Original Android Development] emkorial:
I will be trying the update "skip" shortly. My car broke down, so I've had to switch from electronics mode to car mechanic mode for the past few days,
[Fire TV Original Android Development] emkorial:
So after I wipe data, dalvik, and cache, and flash the ROM, then skip the update, finish setting up the stick, then block updates, and get everything set up totally stock on 6.2.6.6 with updates blocked, I should reboot into recovery and back that up so I can return to that state easily, right?

Would the ADB command to back that up be (from adb shell) "twrp backup partition S, D to STOCK_BACKUP"

Would the ADB command to restore that in the future be (from adb shell) "twrp restore S, D from existant STOCK_BACKUP"
[Fire TV Original Android Development] Sus_i:
(y)

You don't need a name for the backup, example "twrp backup S" will backup system...
[Fire TV Original Android Development] SoftwareRat:
A Fire TV Stick 4K with Fire OS 6.2.9.3 is rootable?
[Fire TV Original Android Development] Wolfforlunch:
Hi Folks,

Thanks for your guide and efforts. I would appreciate some help with the following, if anyone has some spare free time to help me out:

-I don’t quite understand how to it’s possible to have the Fire Stick connected to the computer, while also having a mouse connected to it to interact with twrp. I have an OTG cable, with a micro-usb end that connects to the stick, and the other end which splices into two USBs, one for connection to a power source and one data USB that is connected to a USB Hub. (This set-up has been tested and worked before with connecting external HDDs and such on Amazon’s OG OS.)

-When I get to the fastboot stage, I try to use the adb shell to push Magisk to the device, it pushes fine, but when I try to install it, it gives me an error saying no bootable device found. I can see on the TV screen that there is an option to allow overwriting or read-only, but since I can’t have the stick connected to an OTG mouse AND the laptop at the same time, I can’t interact with twrp through TV. if I unplug the stick from the computer, while still connected to the TV, and connect it to an OTG mouse, it boots up and shows a twrp screen with a reboot countdown and when it gets to 0, it just gets stuck there and nothing happens, also OTG mouse does not appear to interact on this screen to press ‘cancel’ on reboot.

Any and all help would be greatly appreciated in advance! Sorry if this question has been answered before, I have spent countless hours searching the forum but my research skills are at newb-lvl at best.

Cheers!
[Fire TV Original Android Development] Sus_i:
If 'adb push' works fine, run 'adb shell' then 'twrp install...' or something else... Maybe type 'adb devices' first and if there is the serial, run adb shell
[Fire TV Original Android Development] Wolfforlunch:
Thanks for your reply, really appreciate it. I have ran ‘adb devices’ and can confirm there is a serial. ‘Adb shell’ runs fine as well, but ‘twrp install’ will give an error saying something like ‘[amonet] remove boot batch

[amonet] failed to remove boot patch…’ followed by multiple other lines saying failed, failed, failed…
[Fire TV Original Android Development] Sus_i:
Take a picture from the error messages... never saw this kind of error.
[Fire TV Original Android Development] emkorial:
Just another FYI for any other unfortunate souls trying to make this work ...

IF you are using the Ethernet adapter to try and skip updates, you cannot connect to ADB when the Fire Stick is plugged in through the Ethernet adapter. Because of course you can't
[Fire TV Original Android Development] Wolfforlunch:
Although here I was trying mantis, but it’s the same exact ordeal with Magisk.
[Fire TV Original Android Development] emkorial:
So I got the Fire Stick connected. I could not get ADB working when connected through the Ethernet adapter, so I just did direct USB Connection

I rebooted into recovery, wiped data, wiped cache, wiped dalvik, flashed ROM. Rebooted. As promised I got the OOBE for the fire stick.

I paired the remote, connected to my Wifi network, and then it displayed the "checking for updates screen for a moment, and then just skipped it entirely and went right to the login screen. No download progress bar, I didn't kill the connection, it just skipped right over it. Maybe the ROM has that screen disabled?

So I get it all set up, turn on ADB debugging, and connected to ADB. I go into adb shell to delete any cached update file (in case it downloaded one in the background) and disable OTA. But when I enter su, I get permission denied. I checked the applications list, and Magisk is not installed! I thought pre rooted ROM's would have it preinstalled. I flashed the 6.2.6.6 rooted image from https://xdaforums.com/t/fire-tv-stick-4k-mantis-prerooted-stock-images-6-2-8-1_r3.3983091/ which specifically says Magisk will always be installed. But it wasn't.

I redid the entire process, and same thing. No Magisk. Some googling led me to this page (https://miguelmota.com/blog/rooting-a-fire-tv-stick-4k/#rooting-with-magisk) which had the Magisk download and instructions on how to flash it with TWRP. I followed those instructions, and was able to get su working. I then cleared the update cache and disabled the OTA updates

One thing I noticed is the Magisk version is different from what it was before. Before I wiped I wrote down the APK versions of everything I had on the stick, previously Magisk was version 7.3.5-de969a9d, now it say version 7.5.1. Does that matter?

So at this point I should have a totally clean 6.2.6.6 stick with nothing on it whatsoever.
[Fire TV Original Android Development] Wolfforlunch:
I was able to get the twrp and the OTG mouse working, but I am still unable to install Magisk…it also said something about TWRP theme version is different than stock, or something of the sort.
[Fire TV Original Android Development] Sus_i:
Seems something is messed up with your gpt.

Take a look into this thread and search for 'gpt fix'

You may need to run kamakiri again with this gpt fix...
[Fire TV Original Android Development] Wolfforlunch:
Sir, you have outdone yourself. That did the trick. I’m giving you a virtual hug :)
[Fire TV Original Android Development] Joe Ghost:
I did this successfully yesterday. Here are a few solutions I found:

I didn't need to short the pins; the script unlocked the bootloader just fine on its own. This Fire TV Stick 4K was purchased last week.

I could not build the live USB drive with Rufus in Windows. When I booted from the drive it gave some error about "IO charset ascii not found". FAT32 and NTFS were the only filesystem options in Rufus and neither of them worked. So I made the drive in Linux and it worked perfectly and took like 2 minutes. Imaging a USB drive in Linux is ridiculously easy, you literally copy the ISO file to the USB device with one command.

You don't need an OTG cable. I got this ROM on the Fire Stick by using "adb push" to copy the G070VM0984752N1Q folder to /sdcard/TWRP/BACKUPS/, and then doing "twrp restore" from that backups directory in the adb shell. Then I used this fantastic guide to control the Fire Stick through ADB in order to pair the remote.
[Fire TV Original Android Development] savvyyy:
Hi, one of my unrooted sticks ignored the blocked updates and now is on the latest version. Are there any solutions to root it ? Tried the this guide but I get the "RuntimeError: ERROR: Serial protocol mismatch, expected 0001 got 2001".

Thank you
[Fire TV Original Android Development] redeyedjedi:
Seriously? A stick you ordered on Amazon, or bought in a store? I'm curious where you found the older stock, I need to buy another since my dog decided to chew my remote. Right now, the sticks are cheaper than the remotes, I just wanna buy a rootable one.
[Fire TV Original Android Development] Joe Ghost:
Yep from Amazon like normal. It said copyright 2020 on the box - not sure if that matters.
[Fire TV Original Android Development] yellow101:
Hi, How were you able to flash with out OTG? I dont have OTG and im stuck in TWRP.
[Fire TV Original Android Development] Joe Ghost:
I had the Fire Stick plugged into the computer and used ADB for everything. First copy the files with "adb push". Type "adb help" to see the exact usage - in this case it's "adb push -p <local> <remote>" where <local> and <remote> are the G070VM0984752N1Q and /sdcard/TWRP/BACKUPS directories, respectively. It should show you the progress of the files being copied. Then use "adb shell" to gain access to the Fire Stick's terminal, and then within that, "cd" to the BACKUPS directory and run "twrp restore SDB G070VM0984752N1Q". "twrp" command usage is here. Hope that helps
[Fire TV Original Android Development] RDYRDY:
Hello guys, I purchased my firestick 4k in the August of 2019 and have been updating it ever since, I rooted my phone with magisk and so i thought why can't i do the same with my firestick and that's how i found this thread. I'm on the latest update and hence i want to know if Amazon blocked this method, below I've attached the details of my firesticks software, i want to know if this process works with fireos 6.2.9.3 has it been patched @Sus_i , @Joe Ghost ?

Thank you,

RDY
[Fire TV Original Android Development] dallimjp:
I'm having a hell of a time getting the pins sorted. My fire stick looks very similar but the pins aren't even close to the same position.

Can anyone tell me which pins to short?
[Fire TV Original Android Development] Sus_i:
Just grab one of the capacitors near the edge of the eMMC with tweezers, i.e. bridge both sides.

You can also put a bit of tinfoil between the shield and the part on there.

Anyways, do you know that shorting method gets blocked via update 6281 or later?

There is also a new method which works without to short anything (same method as for sheldon), but this gets also blocked via fireOS 6287 or later.