yashsingh1/xdaforums huggingface dataset:
[Fire TV Android Development] Rortiz2:
Yeah.

Also you can flash old preloader for use this unlock by [MENTION=3991724]rbox[/MENTION]

Then run unbrick image and flash again the correct preloader since we can't wipe rpmb.

Cheers.
[Fire TV Android Development] ForForkSake:
Perfect it worked. Can you also upload the LK, TEE1 And boot, please. Cheers buddy

---------- Post added at 04:24 AM ---------- Previous post was at 04:21 AM ----------

Ok yea. Magisk + Sloane = bricked again... Better get shortig again
[Fire TV Android Development] rbox:
http://www.mediafire.com/file/qw96jxap00bcvzy/sloane-5.0.5-imgs.zip/file
[Fire TV Android Development] ForForkSake:
Thanks again man. Went for boot image flash instead . Cant believe how quick an easy this is... new life in the old dog
[Fire TV Android Development] ForForkSake:
Damn it... darn addon.d script got me... flashed prerooted rom and magisk kept auto installing directly after ... put uninstaller on micro sd... twrp wouldn't detect sd... so reloaded theme as tried remounting .. reload theme restarts ... i got distracted and I missed the cue to select twrp...

Hello black and white Amazon logo ?

Shorted again... for the last time . Today lol

Magisk removed....rbox rom installed.. life is good again
[Fire TV Android Development] TessTickles:
Hi I am not new here, been on years - just not for a while and lost access to my email account (forgotten password) so had to start again :(

Anyhoot - I have a Fire TV gen 2 that is bricked (amazon log on a loop).

Does this fix sort a standard factory Fire TV back to working standard or is it basically loading a third party firmware to get ove the problem. i have read the thread but can't seem to get the answer for this question.

Thanks
[Fire TV Android Development] Sus_i:
Take a look here.
[Fire TV Android Development] errut:
AFTV2 with the latest Sloane prerooted Image: Bootet to TRWP and tried to wipe System, which did not work, Made hard Reboot and now i find only the Amazon Headline and nothing is moving.

My Question: is the AFTV irrevocably damaged or is there any chance to recover ?
[Fire TV Android Development] tech3475:
Software only?:

If you rooted with the USB method and only ever stuck with rbox, you may be able to use this method like I did.

If you didn’t use the USB method, the issue will be the preloader version, as newer versions block this method.

If you’re willing to open it up, this may work:

https://xdaforums.com/fire-tv/development/unbrick-fire-tv-stick-2-anti-rollback-t3986303
[Fire TV Android Development] errut:
Thanks for your advice. I realy don`t remember how i did it, but I rember that the device had a sw-version which allowed to root it.

I hope I find your method here.

Is this post 1?

How to connect AFTV2 and PC via USB?
[Fire TV Android Development] errut:
so i found an A-A-cable, but Post #1 didn`t work. It remaind "waitung for prloader"

The click was ok,when connected,my device was rooted before 5.05

Edit :moved folder with scripts of post #1 to overcome "waiting for Preloader"

but now i am stuck with :

Waiting for preloader...

Found port = COM4

Handshake complete!

Flashing unbrick image unbrick.img...

Mediatek Inject, git version fa8d8f

Locating the partition...

Reading 000000200: 0%
[Fire TV Android Development] tech3475:
Bearing in mind it is slow, if it doesn’t progress beyond 0% then from my understanding that may mean you unfortunately have the patched preloader.

So may may need to use the alternative method.
[Fire TV Android Development] errut:
you mean hardmod?
[Fire TV Android Development] Rortiz2:
I think he means this...

https://xdaforums.com/fire-tv/development/unbrick-fire-tv-stick-2-anti-rollback-t3986303

Regards.
[Fire TV Android Development] Dulanjana Palamakumbura:
[MENTION=3991724]rbox[/MENTION] please tell me how to unbrick fire TV stick 1st generation

My device is stuck at boot loop and adb debugging also disabled pls help 🙂
[Fire TV Android Development] Dulanjana Palamakumbura:
@rbox pls help me

I have fire TV stick 1st Gen and it is stuck in a bootloop and I can only see Amazon white logo and boot animation thats all

I haven't enable usb debugging :(

Pls help me to fix my device :)
[Fire TV Android Development] Bertonumber1:
Bin it and buy a 4k, montoya 1st generation cannot keep up with modern apps and lag terribly. Not worth wasting anytime on if you ask me. Buy a 4k you'll get one for 30 quid just now on amazon
[Fire TV Android Development] Bertonumber1:
I'm having the exact same problem on Ubuntu 20.4, I tried windows 10 .bat script and I'm apparently missing a msvcr100.dll file. So had to revert to Ubuntu. Been stuck on 0% for half an hour now. Dunno what's happening.

