yashsingh1/xdaforums huggingface dataset:
[Fire TV General] ImCoKeMaN:
This thread is not the most current, the first line in the first post states that:

There is an updated thread now for rooting the AFTV2 that supports both 5.0.3.1 and 5.0.4 and maybe others in the future, see http://xdaforums.com/fire...dated-t3277556. The new method is simpler than this method and requires less to download and less steps to run.

Also, you may still be able to get it fixed with a revert patch, I think someone already did something similar in this thread, and [MENTION=3411776]zeroepoch[/MENTION] may figure something out for you too, but if you can wait for [MENTION=3991724]rbox[/MENTION] that might work too. Awesome devs =)
[Fire TV General] zeroepoch:
[MENTION=394912]ImCoKeMaN[/MENTION] is right. You can use the diff file from 5.0.3.1 and the original system image from 5.0.4 to fix it up. The old diff knows which parts were messed up so it can pick out those pieces from the original image to get back to stock. A 2 hour process if you're in a hurry. After that you should use the new simpler root.
[Fire TV General] lbthomsen:
Yes, this one dawned on me at 3AM and I started the patching process before I went to bed (I am in GMT+8). It worked and the device now again boots normally.

---------- Post added at 02:44 AM ---------- Previous post was at 02:42 AM ----------

I briefly tried the new version this morning and I had some trouble getting the handshake part working. Anyway - that belongs in the other thread I guess so I will experiment with that a bit later when I got time.
[Fire TV General] imagica71:
sorry for a (maybe) stupid question... but if i root my ftv are all my already installed apps deleted?
[Fire TV General] playingmax:
Nothing will be deleted
[Fire TV General] starplus666:
Hi rooted aftv2 loaded kodi , but pulsar and simple iptv client not working, when it asks to restart kodi , i do but when it restarts pulsar deamon dont work and iptv simple gone back to disabled & no tv tab tried on all kodi variations . Sorry if its in wrong section.
[Fire TV General] deanr1977:
Think this would be more of a kodi or kodi add on problem & I don't think it would have nothing to do with because you rooted, message the developers of the add ons is your best bet or see if they need a update?
[Fire TV General] starplus666:
Hi also i have rootrd aftv 2 then gone back to stock via zeropouch method , can i re root again? As it says stock . And use the newer method ?
[Fire TV General] deanr1977:
Yes mate once your back to stock make sure you have got the new ota update (5.0.4 official) & then follow the guide using the 5.0.4 root method
[Fire TV General] starplus666:
I was on 5.04 rooted then went to stock 5.04 via original .img from zeropouch , clicked check for update but nothing , is it ok to reroot as there was no ota update as i presume im on latest firmware ?
[Fire TV General] deanr1977:
As far as I know, if your on 5.0.4 that is the latest, erm could I ask why if you were already rooted on 5.0.4 & then you unrooted & know what to now reroot? Sounds like a silly question but thought I'd ask?
[Fire TV General] starplus666:
One or more addons were not working in fire tv so thought it might be something i done when rooting . Subsequently found that it had nothing to do with rooting .
[Fire TV General] Fruchttiger00x0:
hey folks,

i know stupid question but i'll give it a shot..

is there a way to wipe cache partition via preloader? And don't tell me I'll have to zero all blocks :victory:

to trigger a rebuild I have to write the whole system partition, right?
[Fire TV General] zeroepoch:
Not that I know of. I think you might be able to get it to reformat /cache from stock recovery but not sure how to tell it to do that.
[Fire TV General] xguitar4lifex:
broken link?

