yashsingh1/xdaforums huggingface dataset:
[Fire TV Android Development] Velcro31:
Already tried that and not working.. :( I think it depends on something from that framework. We'll just wait, still in the early stages of fire 4k development. I'm glad that the system is open now.
[Fire TV Android Development] Sus_i:
OK, I've checked for updates now. 6.2.6.5 is the latest for my sticks.

But there are many system apps that the OTAUpdater wants to update, here are a few names of them:

MShopAndroidTVClient-release-signed_1.apk
signed_1.0.211847.0.apk
com.amazon.tv.launcher.apk
com.amazon.firebat

I've updated until the stick prints that it's up-to-date.

Installs fine without a reboot. As far I can tell, no harm to the unlock, magisk works fine.

This is my fourth system component update since the big 6.2.6.5 install.
[Fire TV Android Development] hyperblu:
So I ran the exploit right out of the box before allowing it to update. I'm able to boot up for initial setup, but I haven't connected it to wifi yet. Does this mean I'll have to let it update and run the exploit again before flashing rbox rom? I'm assuming it's going to want to update after the rbox rom anyway since it's not signed and won't see the latest signed update from Amazon?
[Fire TV Android Development] Sus_i:
The rom from rbox is the latest full update, I've checked this yesterday, probably only some small app updates pending, like in my case.

What I meant before is, that it's best to do the initial setup, let it update, enable adb debugging, check two times for update until it's up-to-date. Then do the unlock, install magisk and sideload the magisk manager. That's what i did. I think I may skip the prerooted rom until the next or after next update, since my sticks are now up-to-date and unlocked.

Ok, you unlocked the stick and the initial setup waits for you. That is ok. You have two options.

Beforehand, no matter which option you choose, I recommend a full TWRP Backup of all aviable partitions in TWRP, save it to an usb stick or pull it to your PC with adb.

First option, you can give the initial setup a try, let it do the update and then do the things I've done above... But maybe the update fails, since the stock recovery is gone. I don't know this in detail, haven't tested this scenario. If the update installs fine, your unlock is probably gone, and you've to redo the unlock steps, install magisk and the manager.

The other option is to use the prerooted rom in order to get the latest update. Don't forget to install magisk after the prerooted rom. For your information, some users reported that the initial setup waits with an update in this case (probably only a small system app update). One user said there is no way to get behind the initial setup with this scenario, because of failed update attempts. Another two users said that prime video won't play after the rom install (see the unlock thread). Could be somekind of user error, can't tell at this time.

If any errors occur, you have a TWRP backup. Also it's possible to restore a stock update.bin & flash a stock boot.img with hacked fastboot, in order to get the stock recovery back.

I wish you good luck and please don't forget to report back... ;)
[Fire TV Android Development] tehlers:
I can tell, that the stick is working after installing rbox' version and Magisk, but every time trying to start something from Amazon it says "license_error" (as reported in the "[UNLOCK][ROOT][TWRP][UNBRICK] Fire TV Stick 4K (mantis)" thread). All other apps like Netflix or others are working fine.

My path was from 6.2.5.8, doing the exploit to install the hacked BL, then flashing this ROM. I can only recommend to do a full backup with TWRP before using this ROM, since I have no idea how to fix that.

Best
[Fire TV Android Development] hyperblu:
So I completed the setup and let it update, but unfortunately didn't know how to force twrp recovery to create a backup beforehand. I'm also having the license error on Amazon video app. Beyond that everything seems normal. I'm going to see if flashing rbox rom will fix the Amazon video issue.

---------- Post added at 02:47 AM ---------- Previous post was at 02:43 AM ----------

It's not the prerooted rom. I just did the same thing and after setup after running the exploit it does this as well.

---------- Post added at 03:01 AM ---------- Previous post was at 02:47 AM ----------

So I just saw there was a pending update to install 6.2.6.6?
[Fire TV Android Development] Michajin:
I saw that also, I blocked it

adb shell

su

pm disable com.amazon.device.software.ota

reboot by disconnecting power to avoid the update...
[Fire TV Android Development] Axecaster:
I let an already registered 4K stick from an earlier Fire OS version back onto WiFi to OTA a couple updates. Once 6.2.6.5 was downloaded and ready to install in the system updates section, I told the device to forget the WiFi network connection, then pressed install.

Questions for clarity:

Because this stick has not yet been online with 6.2.6.5, will that trip the amazon authentication issue after running the exploit, flashing the rbox 6.2.6.5, then flashing magisk?

If data stays untouched, will the device treat the flash like an update, keeping all settings the same, with the device still offline (in order to disable update processes)?

Or, will all the offline changes cause the amazon video authentication issue?

(Or, maybe prior to applying the exploit and flashes, the stick needs to be back online long enough for amazon to see the current system version, but short enough that the next version does not have time to download?)

Just trying to think through the best path forward.
[Fire TV Android Development] hyperblu:
If my theory is correct, you would want to allow the update to install and authenticate with Amazon's server before rooting or running the exploit. Mine would only allow me to update to 6.2.6.5 and not higher. I then reboot into recovery and flash rbox ROM , flash magisk and disable updates.

Whatever version of the rom you flash, you want to make sure you had the clean, factory rom at the same version number before flashing. You don't want to flash an earlier or later update than the last version Amazon authenticated.

For example, if you allow the 6.2.5.5 to install and the new update begins to download, you want to flash the rom before it reboots, root, then block the update service so it can't reach out to amazon upon reboot. Unfortunately, you're stuck on that version until someone works around the DRM fix.

Personally this is what I would do...

1.install the pending ota update. If it downloads the next update, no biggie.

2. Run the exploit.

3.create a full backup in twrp and save to usb

4.install rbox 6.2.5.5 rom, install magisk, then perform a factory reset.

---------- Post added at 02:38 AM ---------- Previous post was at 02:12 AM ----------

I'm going to spend some time messing with one of my sticks with a DRM issue and see if I can find a solution (or safe sequence of flashing) to this for the foreseeable future. I maybe able to remove the proprietary version of Amazon prime and install a less finicky Android TV version that doesn't authenticate device specs with Amazon like theirs does.

---------- Post added at 02:48 AM ---------- Previous post was at 02:38 AM ----------

It's also my understanding that if you do happen to screw something up, you can flash the update.bin with the last authenticated version you had with Amazon and that will clear the DRM trigger. In my case, I flashed the stick right out of the box and have no idea what version was on it. I'll have to flash update.bin a few updates back until I find it and DRM trigger resets.
[Fire TV Android Development] rbox:
The DRM issue is related to one of the firmware partitions. 6.2.6.6 that I am uploading now fixes it.
[Fire TV Android Development] hyperblu:
[MENTION=3991724]rbox[/MENTION] what exactly did you modify on this rom? I'm wondering how ota updates will affect magisk installed on a stock rom or whether DRM checks recovery at all or if it's solely version number?
[Fire TV Android Development] rbox:
I included the missing firmware.
[Fire TV Android Development] hyperblu:
Is the issue just on your 6.2.5.5 rom, or is this something that will affect signed ROMs?

---------- Post added at 03:01 AM ---------- Previous post was at 02:59 AM ----------

Would future updates require a prerooted rom from you?
[Fire TV Android Development] rbox:
If you're using TWRP, tz will not update with a stock rom.
[Fire TV Android Development] rbox:
I have updated the OP with 6.2.6.6.
[Fire TV Android Development] Axecaster:
So it sounds as if the exploit should only be run after full OTA update to 6.2.6.6, then flashed with prerooted 6.2.6.6?
[Fire TV Android Development] hyperblu:
[MENTION=3991724]rbox[/MENTION] I installed the new rom, all is well again with DRM, however I opened magisk manager and it asked me to download the setup zip in order to function correctly. PSVue detects root also. Is there more to setting up magisk post-flashing?

---------- Post added at 04:39 AM ---------- Previous post was at 04:33 AM ----------

No, you should be able to run the exploit on any software version, but this rom includes the fix to tz as the firmware used during the exploit was missing some stuff.

---------- Post added at 04:48 AM ---------- Previous post was at 04:39 AM ----------

Basically tz was good before the exploit, exploit rewrote tz, but missing stuff. The exploit prevents tz from being written over so you ran the risk of having license issues regardless of what you flashed. This rom rewrites tz with the fix and prevents it from being written again. Essentially if you install this rom once, the fix will always be there.
[Fire TV Android Development] tsynik:
Something veird with bundled Magisk - it won't install modules from TWRP - gives me that error:

...

Installing zip file '/auto1-1/AFTV-MM-1.3.zip'

Checking for Digest file...

I:Update binary zip

I:Extracting updater binary 'META-INF/com/google/android/update-binary'

I:Zip does not contain SELinux file_contexts file in its root.

[amonet] Load microloader from recovery...

[amonet] Remove boot patch...

[amonet] OK

I:Legacy property environment not used in updater.

/tmp/updater: line 46: /data/adb/magisk/busybox: Too many symbolic links encountered

- Mounting system

- Mounting vendor

/tmp/updater: line 62: unzip: not found

! Unable to extract zip file!

- Unmounting partitions

Updater process ended with ERROR: 1

...

But, if I reinstall Magisk 20.0 from original Magisk zip installer in TWRP - all is OK

---------- Post added at 07:10 AM ---------- Previous post was at 06:44 AM ----------

does it need to be protected that way? Because after factory reset on 6.2.6.5 (any not current fw) unexperienced user will be force-updated to 6.2.6.6 (via TWRP) at OOBE Setup (which I think directly related to Prime Video Issues - Device "connected" to Account at that point) and there is no way to skip this easely.
[Fire TV Android Development] aasoror:
here you go

adb shell settings put secure install_non_market_apps 1

works instantly, no need to reboot.
[Fire TV Android Development] rbox:
Yup. I can see this. I'll have to figure out why it's not getting installed properly.
[Fire TV Android Development] rbox:
I understand why this is happening. It'll be fixed for the next version.
[Fire TV Android Development] gb160:
Hi guys, apologies for the noob question as I'm v new to android, i've followed the guide and successfully unlocked my firestick 4k, just wondering exactly how I go about flashing this image.

If someone could point me in the direction of an idiots guide that would be great.

Cheers.
[Fire TV Android Development] puppinoo:
Hi,

Can't assume responsibility if this breaks your system but this is how I've done (with essential help from community).

Good luck:

EDIT: This is done in Ubuntu!

*** I hope I didn't forget anything but can't be sure ***

thanks A LOT TO [MENTION=5213625]Sus_i[/MENTION] for fundamental advices and corrections!
[Fire TV Android Development] gb160:
Many thanks, exactly the sort of thing I was looking for.
[Fire TV Android Development] puppinoo:
I edited A LOT so check the corrections!
[Fire TV Android Development] gb160:
Where can I download Magisk-v20.0.zip & MagiskManager-v7.3.5.apk ?

Ive googled it and found links but don't want to install the wrong one and risk buggaring my stick up lol.

Thanks again buddy.
[Fire TV Android Development] puppinoo:
https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

scroll down a bit to "Downloads" section. Download "Latest Stable" and "Latest Magisk Manager" links
[Fire TV Android Development] Sus_i:
Looks good, but this doesn't work (since it is not a zip file):

twrp install /sdcard/MagiskManager-v7.3.5.apk

You can use something like that (I never pushed a apk to the device and installed it from there, probably won't work too??)

adb install /sdcard/MagiskManager-v7.3.5.apk

You can install the apk without pushing it to the device (but you have to edit the path to the apk) i.e.:

adb install /path/to/MagiskManager-v7.3.5.apk

or if you use a windows command prompt and the magisk.apk is in the same folder as adb

adb install MagiskManager-v7.3.5.apk

Edit: Yeah, if I think about it, installing from internal storage won't work with adb, you can only install apk's from the laptop thats running adb.

Edit2: In case the apk is pushed to the device, on sdcard, this should work:

adb shell
pm install /sdcard/MagiskManager-v7.3.5.apk

but I never tested this, as the adb method is much easier
[Fire TV Android Development] puppinoo:
Absolutely right. I edit immediately. Thanks for checking

I hope to not say silliness but Im quite sure I pushed both rom and magisk zips to /sdcard/ and installed from there so that worked. Just the apk files has to be installed using "adb install" command
[Fire TV Android Development] Sus_i:
Yeah, thats just what I meant :good: adb install, but without pushing the apk to the device, it installs directly to the device.
[Fire TV Android Development] puppinoo:
I corrected. Can you quickly check and confirm it's ok?
[Fire TV Android Development] Sus_i:
Yes, should work as expected. :good:

Edit:

If you like you could add this behind disable updates:

adb shell
pm clear com.amazon.device.software.ota

It clears a pending update and deletes the last searched thing from settings...
[Fire TV Android Development] puppinoo:
Thanks.
[Fire TV Android Development] gb160:
Many thanks for your input here guys.

I Followed the instructions and it all went smoothly, without a single hitch.
[Fire TV Android Development] sconnyuk:
Thankyou for your answer, however i did mange to find this a few days ago.
[Fire TV Android Development] aasoror:
Sorry if you posted about finding it on this thread I must have missed it!
[Fire TV Android Development] vanzan:
So hang on if I flash this will I be able to bypass that initial partial Amazon update it forces?
[Fire TV Android Development] gb160:
Does anyone know of a method to get rid of the god-awful banner ads on the home screen?
[Fire TV Android Development] niftynick:
Yes, try replacing the homescreen with another launcher, see here.
[Fire TV Android Development] gb160:
Nice, it looks much better!

Cheers buddy.
[Fire TV Android Development] gb160:
Can u expand on this buddy?

Forgive my ignorance but what is this partial update about?, why do you wanna bypass it?
[Fire TV Android Development] vanzan:
Oh I flashed the first rom released by rbox but when I started the stick up I couldn't bypass an Amazon update. Couldn't get past it to the screen to log into my Amazon account.
[Fire TV Android Development] Sus_i:
Have you tried the newer 6.2.6.6 in the meantime? Should be the latest without any pending update

---------- Post added at 03:19 PM ---------- Previous post was at 03:14 PM ----------

If the stick does an OTA update (the one with restarting), you probably lose root...
[Fire TV Android Development] vanzan:
I haven't mate...that's what I was asking. And you're the only person that bothered to reply! Cheers I'll try out the new rom. :)

---------- Post added at 02:47 PM ---------- Previous post was at 02:20 PM ----------

Yeah great it was "downloading update" just for a second but didn't need to restart the Stick and I got to the login screen. Think I'm good. Now to block updates!
[Fire TV Android Development] gb160:
Guys another possibly daft question:

Ive installed this image, then changed the launcher thanks to the guide posted by [MENTION=5942538]niftynick[/MENTION].

Is there anyway to backup my system atm, with this launcher and all my apps installed, into a zip file so as if I need to restore for any reason (I love to tinker and piss around) I can get back to how my Firestick is right now?

Ideally from shell commands as I don't have that cable necessary to use a mouse.
[Fire TV Android Development] hyperblu:
You can create a backup in twrp via command prompt, however I'm not familiar with the command lines needed.
[Fire TV Android Development] gb160:
Thanks, at least it's possible.

Hopefully someone else can chime in and point me in the right direction.
[Fire TV Android Development] xionbunny:
Will there be a new zip for the new update?
[Fire TV Android Development] Gerald We:
I've installed Reboot Manager, gave root rights and booted to recovery.

Via OTG Kable its easy to attach a mouse and USB stick and make a full backup.
[Fire TV Android Development] MrHomebrew:
Where is 6.2.6.6? I do not see it in the OP?
[Fire TV Android Development] alixyz:
It’s at the bottom of the OP

http://www.mediafire.com/file/03objd9rh171nxt/mantis-6.2.6.6-rooted_r1.zip/file
[Fire TV Android Development] MrHomebrew:
I was seeing this at first without the latest link, now it's there tho, wierd xda bug idk. Thanks.
[Fire TV Android Development] rbox:
I updated the OP with 6.2.6.8_r1.
[Fire TV Android Development] puppinoo:
Always thanks a lot,

Just updated but now I'm receiving a: "An internal error has happened on your device <...>" at each reboot. Annoying but everything seems to work though.

Regards.
[Fire TV Android Development] rbox:
Yeah, I'm getting that too. Haven't really looked into what's causing it, don't really think it's that big of a deal. Might want to try doing a factory reset to see if it clears it up.
[Fire TV Android Development] tsynik:
Thanks. Can you share link to Amazon's original 6.2.6.8 .bin also?
[Fire TV Android Development] Pretoriano80:
I've uploaded the update here .It's renamed to zip,but it's untouched.
[Fire TV Android Development] megladon:
Still getting license_error.

Stick installs an update even on the latest build when setting up.

Do I need to wipe anything before fashing?

Thanks
[Fire TV Android Development] T1inkering:
i flashed 6.2.6.5 and magisk v20.0 previously, am i ok to go ahead and flash 6.2.6.8 without flashing magisk again? what version of magisk is included in 6.2.6.8?

also do i need to clear cache and dalvik every time i update?
[Fire TV Android Development] Sus_i:
Do you have flashed the 6.2.6.6 from the OP?

No, you may flash 6.2.6.6 first, it updates TZ in order to prevent prime license errors. After that flash 6.2.6.8.
[Fire TV Android Development] T1inkering:
Updated to 6.2.6.6 fine but after flashing 6.2.6.8 i'm getting error message "there's an internal problem with your device contact your manufacturer for details" at every boot although everything seems to be working as it should...
[Fire TV Android Development] Sus_i:
Yes, [MENTION=3991724]rbox[/MENTION] said he got the same message. No fix known, I think.

Edit: Update, fix is known, take a look here...
[Fire TV Android Development] megladon:
Did not know that! Thanks mate!
[Fire TV Android Development] cristimnt:
I'm on 6.2.6.6. Can I safely flash 6.2.6.8 in twrp without data loss?
[Fire TV Android Development] mrblack1134:
I found the fix for this error.

It's caused by a mismatch between the /system/build.prop and /vendor/build.prop (search for "There is an internal problem with your device, and it might be unstable until you factory data reset." on android.stackexchange ... I can't post links on xda yet).

