yashsingh1/xdaforums huggingface dataset:
[Fire TV Android Development] bula1ca:
This may sound stupid but what is the default google ids?

Note: I see my device (adb devices) as "###########0W0P recovery" but can figure out what address to connect to.
[Fire TV Android Development] rbox:
There's nothing to connect to. If it shows up in devices, it's there. Just use adb shell.
[Fire TV Android Development] bula1ca:
Thank you, rbox
[Fire TV Android Development] deanr1977:
So i got the Recovery sorted without any bootloops, but cant get the adb mouse to work so i can wipe & install the prerooted rom? Ive given up for the night but will try again tomorrow when i have a bit more time to spare (i do have the stick connected to the tv & the power lead connected to my laptop).

From what i can tell by re-reading the posts here again i need to have these things to do this is this right? -

1. adb connected before i reboot for the recovery menu

2. make the recovery folder in sd/ named- cache/bootmenu_recovery

3. type- adb shell (when recovery is opened up onscreen?)

4. then type- mouse

5. follow the instructions

6. wipe from recovery

7. install prerooted

8. reboot

9. block updates via adb

I think this is right but im not positive?

Thanks in advance as always
[Fire TV Android Development] ytsejam1138:
You might want to try USBDeview and remove some of the extra drivers and start over. http://www.nirsoft.net/utils/usb_devices_view.html

You could also install the drivers using the SuperTool that was originally developed for the Fire 5th Gen tablet.

http://rootjunkysdl.com/files/?dir=Amazon Fire 5th gen/SuperTool
[Fire TV Android Development] sconnyuk:
Thanks.

Will give these a go.
[Fire TV Android Development] the_chinaman:
I used AFTV tools app on both windows 10 and windows 7 (64 bit) to connect. Worked during the recovery bootmenu too

http://xdaforums.com/showthread.php?t=2736774

[MENTION=6169935]bula1ca[/MENTION], I didn't use an adaptor, just used the laptops USB to power the stick. It warned about low power but still worked.
[Fire TV Android Development] 2WhlWzrd:
When trying to install TWRP Recovery, I'm getting "Permission denied".

shell@montoya:/ $ su
root@montoya:/ # sh /data/media/0/montoya_recovery_v1.zip
Extracting unzip...
Remounting /system read-write...
Extracting...
mv: rename /system/bin/e2fsck to /system/bin/e2fsck.real: Permission denied
ln: /system/bin/e2fsck: Permission denied
Remounting /system read-only...
root@montoya:/ # exit
shell@montoya:/ $ exit

And of course no boot menu on reboot. Any ideas?

Edit: Never mind, I got it sorted out.
[Fire TV Android Development] deanr1977:
Silly question but... are you rooted?

sent from the past using my Zx Spectrum
[Fire TV Android Development] sconnyuk:
Thanks for all you guys help, finally got the correct driver installed and now working.

Can now experiment more :)
[Fire TV Android Development] MetaIIica:
can i successful install gapps to full support Playstore and other Google Apps?

Gesendet von meinem LG-H850 mit Tapatalk
[Fire TV Android Development] InFam0us-1985:
Solved

Hey guys, I've installed the Recovery but cannot access the menu - I only get a black screen where I should be able to install / wipe & all that good stuff, any ideas?

Was following this guide; http://www.aftvnews.com/how-to-inst...d-an-initial-rom-on-a-rooted-fire-tv-stick-1/

Edit;

I had to move my stick into the HDMI port 1 for anything to stay on the screen, pulling it out and putting it back into HDMI 2 worked too but I got bored of doing this. Thank you rBox for all your hardwork!!
[Fire TV Android Development] vjgrace:
Hey all,