link appears to be broken.. is there an updated one?
[Fire TV General] zeroepoch:
There is a new thread. See the link at the top of OP (post #1)
[Fire TV General] stephenaboylan:
download.zeroepoch.com is down

I'm trying to download system restore images and the download.zeroepoch.com link isn't working. Is the site down?
[Fire TV General] zeroepoch:
There was an issue with the host but it's back up now.
[Fire TV General] edwhardo:
recovery

Weeks ago, I posted about a failure using this rooting method.

I was stuck on the boot loader screen (white amazon logo)

Even though I heard it was a slow process, I decided to use

write_mmc.py 0x00000000058e0000

to restore the root image (5.0.3.1). It was still running a week later, and then I left for about a week. When I returned, it was finished. I power cycled and it worked. So, it took between 1 and 2 weeks to restore.

Hopefully this helps for anyone else who suffers the same problems. In retrospect, it was my home made USB A to A cable that must have led to a bad write. Perhaps this can be added as a comment to the aftv2-tools script?

Thanks
[Fire TV General] stephenaboylan:
THANKS!!!!!
[Fire TV General] jocala:
my rooted aftv2 is toast

My rooted aftv2 suffered an electrical injury and is toast. Is the currently shipping unit from Amazon rootable or do I need to look elsewhere? I'd like to complete the adbFire root functions for aftv2s running Lollipop.
[Fire TV General] deanr1977:
The latest firmware is rootable at the moments (if its 5.0.4) & they haven't updated it yet? My advice would be root as soon as possible then block ota updates.
[Fire TV General] mjones010175:
I am currently rooting my fire tv 2 on 5.0.4 and the program stopped scrolling through the addr: after about 10 minutes. Is this normal? Should I pull the plug and start over? Thanks.
[Fire TV General] deanr1977:
If it didn't start again yes restart the commands, did it handshake? It done that with me then when i started it again it took & kept going for around 2hrs (I did on 5.0.3.1 though)
[Fire TV General] drdoolittle:
New exploit makes root possible

http://perception-point.io/2016/01/14/analysis-and-exploitation-of-a-linux-kernel-vulnerability-cve-2016-0728/

A new exploit makes it possible to root many Android devices. Is anyone able to compile this into an APK? Could be worth a try instead of the quite cumbersome root method which currently is available.
[Fire TV General] cednut:
Thank for the root method AFTV Gen 2 4K 5.0.4

I appreciate the hard word you put in to discover this root method! I have to give you props!

Keep it up! Also It would be nice if you or someone can make a "Swap SD" apk Internal to external memory card

for AFTV Gen 2 4K 5.0.4 :good: :highfive: Now, I hope Cyanogenmod start rolling out stable Roms for Amazon Fire TV Gen 2 4K?

The demand will be high, as more people are moving to Android TV boxes and throwing away their cable bills.
[Fire TV General] rbox:
With a locked bootloader and Mediatek crap for a processor... I doubt anyone will be working on CM. I know I won't be.
[Fire TV General] getmoneygreen:
can someone please tell me what does Power cycle the Fire TV means ?
[Fire TV General] deanr1977:
Do a reset (or hard reset your fire TV)
[Fire TV General] getmoneygreen:
got it thanks now im getting this error message

Waiting for preloader...

Found port = /dev/ttyACM0

Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 475, in read

raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)')

serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "./root_aftv2.py", line 413, in <module>

handshake()

File "./root_aftv2.py", line 378, in handshake

c = write8(b'\xa0')

File "./root_aftv2.py", line 100, in write8

in_str = dev.read()

File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 480, in read

if e[0] != errno.EAGAIN:

TypeError: 'SerialException' object does not support indexing

what did i do something wrong ?
[Fire TV General] zeroepoch:
That happens sometimes. Try again.
[Fire TV General] dk1keith:
I'm on rooted 5.0.4 and I'm getting a lot of stuttering. No matter what I use for video playback. Is there an easy procedure to go back to a rooted 5.0.3.1 without losing all my apps so I can see if playback is better in 5.0.3.1. I know we don't have a recovery yet so not sure if this is possible.

thanks,
[Fire TV General] zeroepoch:
In theory you can dd all the images like the quick upgrade method just in using the old ones. No one has tested it though that I know of.
[Fire TV General] dk1keith:
Thanks for the reply/suggestion. I may just wait for rbox to create a recovery so I can easily backup my current setup and install a previous version. Don't want to take any chances with my AFTV2.

thanks
[Fire TV General] rbox:
I wasn't planning on making a prerooted 5.0.3... Is that really something you'd want?
[Fire TV General] dk1keith:
Not sure if anyone else would have a need. But I would need one to see if particular issues I'm having are on 5.0.4 and not 5.0.3.1. I didn't want to try a risky process to roll back to that version but I didn't really test 5.0.3.1 long enough to know if I had the same problems that I'm seeing on 5.0.4. My main issue is playback of video from any source even my NAS. Might not be worth it for you to do 5.0.3.1 if I'm one of only a few people having problems on 5.0.4.

