yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] Rortiz2:
haha cool:)

The trick was downgrade to 5.0.5 lk.bin too:

https://github.com/R0rt1z2/amonet/blob/mt8173-sloane/modules/main.py#L81

The problem was that 5.0.5 preloader + 5.6.2.8+ bootloader was not a good combo since the device was stucking at bootrom mode so the rbox script was not working cause it needs to be in preloader mode.

After downgrade the lk too, the tv entered in preloader mode and the script started writting the unbrick image.

So big thanks to [MENTION=3991724]rbox[/MENTION] for that unbrick image :)

Cheers.
[Fire TV Original Android Development] Rortiz2:
[MENTION=7104332]k4y0z[/MENTION]

Regarding to rpmb I played a bit more with it and seems that the problem is that is not downgrading cause still this inside:

b"\x00" * 0x100

:(

As it checks the status here:

https://github.com/R0rt1z2/amonet/blob/mt8173-sloane/modules/main.py#L105

Since it's the same, fails and aborts the script.

I don't know why keeps failing if it's the same on all amazon devices.
[Fire TV Original Android Development] k4y0z:
Well you should probably start debugging it by printing rpmb before and after trying to clear it.
[Fire TV Original Android Development] Rortiz2:
Aight. I tought that. Will do it and report back:)

Thanks.
[Fire TV Original Android Development] k4y0z:
Yeah, looks like the key-derivation works differently on sloane.

Would probably need changes to brom-payload.
[Fire TV Original Android Development] masterElmar:
I tested it now with 2 computers and FireOS and Ubuntu and 3 USB cables. Everytime i lost at the point of (device reports readiness to read but returned no data (device disconnected or multiple access on port?))

So i have to try another or give up at this point. i tried bootrom-step and gpt-fix both break at the same point

---------- Post added at 12:11 AM ---------- Previous post was at 12:04 AM ----------

Nothing changed, i used Ubuntu and FireOS and 3 types of USB cables and 2.0 and 3.0 also the gtp and bootrom.sh