A little problem here (actually most likely a big problem for my fire stick), on 5.0.5 & rooted (first time I rooted this stick because of the fix to eliminate Kingroot), installed recovery (followed AFTVnews guide), rebooted and TWRP was definitely installed but I lost adb, nothing, not connected, unable to use mouse whatsoever, and adb shell gives error as device (null), and after selection prompt goes to white amazon logo...thought I would try hdmi-cec on 2 different tv's but of course to no avail...I'm pretty sure it is gone, but was worth it to try...just posting to see if you all have any ideas to try to get adb back.

Thanks for any suggestions.

***Solved***

First off, thanks xenyz for your advice...it did turn out to be a Windows issue.

What I found out may be helpful to others:

1. Initially, I was working in Windows 8.1 Pro(32bit), fully updated, and I was able to install TWRP (and communicated with the fire stick initially--using fire stick drivers), however, when actually re-starting the stick I could not re-establish adb connection with the Fire Stick and the windows device manager indicated it was missing the driver: "AOSP on ARM Emulator"...I have yet to find the driver to rectify this issue with Windows 8.1.

2. I went to Windows 10Pro(32bit), fully updated, on another partition of my hard drive and had no problem establishing an adb connection (after installing the drivers)...however when using the mouse emulator through adb, it would only type the letters, when trying to move the mouse around. I was using a wireless logitech keyboard when using the mouse emulator, I don't have a wired usb keyboard to use with the mouse emulator, to see if somehow that was the issue...I even did remote desktop and tried input with virtual keyboard and it did the same thing...typed characters versus moving the mouse.

3. Interesting enough I went to a Samsung Laptop running windows 10(32bit), established adb, and ran the mouse emulator without an issue whatsoever and was able to successfully wipe all the Kingroot junk on the stick and restore it back to stock with root.

Thanks so much rbox for such great work...and from this experience it looks like Windows was the culprit for the finicky and frustrating behavior.
[Fire TV Android Development] Axecaster:
If on stock v5.0.5, are there any pros or cons to kingo root versus king root, or is it just a toss up at whatever works?
[Fire TV Android Development] xenyz:
If TWRP boot menu is up, it is likely a computer problem and not an adb problem on the device. I'm going to take a guess and call it a Windows OS issue. Maybe these kinds of problems can get their own thread?

If you're planning on using the pre-rooted ROM after formatting data, then no. I've personally had success with Kingo root as seen in the guides on XDA.
[Fire TV Android Development] 2WhlWzrd:
I'm having similar problems. Can't seem to connect thru usb until after the boot menu expires and then it's to late. Windows trys to install device drivers for "MTP on USB" but complains that the device is unplugged.

Any help from anyone who has had success would be greatly appreciated.

Can you post a link to the drivers you used? I am using the same O.S.
[Fire TV Android Development] InfinityFire!:
I wish there was a way to root. Just checked and my Fire Tv Stick 1 version is 5.2.1.1 so its not rootable. Hopefully a root exploit will come out soon for 5.2.1.1.
[Fire TV Android Development] UyEaH:
Sorry just realized thats for ftv2 http://www.aftvnews.com/fire-tv-2-w...-1-and-older-can-now-be-rooted-with-kingroot/
[Fire TV Android Development] jxjhheric:
just change another usb cable
[Fire TV Android Development] sconnyuk:
I ended up using the adb installer found in a link in this guide :

http://www.aftvnews.com/how-to-setup-adb-and-fastboot-on-a-mac-or-windows-computer/

and the driver for the fire stick is found in the driver folder after extracting RootJunkies Supertool :

http://rootjunkysdl.com/files/?dir=Amazon Fire 5th gen/SuperTool

Hope this helps.
[Fire TV Android Development] peter73:
If i run the zip file i get an error:

Extracting unzip...

unknown operand msgfmt

Unable to open /data/local/tmp/unzip: No such file or directory

Remounting /system read-write...

Extracting...

/data/media/0/montoya_recovery_v1.zip[31]: /data/local/tmp/unzip: not found

failed on '/system/bin/e2fsck' - No such file or directory

