yashsingh1/xdaforums huggingface dataset:
[Fire TV Android Development] hafren:
@Sus_i I've enabled adb and launched adb shell (as administrator) but when I run pm disable com.amazon.device.software.ota I get an Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=9891, uid=2000, package uid=32011

How do I overcome the permissions denial
[Fire TV Android Development] hafren:
@Sus_i I was able to run pm clear com.amazon.device.software.ota with success but pm disable wont work Permission Denial:
[Fire TV Android Development] Bertonumber1:
You have to do :

adb shell

su

pm disable com.amazon.device.software.ota

pm clear com.amazon.device.software.ota

exit

Sometimes though permissions get messed up so make sure you actually have root.

Regards
[Fire TV Android Development] hafren:
Thanks - so how do I make sure I have root. When I type su nothing happens

C:\adb>adb shell
shell@sloane:/ $ su

C:\adb>adb shell
shell@sloane:/ $ pm disable com.amazon.device.software.ota
Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=11935, uid=2000, package uid=32011
1|shell@sloane:/ $
[Fire TV Android Development] hafren:
@Sus_i @Bertonumber1 Thanks for your replies & help. I think I have an issue with magisk so will reinstall from twrp and try again.
[Fire TV Android Development] Bertonumber1:
Hi sir,..

I just took for granted that you had unlocked your sloane? Is that the case

Make sure you have given magisk manager permissions in application settings and then try the above command.

The when you run from a terminal.

adb shell

su

you will see the # sign :

sloane#

If not reboot TWRP, push magisk.zip and flash and try again.

Been away but I'm back now if you need some help

. Regards
[Fire TV Android Development] hafren:
@Sus_i @Bertonumber1 Well finally at the end of the road. I have successfully blocked updates and can load magisk. FTV sloane working fully.

Now I've learned so much from you guys I'm going to try a firestick 4k (mantis) Am I correct in reading this can be rooted with kamikiri without opening the stick and shorting.? Can you point to the correct guide?

I also understand I need be careful about the update that blows an efuse.
[Fire TV Android Development] vp187:
do we need an update?
[Fire TV Android Development] stoger12:
clear 'data' in the superuser app. you will then get asked again to grant or deny .
[Fire TV Android Development] zangetsu09x:
how do i fix this

sdcard # twrp install sloane-5.2.7.6-rooted_r1.zip

Installing zip file '/data/media/0/sloane-5.2.7.6-rooted_r1.zip'

Installing zip file '/data/media/0/sloane-5.2.7.6-rooted_r1.zip'

Checking for Digest file...

Digest matched for '/data/media/0/sloane-5.2.7.6-rooted_r1.zip'.

[amonet] Remove boot patch...

[amonet] OK

Updater process ended with ERROR: 255

[amonet] Install boot patch...

[amonet] OK

[amonet] Install recovery patch...

[amonet] ALREADY_INSTALLED

Error installing zip file '/data/media/0/sloane-5.2.7.6-rooted_r1.zip'

Done processing script file

pls help
[Fire TV Android Development] theistus:
Hey all, just pulled this out of my closet, was going to give it to a friend. it's already rooted and running one the prerooted stock images (5.2.6.7).

What would be the best way to wipe it? Use twrp to wipe system/cache and reinstall prerooted rom? Or should I use the wipe in the settings menu?
[Fire TV Android Development] vp187:
i havent use mine in awhile but now when i plug in in, it keep staying at amazon logo...i have 5.2.7.6 installed....can some one help?
[Fire TV Android Development] HbbS:
Mine was also in a closet. Powered on successfully. I'm running a pre-rooted image from years ago.

Fire OS 5.2.7.6

Is there a way to upgrade to a newer firmware version?
[Fire TV Android Development] hafren:
@Sus_i @Bertonumber1 Logged into twrp 3.3.1-0. Formatted data, wiped cache & dalvik then installed fireos 5.2.7.4 and magisk 25.2. Fireos 5.2.7.4 script succeeded but magisk 25.2.zip hangs with "checking for digest file" Is magisk being blocked because it was loaded in the past? Is it acceptable to take a magisk.apk file and rename to magisk.zip to install with twrp? Do you have any reason why magisk 25.2.zip hangs with "checking for digest file"?
[Fire TV Android Development] Sus_i:
Try an older magisk version..
[Fire TV Android Development] hafren:
Thanks used 23.0 & that worked
[Fire TV Android Development] deanr1977:
If you "need" to wipe the box to a fresh state from recovery, make sure you do not reboot until you install the rom/recovery zip or your be left with a bricked device with no system loaded on to it. Also check you have blocked updates once wiping via recovery or amazon settings format because they will be reset back to the basic original settings again or it may update to an unrootable state in the future?

