yashsingh1/xdaforums huggingface dataset:
[Fire TV Android Development] Patrick_445:
[MENTION=3991724]rbox[/MENTION] I ran into the same problem as [MENTION=2516604]aboshi[/MENTION]. If you know the steps, the instructions seem obvious but they won't be obvious to many. I read the OP a few times but it's only after reading [MENTION=2516604]aboshi[/MENTION]'s mistake that it made sense to me.

I would agree with the advice to separate the script from the content. you could put both the script and the recovery zip file into a container zip and instruct people to download that container zip.

My suggestion for how to write the instructions

1) extract container zip to get script and recovery zip

2) connect via adb (add command)

3) copy recovery zip file to /sdcard (add command)

4) copy script to /sdcard (add command)

5) run script (add command)

6) reboot

As a bonus you could indicate how to compute the hash of the recovery zip before running the script to ensure integrity (unless the script already does so). You could also add a step indicating how to delete the files from /sdcard

Thanks for your great work.
[Fire TV Android Development] rbox:
I've already fixed it so you just need to copy the zip and just run sh on it. And I will add in md5sum checks to it. I'm just waiting to hear back from 1 person and there will be a 3.0.0-2 and a v3 with those changes in it.
[Fire TV Android Development] shino4757:
can't seem to get Recovery to work

I followed all the steps in version 1 had no luck then I seen the second version you uploaded Rambo ADB connection to my IP address and went from there it seem to find the files that I needed that I put on my SD card but still nothing I was even going down some of the things that other people would have it in the form type those commands in and still nothing can someone give me detail commands to typing in version 2 everytime I reboot I just see Amazon white boot screen and then animation boot screen is there a step im missing I've been trying to do this since you uploaded it is still nothing?:(
[Fire TV Android Development] rbox:
From adb shell, after you run su, run this:

ls -l /system/bin/ext4_resize /system/recovery
[Fire TV Android Development] KainanMaki:
Haha don´t worry, it´s obviously a long shot but with recovery working and a backup ready I feel like playing with it.

Also, it´s a good time to thank you for all your amazing work on the Fire TVs.

Takes the FTV to another level.
[Fire TV Android Development] elliwigy:
had to drop in and hit the thanks.. least i could do!
[Fire TV Android Development] jocala:
I was "some people" who first reported this in your rooting thread. However, mount broke again on a freshly rooted system that adbFire never touched. I mentioned this in your thread, you may have missed it.
[Fire TV Android Development] deanr1977:
What do you mean that mount broke?
[Fire TV Android Development] KainanMaki:
It's alive!!!! Well at least the alternate launcher is the new boss in town.

The function to hide sections from the menu is not working.

The RecentsOnMenuLong Home pressing also doesn't, but the new native options for long pressing do work.

Remapping the button from home to menu would be cool.

But again, it is great news that the alternate launcher is working, it's a world of difference in my opinion for the experience. That alone makes the root so worthy!!
[Fire TV Android Development] jocala:
I've had it occur twice, where a freshly rooted v2 refused to allow /system to be remounted. No clue as to why...the only remedy I found was to re-dd the system partition. Yet another reason why a working recovery is so great. Thanks rbox and zeroepoch!
[Fire TV Android Development] deanr1977:
You mean like- I have an Sd card which while I was on 5.0.3.1 rooted I could delete from the Sd card & now I'm on 5.0.4 rooted It won't let me? If that is what you mean how can I fix this? Do I need to DD the system & if so how do I go about that? [MENTION=2718012]jocala[/MENTION]
[Fire TV Android Development] jocala:
My problem was different from yours.
[Fire TV Android Development] deanr1977:
Is anyone else able to delete files from sd card on 5.0.4 rooted/rom? Or is there something wrong with mine, something to do with rw access to sd?
[Fire TV Android Development] shino4757:
Nothing happens just brings up three scripts something like root root and shell then its asking me to type in another command
[Fire TV Android Development] roligov:
Fantastic work rbox, long live rbox :D
[Fire TV Android Development] BagiMT:
I flasehd xposed-v80-sdk22-arm64.zip and used the XposedInstaller_3.0_alpha4.apk. Working well, so far no issues. You can get them from here:

http://xdaforums.com/showthread.php?t=3034811
[Fire TV Android Development] elliwigy:
will this work with any usb keyboard? I can confirm it doesnt work with a bluetooth keyboard/mouse that plugs into usb lol

