yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] KB!:
Thanks for the response. The problem I had was that I couldn't access TWRP, I am certain it was there but because I had already wiped and flashed things ADB was no longer active so I couldn't tell it to reboot recovery.

Since it was booting so far into the system before looping, evidently the preloader, wasn't staying connected to the computer long enough to let the script run.

I ended up opening it up and shorting again several times repeatedly and, probably through dumb luck, ended up in fastboot mode where I was finally able to boot back to recovery.

I originally tried running the bootrom-step.sh and it would never connect. I tried running the fastboot-step.sh and it wouldn't connect. Either way it is fixed, again.

I really wish there was a way to boot recovery at startup like Rbox's ROMs. If I would have had that option, last night would have been a non issue.

I am going to finish setting everything up tonight hopefully before I unlock the other box.
[Fire TV Original Android Development] Michajin:
Did you try the boot-recovery script?
[Fire TV Original Android Development] KB!:
I believe so, I tried anything I could think of... lol
[Fire TV Original Android Development] meohmy:
I tried to disable ota updates by running the commands listed in post 257 but get the error message 'pm' not found. Firetv is running magisk.

Are there any other commands to disable ota updates?
[Fire TV Original Android Development] KB!:
Did you open a root shell first by typing "su" and hitting enter before running those commands?
[Fire TV Original Android Development] meohmy:
Thanks for the reply, su is not recognized as a command since installing magisk
[Fire TV Original Android Development] KB!:
Try "root".
[Fire TV Original Android Development] Michajin:
I used package package disabler. There are many apps that with with root that can make this process easier and more convenient.
[Fire TV Original Android Development] Bertonumber1:
I use luckypatcher, I know this is frowned upon even mentioning this app so I do apologise... but I only use it because it gives a detailed app info on what you're disabling and is simple to use. Its free and although i only use it for disabling apps I do understand (from a developers point of view ) why its frowned upon. I don't agree with the developer of package disabler . Conman IMO . Resetting license keys for the app then recharging people for a new key every so often.

Regards
[Fire TV Original Android Development] meohmy:
When running'root' I get the message that root is not recognised as an internal or external command.
[Fire TV Original Android Development] Bertonumber1:
Are you running 'root'??

You need to to run :

adb shell

su

To obtain 'root' privileges in the terminal or command line.

Regards
[Fire TV Original Android Development] meohmy:
Have succeeded now, I was running the root commands correctly but, for whatever reason, I kept getting error messages so I went back to basics and started from scratch by reinstalling the rom and installing supersu rather than magisk and everything is now as it should be.
[Fire TV Original Android Development] KB!:
I had to launch Magisk manager on the Fire Tv before it would work with mine.
[Fire TV Original Android Development] G S W:
I can load this iso onto a USB stick? Or which method is best to load into linux via win10
[Fire TV Original Android Development] G S W:
Try downloading the apk "Developer Tools Menu" i think you can find it directly on amazon app store. maybe itll help?
[Fire TV Original Android Development] brick00444:
Use rufus or whatever tool you like to make a bootable usb and boot to linux
[Fire TV Original Android Development] Michajin:
It might have, after resetting it i was able to turn on ADB. But i decided to go the shorting way, since it was the most consistent method. I didn't have the app store or anything at the time. There was not even a launcher. It was very like 90% of everything was disabled until i did a factory reset.
[Fire TV Original Android Development] LocoMexican:
I' having the same kind of problems I had with the demo unit which I ultimately got going. In this post, you describe what is happening to my device. I can get it to run the bootrom-step.sh script. It then says rebooting to unlocked fastboot, but it says waiting on device when I run the fastboot.sh scrpit. In the meantime, the power light goes from flashing white to flashing yellow. Never actually runs the fastboot script. You said you stayed in bootrom and ran the

brick script

and then it booted to unlocked fastboot. What do you mean when you say brick script? How did you run it; i.e. what commands? Help is appreciated. Thanks.
[Fire TV Original Android Development] Bertonumber1:
When you get this problem just pull the power and plug it back in. Should boot to twrp when powered back on again .
[Fire TV Original Android Development] LocoMexican:
Just tried that, but still no go. Does the light alternating between white and yellow have significance. Starts out white, flashes a couple of times and then changes to yellow for about 15 or 20 seconds, and then goes out for 3 or 4 seconds, and then goes to white, etc. etc. Never runs the flashboot to load recovery.
[Fire TV Original Android Development] Sus_i:
Did you flashed the minimal step again? ;)

