FireTV 2 (sloane) Recovery [v6] - 3.0.0-5

Search This thread

aboshi

Senior Member
Apr 20, 2010
64
20
NY
Code:
-rwxr-xr-x root     shell        5744 2016-02-06 20:39 ext4_resize
-rw------- root     root       166568 2016-02-06 20:39 2ndinit
-rw------- root     root     11192576 2016-02-06 20:40 ramdisk-recovery.cpio

one sec ill post md5 also

ext4_resize - 269ef2171b2d14b5857d864f4134eb69
2ndinit - 95d08159960b2586d15d3dc058cb88f5
ramdisk-recovery.cpio - 1623b4a88a355301416de07aeba09e6c
 
Last edited:

rbox

Recognized Developer
Apr 22, 2011
1,776
2,612
Code:
-rwxr-xr-x root     shell        5744 2016-02-06 20:39 ext4_resize
-rw------- root     root       166568 2016-02-06 20:39 2ndinit
-rw------- root     root     11192576 2016-02-06 20:40 ramdisk-recovery.cpio

one sec ill post md5 also

Duh... sorry.

Code:
mount -o remount,rw /system
chmod 755 /system/recovery/2ndinit
mount -o remount,ro /system

Make sure you run each line individually, don't copy/paste the whole thing.
 

retyre

Senior Member
Jan 14, 2011
311
322
Central FL
Both of you please run:
Code:
ls -lZ /system/bin/ext4_resize /system/recovery

Code:
-rwxr-xr-x   root     shell   u:object_r:system_file:s0   ext4_resize
-rw-r--r--   root     root    u:object_r:system_file:s0   2ndinit
-rw-r--r--   root     root    u:object_r:system_file:s0   ramdisk-recovery.cpio

Update: Changed permissions on 2ndinit; boot menu shows up now.
 
Last edited:

aboshi

Senior Member
Apr 20, 2010
64
20
NY
chmod 755 did the trick ;)
Amazing work as usual ;)
Also love the new look of the recovery, super clean!
 
Last edited:

dk1keith

Senior Member
Jul 26, 2012
478
50
Duh... sorry.

Code:
mount -o remount,rw /system
chmod 755 /system/recovery/2ndinit
mount -o remount,ro /system

Make sure you run each line individually, don't copy/paste the whole thing.
I entered all the original commands, can I simply go to root and enter the three commands above?
 

bula1ca

Senior Member
Nov 18, 2014
346
63
Hi rbox,

I am getting error: cp /sdcard/2ndinitstub : no such file or directory when I run cp /sdcard/2ndinitstub /system/bin/ext4_resize.

I do not see ext4_resize dir in system/bin. Should I create it?
 
Last edited:

Aobeta

Member
Apr 10, 2013
48
7
I am not able to mount r/w. I get this...

Code:
shell@sloane:/ $ su
su
root@sloane:/ # mount -o remount,rw /system
mount -o remount,rw /system
mount: Invalid argument
255|root@sloane:/ # mkdir /system/recovery
mkdir /system/recovery
mkdir failed for /system/recovery, Read-only file system

I rooted with the original root method released a couple months ago, and I haven't really touched it since. Could never figure out how to mount r/w
 

zeroepoch

Senior Member
I am not able to mount r/w. I get this...

Code:
shell@sloane:/ $ su
su
root@sloane:/ # mount -o remount,rw /system
mount -o remount,rw /system
mount: Invalid argument
255|root@sloane:/ # mkdir /system/recovery
mkdir /system/recovery
mkdir failed for /system/recovery, Read-only file system

I rooted with the original root method released a couple months ago, and I haven't really touched it since. Could never figure out how to mount r/w

Some people early on had issues with adbfire making some changes that broke mount. You might want to just use the stock restore here. Then use the new recovery installer here.
 

dk1keith

Senior Member
Jul 26, 2012
478
50
Code:
-rwxr-xr-x   root     shell   u:object_r:system_file:s0   ext4_resize
-rw-r--r--   root     root    u:object_r:system_file:s0   2ndinit
-rw-r--r--   root     root    u:object_r:system_file:s0   ramdisk-recovery.cpio

