yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] k4y0z:
Glad to hear that worked, it's a bit weird TWRP was still booting up with broken GPT.

Your sizes can't be correct, that would be only about 7 MiB.

To be honest I haven't compared the GPTs for differend EMMCs but AFAIK the size of the last partition will be corrected if it is too large.

The GPT I sent is from a device with Sandisk EMMC and looks like this:

Sector size (logical): 512 bytes
Disk identifier (GUID): DCFE9EE4-8643-429D-B568-3B1205C3F9A1
Partition table holds up to 128 entries
This partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 15273566
Other partition table is at sector 15273599

Number Start (sector) End (sector) Size Name
1 1024 3071 1024.00 KiB lk
2 3072 13311 5.00 MiB tee1
3 13312 23551 5.00 MiB tee2
4 23552 56319 16.00 MiB boot
5 56320 89087 16.00 MiB recovery
6 89088 96255 3.50 MiB logo
7 96256 98303 1024.00 KiB kb
8 98304 100351 1024.00 KiB dkb
9 100352 102399 1024.00 KiB MISC
10 102400 409599 150.00 MiB vendor
11 409600 2662399 1.07 GiB system
12 2662400 3710975 512.00 MiB cache
13 3710976 15273566 5.51 GiB userdata
[Fire TV Original Android Development] tsynik:
Yup, my mistake, it's not bytes but blocks from /proc/partitions for whole mmcblk0

Here is output from SEC EMMC:

mantis:/ # /sbin/.magisk/busybox/fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT

Disk /dev/block/mmcblk0: 15269888 sectors, 3360M
Logical sector size: 512
Disk identifier (GUID): f41b6e51-8ba9-4611-8fbc-fbbf65abe561
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 15269854

Number Start (sector) End (sector) Size Name
1 1024 3071 1024K lk
2 3072 13311 5120K tee1
3 13312 23551 5120K tee2
4 23552 56319 16.0M boot
5 56320 89087 16.0M recovery
6 89088 96255 3584K logo
7 96256 98303 1024K kb
8 98304 100351 1024K dkb
9 100352 102399 1024K MISC
10 102400 409599 150M vendor
11 409600 2662399 1100M system
12 2662400 3710975 512M cache
13 3710976 15269854 5643M userdata
[Fire TV Original Android Development] redglory:
Just as an update, fire tv stick works without both caps (I suppose I've busted them when trying to short on my first try with a clip :P)

Suppose they're there for filtering...
[Fire TV Original Android Development] ddjmagic:
Would anybody be able to point me in the right direction to fix my Fire TV stick 4K. It shows the Fire TV logo (black background) then just goes to a black screen.

I've successfully unlocked as per this thread and with an OTG cable I can enter the TWRP menus, however I'm stuck on what to do next.

I've tried the wipe/factory reset but just reboots to the same black screen. I've tried installing a stock and prerooted rom via TWRP/OTG all seems successful but still stuck at the black screen after logo.

Any ideas or suggestions on what I can try?
[Fire TV Original Android Development] tinybilbo:
Unfortunately I'm stuck with exactly the same issue as you... I've not been able to resolve it.

I have wiped all partitions, and flashed both rooted, and stock firmwares, it just goes to a black background. I've even wiped and flashed from the hacked bootloader.

I can (like yourself) get into TWRP with an OTG cable.

The weird thing for my stick is that it is actually booting.., just not displaying correctly. If I use the the screen grab function in ADBlink I can actually get screenshots of where in the menus I am!

I can even navigate with the remote and set the stick up (by constantly grabbing screenshots and clicking the remote one button at a time).

I figured it may have been a hardware issue as my stick is over a year old (and had pretty much given up trying to fix it).. , However if your having a similar problem as well it may be software related.

Does anyone have any suggestions that we may try to fix the display?
[Fire TV Original Android Development] k4y0z:
Did you try using a different display?
[Fire TV Original Android Development] ddjmagic:
I've tried a few displays. It boots the Fire TV logo with black background at 1080p but then goes to a completely black screen and never gets to the next usual Fire TV logo with white background, if I press the info button on my TV's they all think the resolution connected is 480p.

TWRP works fine and displays as it should., the unlock process went smoothly.

My stick is over a year old too, was hoping it might be a software issue before I buy a replacement.

I'm unsure if mine is booting as when this first happened (before unlocking) it wasn't connected to my network and I couldn't seem to see it with ADB.
[Fire TV Original Android Development] 0815hoffi:
Try.

twrp wipe dalvik

twrp wipe cache

twrp wipe system

Maybe

twrp wipe /system

twrp install fireos7.2.1.zip

reboot
[Fire TV Original Android Development] tinybilbo:
Thanks for the reply k4y0z... Yes I have tried multiple TV's and monitors (ones that that the stick was working on).

The stick lost display after a powercut.

At first I thought it was just corrupted and wiped it and reflashed, No matter what I do I can't get it to display anything other than the hacked bootloader or TWRP.

I have wiped (data, system, cache,dalvik) and flashed stock and pre-rooted images from both TWRP and the hacked boot-loader.

I even reran your (excellent :)) exploit just to make sure....