thanks much for the response and thanks for all your great work!
[Fire TV General] rbox:
Thinking about it, I think it should be easy to tweak some things in my scripts to be able to generate a 5.0.3.1 prerooted. Also wanted to let everyone know that I did a full run through of the entire recovery process last night and it more or less turned out good. Found a few issues I'm going to have to fix, but hopefully I should be able to post it all next week.
[Fire TV General] dk1keith:
that would be awesome rbox. That way if someone is having issues with 5.0.4 they can easily revert back to 5.0.3.1 to see if the issues persist in that version. looking forward to your prerooted rom and recovery.

thanks again for your great work!
[Fire TV General] deanr1977:
Can't wait Rbox
[Fire TV General] jeRrRKKKK:
i wonder, what is the main benefit of getting root?

after all there is still no proper way to get google's play store on the ftv2 and the android tv launcher doesn't work either

so what benefits will we get?
[Fire TV General] deanr1977:
Total control over your files & system, more customization, custom recovery system & custom roms, custom launchers, more compatibility with apps, total rewritable system, ad block, more custom apps from developers, & a whole lot more.
[Fire TV General] dk1keith:
Once rbox provides us with a recovery we will have a working playstore on the AFTV2. I have it on my rooted AFTV1 and it works. Also Firestarter is a great launcher for the Fire TV 1/2 with or without root.
[Fire TV General] ldeveraux:
As an aside, how do you stop the play store from updating? One I install it, I can only use it once before it updates to the newest version and won't function anymore...
[Fire TV General] gdc1001:
After rooting my Fire Tv 2 to 5.0.3.1 I found at that my mobile app ATT uverse no longer works....is there a way to hide the root safely from this app? Also, if I decide just to revert back to stock will a simple reset to factory settings work......I am a newbie here and still a little bit foggy on that and I want to do it correctly....thanks in advance
[Fire TV General] deanr1977:
There is no way to hide or temp unroot the device. You cannot just do a factory reset to unroot mate, you will still have root.

Look on page 1 there should be the option to go back to stock if you want to? If you unroot, you will return back to 5.0.3.1, then be asked/forced to update to the new firmware 5.0.4 by amazon. More than likely once on 5.0.4 the app you were talking about may not still work? But it's up to you If you want to go back. Also if you go to 5.0.4 you can still root (at the moment) or at least until amazon get there next update rolled out. A forum developer called Rbox has almost completed his custom recovery & also a rom (custom firmware) for are device which should be released very very soon so choose wisely if you want to root or unroot.

Hope this helps if so press that thanks button
[Fire TV General] gdc1001:
Thank you...I think I will wait after reading the options that you gave me in your post!
[Fire TV General] deanr1977:
No problem, that's what were here For to help one another here on Xda
[Fire TV General] fleisch80:
about game controllers

if your like me, and dont want to shell out another 50 plus to amazon for

the game controller, just do what i did,

use your old original xbox controller, cut connector off , replace

end connector with a usb connector,

simple to do, just match all the wires on both ends to each other ,

connect them by matching wire colors,

if in fact your left with the orange wire from one end, leave it unconnected,

otherwise as stated match all wires by colors,

also, dont worry if one end of connector or wire does not have bare silver ground

as long as all or all except the 1 orange wire matches it will work,

without a driver matter of fact !

ps, anybody able to get their moga pocket working with firetv2
[Fire TV General] vizzy:
Will the fire TV box, allow me to play back files from an external usb? Or is it a lengthy process every time you plug it in ?

Different sources are giving me different answers .....
[Fire TV General] deanr1977:
Yes
[Fire TV General] vizzy:
Yes it can be done - sounds good.

Is it a lengthy process, or after set up is it just plug and go ?
[Fire TV General] deanr1977:
Well I use a 64gb sd card class 10 & you only have to find the directory, I do this within Kodi. Also can delete content from Kodi too which I was told wasn't possible? I'm using Kodi 15.2 & on a rooted 5.0.3.1
[Fire TV General] vizzy:
Sounds good. I'll give it a try. Using a fire stick at the moment but need usb.

Thanks
[Fire TV General] finndo:
Um, my XBOX 360 wired controller works perfectly on my AFTV2, has from day one, all I did was plug it in... you sir are either very adventurous or just don't feel like giving microsoft any more money (that would be me, I sold my Xboxes and games, but kept the controller as it works on PC also... and the DVD remote works on my HP laptop with a IR sensor built in, really pisses my wife off when I hit the power button on the remote after catching her snooping when I forget to lock the screen when I get up...)
[Fire TV General] samykoka:
Stuck on amazon logo