So i think that was the Fire TV 2 for me :(
[Fire TV Original Android Development] Sus_i:
Can you explain what the gpt-fix does for you?

Was the gpt successful flashed?

Errors at this part?

Or still again at flashing TEE?

c/p terminal output would be helpful.

If you use the bootrom-step, how long does it take to flash the few blocks to TEE until the error?
[Fire TV Original Android Development] masterElmar:
This is the gpt output=

My fire tv disconnects at every connect cycle after the same amount of time ca. 8sec and this on both machines and fireOS and ubuntu. It seems like an Mediatek problem with an wrong flashed file or something.

That the firetv 2 would start but failed and reset after this time.

Because when i connect my fire tv without this script running it disconnects looking under lsusb after ca. 8 sec

and then it reconnects and stays for a longer time.

And everytime with the right ID

Bus 001 Device 020: ID 0e8d:0003 MediaTek Inc. MT6227 phone

so is there any option to brick my device and unbrick ti again to solve this rebooting issue

that was mentioned by some other people out there or the OP in this thread

like here superuser
[Fire TV Original Android Development] Sus_i:
That is as expected, not a fault.

It's just the bootrom trying to load the preloader, which fails always. So the BR will just trying to load it again, in a loop.

The bootrom-script runs a handshake with the bootrom, so it should stay in BR mode waiting for commands.

Can't think of another thing that will let the handshake fail (except a somewhat damaged resistor on DAT0 (cold solder joint) and/or power/usb problems).

Maybe try this:

Make sure you extract and run the zip to/from the desktop, not to an usb stick.

Add this line in the main.py file (in the modules folder):

time.sleep(30)

right behind this section:

# 4) Clear preloader so, we get into bootrom without shorting, should the script stall (we flash preloader as last step)
log("Clear preloader header")
switch_boot0(dev)
flash_data(dev, b"EMMC_BOOT" + b"\x00" * ((0x200 * 8) - 9), 0)

It have to look like this:

# 4) Clear preloader so, we get into bootrom without shorting, should the script stall (we flash preloader as last step)
log("Clear preloader header")
switch_boot0(dev)
flash_data(dev, b"EMMC_BOOT" + b"\x00" * ((0x200 * 8) - 9), 0)

time.sleep(30)

Click save and run sudo ./bootrom-step.sh

Now, it should wait 30 seconds, before flashing TZ to TEE.

Watch out how long it waits, until an error comes up.

Edit: Watch out too how many blocks to TEE until erroring out.
[Fire TV Original Android Development] dovedescent7:
hey guys i got this first try!!!

but HELP!!!!!!!!!!!!!!! Stuck at TWRP now? Great thing, but how do i flash the prerooted rom now? Ive only done this on phones!!!!!

Help stuck at TWRP!!!!!

ive downloaded July 4, 2020 - 5.2.7.3_r1 prerooted! but what do i do with this prerooted rom now????

put it on flash drive or what? I dont want to screw this up!!!! HELP!!!!

Ps Do i need to install supersu or something if i am at TWRP? Cant i just move prerooted file to micro sd card and install prerooted inside TWRP and done????

btw got prerooted from here https://xdaforums.com/fire-tv/development/firetv-2-sloane-prerooted-stock-images-t3309783
[Fire TV Original Android Development] dovedescent7:
UPDATe To above post.

so got into TWRP then flashed July 4, 2020 - 5.2.7.3_r1 prerooted.

Then reboot and stuck at Amazon fire tv logo. I can still twrp and have wiped cache 2x but still gets stuck at Amazon fire logo.

Still have access to twrp tho.

What do I do to boot?

---------- Post added at 12:52 AM ---------- Previous post was at 12:30 AM ----------

DISREGARD MY LAST TWO POSTS

After some finagling, i decided to install sloane-5.2.6.7-rooted_r2.zip because the last one i installed was lastest 5.2.7.3

After flashing 5.2.6.7 its out of the bootloop and now on "Optimizing System Storage and Applications" screen and looking good.

Only thing is i forgot to do the build.prop thing the 2nd time after flashing the 5.2.6.7 though i did it after the 5273.

Not sure what to do there. Pray?

Should i redo the build.prop for updates?

ANd should i update beyond 5.2.6.7 to latest? Or leave it? Pros/Cons?
[Fire TV Original Android Development] dovedescent7:
Extremely frustrated. Took while to do the hardware root thing (open up box and short out d01) finially got twrp to boot recovery.

Then installed like 5 different pre rooted images and ALL of them stop me at Amazon FireTV Logo and cant get past.

Is this a sick joke?

i was on latest 5.2.7.4 and did this hardware hack and even did build,prop to block, yet nothing.

Please, so i dont lose my mind, could someone tell me which specific preroot image i need after getting TWRP working from 5.2.7.4? many links are down

And also please tell me proper procedure how to install the preroot image (in case i am missing something)?

Please? I'll donate. i swear

is this method even possible with 5.2.7.4? I'm going CRAZZZAAAAYYYYYY
[Fire TV Original Android Development] Sus_i:
5.2.6.7 and then a later one is right.

If optimizing storage works fine, but it won't boot, you probably need to wipe data and internalsd too. Best is to use the 'format' data tab in TWRPs wipe section.

After that, the box should boot, but you need to log on at the setup, pair the remote and so on...
[Fire TV Original Android Development] masterElmar:
The Error shows up after perfectly 30s and also after 15s with time.sleep(15)

After that period of time it wont start flashing anything.

Only out put log Flashing TEE

this line stops the code working>

flash_binary(dev, "../bin/tz.img", gpt["TEE1"][0], gpt["TEE1"][1] * 0x200)

The FireTV is then reconnected perfectly as Mediatek Phone.

Whats the next step?
[Fire TV Original Android Development] Sus_i:
There isn't much you can do.

Remove the time.wait command and try it again and again.

It should work fine, an error at this stage is unusual.

Maybe power up the box, wait a minute or more, start the script and connect the usb cable.

Some people had better results with old style laptops, maybe revive one for a test.

In what condition was the box, before you tried to root it?

As a last attempt, we can try an edited main.py, just to flash the PL back.

If the box was working before, it may work again.

Problem is that the tz on tee is damaged and an update over the air is needed to fix this...
[Fire TV Original Android Development] masterElmar:
I tried it severl times now, nothing new and nothing changed...

Nothing differend on my old Notebook from 2010...

The FireTV was in Stock Condition and on the latest version.

The Mainboard inside is Rev. 04

Another aptemp is now to use Ubuntu 18 oder 16 to flash it.

But iam interested in flashing the PL back und hoping for work normally as before.

This is also my first device that is different then the normal one that everyone has. :confused:
[Fire TV Original Android Development] dovedescent7:
So ive not rooted and recoveried since the S7 came out.

And when i get to "Optimizing storage" is not working. It just keeps spinning.

Do i need to edit the build.prop for this to work 100%?

Could you please be a little more direct?

From what i gather your telling me, i must first:

1. wipe data and internal sd "format data" tab/wipe

2. flash only 5.2.6.7

3. Then reboot?

Should i not clear cache partition and edit build.prop before reboot also?
[Fire TV Original Android Development] Sus_i:
In theory its possible that amaz. switched an efuse in the SOC with the latest OS (like they did with the first gen. box ages ago), trying to patch the bootrom vulnerable, but there are no reports at all until now, its very unlikely... so the script 'must' work.

Ubuntu should work fine, but you've to follow the OP carefully, all requirements must be installed, modemmanager needs to be disabled. It is important that you extract the zip with ubuntu, or the file permissions get lost. Then call sudo su and try to run the bootrom script again.

I don't think that the PL will fix it for you, you get probably the same error during a flash. Additional you have a broken TZ, so your best move is to try the script as it is, until it works.

---------- Post added at 06:56 PM ---------- Previous post was at 06:50 PM ----------

Forget about the build.prop.

Boot into TWRP.

Make sure you have a prerooted rom installed, 5.2.6.7 if you like..

Click at wipe tab, wipe cache, dalvik.

Go back to wipe, there you see a button 'format data', push it, type YES, then let it do its thing. Watch out for errors.

In case you get some errors, go to advanced, filemanager, copy the recovery.log to your ext.sd.

Reboot.

The system should boot to the opt. storage screen, 10 minutes later boot to fire OS. The setup should now waiting for you.

Edit: If your box is still disassembled, try cooling the mainboard with a fan. The SOC gets very hot during the storage thing and this could also lead to a blackscreen.
[Fire TV Original Android Development] dovedescent7:
EUREKA!!!!!!!!!!!!!!!

PERFECT DIRECTIONS. Copy Clip and saving these instructions to my nas. Ive spent over 30 hours on this. You my friend? Answered it in 2 minutes.

is there anything else i should know to block updates or keep root or keep up maintenance?

[IMG="genius"]https://xdaforums.com/attachment.php?attachmentid=5113713&stc=1&d=1602437534[/IMG]
[Fire TV Original Android Development] Sus_i:
Thanks mate. Glad that you solved it :good:

You can't lose root, the stock recovery gets disabled thru the prerooted installer, but blocking updates with adb is a good thing... or the ota app will download update packages, again and again.

The supersu popups are working fine, but supersu app won't open (amaz. block), this is normal, in case you want play with the settings, you need to edit the config file.

Edit: In case you see notifications, about an old supersu binary, just ignore it. There is already the best and newest one installed.
[Fire TV Original Android Development] Alexmanafan:
Is this procedure useful for Fire TV 3gen? Model LDC9WZ. My intention is to install a ROM.

I'm sorry, I saw that no.
[Fire TV Original Android Development] dovedescent7:
No this procedure is totally different than for rooting your hardware as the hardware itself is just so different, short answer: NO.

But fear not, after checking for your model, these are the guides to root your AFTV 3rd Gen. Hope this helps

https://www.aftvnews.com/root/fire-tv-3/

https://www.aftvnews.com/amazon-fire-tv-cube-and-fire-tv-3-have-been-rooted/
[Fire TV Original Android Development] Kooneybert:
I am still struggeling with the readiness-error "device reports readiness to read but returned no data (device disconnected or multiple access on port?)".

What I tried so far:

- followed the original instruction

- after error occurance, I removed USB cable but left power on. Then restarted the script, pressed enter twice (still no idea why this could be more effective than saying "please"), plugged USB back in. Obviously, in my eyes, nothing happened except adding some blank lines to the terminal.

- modified the main.py so the flash_binary would automatically retry after failure. This leads to Input/Output errors.

- modified the main.py and added some time.sleep(1) into the flashing loop. Interesting fact: the error always occurs after 2 seconds, no matter how much the script has already flashed.

- repeated all this way too many times while trying different timings of my actions or changing other small things.

What I did not try (but other people here did) due to limitations in available hardware:

- using another Computer

- using another cable

Any suggestions?

'Insanity is doing the same thing over and over again, but expecting different results' (Rita Mae Brown)
[Fire TV Original Android Development] Sus_i:
What do you mean? 2 seconds after the enter press? Can you explain that a bit, please?

How far runs the script? Maybe c/p terminal output.

Does the LED flashing? If yes, white or yellow?
[Fire TV Original Android Development] Kooneybert:
(Estimated) 2 seconds after the script starts flashing binarys.

My terminal output (running the unmodified script):

I should mention, that, from time to time, I also get the input/output error.

The LED never shows up.
[Fire TV Original Android Development] Bertonumber1:
Let's give this a go :

Try switching the device off for a few hours then starting the process again.

when you try the sudo ./bootrom-step.sh again and get the error?

Leave the DC power in

Remove USB from back of box

Run the bootrom step again hit enter, then hit enter again.

Plug the USB back into box and pull the DC power

Then reconnect the DC power to enable the bootrom step.

Keep trying, I was at mine for over 4 days and done it this way it worked first time.
[Fire TV Original Android Development] Kooneybert:
I followed your instructions - didn't change anything. The bootrom-script can't find the device after switching it on again. The only way it will find it again is unplugging USB and DC, restart the script and then plug them in again.

Can you please explain to me what's the point of hitting enter twice? I can't see any rational explanation for doing this. In my eyes, saying a prayer is more expectable to have any effect...

For some other reason, I switched the Linux that I use here. Before: Linux Mint Cinnamon 18.x in Live Mode, now Linux Mint Mate 20.x in Persistent Mode. For some reason, the readiness-error now occurs at different & earlier occasions. Yesterday, with the older Linux, it always failed when flashing TEE, now it failed while sending payload, checking GPT, checking RPBM or also while flashing TEE.

Sometimes, instead of the readiness-error, it's an input/output-error instead (but the time of occurrence is the same).
[Fire TV Original Android Development] Bertonumber1:
Saying a prayer would be better for this box ffs :good:

I was at mine for nearly four days mate

Member [MENTION=2769839]DanielF50[/MENTION] may be able to tell you what the reason for hitting enter twice is in respect of running the script.

I read through the archives and clocked his post, decided to try it out as I'd tried everything else. It worked, and so did every other box (Sloane) I did this way afterwards.
[Fire TV Original Android Development] Sus_i:
I think the reason is that the script may start directly, as soon the box is in phone mode connected...

In other words, the second enter answers the 'remove the short question' in advance.

Sh*t happens ;)