link failed No such file or directory

Remounting /system read-only...

Anybody else with this problem?
[Fire TV Android Development] jim16127:
Would you upload that program? The links on xda have been removed and the topic has been closed! So no one can even request a link from that thread! Please and thank you.

Well for me…I’m stuck at White Amazon Splash Screen! Boots to rbox boot menu, waits the 15 seconds then selects boot normally and ends on White Amazon Splash Screen. I cannot find the device via adb when waiting those 15 seconds.
[MENTION=3991724]rbox[/MENTION] Does the builtin adb on the FireTV matter when at the recovery menu? Doesn't the recovery menu have its own adb coded into it?
[Fire TV Android Development] 2WhlWzrd:
If you watch in the device manager during boot you will see "AOSP on ARM Emulator" appears during the recovery selection window, then disappears when the timer runs out.

And when you check the hardware id you will see it is:

USB\VID_18D1&PID_D002
USB\VID_18D1&PID_D002&REV_0231

and when check the hardware id of the Android device after the recovery window you will see it is:

USB\VID_1949&PID_0022
USB\VID_1949&PID_0022&MI_01

which is the Fire TV Stick.

So apparently, in some cases it may require a different driver to interact with the mouse emulator.

I'm still searching myself, I've found one for single adb interface and it only allowed me to bring up the mouse emulator. But I could not navigate.

So I'll keep looking for the composite one.
[Fire TV Android Development] sconnyuk:
I was getting this exact same issue myself, (windows 7 64)

I ended up trying a bunch of different drivers for AFTM and none worked, i still had AOSP ARM emulator.

Then i tried what someone suggested and install the driver from the Rootjunkies Super tool usb folder.

That seemed to have sorted it. in device manager it shows as a regular Android device.
[Fire TV Android Development] the_chinaman:
No problem - here you go

http://www.mediafire.com/file/afa9wv5cfyv526i/AmazonFire_TV_Utility.rar
[Fire TV Android Development] 2WhlWzrd:
I got tired of chasing my tail this morning and decided to give this a go on Ubuntu that I have set up on another partition on the same laptop I was trying to do this with anyway.

I had already installed Jocala's adblink but still needed to create and edit the android.rules file, it was when I was adding the vendor id's to the file that I realized why the the drivers you pointed to work for some people. Those are Google drivers, version 11, the same drivers that everyone was using with a modified inf file when it was first discovered that the power port on the Fire TV Stick was actually a mini usb port.

Before the official Fire Device drivers where released by Amazon. Google's vendor id is 18d1 the same id the AOSP on ARM Emulator is giving. So I added that and Amazon's vendor id to the android.rules file.

Then I started adblink and plugged the power cable into the usb port, "Refresh ADB" on adblink console to see "recovery" in the "Status" window and waited for recovery selection screen, hit "ADB Shell" and had "shell@montoya", typed "mouse", enter and navigated through the rest of the process without any trouble. I don't know why I didn't do this before when I first thought of it, instead of banging my head with windows.

I guess I just like the challange. I haven't looked but now that we know it is a Google driver that is needed it is only a matter of discovering what product id "D002" represents, a phone or tablet, I suspect.

If I find it I will post back here so that anyone having trouble in windows can use it.
[Fire TV Android Development] sconnyuk:
Good work
[Fire TV Android Development] cr821cr:
I am getting the same error how did you fix it?

thanks
[Fire TV Android Development] MetaIIica:
I have found a solution to install drivers in Windows 7 after install TWRP[/B]

1. Install Drivers from here: http://xdaforums.com/showpost.php?p=70206635&postcount=41 and setup normal booted Stick that shown in Device Manager

2. open in C:\Program Files/Amazon.com/Fire_Devices/Drivers the file android_winusb.inf with notepad

3. add under ;FireTV Stick 1st gen following lines:

;FireTV Recovery
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_D002
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_D002&MI_01