i need a script to restore my aftv2 to original state , read somewhere in the thread that i can use a command like ./write_mmc.py 0x00000000058e0000 <img> , and use system.orig.img to restore the device to stock condition , my question is : How i could use this command ? excuse my ignorance but i have no knowledge with Python scripts .

Thanks
[Fire TV General] f1ux:
If I run out and get an aftv2 today, will it still be rootable? Or do they come with newer stock ROMs now?
[Fire TV General] deanr1977:
Someone in the thread posted said that they rooted a 5.0.5 stock using the guide & then downgraded it to 5.0.3.1 pre rooted rom/recovery he was talking to rbox about something, but don't hold me responsible if it don't work! Read back a few pages & see for your self & you could ask him the question your self. I only read it yesterday I think it was?

Hope this helps If so press that thanks button
[Fire TV General] elliwigy:
i never even got the 5.0.5 on my aftv2 box lol
[Fire TV General] zeroepoch:
See https://gitlab.com/zeroepoch/aftv2-tools/wikis/restore
[Fire TV General] samykoka:
Thanks [MENTION=3411776]zeroepoch[/MENTION] for your reply , the problem is .. i'm stuck on amazon logo so there is no ADB available ... i need to access the device while in preload mode .. that is my only chance to unbrick my AFTV2 if possible.

i thought of using write_mmc.py as the aftv-root works and write successfully the patch . but it always gives me syntax error also handshake.py give me the same error , please help how could i run this commands ? i followed the readme and installed Python and system variable ... bu always gets syntax error .

thanks for your help .
[Fire TV General] ncube2:
Am in the same boat as yours stuck on Amazon Fire TV logo.. Looking to restore it to stock as well... hopefully it can be done.
[Fire TV General] TROJAN4EVR:
It'll arrive sometime this month...check out aftvnews.com for latest info...
[Fire TV General] elliwigy:
no worries.. dont think thered be much improvement over 5.0.4.. just find itodd theyd update older hardware to 5.0.5 first
[Fire TV General] zeroepoch:
You'll need the full flash then unless rbox has some minimal recovery. He did mention that but maybe just the recovery installer he is talking about.
[Fire TV General] rbox:
I have an unbricking image that can be flashed with my inject tool that can get you in to recovery, and then from there you can flash a prerooted rom. I'm not quite ready with it and it might be a day or so.
[Fire TV General] samykoka:
Thanks :good:

much appreciated , cant stand waiting ... i need this badly ....

---------- Post added at 04:36 AM ---------- Previous post was at 04:29 AM ----------

Yes , i need full flash and don't know whether this is going to solve my problem or not ,

i'm doing this right now ... also waiting for [MENTION=3991724]rbox[/MENTION] great work .

thanks for both of you guys .
[Fire TV General] samykoka:
Waiting for [MENTION=3991724]rbox[/MENTION] to come up with a rescue solution for people like me stuck with white amazon logo :(

then continue with the root process i hope ........
[Fire TV General] playingmax:
http://xdaforums.com/fire-tv/development/firetv-2-unbrick-image-t3313349
[Fire TV General] D-an-W:
Evening folks, I am currently running a rooted 5.0.4 using the original 2 hour method. What is the best way to get to a rooted 5.0.5, is it just the same as going from a standard 5.0.4 please?

EDIT: It was actually incredibly easy, installed TWRP using the ADB Shell provided by adbFire (Running on Mac) and then the pre-rooted ROM.
[Fire TV General] Petesky:
Can you install a working vpn app on a rooted Fire 2 , I was

thinking of uprading to a Gen 2 from my Gen 1 just to get root
[Fire TV General] rbox:
No. You can't use any generic android stuff dealing with recovery or flashing. You can only use things made for the Fire TV.
[Fire TV General] jim16127:
When you say "pristine partition"...how pristine?

Should I be past the initial introduction video?

Should i log into my account?

Should I click on factory reset? If I do should i do the above questions?

Sorry for the multiple similar questions...I just want to be sure. :)

THANKS FOR ALL THE EFFORTS!
[Fire TV General] BBLT78:
Ok thanks, appreciate your time.
[Fire TV General] zeroepoch:
No problem asking questions :)