Flashing yellow mean that something is up.

The white flashing shows that the box just rebooted because of the failure... until it goes yellow again... and so on.

Thats a loop.

Start fresh from the beginning to the end^^

About fastboot is not recognized by your PC... Did you update your ubuntu system to a more recent version like I said in my last post? There were some bugs in the older fastboot sources, due to that some devices won't be recognized in some circumstances.
[Fire TV Original Android Development] LocoMexican:
About fastboot is not recognized by your PC... Did you update your ubuntu system to a more recent version like I said in my last post? There were some bugs in the older fastboot sources, due to that some devices won't be recognized in some circumstances.

Yes, I did do a full evironment update as specified in OP. Think I'll reboot computer and start over from scratch, but NOT update fastboot just to see if it recognizes the old adb fastboot. If not, I'll renew that too. Doesn't take long to get through the rootrom-step script. After two or three tries, I hit it every time. It just doesn't want to switch over to the fastboot part after I try to run the fastboot script. Thanks for your help.
[Fire TV Original Android Development] LocoMexican:
FOLLOW-UP: Success. Ran into the same issues as before, so next I d/loaded amonet v1.0 again, unzipped opened two terminals, ran sudo su in both, then in terminal one, ran the bootrom-step.sh and in terminal two ran fastboot-step.sh. Shorted dato, plugged in pwr and then connected device to my rasp. pi 2 Ubuntu system. Got the remove short and enter screen, did as instructed, the bootrom-step ran to conclusion followed automatically by terminal two into fastboot recovery. Checked tv screen and recovery was there.

In recovery, I formated data, installed latest software version posted in this thread, and Magist v21.4zip, wiped davick, rebooted to recovery just to make sure it was there, and then booted system. New software loaded fine. Finished set up by blocking build prop to stop updates, and all is good in the neighborhood. Thanks everyone for your help.
[Fire TV Original Android Development] Sus_i:
(y)

Its better to use adb method for blocking updates.

This is working fine for blocking updates on all rooted fireTV devices:

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
exit
exit
[Fire TV Original Android Development] Sus_i:
If you missed the prompt on your TV (10 seconds timer), you can use the magisk manager and enable root access for shell in there...
[Fire TV Original Android Development] LocoMexican:
At some point, I had su access because I loaded two apks that required su access and actually prompted me to grant. If I use adb , the access is now denied although the device is rooted. Also, I can use adb to reboot recovery.

As for Magist Manager, I can't seem to get the right combination of inputs in the settings to allow access. Maybe I can just start over with the format data, flashing, etc.
[Fire TV Original Android Development] Sus_i:
No, please don't format anything ;)

If you open the magisk manager, you see down in the middle four icons, the second one from the left looks like a shield from a knight, in there you can switch superuser access for adb and/or apps on/off. You can use the fireTV remote to switch it on.

In the manager is also an option to update the magisk manager app. This button is safe...

But don't update magisk via the manager, only via TWRP...
[Fire TV Original Android Development] LocoMexican:
Masgisk worked fine when I found the shield. I hate to be such a dense. I've never used Masgisk before and obviously couldn't figure how to navigate it. I've always used pre-rooted before, but I think I'm really gonna like using the standard updates when I'm ready to update. Question: If I flash standard updates in the future, will the update wipe out all of the settings regarding other apks I've installed?? Just curious. Thanks Sus_i for all your help on this project.
[Fire TV Original Android Development] Sus_i:
(y)

No, flashing a stock rom won't wipe anything, all data will be fine (until you decide to format or wipe data).

Update procedere is simply: first flash a stock rom, then magisk.zip. Done.

Before you reboot you can wipe cache and dalvik if you like, but it doesn't really matter.
[Fire TV Original Android Development] LocoMexican:
What about update blocking? Isn't update blocking required when you flash a new stock rom and magisk.zip?
[Fire TV Original Android Development] Sus_i:
In case you install a new update and wipe only cache and dalvik, then no, you doesn't need to block it again, i.e. the update blocking via adb shell pm disable commands is still in place.

In case you wipe data for some reason, then yes, re-do the update blocking commands.