Basically, it involves copying the value from the /system build.prop to the /vendor build.prop for ro.vendor.build.fingerprint (you need to remount the /vendor mount as rw first). Maybe rbox can include it in his next image?

The image works great, aside for one thing; I can't get the AppleTV+ fire tv app (from the amazon app store) to launch correctly. It keeps saying I need to "update to the latest firmware", which I did (I'm running 6.2.6.8).

I've extracted the apk (for it from apkpure), and then extracted the app.zip (it's some sort of JS app), and traced where the error occurs. For some reason, it does a version check on getCdm("com.apple.fps") and fails. This is the Apple Fairplay Content Decryption Module which somehow fails to properly instantiate on rbox's rom while re-flashing stock Amazon rom would (I assume?) fix that. I haven't tried re-flashing stock from amazon as I don't want to loose the bootrom exploit and re-open my stick (I've been lazy...). But it'd be nice if someone has an idea about how to query cdm's installed on android, or try to install the AppleTV+ app and see if they have the same issue.

Cheers
[Fire TV Android Development] cristimnt:
[MENTION=3991724]rbox[/MENTION], can you make Pretoriano80's custom kernel work with your image?

I've flashed the kernel and it is stuck on the first fire tv logo, on black screen.
[Fire TV Android Development] Sus_i:
lol, don't be lazy ;) you can easily flash a stock update bin, renamed to zip. TWRP keeps the bootrom exploit, no need to re-open the stick...

