FireTV 2 Recovery Installer [v3]

bula1ca

Senior Member
Nov 18, 2014
346
63
0
is the device rooted?

so i understand, you run bat file then powercycle device so the script runs then you dont get the recovery screen?

bothzips are extracted to same directory on pc?
Just my 2 cents:

Why not install recovery first and flash a pre-rooted rom after. It should work without any issue - IF BOX IS ROOTED !
 

elliwigy

Forum Moderator / Recognized Developer
Staff member
Mar 16, 2011
12,953
8,821
253
Phoenix
www.sampwnd.com
Just my 2 cents:

Why not install recovery first and flash a pre-rooted rom after. It should work without any issue - IF BOX IS ROOTED !
idot know if thats even his issue/set up lol

thats why im asking him.

I was already rooted so i just installed twrp then the pre rootedrom.. took afew mins..

it almost sounds like he is able to run recovery installer but it isnt booting into recovery for some reason so maybe that is what hes trying to do?

If this is the case then hes doing something wrong if it runs the bat no issues and he verified his downloads are good..
 

romolac

Member
Oct 24, 2014
10
1
0
Yup, md5s are fine, and I tried downloading them agan, their extracted into same folder, and the bat and sh scripts run without error (which they wouldn't if they weren't in that same folder, all though the bat needed many restarts, thanks windows >.< )
And no its not rooted, if I run 'reboot' the firetv will restart, which I did to check I was logged into it, but it doesn't have the root user, at least not that you can log into. As I said, su not found.
The 'ramdisk-recovery.cpio.lzma' is on an sdcard, but it simply does not boot into recovery?!
After the script runs it just boots into the amazon desktop, the amazon logo comes on screen and it goes to the amazon prime selection, and logs in if it can.
And I checked my sdcard, used gparted and it showed no hidden partition, but I went ahead and made a new msdos partition table anyway.
And I've run the script, successfully, half a dozen times all ready, and every time it just boots into amazon prime, I've never seen the the recovery screen?!
sh script output;
Code:
Waiting for preloader...
Found port = /dev/ttyACM0
Handshake complete!
Injecting 2ndinit...
Mediatek Inject, git version fa8d8f
Locating the partition...
Reading 000000200: 100%
Reading 000000400: 100%
Opening the filesystem...
Reading 0058E0400: 100%
Reading 0058E1000: 100%
Locating the target file...
Reading 005933000: 100%
Reading 04EDFF000: 100%
Reading 005939000: 100%
Reading 050563000: 100%
Opening the target file...
Reading 005942000: 100%
error: source file is larger than target file!
Injecting 2ndinitstub...
Mediatek Inject, git version fa8d8f
Locating the partition...
Reading 000000200: 100%
Reading 000000400: 100%
Opening the filesystem...
Reading 0058E0400: 100%
Reading 0058E1000: 100%
Locating the target file...
Reading 005933000: 100%
Reading 04EDFF000: 100%
Reading 005939000: 100%
Reading 050563000: 100%
Opening the target file...
Reading 00593D000: 100%
Writing target file...
Writing 0506E2000: 100%
Writing 00593D000: 100%
Setting target file size...
Writing 00593D000: 100%
Writing 0506E3000: 100%
Reading 0506E3000: 100%
Writing 0506E3000: 100%
Closing the file...
Edit, I just noticed the size mismatch error, is that what is causing the problem? I dont remember the bat script being so short but due to the stalls it will take me a while to double check the process in windows.
 
Last edited:

romolac

Member
Oct 24, 2014
10
1
0
I managed to get it to work. I don't know why v4 and v5 of the recovery files had the size mismatch error. But the reason v3 wasn't booting to recovery is because I was still using the ramdisk-recovery.cpio.lzma from v5. I put the ramdisk-recovery.cpio from v3 on the sdcard and used v3 recovery files and it booted into teamwin recovery just fine.
I flashed with sloane-5.0.5-rooted_r4.zip and checked with adb, and my firetv is now rooted.
Thanks for trying to help, romolac.
 
Last edited:
  • Like
Reactions: elliwigy

elliwigy

Forum Moderator / Recognized Developer
Staff member
Mar 16, 2011
12,953
8,821
253
Phoenix
www.sampwnd.com
I managed to get it to work. I don't know why v4 and v5 of the recovery files had the size mismatch error. But the reason v3 wasn't booting to recovery is because I was still using the ramdisk-recovery.cpio.lzma from v5. I put the ramdisk-recovery.cpio from v3 on the sdcard and used v3 recovery files and it booted into teamwin recovery just fine.
I flashed with sloane-5.0.5-rooted_r4.zip and checked with adb, and my firetv is now rooted.
Thanks for trying to help, romolac.
yea everything you statedit should have worked lol

glad you figured it out.. i have user error occassionally myself haha
 

BioSt0rm

New member
Aug 26, 2015
3
0
0
not working for OSX el capitan, but than again the handshake/install never worked for osx el capitan. So no surprise there...

