yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] tune345:
u tried to reinstall the stock rom ? was the firestick authorized to PC via usb cable before this ?
[Fire TV Original Android Development] Donphillipe:
Do I install the stock rom via the Install button of TWRP or via the other "sideload" methods which I don't understand how to accomplish? No matter what I try to accomplish I get that failed to mount /vendor error.

I originally used the factory supplied USB cable attached to a PC running the Linux ISO from USB stick. Used foil to unlock via a Linux ISO booted to laptop. Everything went well, TWRP came up and with the PC attached, I could not interrupt the boot sequence with the PC attached to send any adb commands. I detached the laptop and attached an OTG to USB hub now with mouse and keyboard. This is how I run my setup all the time with the OTG permanently in place using a wireless mini keyboard and mouse pad on it when I need to key in anything on the screen instead of using the "hunt and poke" on-screen keyboard. I only used the PC for the initial "exploit".

---------- Post added at 10:35 PM ---------- Previous post was at 10:23 PM ----------

I am trying to understand what "pushing the zip" and using the sideload option is. First I can't boot the system because it is in a severe error state, second I cannot stop the TWRP timeout without an OTG and mouse attached which means I can't I have a PC attached and the third option means I have only a mouse and keyboard attached at the enabled TWRP menu only. At the TWRP menu I don't understand how with only the TWRP screen that I can load a stock rom via "push zip" or "sideload".
[Fire TV Original Android Development] Donphillipe:
How/where do you enter adb commands after exploit

At what point should I be able to communicate with the rooted firestick via ADB with my PC? The Linux ISO has already been used to exploit and the stick is running OK but how do I issue ADB commands to it now?

Anyone have experience with Windows 7 driver that "speak" to it?

The more detailed the explanation, the better for me, thanks.
[Fire TV Original Android Development] dcarvil:
I can't help you with Windows drivers, but you should be able to connect to the firestick with ADB over WiFi/Ethernet by entering "adb connect IP-address-of-firestick" whenever the firestick is powered up (and you have ADB debugging on). You can get the IP address of the firestick from settings, network. The firestick does not need to be plugged into the PC USB port.

You can do this with the Linux ISO you used to root the stick if you can't get it working from Windows. You can read up on ADB at https://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/ and many other places.
[Fire TV Original Android Development] Donphillipe:
Thanks, I had everything I needed and didn't know it. I already had the Google development Windows drivers and ADB executable for Windows from another development kit. All I did open a Windows command prompt on my adb.exe directory and enter the IP address of my firestick in place of this IP address and a permission pop-up flew up on my TV asking if I would approve the connection.

adb connect <ip_address>:5555

All is swell now!

Examples from http://www.aftvnews.com/how-to-remotely-control-an-amazon-fire-tv-or-fire-tv-stick-via-adb/

