yashsingh1/xdaforums huggingface dataset:
[Fire TV General] rbox:
Right now I'm just doing it while it's booted. I'm trying to implement 2nd-init. Basically early on in the boot, you find a script or binary in /system that runs, and you replace it with some special code that makes init restart. Before you restart init, you replace it and it's scripts with something else. So yes the ramdisk is being modified, but it's being modified after it's already started booting. It's extremely hacky but it's what they do on some phones with locked bootloaders.

Edit: So actually I just found some kexec patches for arm64. I may wind up using that instead. kexec is a much cleaner way to accomplish what I want, plus it allows us to use custom kernels. So I guess I'll see...
[Fire TV General] kibmikey1:
After going through things several times, I'm almost certain my usb cable is to blame for not working. Ordered a new one, it gets here tomorrow. I want to thank zeroepoch and everyone that made this possible!
[Fire TV General] arunningpir8:
Either the cable or the port. As I said I switched from my 2.0 to my 3.0 port and it worked great after that. As zeroepoch said it should continuously print out addresses for about (almost exactly) 2 hours. You will know when it finishes because you are returned to the command line instead of just hanging. If it makes anyone feel better about cables too I made mine by cutting and splicing 2 cables (although I do this partially for a living so it wasn't bad) it wasn't perfect either so I would try changing ports before changing cables. I'm guessing the bus timing is just picky on certain ports. We are talking serial data here after all.
[Fire TV General] deanr1977:
I was told that with this app It is possible to use a VPN with the Fire TV 2 - Vpn by Private Internet Access

I don't own that paid app so I can't say for sure though. I added it to my compatible thread If you need any reference for apps & accessories check here- http://xdaforums.com/fire-tv/help/aftv2-best-compatible-apps-accessories-t3269267
[Fire TV General] danknasty:
I just rooted my fire tv very easily but I cannot get google play store on it the open gaps file says it is incompatible with this architecture.
[Fire TV General] TROJAN4EVR:
Follow guide at aftvnews.com:

http://www.aftvnews.com/how-to-install-the-google-play-store-on-the-fire-tv-2-running-fire-os-5/
[Fire TV General] danknasty:
That is the guide I followed it constantly fails when I try to flash the open gaps zip I've tried about 5 different variations of that file and none of them work they all say it work on my rom.
[Fire TV General] TROJAN4EVR:
Re gaps .zip >>>"Note that you do not unzip this file."<<<
[Fire TV General] danknasty:
I followed the directions to the T . I didn't unzip anything the device is rooted its just this one part will not install it keeps failing the installation.

This is the log file I get when i try to install gaps.zip

# Begin Open GApps Install Log

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

ROM Android Version | 5.1.1

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

# End Open GApps Install Log

INSTALLATION FAILURE: This Open GApps package cannot be installed on this

device's architecture. Please download the correct version for your device.

# Begin User's gapps-config

# End User's gapps-config
[Fire TV General] TROJAN4EVR:
ROM Android Version | 5.1.1.....???? Fire tv is on rooted fire os 5.0.5....This is the rom you should be on:

http://www.aftvnews.com/pre-rooted-5-0-5-rom-for-fire-tv-2-released/
[Fire TV General] danknasty:
I am just as confused as you.
[Fire TV General] TROJAN4EVR:
If you rooted your aftv2 via guide at afrvnews.com you should be on rbox's prerooted rom 5.0.5....then follow the guide for installing google play store. Don't know about this 5.1.1 rom you have...
[Fire TV General] danknasty:
I am on fire os 5.0.5 but it still says I am on android 5.1

The message I get when the install fails says "This open GAPps package cannot be installed on this device's architecture. Please download the correct version for your device: armeabi-v7a,armeabi"
[Fire TV General] TROJAN4EVR:
What says you're on 5.1??? In fire tv settings>system>about....what software version does it say? Did you try downloading the file from the "mirror" instead?
[Fire TV General] danknasty:
It says I am on 5.0.5 i believe the 5.1 is referring to the version of the gaps arm64 5.1 nano.zip

The message I get when the install fails says "This open GAPps package cannot be installed on this device's architecture. Please download the correct version for your device: armeabi-v7a,armeabi"
[Fire TV General] TROJAN4EVR:
If you download from the mirror....the file name should be: open_gapps-arm-5.1-nano-20160217.zip Does this match any of the files you've already downloaded and tried?
[Fire TV General] danknasty:
I just checked the mirror and this is the same file I have been installing open_gapps-arm64-5.1-nano-20160217 ........... are you using the regular arm and not the 64bit?

---------- Post added at 03:23 AM ---------- Previous post was at 03:18 AM ----------

Welp I just found out that only the mirror version works so maybe someone should add that as a notice as I downloaded what seems to be the same thing as the mirror from the main and got nothing. But the mirror finally installed thanks for the help.
[Fire TV General] TROJAN4EVR:
When I download the file from the mirror on my phone...it gets downloaded exactly as open_gapps-arm-5.1-nano-20160217.zip....I don't see the "64" in my file name...sorry I can't be of more help to you...

Glad to see you got ot working!!! Good job!!!
[Fire TV General] danknasty:
It worked I downloaded the mirror for whatever reason the actual main version does not work.
[Fire TV General] TROJAN4EVR:
Weird....will have to post on there to let aftvnews know...Have a good night!!!
[Fire TV General] danknasty:
Thanks you too this woulda kept me up all night lol.
[Fire TV General] elliwigy:
the gapps version should be the 5.1.1 opengapps.. on their site you select arm v7 64 5.1.1 nano..

---------- Post added at 06:08 AM ---------- Previous post was at 06:06 AM ----------

heres a mirrored link for correct gapps:

https://drive.google.com/file/d/0By9dxKZHr9vaakZTUHRhZzhIcWM/view?usp=docslist_api
[Fire TV General] TROJAN4EVR:
Yes...thx for pointing that out...but had you read my exchange with danknasty....the aftvnews guide says to select Arm64, 5.1, nano resulting in a file named:

open_gapps-arm64-5.1-nano-20160217.zip

This file supposedly failed to install for danknasty.

I suggested to download from the "(mirror)" resulting in a file named:

open_gapps-arm-5.1-nano-20160217.zip

This file seemed to install for danknasty.

Dont see "v7" nor 5.1.1 anywhere you're asked to select...I only see Arm64 and 5.1

So thx for your input...maybe danknasty was doing something wrong and the mirror download worked anyway. Were you able to install the google play store using the file you posted which is the same file that supposedly didn't work for danknasty?
[Fire TV General] elliwigy:
Yea apologies.. I posted in a hurry and didnt realize but the one on aftvnews is the correct one.. so long as it is arm64 and 5.1.. Im pretty sure the nano was only selected since it mainly just has the core apks needed..

i posted my link as a mirror since I know 100% it works and I downloaded it from the opengapps site.

Glad you got it to work!

Are you saying he got play store working using the arm download instead of the arm64?

I wonder if we use another setup if we can get it to work.. I know the first post I seen that was successful was the arm64 5.1 nano but am unsure if any others were attempted..
[Fire TV General] rp201:
linux script not working on 5..0.5.1

I had a ftv2 which was rooted with the first linux method using an AtoA cable and a raspberry pi2. Reason I used the rpi2 was I I could not get any of my laptops or desktop to load mtk fastboot driver properly under windows xp, 7 nor 10. After a while, I installed the latest twrp on the ftv2. It sat for months untouched till I decided to do a factory wipe in twrp. I forgot to disable to update service as a double precaution as I assumed my router would block updates. So my system took the update to 50.5.1 I figured oh well, I have the OS image I used to root it on the pi2 untouched (berryboot) and saved. I got my cable out and fired up the Pi2 and I copied firetv2_recovery_v5.zip and install_firetv2_v3 to a directory on the pi2 and extracted both files in the same directory. a ran install_firetv2_recovery.sh, unfortunately the script failed.

I also tried a fresh install of raspbian jessie from 3/2016 with same results of cannot execute binary file error.

Sneaky Management at amazon likes to create more problems so people brick more devices and return them... well played amazon, well played....not.

update: I got the mtk vcom windows driver working properly with a laptop I had, what I also noticed was I needed to enable usb debugging and put .cpio file on the micro sd card. (it would not read the file from internal memory) also since I did a "wipe data" i needed to login to amazon. I have a ddwrt router double nat'ed and blocking amazon updates. I would connect to dd-wrt router during setup with no sites blocked. when I receive a connection successful I would disconnect main wan cable on first router. then go into dd-wrt and enable blocking and apply settings and reconnect the network. It takes less time for it to fail updates and allow you to log in quickly.
[Fire TV General] TROJAN4EVR:
You can still root...see here:

http://www.aftvnews.com/amazon-fire...is-still-rootable-using-rboxzeroepoch-method/

Reason your fire tv updated is because Amazon sends updates now from an https domain:

http://www.aftvnews.com/warning-blo...s-via-a-router-or-opendns-may-no-longer-work/

Follow this guide to root:

http://www.aftvnews.com/how-to-root-the-amazon-fire-tv-2/

**disregard the update regarding new rooting method** Follow the link to how to download and install the MTK drivers as you shouldn't of had problems installing on all 3 op sys you mentioned. User error is likely the reason u couldn't at least install in one of the 3. Hope you get it sorted out.
[Fire TV General] spotmark:
Oops, wrong thread.
[Fire TV General] wohltat:
Will I keep root if I update the firmware or will it be gone?
[Fire TV General] T0m93:
Hey, i used Zeropoech method to root my fire TV. Now i want to install TWRP. I tried it with the Tutorial from AFTVnews.com http://www.aftvnews.com/how-to-install-twrp-custom-recovery-on-a-rooted-fire-tv-2/

I'm using the adbfire terminal and always getting SH not found? Am i doing something wrong? Installing TWRP should be possible, regardless of the Rooting method?!?

Thanks :)
[Fire TV General] zeroepoch:
Yes it should be possible. You can even use the unrooted TWRP installer with a rooted system or follow the guide that installs TWRP from an already rooted. The guide on AFTVnews.com assumes you are still stock. In fact even the unbrick image will work as a starting point. You just need to get TWRP running and then flashing the pre-rooted image will fix everything up.
[Fire TV General] T0m93:
Thank You Zeropoech :) i used this tutoial now, and it worked http://www.aftvnews.com/how-to-root-the-amazon-fire-tv-2/. Inside the comments is a mac tutorial,too :) Worked great
[Fire TV General] phresch:
is there currently any way to root a firetv2 on newer firmware via an emmc/soldering method as was the case with the firetv/stick 1? i have seen bits and pieces of info here and there where people were messing around with it, but have yet to find anything definitive.
[Fire TV General] clarke.hackworth:
[MENTION=2415052]NaturalBornHaxor[/MENTION] do you have a backup of those TEE1 and LK partitions? I am needing those partitions from a pre-5.2.1.0 release.
[Fire TV General] NaturalBornHaxor:
I actually might. I'm not home right now but I can look for it on Tuesday.
[Fire TV General] klobster:
Whats the status on this in light of the new hardware?
[Fire TV General] pwntrik:
Have successfully used the cable method for 5.2.1.0 many times, but this method fails on 5.2.4.0. Hangs on "Reading..."