I had twrp and couldn't get adb to connect, selected reboot recovery in twrp as it usually boots back into recovery. But instead I've bricked it like a proper donut.

I haven't any idea how to get round it, I tried doing the short again but it don't even appear "remove short and press enter" anymore, all I get is the handshake then serial protocol mismatch error straight away as soon as I plug dc voltage back in.
[Fire TV Android Development] KB!:
I am curious, what would happen if you run this on a non bricked device?

I have a Sloane that is currently on the newest 5.2.7.7 and I was wondering if I could use this method to revert back to something before 5.2.7.2.

Any help is appreciated.

Thanks in advance.
[Fire TV Android Development] tech3475:
Why would you want to downgrade?
[Fire TV Android Development] KB!:
To be able to unlock the bootloader without opening the device to short the Dat 0 pin to ground.

And root.
[Fire TV Android Development] stillwater77:
This did not work for me, stuck at " Reading 000000200: 0%"

I used the hard mod by shorting DAT0, see https://xdaforums.com/t/unbrick-root-twrp-fire-tv-2-sloane.3986303/
[Fire TV Android Development] H3llzno:
I am stuck at this point. Still won't boot.. Black screen slow flashing light. I did the slow write the first time and it was successful.. took about 2 hrs

Waiting for preloader...
Found port = COM5
Handshake complete!
Injecting 2ndinit...
Mediatek Inject, git version fa8d8f
Locating the partition...
Reading 000000200: 100%
Reading 000000400: 100%
Opening the filesystem...
Reading 0058E0400: 100%
Reading 0058E0800: 100%
Locating the target file...
Reading 0058E8C00: 100%
Reading 0058E1000: 100%
Reading 0058E9000: 100%
Reading 0058E5000: 100%
Opening the target file...
error: source file is larger than target file!
Injecting 2ndinitstub...
Mediatek Inject, git version fa8d8f
Locating the partition...
Reading 000000200: 100%
Reading 000000400: 100%
Opening the filesystem...
Reading 0058E0400: 100%
Reading 0058E0800: 100%
Locating the target file...
Reading 0058E8C00: 100%
Reading 0058E1000: 100%
Reading 0058E9000: 100%
Reading 0058E5000: 100%
Opening the target file...
error: source file is larger than target file!
Press any key to continue . . .
[Fire TV Android Development] Sus_i:
Try the new unbrick guide:

https://xdaforums.com/t/unlock-root-twrp-unbrick-firetv-2-sloane.4222331/
[Fire TV Android Development] rbox:
That's odd.... what do you mean it automatically starts trying to mount the partitions and fails? Where does TWRP show that? If you are getting the orange light it sounds like maybe you wiped your boot partition and it's not actually going to TWRP but stock recovery?

Extract the boot.img from the prerooted ROM and place it in the directory with the unbrick files. Run handshake and reboot to get it to handshake, then run this:

mediatek_inject firetv2 YOURCOMPORT boot.img /boot -

Replacing YOURCOMPORT with whatever handshake said your comport was. That should rewrite the boot image.
[Fire TV Android Development] jim16127:
What I mean by automatically is...

Whenever you go to wipe and select what you want to wipe. Then start the process, during that process in formats then remounts partitions (I think). When the recovery menu starts, I see the splash screen then it skips straight to that format/wipe menu as if I already selected what to wipe and its says partition failed to mount or something like that for ALL the partitions it's trying to mount. Then reboots...and does it all over again.

If that still doesnt make sense I will take a picture of my screen as soon as this 2nd recovery attempt finishes (Assuming the problem persists).

I will also do what you just told me to do. Although I confused on why the boot menu from the rooted rom is necessary. Are you thinking my boot image is corrupt? And if it was, would it cause the issue I'm describing?
[Fire TV Android Development] rbox:
If you are getting the boot menu, then there is nothing wrong with the boot partition. I guess I need to see a picture of what you mean, because I'm confused.
[Fire TV Android Development] jim16127:
Not a problem! I totally understand! Thanks for the blazing fast responses. I'll have the pic up as soon as this process finishes. It's at 49% now.

Here's photo from the Internet on the screen I'm talking about with similar errors im speaking of.

