yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] ~iceweasel:
I'm trying to work through installing magisk through TWRP (no surprise generated more questions). I think I need to install both the manager and magisk zip.

I don't understand the TWRP Unmodified System Partition message. The wording isn't clear to me, do all three statements apply to keeping system partition RO?

-TWRP can leave your system partition unmodified to make it easier for you to take official updates. (I don't want this, right?)

- TWRP will be unable to prevent the stock ROM form replacing TWRP and wil not offer to root your device. (this also sounds bad, correct?)

- (in red) Installing zip or preforming adb operations may still modify the system partition (this sounds great)

I think I want to allow modifications, does allowing modifications prevent updates from wiping TWRP?

Does allowing modifications make it easier for the OS to overwrite TWRP?

Is it possible to restore the RO status, and do I want to restore RO?
[Fire TV Original Android Development] Sus_i:
If you download the magisk.apk you can rename it to .zip and flash it.

The swipe is only needed, if you want to mess with files on system.

You don't need the swipe to install roms or magisk and instead of a mouse and OTG cable, you can just use twrp commandline via adb shell (use the og fireTV usb cable), like this

adb push xy.zip /sdcard
adb shell
twrp install /sdcard/xy.zip
[Fire TV Original Android Development] ~iceweasel:
Thanks again, but I'm still having trouble. I'm still not clear on how to use ADB without it being previously enabled.

TWRP does have a sideload but when trying to start I just get the starting.... message

I tried this from the fireiso system:

# adb sideload app-release.zip
adb: sideload connection failed: no devices/emulators found
adb: trying to pre-KitKat sideload method...
adb pre-KitKat sideload connection failed: no devices/emulators found

I also wasn't clear on the comment about no mouse/OTG cable, how do I stop TWRP from rebooting to FireTV when I don't have a mouse? Am I missing something?
[Fire TV Original Android Development] ~iceweasel:
I think down time is my worst enemy, well that and not totally understanding exactly how this works on an OS level...

I decided to give another try with booting and interrupting the download to get back to the registration screen but I ran into what appears to be a major problem.... if I use the feature to enable voice menu that just enables the feature, it doesn't take you to the special screen that can be used to exit to the registration page... FRICK! So pissed at myself for hesitating when given the chance before... proof I failed myself by not leaning droid development 12 years ago!

I did some searching and can't find a way around this. Sure, pressing the two buttons again turns it off, but turning on just turns it on... I guess there's a flag saved somewhere I'll need to find. But I don't find anyone talking about doing that online. Is there a way to reset that setting? Will the TWRP factory wipe get this done without wiping TWRP?
[Fire TV Original Android Development] Sus_i:
Not adb sideload. You need to boot TWRP, start adb shell and then use TWRP commandline via USB cable ;)

TWRP Commandline Guide

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

twrp.me

Boot the fireISO,

open a terminal in the kamakiri folder,

run ./boot-recovery.sh

and connect the stick via fireTV usb cable.

TWRP will boot and if you type adb shell in the terminal, then you can use TWRP commandline.

Now you've got a terminal open, TWRP is running.

Download magisk from here:

Releases · topjohnwu/Magisk

The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.

github.com

If adb shell is running quit with exit, then rename the apk to zip and push it to sdcard via adb push command.

Then start adb shell and use:

twrp wipe data

twrp wipe cache

twrp install /sdcard/name-of-the-zip.zip

Now you should be able to skip the initial update again and magisk is installed.

Note: Never ever flash something via an APP from inside fireOS, especially not magisk updates. Only TWRP will work. Also never wipe system ;)
[Fire TV Original Android Development] ~iceweasel:
Many thanks, I did as directed with a detour to backup the stick partitions before installing magisk.

Whlle researching magisk I found this thread and had planned to use this version, but I followed your directions and installed 25.2 from the repo you shared.

https://xdaforums.com/t/magisk-25-1-for-fire-tv.4448125/

What you said in the note, "flash something" you're talking about OS updates? Does that include magisk updates? I think you're saying just use TWRP for anything operates on a system partition level, right?