Running Windows 10 with fastboot, adb, and zeroepoch scripts,
[Fire TV General] clarke.hackworth:
Bump. Just wondering if you have the TEE1 and LK partitions from a pre-5.2.1.0 release?
[Fire TV General] maleclub:
also I succeeded in rooting mine! from aftv.com "how to root amazon firt tv 2"
[Fire TV General] torty:
Hi, I've just bought an aftv2 with 5.2.4.0. do you think I can root it ?
[Fire TV General] maleclub:
it's easy to root ,you can secrch the aftvnews.com. has the guide to root 5.2.40<Fire TV & Fire TV Stick

Rooting Starter's Guide>...
[Fire TV General] holybabel:
aftv2 with 5.2.4.0 os version can't be rooted via software.
[Fire TV General] Sajhid:
Can firetv 2 be rooted on 5.2.1 and 5.2.1.1? Thanks
[Fire TV General] Y314K:
Elias keeps a good list of what is rootable on what FW.

http://www.aftvnews.com/amazon-fire-tv-fire-tv-stick-software-update-history/
[Fire TV General] enderffx:
HW rooting aftv2

Hi !

I searched for a while but was unable to find a good tutorial / writeup / video on how to HW root the aftv, i found very detailed instructions for the Gen 1 aftv but not aftv2.