As rbox said version r4 is the latest with all the fixes for me version r1 or r2 with 3.0.3 recovery installed (cant remember which im on?) works great for me so at the moment I have no need to update yet. Do some reading & see which one you want to install? Think r3 or r4 can't access recovery unless you do it via a adb command? On my version you can just select it using a keyboard & swiping right.
[Fire TV Android Development] Sajhid:
Hi Dean, so what you are saying is I can do factory reset from recovery then before rebooting I will need to install the prerooted rom then reboot?

I have 5.0.5 v1 on mine at the minute and I can access recovery fine. Also I'm sure rbox said that the newer preroot rom has updates disabled already.

Thank you for all the help and sorry for too many questions as i don't want to brick my box.
[Fire TV Android Development] deanr1977:
Yes mate that's right, it is not recommended to reboot without installing a rom first because no system would be present anymore! You have the steps right & don't forget to make sure that updates are reblocked via adb once again If you do decide to system format. Think I'm on the same firmware as you too & its working great.
[Fire TV Android Development] zeroepoch:
I'm really curious why someone would ever format the system partition. I'm not sure what that accomplishes other than being really dangerous for no good reason. It gets overridden each time a prerooted is installed? Maybe I'm missing something?
[Fire TV Android Development] dk1keith:
I did that by mistake on my Fire TV 1 and totally bricked it. Too bad there isn't an Unbrick Image for Fire TV 1, like there is for the Fire TV 2. I just stay away from anything that might format system...lol
[Fire TV Android Development] deanr1977:
I don't know [MENTION=3411776]zeroepoch[/MENTION]? It maybe because on some custom roms on mobile (cell) phones sometimes the devs say that do a wipe or full wipe before flashing a new rom (with new firmware) , I have heard of this before but maybe they didn't have a script in there rom or installer to do this before flashing? Who knows? I know with the AFTV2 this is not the case after reading in these forums but as you can see some users are still doing or asking about doing this process.
[Fire TV Android Development] elliwigy:
because on phones typically when you "wipe" its similar to a factory data reset so youre essentially installing on a clean system vs. over top a modified system which can cause issues..

the same thing will happen with a phone (brick) if you wipe system without installing one after in recovery.. however, if you still have recovery and a rom on storage you can reflash rom and all is good.

Now if you were to have a locked BL and use FF like me, youd need to odin a full stock tar (Sammy devices) to get it to boot which is essentially similar to the unbrick image here..

fact is, when doing wipes always be sure you know what your wiping before doing so to avoid the trouble.
[Fire TV Android Development] deanr1977:
Well said mate, like I always say before flashing anything on any device.... Read read & read some more before diving in feet first!
[Fire TV Android Development] deanr1977:
Hi [MENTION=3991724]rbox[/MENTION] errm when you said "stock recovery will be disabled to prevent stock updates from being flashed" does that mean the stock recovery is disabled & not twrp recovery? in other word if amazon did get an update through (even though my updates have been blocked) they couldnt install them because there recovery wont work on our aftv2's after installing the latest recovery? Thanks & i just rooted my friends unit today without any hitchs & was done super quick too
[Fire TV Android Development] elliwigy:
correct.. it will not go into stock recovery at all..

not sure if this was before or after but i booted into recovery when i did adb command but it looked like it wasnt there and asked me to reboot.. i def didnt have normal recovery options
[Fire TV Android Development] deanr1977:
Thanks elliwigy
[Fire TV Android Development] Largewoodenspoon:
Elliwigy. You get my pm?
[Fire TV Android Development] elliwigy:
yes.. if allgoes well ill be making a guide with pictures later...
[Fire TV Android Development] random45:
I flashed this 5.0.5 r4 and then decided to wipe cache.

It then said "formatting cache using make_ext4fs" for a while, so i just rebooted by pulling the plug after 15 min.

Now it just boot loops. When i go into recovery it says "failed to mount /cache (Invalid argument)"

EDIT: Nevermind, I was able to fix it by rebooting into recovery and Wiping Cache again. It took a while but completed successfully
[Fire TV Android Development] ducksoup18:
no root

Posted some comments over at aftvnews about my situation:

aftvnews dot com/how-to-root-the-amazon-fire-tv-2/#comment-213870

aftvnews dot com/how-to-root-the-amazon-fire-tv-2/#comment-212724