I also wondered if it's possible to disable updates from the TWRP adb shell, but guessed fireOS needs to be running for that to be an option. My router has the stick restricted to LAN only so the stick can't access the updates anyway. I'll wait a while for feedback, but I think it's time to reboot -p and get to discovering what version of OS is installed! :unsure:
[Fire TV Original Android Development] ~iceweasel:
I was able to bypass the download, and enable adb and 3rd party apps.

FireOS is v6.2.6.3

Home v6.1.3.1-004

I've got traffic blocked on the router, so home and updates aren't downloading for now.

I tried the following:

mantis:/ $ su

Permission denied

13|mantis:/ $

Prompt now has the 13| prepended.

Magisk on the FireTV has presented an upgrade option and given the previous comment about not flashing from anything other than TWRP has me frozen in my tracks. =)

Wondering if I should accept the "download and install" Magisk upgrade or should I just start pushing rbox images using TWRP?
[Fire TV Original Android Development] Sus_i:
su is aviable as soon as you grant access

Any update of the 'magisk manager' (app) is ok... (y)

The update/upgrade of 'magisk' will only work via TWRP.
[Fire TV Original Android Development] ~iceweasel:
Thanks, that makes sense magisk manger vs magisk itself.

Although I think I now have a chicken-egg thing needing to find a way to allow magisk to download and install so I can approve su access to disable update tasks while preventing the OS from downloading the OS upgrade.

Fingers crossed the pm clear does its job

Job done! I didn't want to risk anything so opened a second shell and kept clearing any amazon .ota file while updating magisk.

Since 6.2.6.3 is older than the first version listed on rbox's custom how should I proceed? Would I still start with 6.2.8.1_r2?
[Fire TV Original Android Development] ~iceweasel:
I confirmed 6.2.6.3 needs to be updated to something newer.

I thought I understood there are a couple critical updates, is 6.2.8.1_r2 still the right next step?
[Fire TV Original Android Development] Sus_i:
Depends on you, if you like the old fireOS launcher use 6.2.7.7 (renamed to zip):

https://d1s31zyz7dcc2d.cloudfront.net/68d33a27765a01a75f9ccc8d11a52791/update-kindle-mantis-NS6277_user_3033_0004597733764.bin

and if you like the new launcher UI then flash rbox 6.2.8.1r2.

Don't wipe anything, rom flash is enough.

If you want to flash a more recent fireOS at some point, make sure you think twice, i.e. keep your efuse from burning: @SweenWolf uploaded a patch somewhere which deletes the efuse burn script and @Pretoriano80 does also similar patches including his awesome custom kernel:

[KERNEL][FireTV Stick 4K] Custom Kernel For AFTV 4k - 6.2.9.4

Warning !!! Use this kernel on your own risk !!! I can't be held responsible for any kind of damage or data loss !!! Features: SDCARDFS exFAT and F2FS support Wireguard Advanced TCP options CIFS and NFS support Insecure ADB v1...

xdaforums.com
[Fire TV Original Android Development] ~iceweasel:
Thanks again. I guess my interest wasn't clear, I wasn't really asking about options but appreciate that. I really don't want to use the box for anything other than the basics (at least right now). I just want to keep it open and I was asking to avoid what happened back in October 2019 (page-12+) all that mess with credentials reapplying boot image and all that when others were upgrading from 6.2.6.3.

I agree, avoiding the efuse will be important moving forward, so will take a look into the Sweenwolf mod, and Pretoriano80 kernel.
[Fire TV Original Android Development] kigba:
Congratulations. Now you have the same situation as with me. Something broke in the bootloader and now my stick is a regular brick. It is sad. I assume that I need a full rom from Amazon to restore the bootloader via mtk flashtool
[Fire TV Original Android Development] Sus_i:
The bootrom script should only 'find' the sticks bootrom, if you shorted one of the known points.

As conclusion, if the bootrom script finds the stick without any short, something is broken.

I can confirm that, I rerunned the steps multiple times and I had always to short infront of the bootrom script. Without a short the script waits forever.

---------- Post added at 09:22 AM ---------- Previous post was at 09:07 AM ----------

I understand that you're may be a bit frustrated, but please stop posting erroneous things. ;)
[Fire TV Original Android Development] puppinoo:
EDIT: Please ignore this post. I was probably wrong cause I got confused with FireTV Stick 2 (Tank) . Sorry.