To test the connection with Windows ADB command window (standard command prompt with the default directory as your system's ADB directory, in this example for me c:\adb>

UP
adb shell input keyevent 19
DOWN
adb shell input keyevent 20
LEFT
adb shell input keyevent 21
RIGHT
adb shell input keyevent 22
ENTER
adb shell input keyevent 66

******* Now we can even translate the Linux example several posts back to Windows:

Windows command prompt
c:\adb>
c:\adb>adb connect 192.168.1.104:5555 (assuming IP address of AFS is 192.168.1.104)
(respond OK to connect on the AFT remote control seen on TV screen)
c:\adb>adb devices
(you should see the IP connection such as
List of devices attached
192.168.1.104:5555 device)
c:\adb>adb shell pm list package
(list of about 2 pages of package names
c:\adb>adb uninstall (FOR EXAMPLE: com.google.android.gms)
[Fire TV Original Android Development] Michajin:
I don't believe wireless ADB is available in TWRP. If you use a OTG you can connect through adb and post #2 gives some directions with a link. Personally i use a OTG hub and a flash drive (for files to flash) and a mouse (for control) in TWRP. There are tools to help with sideloading and ADB install that make ADB work a little easier in FireOS. For installing and file management i use adbLink. With this you can save you IP connections for easy connections from windows. The tool also helps with rebooting too. You can install a app for rebooting (i use TVBoot) to boot into recovery from FireOS. I am not promoting this app, i just find it very useful for sideloading and IP connections. Sounds like you have in under control, but i thought i would through this out here to see if it helps at all..

https://xdaforums.com/fire-tv/themes-apps/adblink-v2-04-t3389826
[Fire TV Original Android Development] shaheen7m:
Hi, Is there any way to increase the RAM capacity with any external storage? Atleast like a virtual memory? My kodi is buffering a lot even with premium debrids with having only a 65 MB cache space.
[Fire TV Original Android Development] rstrelow:
Hello even I did procedure with success my stick still looping in first screen !! The only thing I can do is access internal memory. I'm thinking erase something or all to see my stick not stay more looping. any idea?

there is a standard image for intenal memory files that I can use ?

Is possible format not usefull files ?
[Fire TV Original Android Development] Donphillipe:
Are you sure that one of your connections for the OTG is not supplying too little current to the stick. Will it boot if connected directly to the power supply and cable that was supplied with it?

If you can't resolve the problem, can you still access the the TWRP menu and at that point, first load in the factory restore ROM zip file under TWRP Install option that has been mentioned here (with link) and then later you will be back to an unaltered stick at which point you need to start the procedure all over again. Unless you installed something that you should not have, not read and followed the ordered procedure or if you did in the wrong order, the looping seen is a more frequent result of an improper power configuration where there is not enough power getting to the stick I had to change my own "hacked together" power solution as I was injecting power into one of the ports of the USB hub. I plugged a USB volt meter in and it was reading 4.2V when it was looping. I found a USB-A type male to female connector, spliced in to the black/red the 5V adapter there and inserted this spliced USB extension in line with the hub's male pigtail (previously plugged into OTG) and that got the full 5V to the stick.
[Fire TV Original Android Development] rstrelow:
Stick issue

Hello Donfellipe.

First thank for your support but I dont have problem with power supply even the stick was worked well in same setup.And I tested with good power supplies. Probably issue happened when I tried to install google play store files .When I did the procedure i was happy because all steps works with confirmation in my console but for my surprise when I tested the issue stay there. The Amazon logo appers and in few second stick reset and stay in this looping. In my understand after this procedure I will have a new image installed without my custom app instalation but not.Maybe I need change for other iso file that clean complete ? I dont understand when you say about to follow procedure I followed.there is any different command to execute to have a factory reset ?
[Fire TV Original Android Development] DarkH2O:
Can you use the "Restore to Factory" setting in the menu still? I'm not trying to get rid of the unlock and root, I just a few home screen and reboot issues that an earlier Firestick4k that I also unlocked doesn't have.
[Fire TV Original Android Development] Michajin:
installing google play services is known to cause a boot loop on amazon firetv devices. Did you follow any of the threads to install play services? Did you make a back up? Always make a back up before installing anything. You need to get back into TWRP and remove the play apps. You will find the play store is very limited and there are many alternative app stores that have more options. Do you have a OTG? An OTG is highly recommended for emergency purposes. You can install the latest factory image (it is in the threads). Let me know if you need help...

---------- Post added at 07:30 AM ---------- Previous post was at 07:25 AM ----------

Yes, the unit will still be unlocked, although you may have to flash magisk again. You can also to a factory reset from TWRP.
[Fire TV Original Android Development] DarkH2O:
So there wont be any activation issues after the reset doing it either way?
[Fire TV Original Android Development] Michajin:
I didn't have any issues. I just had to the the registration process again. As long as the device isn't black listed and you have a amazon login, it will be fine. There is a work around for that i saw recently someone was making instructions. I just logged back into amazon with mine.
[Fire TV Original Android Development] rstrelow:
How make a factory reset

Hello .I didnt have backup I just want make a factory reset to return like a new one.

I followed procedure until

./fastboot-step.sh

and realise after this comand I can send by console some adb comands without need otg cable .like

adb uninstall com.google.android.gms

adb uninstall com.google.android.gsf

adb uninstall com.google.android.gsf.login

but the tool did not find this files to uninstall

I can see all files inside my fire 4k but I dont know which one I need delete .

there is any adb command for factory Reset like I listed above ?
[Fire TV Original Android Development] dcarvil:
If you are in TWRP, the default Wipe option (data, cache, dalvik) is basically a factory reset. This will remove all user installed apps and data, so make sure you really want to do this.

"adb help" will display all adb commands. There is no adb factory reset command. Does "adb devices" show your device? If it does not, adb commands will not work. What does "adb shell pm list packages -f | grep google" show? grep is a Unix command, so if you are on Windows, you will have to run it from the firestick as follows:

adb shell

pm list packages -f | grep google

exit

If this command does not display anything, what are the google files you see, including the path?
[Fire TV Original Android Development] rstrelow:
/sbin/sh: pm:not found

Does "adb devices" show your device?

yes I see.

my stick still in looping. there is other procedure to try?

Another image to use?

I don't mind losing the installed apps I would just like to leave my device working.
[Fire TV Original Android Development] dcarvil:
You didn't answer this question: If this command does not display anything, what are the google files you see, including the path? If you answer this question, we might be able to delete the files.

If pm is not found, you have serious issues, and a factory reset is not likely to solve your problems. You probably need to flash a factory image and start over.

If you are really sure you want to do a factory reset, and if you are in TWRP (I can't tell from the info you have given) the following should do a factory reset. I have no idea if it will leave you with a working device.

adb shell twrp wipe cache

adb shell twrp wipe dalvik

adb shell twrp wipe data

adb reboot

Again, I have no idea if it will leave you with a working device.
[Fire TV Original Android Development] rstrelow:
works

Thanks very much now is working .I almost lost my hopes but now I can use again my fire stick.
[Fire TV Original Android Development] dcarvil:
Glad it worked. Now that you have it working, do a twrp backup of the system image, vendor image, data, and boot partitions so you can use them to restore. Take a fresh backup before you attempt anything major, like installing play store.

---------- Post added at 01:56 AM ---------- Previous post was at 01:47 AM ----------

There is an easier way to start TWRP than this: "adb reboot recovery"
[Fire TV Original Android Development] Michajin:
There is also tvboot app (or any root reboot app) or booting with a OTG for recovery... an OTG means you don't have to worry about a bootloop. adb reboot recovery is nice, but not always accessible in a bootloop...
[Fire TV Original Android Development] youngerpro:
i am attempting the boot rom step and having no luck

ive tired shorting all 3 suggested points, ive also tried 2 different laptops

im using fireiso bootable + firestick has a sandisk chip

[root@sysresccd /firestick4k/kamakiri]# ./bootrom-step.sh
[2020-04-25 20:08:26.119070] Waiting for bootrom
[2020-04-25 20:08:40.014331] Found port = /dev/ttyACM0
[2020-04-25 20:08:40.041032] Handshake
[2020-04-25 20:08:40.062394] Disable watchdog
Traceback (most recent call last):
File "main.py", line 119, in <module>
main(dev)
File "main.py", line 24, in main
load_payload(dev)
File "/firestick4k/kamakiri/modules/load_payload.py", line 47, in load_payload
dev.write32(0x10007000, 0x22000000)
File "/firestick4k/kamakiri/modules/common.py", line 147, in write32
self.check(self.dev.read(2), b'\x00\x01') # arg check
File "/firestick4k/kamakiri/modules/common.py", line 84, in check
raise RuntimeError("ERROR: Serial protocol mismatch, expected {} got {}".format(gold.hex(), test.hex()))
RuntimeError: ERROR: Serial protocol mismatch, expected 0001 got 0000
[Fire TV Original Android Development] Michajin:
Do a lsusb and see what linux sees (should be phone). When you short the clk are you holding the short while plugging it in? Also, it is good to use aluminum foil to minimize risk of damage. The shorting point is little under the chassis. I have to do it a few times to get a good short on the right point. If you see preloader, then it didn't short correctly.
[Fire TV Original Android Development] Cagnulein:
Is there a way to bypass the installation wizard on the very first startup?
[Fire TV Original Android Development] 0815hoffi:
Try this.

https://xdaforums.com/showpost.php?p=82336891&postcount=185

Look at common/service.sh SKIP AUTH + UPDATE HACK after RESET section and uncomment it =)

Please report back
[Fire TV Original Android Development] Haze028:
Same error....

I am getting the same error and unable to apply root/TWRP....... I just bought my firestick.... I've tried dat0 and clk for shorting.. holding while connecting device. Same error each time... What am I doing wrong?

Noticed after updating I'm on fire is version 7.2.7.1..... could the new update/version be the issue?

Any help is much appreciated, can't stand the random flip back to Amazon launcher from Kodi using hijack launcher.... NEED to just remove Amazon launcher all together.

Able(willing to provide any informqtion needed to get this thing rooted.

---------- Post added 27-04-2020 at 12:30 AM ---------- Previous post was 26-04-2020 at 11:32 PM ----------
[Fire TV Original Android Development] Cagnulein:
argh i've already register it, thank you anyway!
[Fire TV Original Android Development] Selturk:
I was able to complete almost every step but last step after running command ./fastboot-step.sh it said faild to write on the third line after okay, okay.

I am able to boot into twrp and also tried adb commands but I get no permission error. Su and sudo not working. Does anyone know how to fix this?
[Fire TV Original Android Development] Donphillipe:
Are you booting the machine that does the exploit, booted up from the named ISO burned to USB flash and do run these scripts from the terminal in the assigned directory? I don't think you can run adb commands from twrp or at least I can't find anyone who has explained how it can be done. Su won't work until it is rooted with Magisk, if it will work from TWRP at all. I'd try to find a PC that will boot the ISO from a thumb flash, short and start all over. You might since you are in TWRP go ahead and restore to factory image via Install of the zip factory image, then short the pin with the laptop booted to the linux ISO and a fresh start.
[Fire TV Original Android Development] Selturk:
Thanks for your reply. I did everything from my pc. Exactly same in the instructions. Booted with usb and connected firestick to my pc.

Looks like I have to root it now with Magisk to have write permissions.
[Fire TV Original Android Development] Selturk:
I'm stuck on firetv boot logo now with black screen. I don't even see it listed when I run adb devices.
[Fire TV Original Android Development] Donphillipe:
General consensus is to start from scratch with the procedure.
[Fire TV Original Android Development] Michajin:
Run lsusb, bootrom and preloader do not show up under ADB....
[Fire TV Original Android Development] Selturk:
Thanks guys. I decided to do it from scratch and followed instructions on here:

https://blog.djjproject.com/m/631

Seems to be working fine now.
[Fire TV Original Android Development] david0495:
Does this work with the Basic edition?
[Fire TV Original Android Development] dictorclef:
No.
[Fire TV Original Android Development] david0495:
Is there any solution for the Basic Edition though?
[Fire TV Original Android Development] Donphillipe:
Basic edition of what?
[Fire TV Original Android Development] Sus_i:
The fireTV Stick basic edition is basically a 'tank' aka fire TV Stick second gen.

If you're unsure about the stick generation, watch out whether adb shell prompts 'tank' or 'mantis'

Click here for the xda 'tank' unlock / root thread.
[Fire TV Original Android Development] xDSnAkE:
Banned Fire TV 4k stick

I have a question, I recently bought a fire tv 4k (ebay) unfortunately it is apparently banned from Amazon.

Is it possible to get around the lock?

Quote:

Unable to update Fire TV 4k.

So unfortunately I do not come to the surface to start Magisk etc.

TWRP and install Magisk and was confirmed.

But i don't come to the surface

PLEASE help me :)
[Fire TV Original Android Development] 0815hoffi:
You can try to delete /system/priv-app/com.amazon.tv.oobe in twrp , but then you need to pair your remote over TV/CEC.
[Fire TV Original Android Development] tommyd2k:
My firestick 4k is stuck on the boot screen

in the bottom left corner it says

=> HACKED FASTBOOT mode (0) - xyz, k4y0z

I hooked up a powered OTG mouse and still nothing

Not recognized by adb

When I did the exploit all seemed to go normal.

Any ideas what steps to take now??
[Fire TV Original Android Development] Sus_i:
Did you missed somehow the step from OP that runs: 'sudo ./fastboot-step.sh ?
[Fire TV Original Android Development] redglory:
Well... I've knocked out the cap marked with CMD? and it still boots fine...

This things are so tiny that you must be very careful

Does anyone think it's possible to root even though this cap is gone?
[Fire TV Original Android Development] 0815hoffi:
Yes you can.

I have also lost this cap ;)
[Fire TV Original Android Development] Donphillipe:
I had to roll up a piece of foil with a diameter slightly larger than a wood pencil lead, then make a tip on the end and bend it down like a phonograph needle, then wedge the body of that roll between the shield and the IC chip as I slid that phonograph-like needle across the top of the PC board and stopped where I estimated the correct pin was located. Then I had to keep moving it around until the script would run on the PC, indicating it had been shorted. It's not as simple as some who have shared youtube videos proclaim, where they just cram some foil gum wrapper into that small hole and show you how it instantly works. You've got to have a bright light and a little smarts about yourself to get the thing on the right pin. It also requires when using the foil that you keep enough downward bend or downward spring on the tip of the foil so that when the foil is sandwiched into the crevice, the phonograph needle end of the foil is still dragging on the PC board after it has been crushed from wedging between the shield and IC.
[Fire TV Original Android Development] tsynik:
Hi! Can you point me to proper way to unbrick Fire TV 4K. For some weird reason it stale on black logo screen. I can unlock it again and boot to TWRP, but it can't mount /sdcard nor system, and partitions table looks like this now.

cat /proc/partitions:
179 0 7634944 mmcblk0
179 96 4096 mmcblk0rpmb
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0
~ #

so it looks like table is lost
[Fire TV Original Android Development] k4y0z:
If partition table was lost it wouldn't even boot to TWRP.

What does the GPT output from bootrom-step.sh look like?

did you try reinstalling a ROM?
[Fire TV Original Android Development] tsynik:
That was the point to reinstall rom. But after pin-short, reunlock and booting into twrp there was no Internal Storage for mantis in Explorer and it wasn't possible to store ROM to device (/sdcard) to reflash. I'll post bootrom-step process later. In attach what it have for mount and partitions from command line. I'll try to get full emmcblk0 dump from another device and adb push mmcblk0 /dev/block/mmcblk0 in hope it helps ;)
[Fire TV Original Android Development] k4y0z:
Did you try formatting Data?
[Fire TV Original Android Development] tsynik:
Yes, in all possible ways without otg as i thought the problem was only there:

twrp wipe data

twrp wipe /data

recovery --wipe_data

...

after last command I need to short-pin again to load and access twrp.

but, it looks like not only data missing.
[Fire TV Original Android Development] tsynik:
Here is GPT output from bootrom-step.sh
[Fire TV Original Android Development] Sus_i:
Maybe forget about TWRP and try to flash the images manually with hacked fastboot, i.e. system & vendor...
[Fire TV Original Android Development] k4y0z:
try

twrp wipe userdata

Output looks good I'd say.

if you still have issues, you can reflash gpt.

Extract to same directory as kamakiri and run

./gpt-fix.sh
[Fire TV Original Android Development] redglory:
I've retried several times with same result...

I also have sandisk. Perhaps this model only works shorting DAT0 to GND?

lsusb detects it as "MediaTek Inc. MT65xx Preloader"

EDIT: After noticing both my CMD and CLK are gone, my last resort was to use the DAT0 test point.

Had to removed the top shield corner and after like 20 attempts the freakin' "If you have a short attached..." message showed and process went smooth.

Flashed Magisk with TWRP and back to the system :)
[Fire TV Original Android Development] tsynik:
Can't find attach ;)
[Fire TV Original Android Development] k4y0z:
Oops, sorry about that, added it now!
[Fire TV Original Android Development] tsynik:
Mucho gracias! It did the trick! twrp wipe userdata gives error. fastboot erase userdata and fastboot format userdata have success. But there was no partitions in cat /proc/partitions untill I applied gpt-fix. After that I saw all p1.p13 there, flashed stock fw from /tmp and erase and format again userdata from fastboot. And stick is alive!

p.s. Does that gpt-mantis.bin universal? I mean we have 2 different-sized eMMC in Fire TV Stick 4K - SEC/Hynix is 7634944 bytes and SanDisk is 7636800 bytes (but only userdata partition differs).