---------- Post added at 10:28 AM ---------- Previous post was at 10:25 AM ----------

Also, I noticed the rom structure is different than stock android phones.. to createacustom rom would one have to extract the img, modify then repack it?

I essentially want to see what I can remove from the base rom without losing functionality and have another default launcher as well as look into incorporating xposed and/or play store
[Fire TV Android Development] KainanMaki:
It took me hours to realize the problem was the installer :crying: !!!

Still, it's great info for the rest.
[Fire TV Android Development] elliwigy:
So I understand, steps are as follows:

1) put recovery fileon internal sd card

2) adb connect

3) install recovery via adb

4) reboot?

Theguideon aftvnews.com has a ton more steps im assuming since goimg from complete stock vs. myself whos already rooted and just needs recovery?
[Fire TV Android Development] deanr1977:
Do you flash the zip in recovery, then use the installer? Or use the installer to flash the zip? Can you tell me the steps please
[Fire TV Android Development] Medizinmann:
You flash the zip(aka Xposed Framework) through recovery and then use the installer, which installs the software that controls the Xposed add-ons.

Greetings

Medizinmann
[Fire TV Android Development] deanr1977:
Cheers mate I thought that were right but there is no harm in checking first.
[Fire TV Android Development] yodamann:
I'm having the same double screen problem on one of my 2 firetvs rbox. Any suggestions? Thanks for all that you do for the fire tv.
[Fire TV Android Development] Patrick_445:
I think rbox was asking for the exact printout. Those lines of text contain information that could be useful in diagnosing your problem.
[Fire TV Android Development] ncube2:
[MENTION=3991724]rbox[/MENTION]

I was trying to ROOT my AFTV2 using aftvnews instructions and looks like i bricked my AFTV2 device !!!

Now when i power on my fire tv, I get stuck at the Amazon Fire TV screen. Is there a way to restore, cant get to the TWRP screen either.

I was asked to post my qn here. Plz kindly help if there is a fix. I cannot get to adb since i am in the preload section i assume.

Thanks !
[Fire TV Android Development] elliwigy:
maybe provide more info such as what step it went wrong at would help..

he does have a warning in op that it wont brick if its done correctly so just need to know where it messed up and maybe you can resume the process (hopefully)
[Fire TV Android Development] krawhitham:
Tried v2 on already rooted 5.0.4

c:\FTV>adb shell
shell@sloane:/ $ sh /storage/sdcard1/firetv2_recovery_v2
sh /storage/sdcard1/firetv2_recovery_v2
Extracting unzip...
Remounting /system read-write...
Extracting 2ndinitstub...
Extracting 2ndinit...
Extracting recovery ramdisk...
Remounting /system read-only...
shell@sloane:/ $

Rebooted

There was no boot menu

ran ls -l /system/bin/ext4_resize /system/recovery

ls -l /system/bin/ext4_resize /system/recovery
-rwxr-xr-x root shell 0 2016-02-08 20:46 ext4_resize
-rwxr-xr-x root root 0 2016-02-08 20:46 2ndinit
-rw------- root root 0 2016-02-08 20:46 ramdisk-recovery.cpio
root@sloane:/ #
[Fire TV Android Development] rbox:
Any standard USB HID device should work. If it's a bluetooth dongle that shows up as bluetooth on the system, that's not going to work. If it's a bluetooth dongle that shows up as a regular usb keyboard, it should.

The structure of the ROMs is the standard Android 5.0 zips. My prerooted roms have a standard ext4 filesytem in the system.new.dat that can be loopback mounted. You have 3 options. One is to mount it, modify whatever, and then flash that image. The second option is to modify the updater-script to call a script of yours to delete whatever you want to delete. The 3rd, maybe preferable option is to create a "unbloat" zip that you flash after flashing the prerooted, and then it just goes and deletes whatever. You could even write an addon.d script that would automatically run everytime a rom is flashed.

The guide on aftvnews.com matches up with my post in the Original Development for the Recovery Installer. This method is simpler and requires root. The other method is for people who can't handle adb or who aren't already rooted.

If you could try to get me a recovery log, that would be very helpful. While the bootmenu is up, use adb connect to connect adb and then adb pull /tmp/recovery.log to get me the log file.

As root, please run this in adb shell:

ls -l /system/bin/ext4_resize /system/recovery
[Fire TV Android Development] krawhitham:
ls -l /system/bin/ext4_resize /system/recovery
-rwxr-xr-x root shell 0 2016-02-08 20:46 ext4_resize
-rwxr-xr-x root root 0 2016-02-08 20:46 2ndinit
-rw------- root root 0 2016-02-08 20:46 ramdisk-recovery.cpio
root@sloane:/ #
[Fire TV Android Development] rbox:
Looks like you missed a step about copying files. I'm about to release v3 which is easier to use.
[Fire TV Android Development] elliwigy:
Wow lol.. was going crazy with aftv instructions.. did few instructions in OP and voila!

You da man!
[Fire TV Android Development] rbox:
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.
[Fire TV Android Development] Ludacrisvp:
Nice, I wasn't able to get v2 to work. Originally due to being unable to remount /system as rw, then once I fixed that (used the "3 minute upgrade from 5.0.3.1 to 5.0.4" to upgrade which fixed whatever bug was preventing remount from working properly) I was able to install v2 however the boot menu never showed even after doing:

root@sloane:/ # touch /cache/bootmenu_recovery
root@sloane:/ # reboot

it still went directly into FireOS...

but now with v3 it worked perfectly fine.

root@sloane:/data/local/tmp # sh firetv2_recovery_v3.zip
Extracting unzip...
Remounting /system read-write...
Extracting...
Remounting /system read-only...
root@sloane:/data/local/tmp # reboot

So now I'm on 5.0.4 and have a custom recovery that looks really nice, now to figure out Xposed and the Google Play store...
[Fire TV Android Development] elliwigy:
I must sayafter being stuck on verizon s6 edge with basic root on 5.0 I forgot how nice twrp and xposed is lol

thanks again [MENTION=3991724]rbox[/MENTION] for giving me another device/recovery to work on!

---------- Post added at 08:59 PM ---------- Previous post was at 08:57 PM ----------

xposed is easy.. now play store on the other hand lol

i think i need to enable the module n xposed.. its been so long since i was able to use xposed
[Fire TV Android Development] deanr1977:
Look here someone's worked it out!

http://xdaforums.com/fire-tv/help/q-guide-to-getting-google-play-rbox-t3310974/page2
[Fire TV Android Development] elliwigy:
i got it to work after i posted lol workin great!
[Fire TV Android Development] deanr1977:
I have recovery v.2 at the moment how do I update to v3? Just push the zip & install straight from Twrp? Or do I have to do it like page 1 with a cmd by adb?
[Fire TV Android Development] zeroepoch:
I think you need adb and repeat the same process. BTW there is an updated prerooted image.
[Fire TV Android Development] mikey6283:
Hi Rbox just used the recovery V3 and it took less than a minute, it was that fast i am not sure that it works now going to try and install xposed v80-sdk22- arm64 so that that i can install Google play.

Thanks rbox
[Fire TV Android Development] bula1ca:
I thought we need to flash it through without following the whole process. BTW thank you for the info on the img file, I missed that.
[Fire TV Android Development] elliwigy:
open it up and take a look at the zip..

for some reason i keep getting bad zip when i try to open it on my phone.. trieddling from chrome and cm browser
[Fire TV Android Development] shino4757:
[MENTION=3991724]rbox[/MENTION] thank you your v3 installation worked like a charm great work
[Fire TV Android Development] elliwigy:
I am going to try my luck at making a custom rom tonight.. no eta on a release however since will be my first go at aftv2 so surely itll be trial and error lol

Question for [MENTION=3991724]rbox[/MENTION]

If I keep your prerooted img on sdcard then build my rom off of it as a separate rom.zip, if my install via twrp fails to boot I can still get to twrp and install your prerooted img correct?

If anyone knows my work (if you dont you can check out Extreme Syndicate) then you will know my intentions lol

1) Based on 5.0.4

2) pre rooted+busybox

3) Extremely Debloated (I will remove everything I can fir device to still function) to hopefully free up space/RAM

4) Xposed pre installed

5) Open Gapps pre installed

6) I might preinstall some useful apks such as root browser, adaway etc.

7) Not sure if possible but if V4A works it will also be included