My experience is that if I don't short the point correctly the script simply raises an exception and don't run. And I tried it MANY MANY times before success!

Regards.
[Fire TV Original Android Development] t3ch42:
Good morning. I installed on my second 4K stick last night and found that I was successful, but was not able to play amazon prime videos. Every time I would attempt to do so I would get a "LICENSE_ERROR" error code. I installed both the prerooted ROM and magisk already. I did notice that my firetv version is not the same as my other working stick. The one not working is on 6.1.6.0-729 while the other is 6.1.7.0-13 if my memory serves me...

Any ideas?
[Fire TV Original Android Development] aasoror:
Before shorting correctly for the first (and only) time, the script would busy-wait doing nothing, no exceptions or aborts till I replugged the stick with the short applied and the script proceeded as normal.

I guess, something happened in that one time short and now it's permanently shorted?!
[Fire TV Original Android Development] tehlers:
I have the same problem... I just did not try to play a video before, so I did not notice until now. If somebody knows a fix, please write it.

Thanks
[Fire TV Original Android Development] k4y0z:
I have no issues playing prime here.

Try clearing the cache + storage of the prime app in settings.
[Fire TV Original Android Development] t3ch42:
Thanks. I've tried that already and gone through the whole wiping experience to a freshly wiped system and data.

After installation, I let it update to the latest firetv revision but still having the prime video error.

I don't have the issue on my other 4K Stick that was rooted previously.
[Fire TV Original Android Development] puppinoo:
EDIT: Please ignore this post and the claims I did before. It's probably the FireTV Stick 2 (Tank) exploit and not the 4K one. I went full expoiting in a few hours with all my (different) sticks and probably got confused.

Sorry for confusion.

Fortunately I still had the prompt open so this is literally the excepètion I receive when I don't short correctly:
[Fire TV Original Android Development] cluelessperson:
Worked, but a magisk update has me in a boot loop. :P

Uh oh
[Fire TV Original Android Development] GameBoyJoe:
Hey so I'm pretty dumb & am just wondering how bad i messed up.

I bought a brand new 4k stick and made the initial error of rooting before ever plugging it in or doing any setup. So the initial install went fine & i could see that twrp was installed as the device was mounted as mantis , so i assumed after finishing the guide to power off, rebuild and plug into proper power adapter to set up like normal, but when connecting to wifi it searches for an update but cannot install it (mess up #1). eventually it will skip this step and say "connecting to amazon.com" where it never does and when pushing to the could not connect screen, immediately jumps back to connecting to amazon.com.

As I dont have an otg cable and did not yet get to a place to enable adb, i thought i may be able to reboot into twrp by the cache recovery command (pardon me if this is completely wrong my android understanding is fairly limited). but i could not again mount the stick to access the files. So I decided to try running the short again, (Mistake, clearly), the initial portion went fine, I didnt see any errors but when running the fastboot command i receive an argument.

So as of now its stuck at the fire tv logo with the "HACKED FASTBOOT" at the bottom left. Assuming I bricked it fully but any insight at all would be appreciated, sorry for making such a dumb mistake. And thank you for all the work you guys put into these projects, it's really incredible.
[Fire TV Original Android Development] Tepifan:
What's the argument you receive when trying to run the fastboot script?
[Fire TV Original Android Development] t3ch42:
Is it possible to remove the hacked bootloader and twrp?
[Fire TV Original Android Development] GameBoyJoe:
So after the 3rd reboot, this one being to recreate the argument, I tried running the command first in its own fresh terminal, waiting for the device prompt, and then plugging in. This solved the fastboot issue!

Now unfortunately I still dont have an otg cable, i attempted several different diy methods at creating one but none of them seemed to trigger the firesticks twrp menu. So for now I am back to my original issue of not being able to set up the stick as it cannot update and not being able to trigger or interact with twrp....
[Fire TV Original Android Development] kigba:
Hello. I want to ask a clarifying question - did you connect it to the TV before the stick unlock procedure? Your stick was completely new when you decided to unlock it? In my situation, I didn’t connect the stick to the TV, I immediately unlocked it from the box, but unsuccessfully. Broke the capacitor. After I restored it, but the problem is something else and now the stick is “permanently closed” - when executing the first unlock script, just run the script and just plug in the cable, press enter - the unlock process begins.

sorry for my english, translation difficulties
[Fire TV Original Android Development] ChronoWerX:
Can I do it with a virtual machine? Can't access my boot menu because of BIOS problems
[Fire TV Original Android Development] Sus_i:
Why you can't get behind the update page? Updates blocked with your router? Or is your stick blocked by A. ?

The new initial setup isn't easy to skip, it loops/searchs forever if you have the update URLs blocked.

You can use TWRP Commandline but the initial setup will still wait for you at the reboot :p

try to hit F12 on boot ;)