Update: Changed permissions on 2ndinit; boot menu shows up now.[/QUOTE
how did you change permissions on 2ndinit? adb reboot recovery takes me to stock recovery, then when I unplug fire tv and plug back in to reboot TWRP comes up?
thanks
 

zeroepoch

Senior Member
Code:
-rwxr-xr-x   root     shell   u:object_r:system_file:s0   ext4_resize
-rw-r--r--   root     root    u:object_r:system_file:s0   2ndinit
-rw-r--r--   root     root    u:object_r:system_file:s0   ramdisk-recovery.cpio

Update: Changed permissions on 2ndinit; boot menu shows up now.[/QUOTE
how did you change permissions on 2ndinit? adb reboot recovery takes me to stock recovery, then when I unplug fire tv and plug back in to reboot TWRP comes up?
thanks

The 2ndinit trick @rbox is using modifies to the normal boot process to run a special recovery very early on. It doesn't touch the original recovery which is why "adb reboot recovery" goes to stock.
 

rbox

Recognized Developer
Apr 22, 2011
1,776
2,612
Hi rbox,

I am getting error: cp /sdcard/2ndinitstub : no such file or directory when I run cp /sdcard/2ndinitstub /system/bin/ext4_resize.

I do not see ext4_resize dir in system/bin. Should I create it?

Please run this:
Code:
ls -l /sdcard/2ndinit* /system/bin/ext4_resize
 

dk1keith

Senior Member
Jul 26, 2012
478
50

bula1ca

Senior Member
Nov 18, 2014
346
63
This is what I get when I am running; ls -l /sdcard/2ndinit* /system/bin/ext4_resize
 

Attachments

  • Untitled.png
    Untitled.png
    25.2 KB · Views: 135
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    It's finally here! Recovery for the Fire TV 2. This is based off of TWRP and the way versions will work is I will increment the last digit in the version as I make updates. So 3.0.0-1 is my first release based off of 3.0.0. The downloads will be numbered starting at v1, and at the bottom of the post it will explain what is contained within each version.

    attachment.php

    As usual, this WILL void your warranty and I am NOT responsible for anything you do with this. Installing it properly won't brick your Fire TV, but doing stupid things with it might.

    Installing this requires root. If you are not rooted, please see my FireTV 2 Recovery Installer page.

    Installation
    1. You can copy the files to /sdcard, a USB storage device, or an sdcard. I will be using /sdcard in the instructions, but you can replace it with /storage/usbotg for USB or /storage/sdcard1 for an sdcard.
    2. Copy the zip file to your destination.
    3. Connect adb
      Code:
      adb connect IPADDRESS
    4. Open an adb shell
      Code:
      adb shell
    5. Run the zip file (replace vX with the actual version you downloaded). This will automatically run su, so make sure to accept the prompt if necessary.
      Code:
      sh /sdcard/firetv2_recovery_vX.zip
    6. Reboot

    Upgrade
    You may repeat this to upgrade to a newer version, or you can install an updated pre-rooted rom, as I will be uploading new versions of those with every version of recovery.

    Notes
    This includes bootmenu. For everyone that loved the old FireTV 1 bootmenu with Comic Sans, I'm sorry to disappoint you, but the Comic Sans is gone. When the FireTV boots, it will present you with the bootmenu where you can leave it alone and it will boot normally or you can select recovery and it will boot in to recovery. You do need a USB keyboard to interact with the bootmenu. To force it to boot in to Recovery, you can create a file /cache/bootmenu_recovery.

    DHCP for Ethernet is enabled, and if there is enough demand I may add in wifi at some point. The IP address should show up in the top left corner.

    USB storage, USB keyboard/mice, and sdcards should all work. Hotplugging works, so you should be able to plug and unplug devices as needed.

    You can use a USB keyboard, mouse, or the mouse emulator to interact with it. To use a keyboard, you can use the arrow keys to move the cursor and the enter key to select buttons. Sliders don't require sliding, so you can just hit enter/click on them. To use the mouse emulator, use adb shell and then run the program mouse and follow the instructions.

    ROMs
    Recovery must be included in all ROMs. If you want to develop a ROM, please contact me about including recovery in it.

    Kernels
    The bootloader is locked and you cannot flash kernels. If you do attempt to flash a kernel, you will brick it.

    Installing zips
    You can push zips to /sdcard, put it on a USB storage, put it on an sdcard, or use adb sideload. Do note you need adb version 1.0.32 to use adb sideload.


    Stuck in a loop?
    If you cannot boot normally and keep going back to the bootmenu, wipe Cache from Wipe -> Advanced Wipe.
    If that doesn't work, ensure Cache is not mounted from in the 'Mount' menu and run this from an adb shell:
    Code:
    mke2fs /dev/block/platform/mtk-msdc.0/by-name/cache


    Source Code
    You can find the source code here:
    https://github.com/androidrbox/sloane-2ndinit
    https://github.com/androidrbox/android_bootable_recovery

    WARNINGS

    • It is extremely important you never reboot after a failure. This will most likely lead to a brick. If recovery is hung, you can use adb shell to run
      Code:
      killall recovery
      to restart it
    • It is also extremely important to never reboot after wiping /system.
    • If you wind up bricking, you must use the Unbrick Image to unbrick.


    Finally, thanks to everyone who has donated to me and those that helped to get me my FireTV 2.

    Changelog and Downloads:
    • April 8, 2016 - v6 (md5sum: 79c1a3efbac86618fa2cdbb4901fbd77)
      • This should prevent auto flashing amazon updates.
      • This includes 2ndinit version dee776 and TWRP version 3.0.0-5.
    • February 14, 2016 - v5 (md5sum: 16c957c86f1f61160e14a55819610707)
      • This should fix the problems certain keyboard were having in recovery.
      • This includes 2ndinit version dee776 and TWRP version 3.0.0-4.
    • February 12, 2016 - v4 (md5sum: 15c6d375607839cac4b186a2b68b8b0d)
      • This includes 2ndinit version 743aa4 and TWRP version 3.0.0-3.
        • These are just changes related to the unbricking image. No other functional changes.
    • February 8, 2016 - v3 (md5sum: b39a4dbe0c19080a97f602f37fda63ec)
      • This includes an updated script. You can now just run the zip instead of needing the zip and the script.
      • This includes TWRP 3.0.0-2.
        • Added a reboot recovery option in addition to reboot system. Now reboot system will reboot straight in to Android. Reboot recovery will reboot to the bootmenu.
        • Fixed restoring backups.
      • This includes the same version of 2ndinit.
    • February 7, 2016 - v2 (md5sum: 762621104d158d7ce4010bea725f7181)
      • This includes an automated script.
      • This has the same versions of 2ndinit and recovery as v1.
    • February 6, 2016 - v1 (md5sum: 7be673dd24489080eacdd0ad00feda51)
      • This comes with 2ndinit version fe3362 and recovery version 3.0.0-1
    6
    I just updated the OP with v6/3.0.0-5. This blocks TWRP from auto installing Amazon updates.
    3
    I added v3 to the OP. Now you only need to copy the zip file whole and just run it. Additionally, I updated TWRP to 3.0.0-2. The changes are listed in the OP.
    3
    Hi, @rbox - FYI, I think that the posted v6 ZIP file is corrupt in some way. When I tried to unzip it using 7Zip, I always see the following error:



    The posted v6 ZIP file did pass the MD5 check on my PC, so I don't think it is corrupted - It may have been an error in the ZIP file creation (maybe a file was still open when created?). There are 3 files that are extracted with 7Zip.

    The files also do extract using the Windows 7 Explorer OK, but I wouldn't expect Win7 to be very expressive if there was a lower-level error during the extraction process.

    Also, the 3 extracted files are binary identical between the 7Zip extraction and the Win7 extraction.

    Just letting you know,

    ¿GJ?

    Depending on the quality of the program you're using, and how it follows the zip standard, determines if it believes the zip is corrupt. I don't really know if according to the standard it is or not, but most programs will extract it. I do know some program on mac will refuse to unzip it. It actually consists of a shell script, followed by an unzip binary, followed by the actual zip file. And, looking at your screenshot, your program is just warning you that there is an offset. It's not an error per se, and having an offset is perfectly valid, because I'm using a standard method of "fixing" the zip to apply the offset.
    3
    I'm sure this has been asked, but I couldn't find it in the thread. Was this updated to the same 3.0.0-7 that we have for the FireTV 1, or is it an insignificant change?

    The changes from 5 to 7 don't matter for sloane. In theory I should rebuild all 3 devices with the same version, but I haven't really had a need.