The script is supposed to work 99,9%, I guess.

Was your box on the latest OS?

Bricked or working?

Maybe try a second cable.

lol.

If you (or other people) cannot get further and if it feels too annoying...

and just in case you get the idea to ditch the box in the trash...

the OP from this thread [MENTION=8978978]Rortiz2[/MENTION] needs a development box, since his box died due extensive testing...

Just a thought, maybe someone sends him a box to spain :p From what I've seen, he needs just a box, not a power supply or remote.

I bet he'll do some investigations on this error, maybe he release a new lineage rom for sloane, idk.
[Fire TV Original Android Development] Kooneybert:
I took a look at the provided python scripts. I am 90% sure that the following code from common.py is executed when you guys tell me to hit enter twice:

log("Waiting for bootrom")

old = serial_ports()
while True:
new = serial_ports()

# port added
if new > old:
port = (new - old).pop()
break
# port removed
elif old > new:
old = new

time.sleep(0.25)

This code doesn't care if you hit enter twice, say a prayer, gently say please or pull out your AR-15 and furiously threaten to shoot at your fire tv box.

I am about to give up because so far, I can't see any further progress and I'm even out of prayers and ammunition.
[Fire TV Original Android Development] Bertonumber1:
Yeah, I was pulling my hair out mate, in honesty I only bought it to see if I could root it. I managed to root it and install pre-rooted rom, then put it back to stock and returned it for a refund.