Code:
./install_firetv2_recovery.sh 
Waiting for preloader...
Found port = /dev/cu.usbmodem1420
Handshake complete!
Injecting 2ndinit...
Mediatek Inject, git version fa8d8f
Locating the partition...
Reading 000000200:   0%
always stuck at reading 0%
Did you ever figure this out?
I seem to have the same results.
Just sitting at 0%
 

dagadu

Member
May 17, 2009
7
0
0
Injecting 2ndinit...
Mediatek Inject, git version fa8d8f
Locating the partition...
Reading 000000200: 100%
Reading 000000400: 100%
Opening the filesystem...
Reading 0058E0400: 100%
Reading 0058E1000: 100%
Locating the target file...
Reading 005933000: 100%
Reading 04EDFF000: 100%
Reading 005939000: 100%
Reading 05055F000: 100%
Opening the target file...
Reading 005942000: 100%
Writing target file...
Writing 050A67000: 100%
Writing 050A68000: 100%
Writing 050A69000: 100%
Writing 050A6A000: 100%
Writing 050A6B000: 100%
Writing 050A6C000: 100%
Writing 050A6D000: 100%
Writing 050A6E000: 100%
Writing 050A6F000: 100%
Writing 050A70000: 100%
Writing 050A71000: 75%

everytime i try this, the window stuck at 75%.
I was able to disable signed verification, install driver, open script, plug usb cable, and power cable. The script runs automatically, but then it stucks here. I plugged in HDMI cable to see the screen, but nothing shown on monitor. Did i brick it?
 

PhoenixMark

Senior Member
Feb 23, 2016
57
14
0
Phoenix Arizona
I have no idea how you knew this but this definitely solve the 'reading stuck' problem for me. Thank you very much I was beating my head over this.
How were you able to run this command? I can find no evidence of a process modemmanager on el capitan. When I try to run what was listed above (sudo service ModemManager stop) I receive this response in the terminal - sudo: service: command not found
 
Last edited:

Ludacrisvp

Senior Member
Dec 13, 2008
166
24
0
MN
How were you able to run this command? I can find no evidence of a process modemmanager on el capitan. When I try to run what was listed above (sudo service ModemManager stop) I receive this response in the terminal - sudo: service: command not found
The service mentioned is a Linux OS thing, not a Mac OS X service.
 

roligov

Senior Member
Dec 29, 2012
284
98
0
London
In 5.0.5.1 there is good news and bad news.
Good news is the handshake still works in 5.0.5.1, so does writing to the nand.
Bad news is the existing firetv2_recovery_v5 and install_firetv2_recovery_v3 don't work. I took a chance and ran it, twice. It completes successfully, but upon booting with the USB drive plugged in, the FireTV boots normally with no sign of recovery menu.
 

rbox

Recognized Developer
Apr 22, 2011
1,768
2,567
143
In 5.0.5.1 there is good news and bad news.
Good news is the handshake still works in 5.0.5.1, so does writing to the nand.
Bad news is the existing firetv2_recovery_v5 and install_firetv2_recovery_v3 don't work. I took a chance and ran it, twice. It completes successfully, but upon booting with the USB drive plugged in, the FireTV boots normally with no sign of recovery menu.
I was afraid of that. They probably fixed the idiocy that I took advantage of in the kernel. How do you have a system with 5.0.5.1 and root?
 

rbox

Recognized Developer
Apr 22, 2011
1,768
2,567
143
This was a stock 5.0.5.1 rbox. Willing to sacrifice it since I have 3 others.
firetv2_recovery_v5 should have failed... Either way, good to know they still haven't patched the preloader. Once I finish firetv1 stuff, and I get the update package for 5.0.5.1 for firetv2, I'll take a look at how to attack the new kernel.
 

roligov

Senior Member
Dec 29, 2012
284
98
0
London
Sorry to be more precise, I extracted the files from firetv2_recovery_v5.zip into the same folder as install_firetv2_recovery_v3.zip. Then I ran install_firetv2_recovery.bat.

But I take that back, there was something dodge with my USB stick. Put the file on an SDCARD after flashing with the above and get taken to the stock "Amazon system recovery <3e>".

Same as this: http://imgur.com/xsPvta0
 

rbox

Recognized Developer
Apr 22, 2011
1,768
2,567
143
Sorry to be more precise, I extracted the files from firetv2_recovery_v5.zip into the same folder as install_firetv2_recovery_v3.zip. Then I ran install_firetv2_recovery.bat.

But I take that back, there was something dodge with my USB stick. Put the file on an SDCARD after flashing with the above and get taken to the stock "Amazon system recovery <3e>".

Same as this: http://imgur.com/xsPvta0
Well that's good. It means 2nd init is working, but the ramdisk didn't extract. Are you sure it's not corrupt?
 

roligov

Senior Member
Dec 29, 2012
284
98
0
London
I'm pretty sure but will test again tonight, anything is possible. It's 6am now and I'm off to work so can only test in about 12 hours time. For some reason I woke up at 3am this morning so I decided to tinker.