I do have the required emmc board but i never used it. I bought it for my first FireTV but then it was able to root it via Software so i left it in the drawer :)

If you know a good place that guides a emmc newbie a link would be very nice !

Greetings,

Ender

P.S: a friend has a BRICKED attv2, could i flash a new image via emmc or is emmc only "good" to copy over su binaries ?
[Fire TV General] zeroepoch:
I was never able to figure out where the flash pins were. Although I didn't care too much once I found the uart and a way to use SW to access the flash. It's not really the same as using a flash reader though and much slower than a reader.
[Fire TV General] enderffx:
Hello zerotech, thanks for answering.

Ok, then i guess it will stay bricked :)

About the UART pins: could you point out where thise are for the ATV2 or do you have a link showing it ?

Or even better a link to a tutorial (or is it just the same as ATV2 apart from the pin location) ?

Thanks & Greetings:

Ender
[Fire TV General] zeroepoch:
You can find some info about the UART here: https://xdaforums.com/showpost.php?p=63294247&postcount=505

That's the specific post about the UART, but there is a little more info later in that thread. The same link is also on the first post if you need to find it again, under the background info section.
[Fire TV General] enderffx:
Thanks ! I guess trying to revover the FTV2 is a winter evening project ;)

Ender
[Fire TV General] hunter_bruhh:
Is it possible for someone to use your method of accessing the flash on an unrootable fireTV 2 and hardware root it, similar to what was done on the fireTV 1 by GTVhacker guys?
[Fire TV General] zeroepoch:
I would think so. If you can access the flash as raw bits you could use rbox tools to modify the ext4 filesystem. I'm not sure what that would take and may even require unsoldering stuff to get to those pins. No idea though.
[Fire TV General] hunter_bruhh:
Can you tell me how you accessed the flash? Were you able to access the /system partition? If I could just mount it, I could push su to /system and then install TWRP and all that good jazz.
[Fire TV General] zeroepoch:
I was using commands in the preloader to read/write addresses in the physical memory. At that phase virtual memory equals physical memory or it does at least for the I/O space. I wrote a sort of MMC driver using this memory read/write interface. [MENTION=3991724]rbox[/MENTION] took this idea much further and allows you to mount partitions, including /system, and work with them directly like normal filesystems while it does all the magic UART commands in the background. It used the ext libraries to walk the filesystem. It's very slow though so you don't want to change more than a few MB otherwise it could take a day or more to complete. If you're interested in his tools you can find them here:

