yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] Veg-Meat:
Are there any custom ROMs for this box like LineageOS or something yet? Or at least a way to disable amazon login requirement and all that amazon telemetry from the box like how we can disable OTA updates with ADB Shell Root Commands. Because it would probably be fine if we could just disable all the Amazon Account & Telemetry and then just put F-Droid onto the FireTV which would make it pretty good.

I've been trying to get a full on Linux distro working on the box (currently trying postmarketOS) but still no luck, mainly struggling with kernel compilation issues. Would also be pretty helpful to have access to a LineageOS Kernel for putting into it.

There would also be some pretty big issues with things like display drivers and usb drivers and ethernet drivers on the FireTV.
[Fire TV Original Android Development] Rortiz2:
Not yet. I'm working on LineageOS 16.0 and/or fixed LineageOS 12.1. All the sources are up in GitHub (including the kernel source): https://github.com/mt8173-dev
[Fire TV Original Android Development] Sus_i:
There is an old guide to put ubuntu on sloane's microSD ;)

But back then they had to deal with many limitations, cuz the BL was locked and the stock amazon kernel isn't a good ubuntu kernel^^

https://xdaforums.com/t/fire-tv-2-ubuntu-headless-install-guide.3323351/

I wonder if that will work better nowadays, with an unlocked BL... :unsure:
[Fire TV Original Android Development] Veg-Meat:
Thank you! This is what I was looking for, hopefully with this kernel I can get a build of postmarketOS (an Alpine Linux based distro made for Android Phones) working on the sloane.
[Fire TV Original Android Development] Bertonumber1:
Good.pics. ..I see.you done.some.drilling for oil going by the dust around dat0 ? Lol

Glad it worked well for you in the end..Sloane is a tough little box to run a script on but by far the best Amazon device being arm64. Be good to see some development at a later date.

Regards
[Fire TV Original Android Development] ctexy:
Thank you for this guide!