For the old build.prop update blocking (editing) is always required, everytime you flash a rom.
[Fire TV Original Android Development] LocoMexican:
Got it. Thanks again for your help.
[Fire TV Original Android Development] Toothless_NEO:
How do I upgrade from the older installation method?
[Fire TV Original Android Development] DanielF50:
I've just been scrolling through this thread & I'm suprised people have been having issues with this - I just updated 2 already BL unlocked devices in under 5 minutes using method #1 (download, sdcard, flash in twrp) & for kicks reset a 3rd to stock & ran through method #2, then flashed 5.2.7.2 & Magisk v22 which took me about 25 mins in total, including flashing the "FireISO" linux live boot to a USB.

Yeah, I'm probably a seasoned user of this amonet build, but I wouldn't expect it to take more than a couple of hours for first attempt... if you properly read the first few posts & download all needed files before you start.

Download Magisk v22.0 from github, rename it from .apk to .zip & flash in TWRP ("sudo ./boot-recovery.sh" or "adb reboot recovery") 👍
[Fire TV Original Android Development] brick00444:
Not sure if this is a dumb question but, is there a way to remove twrp and have a stock box again?
[Fire TV Original Android Development] Bertonumber1:
Usually just flashing stock firmware and allowing the device to update solves this. I pm you regarding ota.

pm enable com.amazon.device.software.ota

pm enable com.amazon.tv.forcedotaupdater.v2

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

You can also use fastboot to flash stock recovery img to replace twrp.
[Fire TV Original Android Development] brick00444:
Tried it and this is what I get:

C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell

shell@sloane:/ $ pm enable com.amazon.device.software.ota

Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=4931, uid=2000, package uid=32011

1|shell@sloane:/ $ pm enable com.amazon.device.software.ota.override

Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=4948, uid=2000, package uid=32011

1|shell@sloane:/ $ pm enable com.amazon.tv.forcedotaupdater.v2

Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=4962, uid=2000, package uid=32097

1|shell@sloane:/ $
[Fire TV Original Android Development] brick00444:
Just tried 5.2.7.3 with same results. "Your Fire TV is up to date". Not sure what I'm doing wrong. Seems to be simple, flash stock firmware and let it update. Shouldn't it look for updates during setup?
[Fire TV Original Android Development] k4y0z:
Installing OTA will not remove TWRP.

You will have to manually flash boot.img to the boot partition (not boot_x) using hacked fastboot.

Flash stock image first using TWRP, then use the boot.img from the same stock image.

After rebooting FireOS it will restore stock recovery.
[Fire TV Original Android Development] brick00444:
One question, flash boot.img to the boot partition (not boot_x)? not sure what that means. Excuse my ignorance.
[Fire TV Original Android Development] k4y0z:
Boot into hacked fastboot and flash the boot.img

fastboot flash boot boot.img

EDIT:

Apparently this causes issues on sloane you can use dd from TWRP commandline instead:

adb push boot.img /sdcard/
adb shell dd if=/sdcard/boot.img of=/dev/block/platform/mtk-msdc.0/by-name/boot_amonet

May I ask, why you want to uninstall TWRP?
[Fire TV Original Android Development] brick00444:
I want mine to have twrp but, it's for a friend that wants it completely stock. I told him the advantages but its what he wants.
[Fire TV Original Android Development] LocoMexican:
So do you do this through a terminal in recovery or by computer commands?
[Fire TV Original Android Development] Rortiz2:
Your question is too broad. What are you talking about?

Fastboot commands must be run on a terminal (computer).
[Fire TV Original Android Development] k4y0z:
Apparently flashing boot.img using fastboot causes issues on sloane, use dd from TWRP commandline instead:

adb push boot.img /sdcard/
adb shell dd if=/sdcard/boot.img of=/dev/block/platform/mtk-msdc.0/by-name/boot_amonet
[Fire TV Original Android Development] LocoMexican:
Thanks. No problem pushing boot.img to the sdcard. By TWRP command line, I assume you are referring to the terminal in twrp, but I'm pretty sure you are not. When I try, I get adb not recognized and if I try from computer, I get permissions denied.
[Fire TV Original Android Development] Rortiz2:
You can use both TWRP commandline and ADB in TWRP. If you're having problems with ADB in TWRP you probably want to set USB mode to 0 with