By either restoring a backup or editing the system files from TWRP on a fresh install, I can gain ADB and using ADBLink I can get screengrabs that show the stick is running.

(I can navigate the menus by moving incrementally and grabbing screenshots)... Very bizarre...

Try enabling ADB from TWRP (see my post) (you can do this from a fresh stock or pre-rooted image).

https://xdaforums.com/showpost.php?p=82431327&postcount=3

and then use ADBLink to get a screengrab and see if it is actually booting, just not displaying...

https://xdaforums.com/fire-tv/themes-apps/adblink-v2-04-t3389826

Thanks :good:, but I have already tried that to no avail! :(
[Fire TV Original Android Development] k4y0z:
That does sound like some kind of hardware-issue.

I asked because I've seen it before, that display was working fine in TWRP but not in FireOS.

Switching Displays solved it in that case.

Does the display detect a device being connected when FireOS is running and the screen is dark?
[Fire TV Original Android Development] tinybilbo:
Yes the display is detected, it goes from whatever the initial boot screen is (with the amazon logo or name) to 1080p on my PC monitor (HDMI) to a lower one (I forget 640 by something I think) on the TV's.

But the display is just black, however an ADB screengrab takes a screenshot as if the image was being displayed...

(I've tried 2 PC monitors and 3 TV's). I might do a wipe from the bootloader again and reflash stock and try them all again just to be sure....

My feeling is that the power outage damaged something but didn't kill it outright, which is why only certain resolutions work.

BTW "adb shell wm size" and "adb shell wm density" commands work but the display doesn't change back.

I've pretty much given up trying to get it to work, except that i noticed that someone else was having a similar problem...

It may just be coincidence that we both have faulty firesticks!
[Fire TV Original Android Development] redglory:
How are you powering FTV ? USB or power adapter?

Perhaps the HDMI circuit got burned because of the power surge you got?

Can you test if you have 5V in pin 18 on HDMI ? this line is used to tell the output device (TV) something is connected.
[Fire TV Original Android Development] tinybilbo:
Thanks for the idea... I have to dust off the old multimeter!

I'll have a crack tomorrow and get back to you.. :)
[Fire TV Original Android Development] trujtru:
Hello, new to the forum.

I have a firestick 4k that all of a sudden got stuck on the FireTV logo. I followed the instructions on the first page and got to "waiting for bootrom". I'm trying to short and I'm pretty sure I hit the Dat0 point, but the script is not going to the next step. I've read through most of this thread and tried the aluminum foil trick and it still does not work.

ADB was not turned on prior and was wondering if this is the problem. Does ADB need to be turned on for this to work?

Any help will greatly be appreciated.
[Fire TV Original Android Development] Donphillipe:
I've done 3 now and this last time I used a very thin roll of foil and pried slightly to bend up the metal cover so that thin tube of foil (about half the diameter of an old-school pencil lead) would slide under. Now even though I had made the tip of the foil tip bent down like a phonograph needle to touch the PC board, by the time I had slid it into position, that tip I put on it it was no longer touching the PC board so I used the tip of a wooden toothpick to slide between the foil and the metal casing covering the area and this pushed that foil tip down onto the board and made enough contact for the script to take off running. When it said to remove the short, I slid out the toothpick and then pulled out the foil sideways where I wouldn't slide the foil over other contacts, potentially shorting something I shouldn't.
[Fire TV Original Android Development] tsynik:
1st check lsusb command works on your PC in fireiso and there is some devices.

2nd to recheck you short left side of left smd under the nand.

p.s. sometimes changing PC helps
[Fire TV Original Android Development] cook:
Sorry to ask a very stupid question.

Under Magisk Manager, Magisk and Magisk Manager request update (20000->20416 and 245->285). If I understood correctly I should not do it from here (under FireOS)

So how to do it?

An other thing :

I have the modules Google TV for FireOS 6 v1.3 and Xposed Framework v90-beta3 but still on Amazon Launcher? Why? How to activate Leanback Launcher?

No way found to authorize installation from other sources or access to running Xposed Installer... Maybe because I'm not under Leanback Launcher?

Thanks for any help
[Fire TV Original Android Development] dcarvil:
Magisk updates should be flashed from TWRP. I don't recall if there is a problem updating Magisk Manager from itself, but an alternative is to use "adb install -r".

If you have Leanback Launcher installed, you should be able to start it from the Amazon Launcher just like any other app. See this thread if you want to completely remove the Amazon Launcher.

https://xdaforums.com/fire-tv/general/fire-tv-4k-launcher-replacement-root-t4087139
[Fire TV Original Android Development] cook:
All problems was cause by obsolete Magisk. Updated from 20.0 to 20.4 and all problem solved. Magic. Everything working. Launcher. Google Play. Xposed. very happy.
[Fire TV Original Android Development] gil_happy:
Hello all, I have followed all of the steps in this post for my Fire TV Stick 4k and I think it was successful. The reason I say I 'think' is that after I ran the ./fastboot-step.sh, my device did indeed boot into TWRP, but now I unplugged it and moved it to a different TV. A couple of questions / comments:

- Did this process actually root the device?

- Why do I need Magisk or do I need Magisk? I didn't install it, but again, I think maybe I need this to disable 'OTA' updates?

- How to I get adb to work? When I connect the stick to the fireiso laptop and type 'adb devices', it states that no devices are available.

- I want to disable OTA updates before connecting it to my WiFi (it has not been connected to WiFi since I purchased it recently).

Thanks in advance!
[Fire TV Original Android Development] Sus_i:
Nope, the process unlocked the stick + installed TWRP recovery.

You need magisk for root access and for any system modification with TWRP (won't boot without magisk, after you mess with the system).

I would just try to do the initial setup...

In case you get access to the launcher, go to the settings and enable adb debugging.

Then connect with adb and disable the ota update apps.

A probably downloaded ota update is stored on cache, delete it via adb shell or TWRP file manager.

Won't work. It's recommended to do the setup and all the updates as a first step, after that the unlock... ;)

Edit: In case the ota updater downloads a file and reboots into TWRP, take a look at /cache. Watch out for the update.bin file, if the size is over 500mb, you can rename the .bin file with TWRP file manager to zip. Now you can flash it with TWRP. If the file size is much smaller, delete the file and reboot, in order to download the full update.
[Fire TV Original Android Development] gil_happy:
Thanks for the quick reply [MENTION=5213625]Sus_i[/MENTION]! Here is what I did after reading your instructions:

- connected the 4k stick to my TV and powered it up.

- connected it to the Wifi (an update was automatically performed)

- signed in to my Amazon account.

- Then I went to 'My Fire TV' under 'Settings' and enabled 'ADB debugging'

- Then I connected the 4k stick to my Linux PC and I have access and can run 'adb' commands, e.g. 'adb devices'

- then using the adb push command (adb push ~/Desktop/Magisk-v20.4.zip /sdcard/

- The problem I have is now trying to install Magisk for root. How do I do this from adb? Some of the instructions in this thread say to:

- adb shell

- twrp install /sdcard/Magisk-v20.4.zip

- twrp wipe cache

- reboot -p

The problem is that when I type the 'twrp' as part of the command, it says 'twrp not found'. Of course I know that TWRP is on my device because I can boot into TWRP from adb by doing 'adb reboot recovery', but I don't have any kind of USB-OTG.
[Fire TV Original Android Development] Donphillipe:
TWRP is a menu system that appears automatically during the boot sequence if you have an OTG USB device (powered) and plugged in. You need a USB mouse plugged in the OTG or in a USB Hub (powered) plugged into the OTG (which is plugged in the Firestick) Once the TWRP menu pops up, there is an INSTALL window where you install zip files. If you have a USB hub you can plug in a USB memory stick that you have these files and apks you wish to installed stored on. When you go to install, just change the storage location to the USB stick in your hub and install the appropriate ZIP file you wish to "install via TWRP".
[Fire TV Original Android Development] gil_happy:
Thanks for this... I guess I'm looking to install without OTG and that I where I'm stuck.
[Fire TV Original Android Development] Donphillipe:
Do you have a Chinese electronics or cell phone kiosk anywhere nearby? They sell the specificially for this purpose on Amazon but I already had one I was using on my android phone, so I just took it and a 4 port cheap USB HUB and plugged into the OTG connector and the powered hub powered the firestick and with that I had 4 ports to use, USB mouse and a memory stick and (optional) I also put a USB dongle to a mini keyboard and track pad for android TVs so when I have to type something I can use the keyboard. If you are in nowhere land and can just land a OTG device (usually cheap) you plug the micro-USB-male part into the micro-USB-female of the firestick. Then you plug the USB-A-male of a 4 port USB hub into the USB-A-female of the OTG. Now you need a powered hub but if you are in the land of nowhere you can take two USB cables, cut the two USB-A-male ends off the cables and solder the red to red and black to black and insulate them and this will power the hub and firestick in an emergency by plugging one USB-A-male into a wall 5V charging outlet and the other USB-A-male into one of the 4 ports of the NON-powered USB hub which will make it powered but you will only have 3 slots left then for USB mouse, memory stick and an open one.
[Fire TV Original Android Development] gil_happy:
Thank you for the detailed info... I just purchased one from Amazon, so it should be at my home in a couple of days.
[Fire TV Original Android Development] Sus_i:
Thats fine. :good:

You don't need an OTG cable, 'if you power up your stick using a USB port' from a laptop/pc. Let it boot, connect with adb and (as you said) run:

adb reboot recovery

The stick should just boot TWRP and twrp's commandline over adb is aviable. Then:

adb shell
twrp install /sdcard/Magisk-v20.4.zip
[Fire TV Original Android Development] Donphillipe:
Then please also explain how the Magisk zip file arrived on /sdcard and by the way thanks, it's nice to see how to do this after I have been asking for several months.
[Fire TV Original Android Development] Sus_i:
Take a look at [MENTION=5757678]gil_happy[/MENTION] 's post here... and you will probably see that (and how) the zip was pushed ;)

Edit:

TWRP's adb works the same as the adb from fireOS, except that you didn't need to call su in adb shell.

If you open an adb shell to use twrp commands, you can go back to adb with an 'exit', for an adb push or adb pull or whatever you want to do with adb.
[Fire TV Original Android Development] gil_happy:
Good news - I think I was able to install Magisk from command line following your instructions. Here is what I did:

- Boot into TWRP by 'adb reboot recovery'

- Once it reboots, type 'adb shell'

- Then, 'twrp install /sdcard/Magisk-v20.4.zip' (I see Magisk installer messages)

- twrp wipe cache

- reboot -p

Now my question is how do I know if I have root? The reason I ask is that once the device rebooted using the above command, I tried to access the device by:

- adb shell

- then, 'su'. I receive a 'Permission denied' when trying to do 'su'.

Per the instructions in this post, it states to disable the OTA updates (not sure we need to disable OTA updates when I first started posting about having problems, I was told to first connect my device to WiFi, perform the updates, and then follow all of the directions), by:

adb shell

su

pm disable com.amazon.tv.forcedotaupdater.v2

pm disable com.amazon.device.software.ota

pm disable com.amazon.device.software.ota.override
[Fire TV Original Android Development] Sus_i:
:good:

A magisk popup screen asks for permission on the TV screen, as soon you call su... and in case the timer runs out, you get that permission denied message.

Solution: open the magisk manager app, root tab, then grant root access for adb shell.

Grant root access in the manager app and then run the commands :good:
[Fire TV Original Android Development] gil_happy:
Great news.... looks like I have root. When I called 'su', nothing happened on the screen, so I opened up Magisk Manager and enabled 'su', I can run those 3 disable commands.

I'm still not sure why we need to disable these 3 lines and what they do:

pm disable com.amazon.tv.forcedotaupdater.v2

pm disable com.amazon.device.software.ota

pm disable com.amazon.device.software.ota.override

Again, the very first step before following anything on this procedure was to perform an OTA update.

Thanks again
[Fire TV Original Android Development] Sus_i:
That lines will stop any kind of ota updates.

If you leave it enabled, the updater downloads app and (if available) partial or full system updates.

App updates install fine, but all system updates fail and waste space / dl bandwidth.
[Fire TV Original Android Development] gil_happy:
Makes sense, but what is wrong with system updates? Does it break root if you didn't disable updates and an update were to automatically be performed?

BTW - I'm currently on Fire OS 6.2.6.8.
[Fire TV Original Android Development] Sus_i:
The stock recovery gets wiped (replaced with twrp) during the unlock procedere, so the ota updater can't install any system update.

It breaks nothing, but the updater will try to download the system update again and again and again.

6.2.6.8 is an old OS version. If you like to update, you have to do it manually with TWRP.
[Fire TV Original Android Development] gil_happy:
Thanks so much for the clarification... that makes perfect sense. It looks like the latest software is 6.2.7.1 and there are a couple of different options to download and install using TWRP after a quick browse through the posts (a debloated stock ROM, stock ROM, etc).

Once that is done, I need to figure out what interface (Launcher?) I should use. My plans are to install Xfinity, OpenVPN, a couple of radio stations, and then use Tasker.
[Fire TV Original Android Development] Donphillipe:
Just a note on storage issues - I've found if you plan to use Kodi, you can only view videos that are smaller than what the free memory is or it will buffer (viewing a Samba share). In other words if you get your system down to around 2.3GB free space and you want to watch a 3Gb mp4 file, then the video constantly buffers or at least on my installation it does (on local network with very strong router and fast router). For this reason if I I had it all to do over again I wouldn't have even messed with the firestick and would have secured an android TV device with more memory.
[Fire TV Original Android Development] redglory:
EDIT: noticed someone already answered you :D
[Fire TV Original Android Development] gil_happy:
Thanks for the tip... I don't plan on using Kodi, but would maybe use Plex instead.
[Fire TV Original Android Development] Flakie:
Thanks.

Newbie to Linux. I have got to TWRP installed. But root. How?

Says to read opening post which I have but it only goes as far as TWRP?

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

Found a guide on Reddit. Following that.

---------- Post added at 04:09 PM ---------- Previous post was at 03:23 PM ----------

I could enter the su command until it rebooted.

Maybe because twrp is not in write mode. Just guessing.

But if so, with no mouse i cannot swipe.
[Fire TV Original Android Development] dcarvil:
This guide gives the commands to install a pre-rooted image using TWRP. You can also root your stock image using the same commands, except substitute the Magisk zip for the pre-rooted image.

https://xdaforums.com/fire-tv/orig-development/newbie-guide-how-to-unlock-bootloader-t4015273

The image referred to in the above guide is out of date. A newer image is at https://xdaforums.com/fire-tv/development/1-0-debloated-rom-fire-tv-stick-4k-t4084947

Note this image uses a different installation method.
[Fire TV Original Android Development] Flakie:
Thanks. I dont really wnat to use a rooted image. Just install it on my own.

Magisk installed with no errors using the below but after a reboot access is denied to su (su not found).

adb push ~/Desktop/Magisk-v20.4.zip /sdcard/

adb shell

twrp install /sdcard/Magisk-v20.4.zip

twrp wipe cache

reboot -p

Will look at the guide to substitute it for Magisk.

---------- Post added at 05:27 PM ---------- Previous post was at 05:11 PM ----------

So the guide is basically what I have been doing excpet it adds in a dalvik wipe.

I get the message that Magisk is already installed.

After the reboot trying to run su gives permission denied.

---------- Post added at 05:59 PM ---------- Previous post was at 05:27 PM ----------

So I tried the rooted image (the older one)

First time I try to run su:

read (4 != -1) failed with 104: Connection reset by peer

Then any following time:

.No daemon is currently running!
[Fire TV Original Android Development] Sus_i:
You've probably missed the screen on your TV just after calling su (you need to grant root access before the timer runs out).

Take a look into the magisk manager app, at the root tab and grant root access to the shell...
[Fire TV Original Android Development] Flakie:
Thanks. Just figured that out after another reset :)

Does not stay on screen long and when its gone, its gone.

Good to know there is a way to fix without another reset.

Cheers :)

---------- Post added at 07:48 PM ---------- Previous post was at 06:59 PM ----------

It is very hit and miss getting Magisk installed on this 4K.

I dont think I was missing the prompt to allow root. It was not appearing. Done 3 resets to test jsut now and not appeared on any of them.

Get the same error message as before.

Magisk Manager states magisk is not installed.

Going to try and remove twrp and start again on this one.

Hope the others are easier. I have up to 30 of these to do (but I intend to update my own developed ADB app to do most of that).
[Fire TV Original Android Development] Sus_i:
Have you flashed that file: Magisk-v20.4.zip from here with TWRP?