I'll stick with my 4k firesticks from now on. Much more mod friendly and easier to exploit.
[Fire TV Original Android Development] Sus_i:
Nice, lmfao :D

Didn't know that this old box is still sold with return / refund policy :p
[Fire TV Original Android Development] Bertonumber1:
Yeah mate, Cex online are a good source and always return a refund if it goes Pete tong lol

Good source for all the gamers out there too :good:
[Fire TV Original Android Development] Hannover2k:
I have 3 Fire TV Sloane devices, two rooted, one stock. I've been manually flashing the two rooted devices with the pre rooted roms up through version 5.2.7.3, however about a week ago, one of the devices rebooted while watching a movie and never came up again. It still boots to the TWRP screen and then past it, showing the white Amazon logo, but then the monitor turns off and that's about it. It can still get into recovery so I re-flashed the same rom but it does the same thing and never boots.

I noticed today that the other rooted device started downloading an update for version 5.2.7.4. Prior to this, I've never had to block updates, the ROM just never updated itself so I'm not sure what happens if I let it finish. I saw another threat for the Fire TV STICK 2nd gen had the same thing happen and a bunch of people lost root permanently.

So I have two questions:

There is no pre-rooted rom for 5.2.7.4 sloane version yet so I'm wondering if I have to keep the working rooted unit offline until one comes out or if there's a way I can manually flash the stock rom, then re-flash twrp and root at the same time before rebooting? Is there a source for stock images? can I pull the update files from the downloaded update folder and manually flash before they install themselves? As of now when I boot it it's still on 5.2.7.3 and has not completed the update yet. Still not sure how it was able to.