A virtual machine should work too, but you need a patched kernel.
[Fire TV Original Android Development] ChronoWerX:
It is F8 here and the pc freezes then. When I want to go to BIOS too.

When I boot the virtual machine from the ISO, I have a patched kernel or?
[Fire TV Original Android Development] Sus_i:
Yeah, if you manage that somehow and boot the fireISO, the kernel is patched.
[Fire TV Original Android Development] tsynik:
Yup. But you can enable adb via shell and disable OOBE package, in that case system boot directly to any founded launcher.
[Fire TV Original Android Development] Sus_i:
Updating from 6.2.6.3 should be no problem at all if you did the unlock with kamakiri 2.x, then your stick got already all images needed to work fine up to 6.2.7.7 (and now you can re-do the bootrom-step without to short).

Updating from 6.2.6.3 to rbox 6.2.8.1 is also ok.
[Fire TV Original Android Development] ~iceweasel:
Perfect!! Many thanks, you've been a great help!
[Fire TV Original Android Development] fluffi444:
@Sus_i

I thought I now got everything understood from your and @~iceweasel valuable discussion here... But I failed at the very beginning... OMG...

I got today my second brand new FireTV 4K build 2018 - shown on package. My first one - also an 2018 - which I updated to 6.2.9.4 by mistake is already sold to a friend whom do not care about rooting and stuff. I told him everything of course!

But now I stuck at "waiting for device" and nothing happens. I guess this stick has a quite old FW installed. It was 100% originally and not opened before. Im using latest FireISO on USB stick.

As far as I understood I should use only kamakiri 2.0.1 WITHOUT any shorting.

[root@fireiso ~/Desktop/kamakiri]# ./bootrom-step.sh
[2023-01-05 13:51:18.465124] Waiting for device

After that, after a few seconds, the AFTMM Device shows on Desktop.

But nothing happens... Waited for some minutes...

Tried it several times. Used original USB cable. Tried it with other cables and OTG Y-cable as well... All the same...

What did I wrong? Or is it needed to short this old stick?

EDIT

Found my balls again :) and booted up to stick, with only MobilePhones Hotspot and only 2G data rate, skipped inital update with MENU + BACK, log in my account etc, set ADB +unknown devices ON - And checked the Version.... And of course cleared the updated files (after the pictures were made)... That all works without any new Software download/installation...

So I have as expected an very old FireOS 6.2.3.1 - Maybe this helps?!
[Fire TV Original Android Development] elMagnate:
****, I didnt notice the serial number before buying it. Mine is VM252. There is not a chance its rootable, right?
[Fire TV Original Android Development] fluffi444:
Found my even bigger balls and updated to offered 6.2.6.5 by FireOS.

But here the 2.0.1 mantis script did not work also... endless "waiting for device"...

To giving up is not an option so I decided to do the shortening!

Even its its told that this is not needed anymore....

And without shortening it should work for all if FireOS is below 6.2.8.7.

AND: It works! As many I used a small piece of aluminium foil. Push with one finger for better contact. And the script (2.0.1) instandly found my stick after connectiong USB. The rest went smothly...

All in All it looks like that some very old sticks are still needing the shorting method...

Do not know if this is proven or not - Maybe because of my old stick with VM058.

Anyway - I got it only working this way!

Blocking now updates and thats all for today...
[Fire TV Original Android Development] ~iceweasel:
I initially had no luck without the shorting using the method here and with the ubuntu guide the 3/lite thread. After trying that, I returned here with the FireOS.iso and with shorting got identified like you. Mine was also new @ 6.2.6.3 old but younger thna yours!