I just mean you have not tried any rooting attempts before. Normally the system partition is readonly so normal daily operation will never change it. Otherwise normal updates would break.
[Fire TV General] arunningpir8:
It lives!!!

Man that was the longest 2 hours of waiting after having almost 20 failures :P

For others that might run into this here is what happened and how I solved it:

I tried running the patch software and it seemed to fail at random intervals, usually within 5 or so minutes. I also could not boot up the fire tv anymore (obviously) after this (not that I attempted to, but I ran handshake.py without root rights, rebooted, and obviously it tried to boot as the script failed).

The fix for me was switching from my usb 2.0 port to a usb 3.0 port. For future reference, everytime the patching fails, you will have to start the handshake.py script again, and restart the fire tv in order to attempt a patching again.

Long story short, I had many things happen that you would think are unrecoverable, but I still recovered in the end, with root ;) Hope this helps someone else not freak out if the process fails multiple times for them :)

Thanks zeroepoch for the immediate help and for the root :)
[Fire TV General] T0m93:
After Handshake.py is complete and you enter the Last command line :

"./patch_mmc.sh 0x00000000058e0000 system.root.img system.diff"

I get this output:

Patching patch_00000400.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.001829 secs (279912 bytes/sec)

Is it normal that nothing happends after? I waited 1h and this is all that is coming out. Any thoughts? How should the Output look?
[Fire TV General] zeroepoch:
No it should continue to print addresses ~1/sec. I would try restarting. Try to power off the device, reboot your computer, run the handshake script, then turn on the device. Before running the patch script after handshaking is complete try and disconnect the USB cable for a few seconds and connect it again then start patching. I noticed at least on the Mac I tested it hung right away on the patching script but worked fine if I disconnected the cable in between. No idea why that helps my best guy would be it flushes some buffers which may have junk.
[Fire TV General] T0m93:
Thanks for the hint. Now it executed all 8 .img Patches.

After that nothing happend agaian. Dont know if its correct :confused: Lets wait 2h and see whats coming :)

(same Problem as kibmikey1 and brad_robbo)

Thanks :)
[Fire TV General] xenoglyph:
tested and working here! cheers man, good stuff.

now with root i think we'll be able to create an easier and faster root if my hunch is correct.

next stop: recovery!

---------- Post added at 01:07 AM ---------- Previous post was at 12:57 AM ----------

You got this. i've been noticing little things here and there that give me confidence.
[Fire TV General] kibmikey1:
So, how many images are there during patching? 8? Because that seems to be how many I am getting. Do we wait after that?

Edit: It consistently stops at random places during patching.
[Fire TV General] brad_robbo:
yeah I've got 8,its scrolls through then stops at image 8 and does nothing, is it just a case of just leaving it to do its thing
[Fire TV General] T0m93:
I noticed after the last patch 1 Line is missing. Under the first 7 Patches there was this "Addr: 0x593e800" line.

Under the last Patch there wasnt. Is it the same for you, too?

The last Patch looks like this

"Patching patch_00066400.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.001794 secs (285418 bytes/sec)"

Is the Patch incomplete? Has to be there another "Addr: 0x593e800" line?
[Fire TV General] zeroepoch:
The last address is 0x50dce600. It should continuously print out until it exits.
[Fire TV General] T0m93:
Ok it stopped working with the Last Patch. Dont know why.

I will delete anything and begin from the beginning :)

Edit: Ok i did everthing from the Start. Still not working and stops at the 8th patch.

Any Ideas how to fix this. Could this has anything to do with any rights or something?

Edit2: I made it to patch_08052000.img (Number 12). I didnt restart the Fire TV i unplugged it and replugged it. But it was just luck...

Using: Macbook Pro 2012.
[Fire TV General] brad_robbo:
yeah mines getting stuck at:

Patching patch_0005e800.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.001718 secs (298013 bytes/sec) which is the 8th file
[Fire TV General] rbox:
Well I was messing around with it last night, and was trying to make init do some magic. And I was about to give up for the night, but found some new code to test and gave it one last try. And when I had to go to bed at least I had init crashing, instead of doing nothing. Of course, crashing init wasn't really my goal, but hey... baby steps. lol.
[Fire TV General] zeroepoch:
Cool! At what point in the boot process are you messing with init? Did you find some way to modify the ramdisk?