No idea whats going on. Had stock AFTV2 on 5.0.5. have TWRP installed. Once installing [MENTION=3991724]rbox[/MENTION]'s pre-rooted v4 i connect via adb and pull up a shell. I run 'su' and it just sits there. No supersu popup on my screen or anything. I am really confused as to whats going on. I was under the impression that if i have a custom recovery like TWRP that installing an already pre-rooted rom would be sufficient for root access. Does anyone have any other ideas?

---------- Post added at 04:38 PM ---------- Previous post was at 04:10 PM ----------

[MENTION=4090599]harlekinrains[/MENTION] does this post mean that you're not able to launch supersu on any of the 5.0.5 pre rooted roms? im unable to get any su access even on the older 5.0.4 roms as well as the latest v4 of 5.0.5. No idea whats going on. I feel like a noob not knowing why the heck its not rooted, but followed the aftvnews post verbatim without any su abilities.

---------- Post added at 04:44 PM ---------- Previous post was at 04:38 PM ----------

Also rootchecker is saying after installing the prerooted rom's that root access is not properly installed on this device. no root on a pre rooted rom. Anyone know whats going on here?
[Fire TV Android Development] MicrosoftBug:
Hi [MENTION=3991724]rbox[/MENTION], just wanted to say thanks and great job on these pre-rooted ROMs. I'm currently running your latest 5.0.5 incarnation on both of my AFTV2s and wanted to know what the procedure would be for updating SuperSU to the latest version. Can I simply download the latest zip and flash in TWRP?
[Fire TV Android Development] rbox:
Why do you feel the need to update it?
[Fire TV Android Development] harlekinrains:
[MENTION=2098984]ducksoup18[/MENTION]: As specifically mentioned - you should get a superuser popup asking you if you want to grant it root rights (on your TV screen) - each time an app asks superuser permissions (that is if you havent told superuser to ignore - or to grant it to that app before).

The only question I should have to ask you is - are you sure you are on a shell on the Fire TV - when you are typing su?

If you have problems connecting with adb - try toggling the adb response of the FIre TV off and on again in its settings. Also make sure you dont have Fire Starter using its Home button detection using adb (Firestarter settings). On Android 5.x there is only one active adb connection allowed at all times. Sucks, but thats the way it is.

If that doesnt get you anywhere - no Idea where your problem comes from. I've already used r4 as the first custom rom image flashed on a new Fire TV 2 - so it isnt the package. Make sure you downloaded all of it - I guess..
[Fire TV Android Development] ducksoup18:
I had to do a full wipe via TWRP (including data) and then reinstall the latest rooted rom in order for things to work. I think there must have been something messed up originally with some other app that i had installed earlier that messed everything up. Everything is working now. Now i just gotta figure out how to install OpenVPN. I tried the installer but it keeps saying that im not mounted correctly. I can mount r/w via adb but i guess the installer must need to have it be mounted as well. somethings jacked up. Not sure whats going on. Was able to install it via adb but it was a 32 bit one and not 64 bit i guess and adb complained. Any ideas?
[Fire TV Android Development] harlekinrains:
No - and also, you are threadjacking at this point.

32bit versions should work on this android box as well. In general, not speaking for openVPN.
[Fire TV Android Development] lalord69:
if i currently have 5.0.4, can i just flash 5.0.5 thru recovery and it will work without issues?
[Fire TV Android Development] bula1ca:
yes
[Fire TV Android Development] deanr1977:
Yes flash the zip in Twrp, this will also update your recovery to the latest version because recovery is built into the prerooted rom on every release
[Fire TV Android Development] Hoggels:
OpenVPN

Install faild on r4. Plz help.

/System/ is rw mounted

"OpenVPN Installer"

https://play.google.com/store/apps/details?id=de.schaeuffelhut.android.openvpn.installer
[Fire TV Android Development] elliwigy:
id try posting in troubleshooting section.. doesnt seem to be a rom issue more so than with the app.. or you can try an alternate method..

theres many ways to use vpn on Android
[Fire TV Android Development] LivinOne:
I used ROM root-aftv2-5.0.4 but cannot find anywhere what ROOT password is? I'd like to backup some stuff via automated SFTP but need the password for Root... thanks.
[Fire TV Android Development] Sajhid:
Didnt think it had any.
[Fire TV Android Development] mdpauley:
If you're using web.oss.sshsftpDaemon.apk the default root password is abc123