It's funny how stressful this was, and I've been doing CE mods for decades. But this was the first time I was a follower and sweaty palms uncomfortable at the though of killing a $20 stick!!! 🤣🤣
[Fire TV Original Android Development] fluffi444:
🤣 Totally Right! I also have some rooting history with phones and Samsung TV. I didn't not hesitate to root my 1000 EUR TV (2012 series) with less expirenence than now... Actually I didn't want to root anymore. Sometimes it eats just time... Hunting for updates/new ROMs/Kernels etc... But that happens if there is some free time because of new years hollidays. And did not accept my own dumbness to update the first stick out of the box! :cool:

Thanks again... Some questions you asked/discussed came to my mind as well - And were answered by Master Sus_i with angelic patience. I thing the discussion during the last days will be valubale for others as well...
[Fire TV Original Android Development] fluffi444:
Look here

https://xdaforums.com/t/unlock-root-twrp-unbrick-fire-tv-stick-4k-mantis.3978459/post-87531941

One user reported that his VM252 is blocked for rooting out of the box.

But how knows? Main key should be FireOS lower than 6.2.8.7.

Some information can give you the production year... Some say that 2019 would be good to go.

But with any later production e.g. 2021 the chances are sinking...
[Fire TV Original Android Development] Sus_i:
Thats fine, will unlock 100%.

You may need to short it (most likely, preloader is probably to old for the new non-shorting method). Do the short carefully, like this:

https://xdaforums.com/t/unlock-root-twrp-unbrick-fire-tv-stick-4k-mantis.3978459/post-80487815

Edit: Just saw your later post, glad that it worked out fine for your stick :)
[Fire TV Original Android Development] fluffi444:
Yes - And thanks again to you as well. Your discussion with Iceweasel helped a lot...

@All

Maybe some one can do me a little favour? I messed up my adb RAS key file permissions...

I hat some issues with "device offline" - Untill I noticed that its "just" a worn out USB 2.0 port which losses connection 🤣

Can someone can give me the "ls" output of folloing command - with ADB Shell + SU - of a rooted decive - FireOS version does not matter... Its just about the correct settings for chmod/chmod/chcon

mantis:/ # ls -lZ /data/misc/adb/adb_keys

Many Thanks
[Fire TV Original Android Development] ~iceweasel:
Realizing it's a little OT, but I'm trying to update to the r2/r3 builds and have run into a problem.

I authorized the firestick to save the authorization of the laptop which was running FireOS.iso but since I've restarted the laptop I'm wondering if I have to kill the saved key on the stick because I'm guessing the saved key pair on the laptop was only in a ramdisk since I was running the live iso. Is that what's happened? Can I trigger the stick to forget the previous saved authentication?
[Fire TV Original Android Development] ~iceweasel:
NVM after restarting the laptop and stick a 4th time something's different and the request appeared again on the stick. I unchecked the option to always accept hoping that will prevent this in the future.
[Fire TV Original Android Development] ~iceweasel:
Back again, and the latest update sucks... if appletv had worked correctly I wouldn't be updating but here I am. Running 6.2.8.1 (thining it's r3) and see there's an update 6.2.8.9 pending download so WAN is disabled for the device. What's got me confused again is trying to su in the adb shell is giving a permission denied. I buckled and selected accept all connections from this device during the ssh handshake (so I guess I need to know how to revoke that again). Without su I can't disable the update packages....

I thought @Sus_i mentioned earlier that once the adb connection is accepted (key accepted) su should be granted. Did I remember that wrong? Did I loose root when updating to 6.2.8.1_r3? *confused* Not happy with appletv at the moment!

I also thought Magisk is installed the later systems, but I can't see it. Guessing I may have to reinstall that to restore su?
[Fire TV Original Android Development] Sus_i:
Hi there

If you can't see magisk manager, you may need to re-flash magisk via twrp. Then you can grant the su permission for shell at the prompt on your TV (which pops up just after you call su via adb shell) or grant it in the magisk manager su tab.

As you know, avoid updating to a stock rom, it will burn your sticks efuse.