8) That is just the start for a first build lol I will not release anything until I know everything functions as intended which Ive already started fooling around.. I have open gapps with working play store, xposed working so next step I will start debloat process then building
[Fire TV Android Development] bula1ca:
Zip has the usual 3 files : ramdisk-recovery.cpio, 2ndinit and 2ndinitstub, most probably needs to be install running the bat file or as per 1st page guide.
[Fire TV Android Development] Patrick_445:
Thanks for the link. Would someone spell out how to use those two files to install the XPosed framework? I assume you sideload the installer via the "adb install *.apk" command? What do you do with the zip file?
[Fire TV Android Development] elliwigy:
I see.. then yes, this means it would need to be installed the same as the OP I would assume with the adb commands.. I wonder if it'd be easier to just make a flashable zip for twrp lol although method in OP isn't difficult at all and takes like 30 seconds :)

---------- Post added at 09:42 AM ---------- Previous post was at 09:40 AM ----------

I recommend doing some reading up on recovery and xposed before you take the plunge if you don't even know how to install it lol.. You should be fine but it's not much use if you don't know how to actually use it...

The apk you are correct, either adb install or push the file to your aftv2 somehow and install it as a normal apk...

The .zip file must be flashed in TWRP recovery made by [MENTION=3991724]rbox[/MENTION]..

So you need a rooted aftv2 with TWRP in order to install Xposed.
[Fire TV Android Development] bula1ca:
I agree, not difficult at all. Thank you.
[Fire TV Android Development] Patrick_445:
I installed Xposed on my FTV1 about a year ago using nothing but an apk as per the instructions on aftvnews (unless my memory is inaccurate), so I got a bit confused when I noticed that there were two files to deal with this time. Your explanation is helpful, thanks.

PS. Does it matter which I do first? install apk or flash zip from recovery?
[Fire TV Android Development] AFTVnews.com:
Yeah, my guides are completely overkill for someone like you who knows their way around a command line. Rbox does a fine job of laying out the essential instructions needed, so I try to handle the other extreme where someone needs their hand held through the whole process. Sometimes that means doing things the long way to avoid ambiguity, and I know that can drive experienced users crazy.

I'm really excited about your potential ROM! A debloated ROM with a few extras, like Gapps, built in is a great idea! (FYI, one common bloat concern is the 300mb of photos downloaded by the default screensaver.) Feel free to hit me up if you have any questions about the Fire TV that I might be able to help with.
[Fire TV Android Development] jocala:
adbFirehttp://www.jocala.com will now install rbox recovery v3.
[Fire TV Android Development] dk1keith:
Leanback Launcher on Fire TV 2

Now that we can install Google Play Store, has anyone considered moding the Android TV Launcher (Leanback Launcher) for the Fire TV 2? there is a thread on XDA that has successfully made a LeanbackMod for other devices. The mod file even installed on my old Nook HD+. It would be nice to have another Alternative Launcher for the Fire TV 2.
[Fire TV Android Development] elliwigy:
will do and i understand the need for detailed instructions..

i will reach out if and when I need assistance!

---------- Post added at 05:57 PM ---------- Previous post was at 05:56 PM ----------

thats already possible with 3rd party launcher and rbox fire tv xposed mod unless you mean fire menu which you can also customize
[Fire TV Android Development] rbox:
So as long as you make sure /system/bin/ext4_resize is correct and the files in /system/recovery is correct, you should always be able to boot back in to TWRP.
[Fire TV Android Development] playingmax:
i keep getting this error msg
[Fire TV Android Development] rbox:
You're not supposed to include the $. I'll remove it from the instructions.
[Fire TV Android Development] bula1ca:
Remove the $ sign from your command line:

sh /sdcard/firetv2_recovery_v3.zip

.
[Fire TV Android Development] Takeoo111111:
I'm getting the following error:

sudo ./mediatek_inject.linux firetv2 /dev/ttyACM0 2ndinitstub /system/bin/ext4_resize -
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 01D947000: 100%
error: source file is larger than target file!

Both, with version 2 and 3.

My FireTV2 Modell number: DV83YW

Maybe related to this post.
[Fire TV Android Development] vrl2:
Awesome work, rbox, thank@ Everything has been working fine, but I've hit a hurdle: wiped my system and data partitions, but accidentally rebooted system (instead of flashing the prerooted rom). Now AFTV2 shows a black screen and doesn't load into recovery. Can anyone suggest any next steps? Thanks so much.
[Fire TV Android Development] ks-man:
For some reason I can't push the zip file to /sdcard. Does it need to be run from there? I was able to copy it to a folder created in /sdcard called tempfiles. Thanks.

--Edit--

Guess I needed to do /sdcard/...worked then.

C:\Users\HP\Desktop\adt\sdk\platform-tools>adb push firetv2_recovery_v3.zip /sdcard