http://www.rs-computer-services.co.uk/Android/HTC_Desire_820n/Cache_Error.jpg

55% done now.
[Fire TV Android Development] rbox:
Right, and what are you doing to get that? In the post for recovery are instructions for properly formatting cache. That should fix any problems you are having with it.
[Fire TV Android Development] jim16127:
I attached a picture of the errors I'm receiving. I applied the unbrick fixes to no avail.

You ask what am I doing to get that?

Now I don't do anything to get that. If my FireTV is plugged in then it endlessly reboot to amazon white logo then to amazon white logo again (but real quick) then to teamwin splash screen then immediately to the screen pictured.
[Fire TV Android Development] rbox:
Ok, so it looks like your /data is totally corrupt, but for some reason it thinks there is an update script in /cache and it's trying to run that. Let's see if clearing out cache fixes it.

http://www.mediafire.com/download/a9rto282jt1d36i/cache.img

Download that and put it in the unbrick directory, run handshake, power cycle, and run this when handshake completes:

mediatek_inject firetv2 YOURCOMPORT cache.img /cache -

Where YOURCOMPORT is the comport handshake reported.
[Fire TV Android Development] jim16127:
EXCELLENT! That got me out of the boot loop! I'm sitting on the Team Win Recovery Project's main menu ready to choose an option.

What should be my next move?

I should be able to try and flash a rom again, right?
[Fire TV Android Development] rbox:
From Wipe select Advanced Wipe and then pick Cache and Data. That should reformat cache and correct the errors for Data. Then restart recovery. The nav bar at the bottom the icon with the lines, that switches to the console. After the reboot, check there and you shouldn't have any more errors.
[Fire TV Android Development] jim16127:
Okay, I followed those instructions. Here is the updated errors. They're similar but different.
[Fire TV Android Development] rbox:
You're getting that after doing advanced wipe AND rebooting? That's not right...
[Fire TV Android Development] jim16127:
After using your cache.img the FireTV booted to TeamWIN. I selected Advanced Wipe ticked the cache and data then clicked the swipe bar in the bottom right to start the process. The picture shown is what happened next. I was still in the boot menu though. So I did it again received the same errors and clicked reboot. It warned me that I don't have an OS. Now I'm in the same boot loop again.

I'm currently running your cache.img to get out of the boot loop again.

Any other ideas for me to try?
[Fire TV Android Development] rbox:
Connect via adb shell and run these 2 commands:

mke2fs /dev/block/platform/mtk-msdc.0/by-name/userdata
mke2fs /dev/block/platform/mtk-msdc.0/by-name/cache
[Fire TV Android Development] jim16127:
I don't know how to adb over USB?

After I run those, do I then try to advanced wipe again?

---------- Post added at 05:41 PM ---------- Previous post was at 05:30 PM ----------

1st command worked

2nd command failed with this error...

"/dev/block/platform/mtk-msdc.0/by-name/cache is apparently in use by the system; will not make a filesystem here!"
[Fire TV Android Development] jim16127:
When going into advanced wipe after running those 2 commands. I included an attachment with the error updates.

UPDATE: So after reading "/dev/block/platform/mtk-msdc.0/by-name/cache is apparently in use by the system; will not make a filesystem here!" I figured I should try to wipe system. It worked! So then I tried to wipe data and cache. They both worked! I'm not sure if that means I'm home free but the errors are gone. I haven't rebooted yet though.
[Fire TV Android Development] rbox:
Well try to reboot and see what happens.
[Fire TV Android Development] jim16127:
Warned me about no OS installed before reboot. Now I just sit on the white amazon logo screen. I assume I need to run unbrick.img again?
[Fire TV Android Development] rbox:
Should have taken you back to recovery. Try the cache.img first, if that doesn't work, then try the unbrick. Once you are in, connect via adb, run

umount /data
umount /sdcard
umount /cache

Then try to do the mke2fs commands again. They should both succeed. Some or all of the umount's might fail.
[Fire TV Android Development] jim16127:
You saved my FireTV and rooted it! Thank you! In the end I was able to check all the boxes in advanced wipe (except sd & usb) and all of them finished with 0 errors. I then immediately flashed the latest pre-rooted rom. adb'd the su command with success. I can't thank you enough. That cache.img is priceless.:cool: Hell, all those tips we're priceless! Thanks again!:highfive:
[Fire TV Android Development] Ridx:
My pre rooted rom freezes at the end of progress bar when installing. Im trying to root a new 2 gen. I updated to latest 5.0.5