and save the file or download attached zip and replace the file

3. go to device Manager, select Device and install the driver again in manually mode (use select list of Devices) and use path C:\Program Files/Amazon.com/Fire_Devices/Drivers to install the driver

4. after that, reboot PC

5. Reboot your stick and check when Boot menu run in your Device manager you have in Fire Devices the device Android ADB Interface without issue

6. then start cmd and do what in startpost to use TWRP
[Fire TV Android Development] 2WhlWzrd:
I used sonnyuks' method here. And did a psuedo upgrade (5.0.5 --> 5.0.5). The problem is apparently a corrupt file causing the permissions to misbehave, but once overwritten everything is again normal.

Be aware you will lose root, but the su binaries are still present on the system. So it's just a matter of rerunning the root program again. For me Kingroot 4.1, which said root failed, until I opened Kinguser.

Then it said root successful and I verified with a command window, and be sure to re-block updates.

Now you should be back at square 1, just rerun the TWRP recovery install.
[Fire TV Android Development] cr821cr:
Thanks that worked great!
[Fire TV Android Development] jim16127:
Would you make the file public? I am not able to download it. Says its been marked as private by owner? Thanks for the upload btw.
[Fire TV Android Development] 2WhlWzrd:
You can also use Jocala's "adbLink".
[Fire TV Android Development] the_chinaman:
Try it again, it should work now.
[Fire TV Android Development] _bfritz:
TWRP with 54.1.1.0_user_110041020 (OS3)?

I have a montoya device running 54.1.1.0_user_110041020 rooted using dirtycow[1]. Any recommendations for the best way to install TWRP?

I tried montoya_recovery_v1.zip without luck so far. sh montoya_recovery_v1.zip failed because dd in that ROM does not support msgfmt. So I extracted unzip on a Linux box and manually installed it to /data/local/tmp/unzip.

After that ran:

/data/local/tmp/unzip -od /system/recovery /data/media/0/montoya_recovery_v1.zip
mv /system/bin/e2fsck /system/bin/e2fsck.real
ln -sf ../recovery/2ndinitstub /system/bin/e2fsck

Resulting in:

root@android:/ # ls -l /system/recovery/
-rwxr-xr-x root root 121204 2016-12-18 16:49 2ndinit
-rwxr-xr-x root root 9488 2016-12-18 16:49 2ndinitstub
-rw-rw-r-- root root 2410171 2016-12-18 16:26 ramdisk-recovery.cpio.lzma

root@android:/ # ls -l /system/bin/e2fsck*
lrwxrwxrwx root root 2017-01-01 20:34 e2fsck -> ../recovery/2ndinitstub
-rwxr-xr-x root shell 122532 2015-04-02 19:10 e2fsck.real

There's no sign of TWRP after a reboot. My best guess 2ndinit.c needs to be tweaked work with for OS3. I tried with a build where selinux_permissive(); was commented out, but still no sign of TWRP on reboot.

End goal is to get TWRP working and a recent pre-rooted ROM installed. Any advice for debugging 2ndinit? Suggestions for a better path forward?

Thanks for any help and big thanks to [MENTION=3991724]rbox[/MENTION] for the time he's donated to the Fire TV community.

[1] https://github.com/dirtycow/dirtycow.github.io/blob/master/pokemon.c
[Fire TV Android Development] rbox:
The method used within 2ndinit and the binaries themselves are compiled for OS5. In theory, flashing an OS5 kernel to the boot partition should allow it to boot in to TWRP... then again, it might wind up bricking as well.

You might also try removing the line APP_PLATFORM in Application.mk when compiling.
[Fire TV Android Development] t_house:
This whole stupid mouse emulator through adb has me wanting to eat a bullet right now. I have been trying to deal with making it work for about 20 hours now. I am so over it. Can't I just flast a pre rooted rom through Flashfire?
[Fire TV Android Development] llazarl:
unknown operand msgfmt