I am currently on TWRP 3.0.0.5 and Fire OS 5.0.5.1 (haven't done much updating in the last 5 years haha).

I read the whole guide, but I think I missed something. Since I saw that it says if you are already unlocked you can just flash amonet1.1zip in TWRP, I did that. It rebooted to TWRP 3.5.x.x something which I assume is in Amonet, then I also did "go to Wipe > Format Data and type "YES"". That worked fine, but when I rebooted to system after all of that, I am back to TWRP 3.0.0.5 and Fire OS 5.0.5.1.

I have obviously not done enough here. I am able to use TWRP with a mouse/keyboard connected to the fire TV, and I THINK I am now supposed to run the script by opening a terminal in the extracted amonet folder (which I've put on an external micro sd card) but I can't seem to get to that.

Do I just need to learn how to change folder in terminal then run the script, or is there much more I need to do and I am not doing properly?

I apologise if this seems basic, I did read all 4 posts, and I think posts 1 and 3 pertain to me. Advice appreciated and thanks again for this!
[Fire TV Original Android Development] Bertonumber1:
After you format data and type yes. Reboot to unlocked twrp and then flash add new firmware plus latest magisk (rename magisk 23 from apk to zip) then install/flash.

Wipe cache and dalvik and reboot system

Regard ms
[Fire TV Original Android Development] ctexy:
Thanks for your reply!

So after format and type yes, then rebooting to unlocked twrp, do you mean flash new firmware there? Also if I flash a new firmware from this thread, will that somehow also update my TWRP which seems to be stuck on the only version?

Finally, do I just get the latest official magisk, or do I need a special one for fire tv? Thanks so much for your assistance!
[Fire TV Original Android Development] Bertonumber1:
Post in thread '[UNLOCK][ROOT][TWRP][UNBRICK] FireTV 2 (sloane)' https://xdaforums.com/t/unlock-root-twrp-unbrick-firetv-2-sloane.4222331/post-84343353

Follow this post here.

When in locked twrp after flashing the zip and the script has run.

Then after formatting data then typing "yes"

There is the sudo. /fastboot-step.sh which will reboot you into unlocked TWRP.

Then you may install/flash a newer firmware (in the unlocked TWRP after the prompt and reboot ) making sure you install/flash magisk after it before rebooting system.

Do the registration, enable adb and magisk permissions and disable the OTA. If your device takes the latest update during the process. Don't worry.. let it.

You can go back to TWRP and wipe /system only (to keep from redoing everything again) and reflash the firmware you originally chose (along with magsik again)

If you install a firmware from 5.2.7.4 or below you may want to update...

Amazon appstore:

https://d1s31zyz7dcc2d.cloudfront.net/86b238ca8724c46df47a1a6d84d0ec92/com.amazon.venezia.apk

And...

Amazon Webview

https://d1s31zyz7dcc2d.cloudfront.net/57469b3829a56da55acd6b4d60cb3d1f/AmazonWebView-release-64-signed.apk

To keep the appstore working smoothly.

I would say 5.2.7.1- 5.2.7.4 is the best firmware to choose before amazon started going crazy with nasty updates disabling things.

If you need any further help just ask but please follow OP steps carefully

Regards
[Fire TV Original Android Development] Sus_i:
The old TWRP boots from the ramdisk in system, so if you flash a new stock rom, the old twrp is gone too.

In order to do this, run adb reboot revovery. Then the new twrp will boot up, ready to flash the stock rom.
[Fire TV Original Android Development] hikkymemo:
Hi there,

I have a Fire TV 2 which boots into "Amazon system recovery <3e>".

I am trying to follow the unbricking steps in the original post, but it fails at verifying writing the updated GPT. The partition table remains the same as it is originally.

I tried digging into the code, and it seems like when I try to write anything to the eMMC on my device, I don't see what I just wrote when the block is read afterward, which is seemingly reflected in the failure to find boot_x/recovery_x partitions in the written GPT.

What am i doing wrong here or why does my device not want to make any writes? TIA
[Fire TV Original Android Development] Sus_i:
Hi

Maybe you're doing nothing wrong.

It could be that your eMMC is faulty, in this case the eMMC will switch to permanent write protection, probably in the CSD of the eMMC... That happend a few times, especially with samsung eMMCs.

You can try the gpt-fix.sh, but if that won't help...
[Fire TV Original Android Development] hikkymemo:
Yeah, it's Samsung eMMC. I've tried the gpt fix but it didn't do anything.

How would I be able to find out if the eMMC has gone to permanent write protection?
[Fire TV Original Android Development] Sus_i:
Then it's broken for sure...

You can dump the CSD (Card-Specific Data) register with amonet, via bootrom... Give @Rortiz2 a PM
[Fire TV Original Android Development] ctexy:
Just wanted to say thank you! I finally got this to work, using your handy write-up mostly as I was confused. Thanks to you, @Sus_i , @Rortiz2 and @Michajin

I am now on 5.2.7.4, I've disabled ota via adb, and Magisk is working. Now to find some cool stuff/apps I can use with root - suggestions welcome!

Last question - with the previous TWRP recovery, there was a prompt on boot to go to recovery. If something were to go wrong in future, how would I get to new recovery? Do I have to use adb? Thanks again!
[Fire TV Original Android Development] Bertonumber1:
Download powermenu little Vic apk from apk pure and that will let you boot recovery from os.

Also you can use remote adb shell and type :

reboot recovery.

You can install custom launcher and disable some of the bloatware from /system/priv-app.

There are some debloat lists kicking around but just be sure to disable, don't delete the apks. You can always re-enable them should something mess up.

As for apps... Search around I use the frowned upon lucky patcher but only because its handy and quicker to disable/enable apks.

You can install adfree brave browser, smart YouTube adfree etc etc list is endless really.

Regards
[Fire TV Original Android Development] LocoMexican:
You can also reboot recovery directly from the Magisk app. On the Magisk home screen, at the top of the screen on the right hand side is a circular arrow. If you click that arrow, it will allow you to reboot recovery.
[Fire TV Original Android Development] Michajin:
To boot directly into recovery if you cant get into the rom run the script boot-recovery.sh from the OP, you can also boot into fastboot with boot-fastboot.sh
[Fire TV Original Android Development] Bertonumber1:
It would be good to have seen (if possible) the old menu to recovery to continue on the new unlocked version of twrp.

(Giving the slight pause, or like mantis the option appears when otg is connected)

As far as I remember I'm sure Rortiz2 said it couldn't be done or would mean rewriting a lot of stuff idk. But it would've been good to see it on Sloaney.

Regards
[Fire TV Original Android Development] Rortiz2:
Yeah, indeed that can be done. But as you said, it needs a few changes to firetv-2ndinit ;)
[Fire TV Original Android Development] Luis_Erasmo:
In fact.. I stored the sloane in a drawer for a year and a half, when I find out the recovery was possible I pulled out and crack the case.
[Fire TV Original Android Development] LocoMexican:
I have one that goes through all the motions of being successfully programmed, but reboots to white Amazon logo then black screen. TV set show no signal when it fades to black. Did you ever get your going? MIne also has the Samsung chip.
[Fire TV Original Android Development] Sus_i:
It wasn't mine, Rortiz2 has got a faulty one on his developing box... ;)

In case the bootrom-step.sh from OP flashs still up to the end, your eMMC is fine.

A faulty eMMC switchs to a kind of write protection, so the bootrom-step will always fail (as soon as the script does a write attempt to it).

For a white Amazon logo followed by a black screen, I would guess that something is up with the system partition, but it could be something on data too. You can try a format of userdata, wipe system cache dalvik too. Then flash one of the stock roms together with magisk. Best is if you run the gpt-fix.sh from OP infront of all this, just to make sure that the GPT is fine and the exploit payload in place.
[Fire TV Original Android Development] brick00444:
Pretty sure one of mine did that. Found out I knocked the little chip off while trying to short it. Just a guess.
[Fire TV Original Android Development] Sus_i:
In case it's the resistor marked as DAT0 and if the soldering pads are still there, you can fix it with a 47k ohms resistor...
[Fire TV Original Android Development] ccf801:
Hello . was able to flash twrp , and newer Roms . I'm extremely greatful for that.

Does anyone have access to the older Sloane Roms on 5.0/ 5.1.

I tried the 5.0 r3 and maybe r4

with no luck.

Is unbricking to 5.0 possible.

If not can a downgrade be done from inside the OS after installing

the newer ROM.

Thanks so much .

Chris .
[Fire TV Original Android Development] Sus_i:
Maybe you find some URLs for older stock Roms somewhere hidden in the prerooted rom thread for the fireTV2 (but I guess almost all amaz. apps won't work properly).
[Fire TV Original Android Development] dcellini21:
I just wanted to give a huge thanks to everyone who contributed to this project. I somehow botched the process of unlocking my Fire TV coming from a locked bootloader with the Rbox prerooted ROM installed. It was stuck in a bootloop where I couldn't get past the Amazon logo but the unbrick script worked wonderfully. After a lot of patience and persistence I managed to use a screwdriver bit and a metal spudger to complete the short and let's just say I'm genuinely surprised that I did it without breaking anything.
[Fire TV Original Android Development] ccf801:
i also want to give major thanks to the creator of the unbrick / pre rooted rom flash method.

without your help and tools , i surely would of been screwed and dont think i would of wanted to

work on , or have anymore fire devices.

also , thank you to member

Bertonumber1

he helped me at the twrp menu , where you need to know how to get the internal flash

to be recognized.

thanks guys .

c.f.
[Fire TV Original Android Development] Sus_i:
I guess your box got a faulty eMMC, probably a samsung chip. Unfortunately, not fixable.

Anyways, maybe check a different usb cable, another usb port and so on together with the gpt-fix.
[Fire TV Original Android Development] LocoMexican:
Perhaps his computer's "environment" set up is incomplete?
[Fire TV Original Android Development] Sus_i:
May be too, yeah.

But it's odd that the unlock/unbrick worked fine for him in the past and now it fails.

The eMMC dead (it switches to a permanent read-only) shows up usually with:

- OS won't boot anymore

- TWRP boots fine, but flashing always fails

- GPT-fix and the bootrom-step doesn't help/work, failure at the first write attempt.
[Fire TV Original Android Development] Rortiz2:
If you can access TWRP, run the following commands through ADB and send me the output:

adb shell "cat /sys/class/block/mmcblk0/device/cid"
adb shell "cat /sys/class/block/mmcblk0/device/csd"
adb shell "mount -t debugfs none /sys/kernel/debug && cat /sys/kernel/debug/mmc0/mmc0:0001/ext_csd"
[Fire TV Original Android Development] BagiMT:
Thanks for the replies. I am pretty sure that the environment is setup correctly (it's a vanilla Ubuntu I setup specifically for this) as it worked to run through the process once a few days ago. After that I got into TWRP but was unable to flash the ROM (it would hang around 80%). The ROM was one of Rbox's pre-rooted ROMs (5.2.7.6), so not sure if that could have caused any issues. I later realized that I should have used a stock ROM. Now the box hangs a the white Amazon logo and running the scripts gives the above errors.

It is a Samsung chip so it is possible that the eMMC is bad. But as I said above, the process worked ok a few days ago, so unless it went bad right after that I assume it's not in read-only mode. I will try again tonight to see if anything changes. I hope to at least get back into TWRP.
[Fire TV Original Android Development] Rortiz2:
Currently, I have a sloane with the eMMC (Samsung) in read-only mode and unfortunately, before bricking (itself) it showed the same sympthoms as yours.

If you (somehow) manage to access TWRP, run the commands I sent you in my previous message so I can check the current status of your eMMC.
[Fire TV Original Android Development] BagiMT:
I spent some more time on this last night. I was never able to run the bootrom-step.sh from this thread (alwas same error of bad gpt) but was able to run the gpt-fix.sh script through on one occation as well as the bootrom-step.sh from the previous unbrick thread (after many failed trials, it's very inconsistent although I can consistently get it into boot-rom mode). Unfortunately, in both cases the box was still stuck at the white Amazon logo and never booted to TWRP. So I guess this points towards a bad eMMC, or an eMMC about to go bad.
[Fire TV Original Android Development] incognegro76:
It's not exactly clear here which pins are supposed to be shorted to ground. Is it all 3? Dat0 Dat1 and Dat2 at the same time?

I'm about to downgrade my FireTV down from 5.2.8 so this method ought to "brick" it and then allow me to boot into recovery and load an older rom, which could then be unlocked. Is that right?
[Fire TV Original Android Development] Sus_i:
It's DAT0

You do the unlock (i.e. the OP, which installs also TWRP) and then you can flash whatever rom you like...
[Fire TV Original Android Development] nathanjuk:
Firstly, thanks to everyone who has worked on this project.

I'm having problems with the fastboot-step.sh. It runs without errors but when it reboots it doesn't go into TWRP it just goes in to a bootloop with a white Amazon logo and orange LED. What would cause this?

I'm coming from an unrooted box on the latest firmware. I did the short and after a few tries was able to reliably run both bootrom-step.sh and bootrom-step-minimal.sh. Is there anything else I can try to get TWRP running?

Thanks
[Fire TV Original Android Development] LocoMexican:
You could do the "short" and then run the - gpt-fix.sh - script. When it completes (about 15 minutes on my rpi) it will boot into twrp. From there, install the amonet zip 1.1, format data and install your the rom of your choice followed by Magist for root access. I don't have a link for the gpt-fix, but it is in this thread. Good luck.
[Fire TV Original Android Development] nathanjuk:
Thanks for the suggestion. I just tried and it fails at the "Flashing TEE" stage. The scripts from the OP in this thread all seem to complete without problems but both scripts from the old root thread (in amonet-sloane-v1.3.zip) fail at the same stage.
[Fire TV Original Android Development] Sus_i:
At which block does this failure show up? Just at the start of the flashing or how many blocks were written?
[Fire TV Original Android Development] nathanjuk:
It happened really quickly but I think it was around 99-100.
[Fire TV Original Android Development] Sus_i:
OK. Try it again and again ;)

I would use the new scripts from OP.
[Fire TV Original Android Development] Rortiz2:
I've updated the OP with gpt-fix.

Note that you need to extract the zip alongside the amonet zip (since it depends on the python modules/payloads).
[Fire TV Original Android Development] nathanjuk:
Thanks for that. I think I must be doing something wrong because I'm now getting this:

"

a@a-linux-laptop:~/Downloads/amonet1.1$ sudo ./gpt-fix.sh

sudo: ./gpt-fix.sh: command not found

"

I extracted "amonet-sloane-v1.1.zip" and "amonet-sloane-gptfix.zip" in to the same folder, was that correct?

Maybe my python install is screwed but as far as I can tell it's correct. (I'm a noob when it comes to linux, sorry!)

Any ideas?
[Fire TV Original Android Development] Rortiz2:
Looks like the script doesn't have the proper (executable) permissions. Try with the new zip that I just uploaded.
[Fire TV Original Android Development] nathanjuk:
Thanks. It now runs through the gpt-fix.sh script ok and reboots to fastboot. I tried running the fastboot-step.sh script again and it still doesn't reboot into twrp, it just goes in to a bootloop of white amazon logo and flashing white LED then solid orange LED and reboot.

I must be missing something, does this look right?:
[Fire TV Original Android Development] 010u:
I opened the bricks last night and I was ready for the short. The environment has been built on Ubuntu on Pallarels. The USB A-A cable is now being delivered. I am very much looking forward to arriving. By the way, how can I use Lineage Custom Rom etc.? I am excited that the bricks from 6 years ago will become an Android Computer that can be projected on a large screen with HDMI. We support development.
[Fire TV Original Android Development] Sus_i:
That looks good.

You can now try the boot-recovery script (from amonet folder), in order to boot into TWRP.

In case TWRP boots, I would format data, wipe cache and flash a new OS.
[Fire TV Original Android Development] nathanjuk:
Thanks

OK, I ran the boot-recovery script. After running the script it goes:

Reboots

White slow flashing LED + white amazon logo.

Orange solid LED.

(no ADB devices connected and no fastboot devices)

Reboots into fastboot.

Stays on with slow flashing white LED and white amazon logo.
[Fire TV Original Android Development] Sus_i:
Try sudo ./boot-fastboot.sh

and then run the fastboot-step.sh again.
[Fire TV Original Android Development] nathanjuk:
Thanks for trying to help. No matter what I do it won't boot into recovery. It always results in an orange LED and reboot loop. I can interrupt the bootloop with a script and reboot back to fastboot. No matter which script I run it just won't go into recovery mode.

Is there anything I could flash to bring back a system and start again?

P.S. sorry for hijacking this thread!
[Fire TV Original Android Development] Rortiz2:
I don't know what else to suggest you. Try to flash system and boot (to boot_x) with hacked fastboot mode.
[Fire TV Original Android Development] nathanjuk:
Sounds like a good idea. Any suggestions where I can download a system image? And how do I make it boot to boot_x?
[Fire TV Original Android Development] Rortiz2:
I'll send you both images in PM in a few minutes.
[Fire TV Original Android Development] incognegro76:
Did you get this working? I'm on 5.2.8 and I can get into preloader mode but I can't get TWRP to boot.
[Fire TV Original Android Development] Sus_i:
Maybe update adb and fastboot.

Your second picture says 'omni-sloane', which is the message of twrp.

Is the hdmi connected?
[Fire TV Original Android Development] Rortiz2:
As the OP states, you need to quickly run adb shell setprop twrp.usb.mode 0 as soon as TWRP appears.
[Fire TV Original Android Development] incognegro76:
I'm using an old TV on HDMI, maybe that's why I cant see anything. I'm going to connect to a new monitor and try it today.

I did this but nothing appears on the output from the HDMI to the TV I'm using.

Gonna try again tonight.

Thank you all for your help!

EDIT: That worked!

Apparently this old TV only goes up to 1360x768 so it wouldn't display TWRP. It was working the whole time, I just couldn't see it!
[Fire TV Original Android Development] Sus_i:
(y)

Maybe @Rortiz2 can add some low resolution display profiles? :p
[Fire TV Original Android Development] incognegro76:
I found another thread where they were discussing this same thing: that TWRP goes "tits up" when trying to output to a 1080i monitor lol I should have read more before starting.

Now I have a new problem and I'm pretty sure I borked my FireTV2 this time. It's stuck in a boot loop after I tried to downgrade to pre-rooted FireOS before my device was fully rooted. Now I'm getting an input output error when I try to run gpt-fix and bootrom-step scripts.

Any ideas?
[Fire TV Original Android Development] LocoMexican:
Those kinds of erors are common for me. Change ubs port somethimes fixes my similar issues. Just start over and do it again.
[Fire TV Original Android Development] incognegro76:
That worked perfectly.

I was able to use recovery and then bootroom/fastboot to unbrick, then downgraded FireOS down to a rootable version but I had to wipe EVERYTHING in TWRP and rename the .bin stock OS to .zip. Then I installed it in TWRP and then Magisk/Amonet and rebooted to downgraded stock. Nervously connected a lan cable and entered Amazon credentials to setup. Then configured Magisk for SU over ADB to not prompt and then disabled OTA from my K-Lite Linux laptop. I even deleted the update that my FireTV had downloaded immediately when I connected it to the network, it was just waiting for a reboot to undo all the work I had just done!
[Fire TV Original Android Development] 010u:
The AA cable arrived last night and I tried a short. I succeeded in burning the Stock ROM. However, although the network succeeded in scanning, the connection was not successful. It seems that the LAN cable is not working well, and it is displayed that the update is being checked, and the error "Please unplug the power and try later"? I can't proceed from.

My AFTV2 OS 5.2.8.0

Brick method

Ubuntu on parallels

amonet-sloane-gptfix.zip

amonet-sloane-v1.1.zip

Run gpt-fix.sh> minimal.sh

After wiping data with Twrp

Flash amonet-sloane-v1.1.zip

Flash update-kindle-full_sloane-36.6.4.8_user_648594820.zip

(update-kindle-full_sloane-36.6.6.8_user_668694820.zip and)

(I also tried update-kindle-full_sloane-36.6.3.0_user_630508620.zip)

Flash Magisk-v23.0.zip

(I also tried without Magisk)

Reboot

It succeeds, but I cannot connect to the above network and cannot activate. (Cannot reach the HOME screen)

afterwards,

When I burned sloane-5.2.7.0-rooted_r1.zip, the setting screen disappeared and

Even if I put it back in the Stock ROM due to a short circuit, the setting screen is no longer reached.

I want to return to the Stock state once and solve the network problem.

How should I solve it?

Thank you.