1 unpacked installer (v3) and recovery (v5) and run on win 8.1

2 loaded rom 5.0.5 (v4) and ramdisk-recovery.cpio.lzma on sd

After fire tv boots into recovery i choose install , select storage(sd card) and select install. At the very end of installation the process freezes.

Even adding unbrick files to the installation files and running, i get to the same point and it freezes.
[Fire TV Android Development] jim16127:
Redownload the Prerooted rom and/or double check the md5 checksum of the rom.

http://www.aftvnews.com/how-to-use-twrps-built-in-md5-file-integrity-checker-to-avoid-bricking/

http://www.aftvnews.com/how-to-root-the-amazon-fire-tv-2/
[Fire TV Android Development] alandmo:
Unbrick

Keeps happening to me, did you sort it?
[Fire TV Android Development] Ridx:
Thanks jim16127

Thanks i think this is the problem. The md5sum verify correctly when i download on pc win 8.1. When i move the rom (sloane-5.0.5-rooted_r4) to the sd card inserted in pc, the md5sum check show corrupted file. It seems somthing is changing the rom during the transfer from lc to sd card.
[Fire TV Android Development] Ridx:
Flawless Unbricking

Problem solved, the rom download was getting corrupted on my pc win 8.1. I downloaded the pre-rooted rom straight to the sd card on my laptop and rechecked the md5sum, all good. the unbricking went flawless, THANKS a million Rbox for the software and Jim16127 for pointing out the obvious i missed.
[Fire TV Android Development] er1000:
Yeah I did manage to get it working again. I just tried for numerous times until it worked. Something that might have helped me is that I closed chrome when I ran the program. Also, be sure to check that you have the right files in the folder.
[Fire TV Android Development] alandmo:
Downloaded the three files and unzipped to same folder. Copied ramdisk-recovery.cpio to sd card. Started unbrick_firetv2.bat, chose to install unbrick.img, got handshake etc, but now only gets to 3% and stops...Any ideas much appreciated anyone.
[Fire TV Android Development] ccrobin:
Is there a similar solution for a 1st gen Fire TV on 5.05? I rooted mine with Kingroot today and after trying to install exposed the unit rebooted and is now stuck in boot loop. Unfortuately I have no recovery software installed, so I am bricked until I find another solution.
[Fire TV Android Development] rbox:
The only solution for FireTV1/Stick is to use the hardware MMC method to hook the flash chip up to Linux and write a good system.img.
[Fire TV Android Development] Dude360:
Hi [MENTION=3991724]rbox[/MENTION]

Having an issue with the unbricking.

I don't know what happened to be honest. I flashed the latest pre-rooted ROM and am now stuck on the white Amazon logo.

It was rooted when root very first appeared and then flashed with recovery, then I left it till all the bugs had been ironed out and moved over to the firestick.

The unbrick procedure 'works' but always hangs the same way that it did during the original root method except that the unbrick doesnt continue after a power off and re-run of the batch. Highest Ive got is 16%.

I had a ton of trouble with the original method but it eventually went though (over a hundred re-runs)

I don't have abd access either.

Is there anyway you could modify the script to be able to continue?

Would it be worth attempting the original root again? (edit just tried it and seems /system doesnt contain a build,prop! /system not been flashed properly?)
[Fire TV Android Development] rbox:
Once you've attempted the unbrick and not completed it, your system partition will be corrupt, so that is why the original procedure doesnt work. The only reason the original method supports resume is because there are 100's of little tiny pieces, and it knows which pieces it's already done and it knows which are left. But if a single piece always froze in the middle, it would always retry that. My method has 1 l large piece and it can't restart in the middle. I suppose in theory you could take my unbrick.img, split it up into small pieces, and then use [MENTION=3411776]zeroepoch[/MENTION]'s write script to write each one to the system partition with an offset. Maybe [MENTION=3411776]zeroepoch[/MENTION] could help you there. The best advice I can give is to not use Windows though.
[Fire TV Android Development] Dude360:
Hmm Ill get in touch, see if he's willing to help me out.

I think its a dicky USB port on the box, if I plug it in and don't handshake, Windows will do the remove/insert USB sounds every 15secs even though Device manager doesnt show a change. (thinking about it this could just be the bootloop)

Ill give Ubuntu a shot anyway see if it likes the box better!
[Fire TV Android Development] zeroepoch:
I've already answered [MENTION=367227]Dude360[/MENTION] directly, but I'll repeat the answer here for others who might be in the same situation.