You may do a TWRP backup, in order to get back to the prerooted after your tests.

Link to the latest stock .bin
[Fire TV Android Development] Pretoriano80:
Have you flashed the stock rom as i recommended yesterday?The kernel works fine with the stock rom flashed via TWRP, so probably something is wrong/missing on rbox's rom,i have no idea.
[Fire TV Android Development] cristimnt:
Hey, I hoped rbox has some quick fix but I will take your recommendation and install the stock rom.
[Fire TV Android Development] gb160:
Guys sorry if this has already been asked:

Im on the rooted 6.2.6.6 image, how do I install this latest 6.2.6.8 image?

Im quite new to this so step by step would be greatly appreciated.

Cheers
[Fire TV Android Development] tsynik:
Just flash this update from TWRP and Magisk 20.1 after.
[Fire TV Android Development] gb160:
Worked like a charm.

Thanks buddy!
[Fire TV Android Development] rbox:
There is nothing modified from stock to my roms, but /system might have different metadata. Are you sure you are flashing Magisk after flashing the kernel? verity needs to be disabled.

Well that's quite odd. It's supposed to be flashing the vendor partition from the stock ROM. I'll poke around to see what's going on.
[Fire TV Android Development] urbanman2004:
rbox, I see that you're at it again w/ the prerooted AFTV devices images. So I had a bit of an argumentative exchange, going back and forth with someone online who claims that this exploit procedure causes the bootloader to be "unlocked" when in fact, contrary to what they believe, I rebutted their statement by informing them that "root" was ONLY established and that if the bootloader had been unlocked then he would've been able to install Magisk Manager w/o the risk of bricking their device. So rbox (or anybody educated enough a/b the subsequent results of this exploit), I humbly ask for your feedback: Does this exploit procedure provided by @xyz ` unlock the bootloader? Also when going through the root process, doesn't your [rbox's] image help retain root when it is flashed with TWRP? Thanks
[Fire TV Android Development] rbox:
There is an exploit that allows patched unsigned kernel images to be booted. TWRP has code in it to patch these kernel images so they can boot. So its a similar effect to having an unlocked bootloader, but not really.
[Fire TV Android Development] urbanman2004:
Alright, fair enough. So just to get to further clarity in regards to what I am needing to know a/b this exploit: if I were to hypothetically install Magisk Manager after successfully rooting the 4k firestick with this exploit, would that brick the device?