adb shell setprop twrp.usb.mode 0
[Fire TV Original Android Development] Bertonumber1:
Yes, in twrp goto Advanced>Terminal

On your pc/laptop rename the desired update.bin to zip and extract the boot.img.

Then :

adb push boot.img /sdcard/

adb shell

(In twrp terminal or pc)

dd if=/sdcard/boot.img of=/dev/block/platform/mtk-msdc.0/by-name/boot_amonet

(like k4y0z says)

Please accept my apologies to earlier post I forgot Sloane is different.
[Fire TV Original Android Development] LocoMexican:
NO apoloies necessary. I must be missing a step. In twrp terminal, I enter the command and it shows that the boot.img is copied (15 M or so), but the device still doesn't update and reboot recovery still functions.?? Any thoughts? Thanks for your help.
[Fire TV Original Android Development] brick00444:
Same results here.
[Fire TV Original Android Development] Bertonumber1:
Have you tried just flashing the boot.img to boot and recovery.img to recovery?

In fastboot on your pc/laptop place the img files in same folder as adb and fastboot.

fastboot flash boot boot.img

fastboot flash recovery recovery.img

Idk if this is appropriate for sloane if one of the other guys wants to correct me here.

Regards
[Fire TV Original Android Development] k4y0z:
Did you install the OTA first and then flashed the boot.img from that same OTA?

After reboot to FireOS it should restore stock recovery.

What do you mean, it still doesn't update?
[Fire TV Original Android Development] LocoMexican:
I started from scratch by bricking device and running v1.01 posted here. After that I formated data and installed stock full sloane 36.6.5.9. This is the next to latest stock version. I did not install Magist nor did I block updates as described in this thread. The device functions perfectly, and when I check for updates, it shows to be up to date. It really isn't because there is one later version update.

I took the 36.6.5.9 stock rom I had previously installed and extracted the boot.img which I then pushed to the device sd card. From there, I followed the procedure outlined in post 325 from twrp terminal. The terminal shows that (15M) of the boot.img was copied. After reboot system, the device still shows up to date when I do a update check and when I reboot to recovery, the device in fact goes back into recovery. It was my understanding the install of stock boot.img would not only take out twrp, but also allow updates. I my case it does not. So, as I stated, I must be missing a step somewhere in this process and I'm looking for suggestions. Thanks everyone for all your help
[Fire TV Original Android Development] k4y0z:
Not sure what version 36.6.5.9 is supposed to be, maybe @Sus_i or @Rortiz2 can confirm which is the latest version.

The procedure I described should result in a locked device with stock OS + recovery.

Was TWRP not replaced with stock recovery after reboot?

I don't know if or how you blocked OTA updates, but i would suggest you do a factory-reset after going back to stock.

TWRP or an unlocked device by itself won't block any updates, that's totally up to you.
[Fire TV Original Android Development] LocoMexican:
Just tried to flash boot.img with the following result.

C:\platform-tools>adb reboot bootloader

C:\platform-tools>fastboot flash boot boot.img

target reported max download size of 52429824 bytes

sending 'boot' (15630 KB)...

OKAY [ 1.009s]

writing 'boot'...

FAILED (remote: flashing not allowed for locked hw)

finished. total time: 1.035s

C:\platform-tools>

Also, the rom I used was posted here and is Fire OS 5.2.7.6 (659654620). The latest update is 5.2.7.7. I'm going to start over and use the old rom you posted in post 13. I'm thinking a day and a half is not long enought for the device to decide it needs an update.
[Fire TV Original Android Development] DanielF50:
Alongside k4y0z reply, you can also do this:

Download Rbox's pre-rooted rom AND a official Amazon rom (I recommend 5.2.7.2).

Place them on a sd card.

Flash Rbox's rom (this will remove BL unlock).

Reboot into TWRP.

Navigate to /system using the inbuilt file explorer.

Delete the /recovery folder (do not reboot afterwards).

Flash the official Amazon rom.

Reboot.

Works for me 100% of the time 👍
[Fire TV Original Android Development] Rortiz2:
rbox rom does not remove the bl unlock
[Fire TV Original Android Development] Bertonumber1:
Use a lower fireos version. Try 5.2.7.3 or 5.2.7.4 also make sure (if using Windows) your running terminal with admin privileges.