getting this on FireTV1 rooted on 51.1.4.1. Any idea how to fix ?

s1|root@android:/ # sh /data/media/0/montoya_recovery_v1.zip

sh /data/media/0/montoya_recovery_v1.zip

Extracting unzip...

unknown operand msgfmt

Unable to open /data/local/tmp/unzip: No such file or directory

Remounting /system read-write...

Extracting...

/data/media/0/montoya_recovery_v1.zip[31]: /data/local/tmp/unzip: not found

failed on '/system/bin/e2fsck' - No such file or directory

link failed No such file or directory

Remounting /system read-only.
[Fire TV Android Development] Metconnect2000:
are you using this recovery on fire TV? This one is for fire stick. U should look for the One for fire TV in the Forum..
[Fire TV Android Development] deanr1977:
I couldnt get it working first.... then i changed a cable & it worked first time, so that could be a solution to your problem?

sent from the past using my Zx Spectrum
[Fire TV Android Development] _bfritz:
The immediate problem was OS3 calls e2fsck with `/dev/block/platform/sdhci.1/by-name/persist` (rather than `**/userdata`) so `2ndinit` was never called.

Fixed that but, naively, did not give myself a bypass mechanism. Now stuck at the white amazon logo.

I have a general sense for how 2ndinit works, but many of the details are still cloudy. Going to study it a bit and come back if I have concrete questions.

Would be really nice to watch console during boot. Anyone know if there is UART exposed on the board? Did some poking with a multimeter and FTDI but came up empty. Noticed there's a Broadcom 0a5c:e720 USB device enumerated on boot too, but not finding any details about it online.

Tried to wire up the eMMC with the exploitee.rs adapter, but my soldering...or at least my patience...isn't good enough yet.