Once you have a copy of my aftv2-tools, either from downloading a zip or cloning the git repo, you can then run the following commands:

./handshake.py
./write_mmc.py 0x00000000058e0000 unbrick.img

NOTE: Since the source image is not a multiple of 512 bytes the last 48 bytes will not be written. It would need to be padded up to the next 512 byte boundary to be fully written. I did a quick test removing the last 48 bytes and it loopback mounts fine so it should be OK for unbricking purposes.
[Fire TV Android Development] Dude360:
Well, no luck with the slim unbrick. Still bootloops at the Amazon logo.

Just trying the unbrick and ramdisk now, its picked up right from where the slim unbrick picked so will see if that works.

Plus side is, it seems to be 'working' using write_mmc and having the option to resume :)

;edit; Nope. Neither the slim unbrick or the full unbrick worked.

I still get:

Solid white light when power on, then solid orange while the white Amazon logo is displayed then it cuts out and repeats.

Might have to chalk this one up to a completely dicky box unless theres any else I can try?
[Fire TV Android Development] zeroepoch:
Remove lastaddr.txt if you switch images. That's how it knows where to resume but the images are different so if you start again with a different image delete that file first.
[Fire TV Android Development] Dude360:
...Doh... Didn't even think about that. For some reason had it in my head that the full unbrick would be an 'extension' to the slim unbrick bit-wise... what a noob...

Ill give the full unbrick another shot this week see if it works.

OOI, does the prerooted ROM flash /boot (can't remember off hand). Just wondering if the unbrick is successfully writing /system but somehow /boot has been corrupted and not booting to it? I've never hosed a /boot before so don't know what the effects/symptoms are.

Could I flash the boot.img from the pre-rooted ROM the same way using a different 0x00 (write_mmc.py 0x000000000xxxxxx boot.img)?

I've got the box till the weekend before my mate collects it so happy to try a few things :)
[Fire TV Android Development] zeroepoch:
Yes, it does also update /boot. Although I think you wouldn't see anything on the screen if it failed there. Just in case the offsets for the other partitions including boot are listed here.

https://gitlab.com/zeroepoch/aftv2-tools/blob/master/partinfo.txt
[Fire TV Android Development] Dude360:
Just tried a flash of the full unbrick image, took 2 1/2hrs and no dice.

If the boot image is 16mb then it'll take 3x that and I unfortunately won't have the time before the weekend :(

If it wasn't for the dropouts every few minutes then I'd leave it over night but its a ruddy pain.

Well, at least I tried :) Think mates gonna get another box so I can at least try the 5 minute recovery install and hope hes luckier with his box :) I'm just hoping my Stick is in better condition for when I try recovery :p
[Fire TV Android Development] ccrobin:
Oooo.....OK, I do have the hardware for that, just never used it. I was originally going to use this to use the hardware root method, but then when the 5.05 update came out I braved the kingroot method (should have waited for you).

I have tried searching, but didn't find anything describing the hardware method to write a new image for a bricked device. Is there a thread discussing this process, and if so could you point me in the direction?

Thanks!
[Fire TV Android Development] rbox:
I think there's some information on how to do the root. Instead of mounting the partition, you just need to do dd the system.img. When I release the prerooted 5.0.5 you can take the system.img out of that.
[Fire TV Android Development] cmlusco:
Img file link dosent seem to work anymore. Anyone have a mirror?
[Fire TV Android Development] rbox:
Works for me
[Fire TV Android Development] KTac:
Waiting for preloader...

I just unboxed my new Fire TV 2 earlier today. It came with system software 5.0.4 preinstalled. I followed the guide on AFTVnews.com using KingRoot. After I booted into TWRP and flashed pre-rooted 5.0.5.1, I continued following the directions to wipe the additional data. I must not have been paying close enough attention to what I was doing because after I rebooted I got stuck at the white Amazon logo. I tried pressing "Alt+i+Print Screen" many times hoping to get back into TWRP to re-flash but no luck. I'm trying the method here in this thread now. I've got the Fire TV powered on and connected to my computer with a USB A to A cable. After running "unbrick_firetv2.bat" and picking the image I want to use, it stops at "Waiting for preloader..." and does not advance from there. Is there anything else I can try or is my Fire TV hard bricked? TIA.
[Fire TV Android Development] bula1ca:
Have you installed the needed drivers? See step 2 here: http://www.aftvnews.com/how-to-root-the-amazon-fire-tv-2/. BTW when you have everything installed connect firetv to computer (without power cord connected), run bat file and then power on firetv unit.