The other question is can the other rooted device be recovered? I think it's only a partial brick as I can still get into recovery without any issues and flash zips, etc, however I've already tried wiping almost everything (not the system partition) but always get stuck in the same place on boot. Is this thing actually a brick?

Thanks!
[Fire TV Original Android Development] Sus_i:
I've answered to your posting here in this thread...

Don't mess with the stock update file in TWRP, best is to disable updates and wait for a new prerooted rom.

Have you tried a 'format data' - i.e. not a wipe, a full format!? You find the button in the wipe section.
[Fire TV Original Android Development] dovedescent7:
Hey Bertonumber.

Im having a go with my friends ftv2 now that ive rooted mine.

Quick question: After attemoptiung to root im getting errors but im not worried about those.

I am concerned that lights are no longer coming on on the ftv.

Ive tried different power outlets.

If the lights dont come on does this mean i fried it? Its not displaying video either, Or is it something where i just need to let it sit for a while?
[Fire TV Original Android Development] Bertonumber1:
The LED disappearing happens sometimes I think this is something to do with the bootrom/ bootloader, it happened to me too, but once I successfully flashed a rooted rom and rebooted the led came back again :good:
[Fire TV Original Android Development] dovedescent7:
So this thing isnt dead? Its not powering on at all when plugging into tv.

There's no lights, no signs of life whatsoever.

How can i confirm this thing isnt dead? and/or what do i do next?
[Fire TV Original Android Development] Bertonumber1:
Hey, how you doing :good: not too bad I hope

First what's your pc saying on windows to adb devices when you type it in.... is the box showing up? Serial number etc?

Second, what is box showing on Linux terminal lsusb?

Don't know if it's dead until you try that, then you may have to investigate further by testing the voltage on board at certain points to see if power is going through the board. But we'll do this the other two checks first :confused:

##Edit ## leave it for a few hours then try running the script again.

Sometimes the EMMC becomes overwhelmed with the process.
[Fire TV Original Android Development] Bertonumber1:
Try using Ubuntu 20.4, I couldn't get it somehow using the live USB, I ended up partitioning my laptop hardrive to dual boot and running Ubuntu straight from that.

I know it's a long way for a shortcut but these boxes can be fussy. Did you try hitting the enter twice after leaving the box plugged in and just plug USB back in then power off/on.

Again not meaning to sound like a broken record with the hit enter twice thing. This is how I got several boxes to go. It is frustrating but somehow it just flashed twrp and then you're in :good:
[Fire TV Original Android Development] dovedescent7:
Fire tv rescued from the depths of hell!!!!! Amazing

#1 Thanks to OP and ESPECIALLY BERTONUMBER for pushing me to keep going! Rule #1 LISTEN TO BERTONUMBER

#2 I've been trying to fix this Sloane FTV2 for WEEKS.

Got ftv2 from friend and could NOT INSTALL Youtube TV, the cable channel one because I was stuck on 5.2.6.0 and would not update PERIOD.

Tried many things then went to this root method AND FTV2 COMPLETELY DIED NO SIGNS OF LIFE. No lights nothing.

Bertonumber kept pushing me and I COULDNT BELEIVE IT. After NO SIGNS OF LIFE FOR FIVE DAYS I STILL WAS ABLE TO ROOT AND FIX!

You just got to keep trying like Bertonumber says and listen to him. I've rooted/rom'd many devices... But this one is hell. But you can do it! Keep trying!

bertonumber

[IMG="deniro"]https://ibb.co/QXzY05r[/IMG]
[Fire TV Original Android Development] Bertonumber1:
Glad to help mate, the Sloane is an awkward type and he doesn't like having his dat0 tickled :laugh:

Sometimes you just have to leave it for a while then go back in with fresh eyes.

All the best my friend