-mdpauley
[Fire TV Android Development] LivinOne:
Is that pre-installed on the rom?
[Fire TV Android Development] rajashekhara:
I am stuck in boot-loop, I clicked wipe dalvik cache after installing the rom and it was taking too long to I took the power cable out.

Then I tried booting but it would loop back to the twrp boot screen.

I wiped everything including system, Tried unbrick image and flashed the rom again it is still in the same loop.

Please help
[Fire TV Android Development] rbox:
In the first post in the recovery thread is some steps to do if you are in a loop.
[Fire TV Android Development] rajashekhara:
Thanks for replying, I have tried going in wipe advance wipe and wipe cache.

I am not able to boot normally, I see the white amazon logo and then it goes back to twrp boot screen.
[Fire TV Android Development] deanr1977:
Are you still wiping "after" the installation of the rom? If so you don't need too & will result in a bootloop, & also when you downloaded the rom zip did you check the md5? If not try redownloading it & check the md5, push to your sd card & try to reinstall via twrp but don't do any wipes. Ether way good luck & I hope you get outta this.
[Fire TV Android Development] rajashekhara:
Hi, tried what you suggested the MD5 verification passed but I am still unable to boot normally.

Is it possible to go back to the stock rom ?
[Fire TV Android Development] elliwigy:
these are stock pre rooted roms.. i simply flashed in recovery and rebooted for each rom version and had 0 issues.

did you try reflashing rom without wiping anything afterwards?
[Fire TV Android Development] rajashekhara:
Yes, i have flashed the rom with TWRP and rebooted without wiping. I am still unable to boot normally.
[Fire TV Android Development] deanr1977:
Rbox is the one to talk too, have you ever booted properly? If so did you make a backup?
[Fire TV Android Development] rajashekhara:
Hi, no I have not booted successfully since flashing, unfortunately did not bother to make a backup :(
[Fire TV Android Development] rbox:
From TWRP, on the bottom navbar, the icon on the right is like 4 lines. Click it and it'll take you to the log. Are there any errors listed.
[Fire TV Android Development] rajashekhara:
No errors

Updating partition details...

...done

Full SELinux support is present.

Running boot script...

Done.
[Fire TV Android Development] rbox:
Odd, really the only way to get in a loop is if /cache is corrupt, but it seems fine. Open up an adb shell and run these 2 commands,

umount /cache

mke2fs /dev/block/platform/mtk-msdc.0/by-name/cache
[Fire TV Android Development] rajashekhara:
It says umount : can't umount /cache : Invalid argument

Second command worked, And next screen has loaded :).

Did I delete the /cache ?
[Fire TV Android Development] rbox:
Weird, try just going on to the next command.
[Fire TV Android Development] rajashekhara:
:D Working now, I am going to try and pair the remote
[Fire TV Android Development] Ludacrisvp:
[MENTION=3991724]rbox[/MENTION] - would you be wiling or able to include 'nano' in the pre-rooted roms?

There are a couple of things that need to be added to /system for it to work like a natively available nano setup. If you are able / willing to do so I can tell you what to include.
[Fire TV Android Development] rbox:
Aside from recovery and SuperSU, my ROM is 100% stock. You can create a flashable zip that uses addon.d to preserve it through flashing though.
[Fire TV Android Development] goodhur:
Can I perform a settings>system>reset to factory defaults without issue this rom? After installing xposed and trying to get the playstore working, I seem to be having issues with my Fire game controllers. I would like to have a clean install or know if this can be clean flashed

Thanks.
[Fire TV Android Development] rbox:
No. Go to recovery and perform a factory reset there.
[Fire TV Android Development] goodhur:
Thank you!!
[Fire TV Android Development] elliwigy:
or reflash the rom in twrp.. thats what i do lol
[Fire TV Android Development] goodhur:
I tried that first but the play store from opengapps was still in system. Even after I did the factory reset in twrp it was still there, stubborn. It gave me the google accept decline dialogue for app verification when installing ES File Explorer after reset then reboot. What I finally did was:

1. system wipe (no reboot) then,

2. twrp factory reset (no reboot) then,

3. reflash the rom

4. reboot

5. set up as new firetv

All good now.
[Fire TV Android Development] rbox:
Yeah, you found one of the features. :) I implemented addon.d, so things like gapps get preserved through rom flashes. It's good when you are trying to upgrade, not so much when you want to wipe it out. Another way is to delete the gapps file from /system/addon.d before reflashing the rom.
[Fire TV Android Development] goodhur:
Damn you are meticulous! Great work!
[Fire TV Android Development] elliwigy:
gotcha.. it typically reverts everything back to stock for me and in order to get playstore and xposed i need to reinstall it..