Not particularly worried about a bricked stick, but it would be nice to regain access so I can continue to experiment.
[Fire TV Android Development] UyEaH:
Try to re-run kingoroot or kingroot (forget which one worked for me) ,from your pc to it. I was stuck at amazon logo ....got me out of it ..... Might not work for you since your stuck at white logo screen :(
[Fire TV Android Development] Hatman41:
I am going to be buying one of these today. My question is where do you get the pre-rooted ROM? I cannot seem to find it on the forum.
[Fire TV Android Development] king200:
Reat the Original Post, OP. You have to be rooted before you can install TWRP. If you get a new Firestick, it is either already updated to v5.1.1.1. If root and recovery are important to you be careful buying. Buy from somewhere where you can return without problem.

On first boot, if you connect to lower voltage/amp usb power supply, I understand that the stick doesn't update. Use a PC USB port. Then, you can check the software version. If it's a go, put the stick and read carefully here. There are a bunch of details to check. When you have it all down, you can attach the stick PC->Stick-TV. It's 15 minutes of effort doing the deed when you actually TWRP and install the rom.zip. When it's all done, you'll have a challenging Android device. But, you'll have lots of fun hanging around in this forum!
[Fire TV Android Development] Hatman41:
I did read the OP and there is no mention of where to get the ROM's. I do know that you have to have it rooted first. I also looked through this forum for the ROMs but am not able to locate them. Unless they do not say Fire Stick ROM.
[Fire TV Android Development] ldeveraux:
God, the semantics...

https://xdaforums.com/showthread.php?t=3521806
[Fire TV Android Development] king200:
FireTV Stick (montoya) TWRP Recovery by rbox https://xdaforums.com/fire-tv/development/firetv-stick-montoya-twrp-recovery-t3521805

FireTV Stick (montoya) Prerooted Stock Images [5.2.1.1_r1] https://xdaforums.com/fire-tv/development/firetv-stick-sloane-prerooted-stock-t3521806
[Fire TV Android Development] Hatman41:
Thanks much. I looked but did not see the post.
[Fire TV Android Development] jj^2:
Ok, I still trying get aftm to register before boot up. I tried desktop, laptop, new cable, Amazon drivers, drivers from this thread and still nothing. Going on night 3 :(

Has anybody used any other drivers and they worked???
[Fire TV Android Development] MetaIIica:
Use this driver i attached. Its for Win7 and is modifyed to use with Recovery and normal. Working fine for me. Download, extract, and replace the Files exact with path used in C:\Program Files\Amazon.com then install Driver again and reboot PC

see here: https://xdaforums.com/showpost.php?p=70248636&postcount=50 here in detail what i have done
[Fire TV Android Development] jj^2:
Thanks, I followed directions...plugged in and uninstalled driver, and then remove and let reinstall "new" drivers and does not show up until Amazon logo on TV. Anything else??? (:

OK, tried 3 PC...installed 15s adb-fastboot, setup amazon.com directory expanded Metallica zip files. Did not load drivers, manually told where amazon.com drivers were. Loaded drivers and showed Fire device-adb interface.

Unplugged, plug into tv, then PC and nothing until Amazon logo.... Looking for some guidance....

jj^2
[Fire TV Android Development] jj^2:
Please post if someone gets another way to get windows drivers to work.

I broke down and borrowed Mac, and unfortunately it worked the first time....(:

jj^2
[Fire TV Android Development] odienez11:
Have this working but can't find a non root rom or a way to disable supersu. Even a gui for supersu would probably work but I can't find a way to do that need to unroot with twrp still installed so I can go back to root if I so choose

---------- Post added at 01:12 PM ---------- Previous post was at 01:09 PM ----------

BTW thanks so much rbox for custom recovery on the stick
[Fire TV Android Development] king200:
Look here:

https://xdaforums.com/showpost.php?p=70407872&postcount=46

https://xdaforums.com/showpost.php?p=70523192&postcount=48
[Fire TV Android Development] odienez11:
I found that I was hoping the diable root in supersu would allow me to play uverse but still detected even with full unroot through supersu. I think it might see either the supersu app that I can't delete because I lost root or custom recovery which I assume works kind of like safestrap since we don't have bootloader unlock.

---------- Post added at 02:38 PM ---------- Previous post was at 02:37 PM ----------

Is there no way to fully unroot the rom itself and leave twrp
[Fire TV Android Development] rbox:
In theory, you can delete the su directory from the update zip before flashing it. But I make no guarantees on anything if you modify the zip. It should be fine though.
[Fire TV Android Development] MetaIIica:
has anyone test Backup and restore? Does it work?

send and wrote with stickyfingers from my unholy and horny LG H850
[Fire TV Android Development] sconnyuk:
Works fine. I even restored the data from 1 stick to another.

Obviously nothing but the data.

But yes the backup and restore features work fine.
[Fire TV Android Development] MetaIIica:
good to hear, thank you

send and wrote with stickyfingers from my unholy and horny LG H850
[Fire TV Android Development] Ludacrisvp:
does hiding the SU binary with 'Hide my root' work for you? it bypasses the detection that DirecTV Now has for root.
[Fire TV Android Development] 82ross:
Hi all. I have TWRP installed and booting into recovery (using the cache file method) When I log in using adb shell my user in the command prompt is unusual. Like "~ # [some more symbols] 6n" I can access the file system of the stick still and launch mouse. But mouse then doesn't work as expected so I can't control TWRP.

Using win10 x64 tried a couple of different drivers and cables. On hold now till I get home later.

Anything obvious I'm brain farting on?

Cheers
[Fire TV Android Development] 2WhlWzrd:
Wrong drivers. Try these. You will probably have to manually install them, unless you modify the .inf file.

But they seem to be the ones that most people are having the best luck with.
[Fire TV Android Development] BagiMT:
I had the same issue on Win 10 64bit. For the mouse try pressing the letter and then ENTER, that worked for me. I never got the drivers to work since they are not signed and Win 10 is more protective.