https://github.com/androidrbox/mediatek-preloader-tools

He used this method to create a mini root filesystem that boots into his TWRP as an unbrick image. So there are some interesting ways to extended it but with recent firmwares removing the preloader commands needed it's not much use anymore except on older firmware or other mediatek devices.
[Fire TV General] ccf801:
what pisses me off about amazon is their absolute refusal to just leave peoples fire tvs alone.

i mean , they are always patching holes that allow for root access.

this makes me extremely mad. its like they are saying you are not entitled to have full control over your own device. at any time they can block certain softwares , vpn services or anything else they want to change on your device .

ive learned how to hardware unbrick and root , but that still doesnt change the fact that the average owner

of the fire tv box is mostly screwed because amazon locked down any and almost all holes to allow you

to obtain root .

thank god theres hardware unbricking and rom flashing with pre rooted roms.

amazon ,

i hate you .
[Fire TV General] Han-Droid:
that's because THEY THINK, they've sponsored YOUR device giving you a cheap device and granting them a lifetime right to control
[Fire TV General] bubbanc:
Here is the cable I used successfully: http://www.amazon.com/gp/product/B004TXPWV6
[Fire TV General] MDon3:
How to get R/W access to /dev/ttyACM0 ?

Running Ubuntu 15.04 64 bit.

How do I get R/W access to /dev/ttyACM0 ?

Thanks
[Fire TV General] zeroepoch:
The easiest way is to run the handshake and patch scripts with sudo if you don't want to mess with groups.
[Fire TV General] zeroepoch:
I'm curious if anyone has been successful with a Mac? The procedure should work with the adjustments suggested but I haven't gone though the entire 2 hour process myself. I've only tested that reading and writing works.
[Fire TV General] zeroepoch:
That was something I was thinking about lately as well. I've seen people attempt kexec as a module for the Galaxy phones with locked bootloaders. I haven't tried anything myself. It would be awesome if you got that to work.
[Fire TV General] D-an-W:
Hi folks, I have just sold my AFTV1 and replaced it with the AFTV2 and updated that to the required firmware (Thanks zeroepoch for the inspiration to do this!) .

I run El Capitan on a hackintosh so would it be better (Easier :eek:) to try and complete the process in OS X or boot some form of Linux (Ubuntu?) from USB?

Also I need to grab a USB A to A cable, can anyone in the UK that might have bought one that worked for them let me know where it came from?

EDIT: I also meant to ask, could this be done using a Raspberry Pi 2 running some form of Linux?
[Fire TV General] jim16127:
This is the cable I use...

http://www.amazon.com/gp/aw/d/B003VTZ070

This is the one Elias from AFTVNews recckmended a couple months ago.
[Fire TV General] pot_head421:
Do anyone fancy putting this together so it can be used on windows if its even possible? I have no clue on how to use Linux

Thanks in advance
[Fire TV General] MDon3:
Ok, got it. It is running now (also had to use sudo ./patch_mmc.sh 0x00000000058e0000 system.root.img system.diff ). Will report back in 2 hours:fingers-crossed:

Thanks!