its mainly if you dont want to completely wipe everything but in your case i suppose you messedsomething up and needed to start over lol

i actually did a few times myself by debloating certain apks (trial and error lol)
[Fire TV Android Development] deanr1977:
I think I may revert back to 5.0.4 r2 using this & clear up any crap which may have gathered along the way? Then reinstall googleplay/xposed & my good apps I wanna keep, it's quite safe isn't it? As long as I don't reboot without flashing a rom in twrp am i right? I'm coming from the latest version of the 5.0.5 prerooted but do not have write access on this version to usb so wanna go to a version which this does work. Anyone else getting this write access problems on 5.0.5, also I know I can't revert to an earlier version of twrp with out the prerooted but can I update to the latest recovery after I'm back on 5.0.4 or is this a no no?
[Fire TV Android Development] kashb91:
anyone have a mirror link for the latest build? mediafire keeps saying the download is not available.
[Fire TV Android Development] kashb91:
working now. must've been something on my end. thanks for checking.
[Fire TV Android Development] PhoenixMark:
Updated link as I made a new domain to place these guides at.

Here you go http://marksmods.com/Hack-the-Fire-...-and-Install-a-Pre-Rooted-ROM-with-a-Mac.html
[Fire TV Android Development] conductingchaos:
If following this guide: aftvnews.com/start/ ... KingRoot, TWRP, pre-rooted rom.

Is it necessary to first install Boot Menu and Pre-Rooted ROM version 51.1.4.0 before the latest pre-rooted ROM? As it says here: aftvnews.com/roms/

Wasn't sure if that was solely for clockwork mod or if no longer necessary with TWRP recovery.

That ROM page also states "These custom ROMs are identical to the stock software released by Amazon, only they have already been rooted. This allows you to update to the latest software version released by Amazon without losing root access."

But I've read several places that OTA updates should be disabled and that stock recovery is actually disabled with latest pre-rooted ROM. So I assume it means, wait for updated pre-rooted ROM and flash manually?

Xposed Framework is working for Fire TV 2 (Sloane) ROMS? but it sounds like Google Play Store is not so all apps will have to be sideloaded and updated manually?

Sorry for all the questions. I'm an Nvidia Shield guy but considering Fire TV just for family and a new toy to play with. I did do some research but it sounds like things have changed recently, as is usually the case with development and just looking for the most recent info.
[Fire TV Android Development] conductingchaos:
nevermind, read the FTV 1 rom thread. Sounds like boot menu and installing previous pre rooted applies only to that and not FTV 2?
[Fire TV Android Development] deanr1977:
Not sure if this would work with AFTV1 but would have thought it would? As long as you're rooted/have a recovery active with a backup made & have Xposed framework running. That way if it don't work you can always go back to the same working state as before attempting this.

It stats this is for AFTV2 but like I said it "SHOULD WORK?" upto you though If you wanna try this? Here's the guide/link -

http://www.aftvnews.com/how-to-install-the-google-play-store-on-the-fire-tv-2-running-fire-os-5/
[Fire TV Android Development] bula1ca:
deleted
[Fire TV Android Development] rbox:
I just uploaded 5.0.5.1_r1. This also includes a new version of TWRP that prevents auto flashing the amazon updates.
[Fire TV Android Development] deanr1977:
Just a question please mate- can you still use Firestarter as intended like before on 5.0.5 or is it the same as the newest software (I think I know the answer but thought I'd ask just incase)
[Fire TV Android Development] rbox:
I don't modify the software. If Amazon disabled it in 5.0.5.1, then it's disabled. I do know someone has posted instructions for reenabling it on another thread.
[Fire TV Android Development] deanr1977:
No worries mate I have seen it, yeah thought I was right. Just wondering have you any desire to theme the recovery at some point when you have some spare time? I would love a red recovery, I would do it myself but not too keen on modding a recovery system just incase it all goes wrong! Nothing fancy just the spashscreen & font change? (I know ya a busy man but if you don't ask you don't get?) Take care rbox
[Fire TV Android Development] rbox:
TWRP supports external themes. Although I don't know what would happen to boot menu if you tried to use one.
[Fire TV Android Development] deanr1977:
There is a twrp theme thread but like I said I'm not brave enough to go down that road just yet, I dabble in a little .xml & .xbt modifying & photoshopping but that's about as far as I go. Thanks for this as always mate this is most appreciated.