failed to copy 'firetv2_recovery_v3.zip' to '/sdcard': Is a directory

C:\Users\HP\Desktop\adt\sdk\platform-tools>adb push firetv2_recovery_v3.zip /sdcard/tempfiles

3072 KB/s (5578945 bytes in 1.773s)
[Fire TV Android Development] deanr1977:
I am also getting the same error on v3, v2 was fine with no errors. Even though it gave an error it seams to have still installed ok? What would this mean please [MENTION=3991724]rbox[/MENTION] ? Would it still be ok or should I try to reinstall? I still have root, latest recovery version & updates are still blocked too, right permissions seam good too?
[Fire TV Android Development] rbox:
No, that's a different issue.

I guess I need to add warning. You cannot (and really should not in the first place) use the installer after using the method outlined on this post and/or installing a prerooted rom. The installer is only for 100% stock roms or roms rooted with the original rooting method.
[Fire TV Android Development] rbox:
You really should never wipe system... Unfortunately it's bricked. You will need my unbrick image. It looks like it may be ready tomorrow.
[Fire TV Android Development] deanr1977:
Oh.... Well I rooted to 5.0.3.1 using the older method (2-2&half hr), then updated to 5.0.4 & recovery & root with your installer (with no issues), & updated recovery & rom with this method in this thread. What do you think? Do you think I need to reinstall using the installer method? Or just wait for the next release & go from there? Thanks in advance Rbox
[Fire TV Android Development] rbox:
If you flashed a pre-rooted rom and are still on 3.0.0-1, then just follow the method here and/or install the latest pre-rooted rom.
[Fire TV Android Development] deanr1977:
No mate.... recovery has updated to 3.0.0-2 & haven't had any booting issues or any problems when the latest rom flashed in recovery ether? It just said about the issue with the target file when the .bat finished in cmd? Is there anyway To check if it updated my rom to the new version?
[Fire TV Android Development] rbox:
You should not be using the .bat file after installing a prerooted rom. That is why it failed. The installer is only for installing 2ndinit. You already have 2ndinit, so the installer will do nothing for you.
[Fire TV Android Development] deanr1977:
Oh right sorry rbox, feeling like a right idiot now haha.Thanks for all the excellent work so far mate & looking forward to seeing more of your work on the AFTV2, the Fire 2 is moving along very nicely now & were lucky to have you & the other experienced Devs onboard. Take care mate
[Fire TV Android Development] mikey6283:
Hi, I flashed the xposed-v80-sdk22-arm64.zip to a sdcard and received the following :

Installing Zip File xposed '/usb/xposed-v80-sdk22-arm64.zip'

Checking for MD5 file...

Skipping MD5 check : no MD5 file Found

**********************************

Xposed Frameworkl Installer zip

********************************

- Mounting /system and /vendor read-write

- Checking environment Xposed verison 80

- Placing Files

chown: /system/lib/libart.so.org.gz: read-only files system,

Updater process ended with error :1

Error installing zip file '/usb/xposed-v80-sdk22-arm64.zip'

Any ideas on where i am going wrong.
[Fire TV Android Development] daffung:
amazon white logo

hey guys, i received a replacement from amazon

but they sent me a bricked fire tv

which is stuck at white amazon white logo...

so i did this.. i was able to do the handshake and do the installer..

i was able to boot into recovery!

then install pre rooted firmwre (sloane-5.0.4-rooted_r1.zip)

now after installation, i dont even get any screen at all not even whilte amazon logo

did i just fully bricked it?

anyway to unbrick it?

since i can still do the installer

and no screen at all,

tried doing installer again but with error

------------------------------------------------

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 00593D000: 100%

error: source file is larger than target file!

Press any key to continue . . .

and looks like amazon is not asking for it back and i get to keep it, i a fix for this would be nice,,
[Fire TV Android Development] deanr1977:
Think rbox said hes making a unbricking image? Said In a few posts that it ready in a day or two.
[Fire TV Android Development] Largewoodenspoon:
Hi guys. Is there a quick easy uninstall process. My tv doesnt show the boot menu correctly and it looks ridiculous on startup.
[Fire TV Android Development] deanr1977:
Is it a double image? Someone was talking about something like that on a post before
[Fire TV Android Development] Largewoodenspoon:
Yep. Double image. Think its my tv. Old sony bravia. My ouya used to do the same thing at boot menu.

Just want to remove it completely, cant use it as it is!