-MDon3
[Fire TV General] zeroepoch:
One person mentioned the device wasn't detected on his pi but I see no reason why it shouldn't be possible if you can detect the device.
[Fire TV General] T0m93:
Ok. I Tried i installed Ubuntu inside my VirtualBox (Macbook).

The handshake.py is not working. And im not sure if the VirtualBox can see the USB Device before it is already booted. Any Ideas or impossible?

./handshake.py

Traceback (most recent call last):

File "./handshake.py", line 5, in <module>

import serial

ImportError: No module named 'serial'

Ok New Plan. I will try to install Ubuntu on an USB Stick and Boot it using Refind. I will let you know how it goes :)
[Fire TV General] kibmikey1:
Using my mac, every time I run it, it varies as to how far it gets, but always between 1 and 14 images. Never any more than 14. I've tried 2 different cables now, and it still won't work. I'm at a loss.
[Fire TV General] MDon3:
Running patches as sudo - Success!

Great, root was successfully obtained!

OTA updates disabled with pm disable com.amazon.device.software.ota and pm disable com.amazon.settings.systemupdates

[com.amazon.otaverifier - not found]

Thanks for all your help.

-MDon3
[Fire TV General] mdpauley:
I am working on converting the scripts from python to nodejs with cross OS support. [MENTION=3411776]zeroepoch[/MENTION] is it ok to do this and use the files you're hosting?

Thanks
[Fire TV General] zeroepoch:
Yes! I'm happy to see others utilizing my work. I only have some basic node.js experience but if you have any questions about the process let me know.
[Fire TV General] bubbanc:
sudo apt-get install python3-pip

sudo pip3 install pyserial
[Fire TV General] D-an-W:
Ok thanks, I will try it tonight if I can source a lead today.

For the process to work I assume HDMI also needs connecting to the AFTV2 and am I ok leaving Ethernet disconnected and Wi-Fi not connected?
[Fire TV General] T0m93:
Hey, I wanna try to use a Live Linux USB. So Far Ubuntu 14.04 didnt work. I couldnt install pyserial and pip3. And the Handshake.py always getting an Error (mentioned before).

Any Ideas with Distro is best to try for this process? With a test future? I will try older Ubuntu Versions First. I will let you know if i find a way :)
[Fire TV General] brad_robbo:
using a mac, python is installed,

handshake works and completes, i run ./patch_mmc.sh 0x00000000058e0000 system.root.img system.diff

and it gets to 8th images and then nothing every single time.... all help appreciated

sh-3.2$ sudo ./patch_mmc.sh 0x00000000058e0000 system.root.img system.diff

Patching patch_00000400.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.001970 secs (259923 bytes/sec)

Addr: 0x58e0400

Patching patch_00001000.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.006037 secs (84810 bytes/sec)

Addr: 0x58e1000

Patching patch_00052000.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.005922 secs (86456 bytes/sec)

Addr: 0x5932000

Patching patch_00053000.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.006111 secs (83785 bytes/sec)

Addr: 0x5933000

Patching patch_00053a00.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.001732 secs (295634 bytes/sec)

Addr: 0x5933a00

Patching patch_00059800.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.006047 secs (84670 bytes/sec)

Addr: 0x5939800

Patching patch_0005a200.img...

1024+0 records in

1024+0 records out

1024 bytes transferred in 0.012181 secs (84065 bytes/sec)

Addr: 0x593a200

Addr: 0x593a400

Patching patch_0005e800.img...

512+0 records in

512+0 records out

512 bytes transferred in 0.007175 secs (71359 bytes/sec)

/patch_mmc.sh 0x00000000058e0000 system.root.img system.diff
[Fire TV General] T0m93:
This was mentioned a Couple times before. Many People including me have this Problem and we dont know how to fix it yet.

The Patch is incomplete and just stops. It happend to many Mac Users. If you have the Option try it with Linux (Y).

I think D-an-W wanted to format it from python to something else. Maybe this will help and fix the Issue :)

Good Luck.
[Fire TV General] zeroepoch:
You only need power and USB connected. One patching is complete you will need HDMI to accept the prompt when running su from adb shell.
[Fire TV General] D-an-W:
EDIT: Couldn't get Mac to respond so I thought I would try the Raspberry Pi 2 and it's currently flashing my ATV2.
[Fire TV General] brad_robbo:
well i think I've pickled it, it didn't flash, got stuck on the 8th file over and over.

now it turns on, but now it will connect via adbfire and adb in terminal but will not accept any apks.

think I've done some internal damage, but really don't understand how to flash the original image

any help would be awesome