Furthermore, unplug the USB cable after each failed attempt and plug it in again then :

fastboot devices

fastboot flash boot \path\to\boot.img

fastboot flash recovery \path\to\recovery.img

Note : Drag the boot.img/recovery.img into terminal/command line so the full path is displayed (this worked for me).

Sloane is a weirdo. He needs some tlc before he puts out.

Regards
[Fire TV Original Android Development] Michajin:
Boot into TWRP and from TWRP reboot into unlocked fastboot. If you are trying to go full stock you will need to flash recovery also (unless i am missing something)

Just wondering if there is a difference on this like the other unlocked fire devices, booting into fastboot is different than booting into the hacked (unlocked) fastboot. Likely why he got the locked hw error.
[Fire TV Original Android Development] Sus_i:
36.6.5.9 is fireOS 5.2.7.6, the latest should be 5.2.7.7. I guess I posted the link to it somewhere in this thread.

Haven't looked into all the postings above, but returning to stock should be easy:

It's just the gpt-fix (with shorting) from this OP:

[UNBRICK] [ROOT] [TWRP] Fire TV 2 (sloane)

This guide is only for the Fire TV 2 2015 (not stick) codenamed "sloane" with mt8173. This will flash correct partitions and TWRP into it. This WILL NOT clean RPMB neither will unlock the device. I am not responsable of any physical damage in...

xdaforums.com

It will (amongst other things) flash the stock GPT and a TWRP image onto system.

Then a format data, wipe cache and any stock rom flash will return it to full stock.
[Fire TV Original Android Development] Bertonumber1:
Yeah you're right Sus_i the gpt fix is the way to do it. I don't know what's happening here. Perhaps loco is not proceeding with the step after the gpt fix (format data) as I think he wanted rid of twrp initially. Idk
[Fire TV Original Android Development] Bertonumber1:
I think hacked fastboot is for flashing boot_x, recovery_x partition and fastboot is for locked images.

Either way I'd imagine he would have to use hacked fb to flash any images.

Once he formats data and wipes cache after gpt fix he won't be able to do anything except the update.bin from twrp. Idk? I've never had this problem
[Fire TV Original Android Development] Michajin:
I would think he could flash stock recovery from TWRP itself also. It should work as stock. But I have never done it on this device.
[Fire TV Original Android Development] Bertonumber1:
Yes definitely, I agree I've done it this way with tank and mantis and it works I'm not sure what the problem is. I know Sloane behaves differently to the other devices, however, I thought a return to stock would've been straight forward. Obv not lol

Here is the procedure for returning to stock on unlocked bootloader Amazon devices

https://xdaforums.com/t/fire-stick-4k-return-to-stock.4163417/post-83509209

Regards
[Fire TV Original Android Development] k4y0z:
I'm still not sure what you're trying to achieve.

In locked fastboot you cannot flash any images.

If you flashed the stock boot.img as I described earlier your device should be locked and TWRP replaced with stock recovery, is that not the case?

No need to install pre-rooted if you want to return to stock.

You can also flash recovery (there is one in the unlock-zip), that shouldn't be necessary if you flashed stock ROM + boot.img, since recovery should then automatically be restored on first boot.

That won't work, flashing anything with TWRP will not return to stock, you need to manually flash boot.img (and optionally recovery.img) after installing the stock ZIP.

gpt-fix should only be used if there are actually issues with the GPT.
[Fire TV Original Android Development] Bertonumber1:
Hey k4y0z,

I don't know what is happening with his device?

When I returned to stock on sloane I'm sure all I did was :

Reboot to Unlocked fastboot

fastboot flash boot boot.img

flashed stock update.bin

Booted up to fireos and let it ota?

Idk if this is correct but it worked for me and once several updates d/l and rebooted there was no more twrp.

Regards

Ps, not sure why twrp needs to be removed
[Fire TV Original Android Development] Sus_i:
Yes and no ;)

You might have overlooked it, but my link points to rogers old amonet style package (for/with locked BL), which flashs boot, lk, tz, pl and an unbrick image on system (aka rbox TWRP) together with a force recovery command on cache. I would run the gpt-fix instead the br-step, in order to get rid of the boot-x/recovery-x partitions too.

Format data and wipe cache should be mandatory. The stock rom flash is just the replacment for the unbrick image sitting on system.