yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] Pro-me3us:
@shyguy88 Thought about it again, and it can be done with raven_shrinker / raven_buf by directly editing package-restrictions.xml where app state information is stored. I've attached a basic script that will make the edit for you.

What this will do?

Allows you to use a custom launcher and keep Amazon Launcher enabled by only disabling the homescreen component of the app.

Why do this?

Allows accessing the regular FireOS settings menu using the quick menu (long press home button). App Store search, Alexa search across apps from the homescreen, remote recents button and a couple others Amazon dependent functions will continue to work when using a custom launcher.

Instructions

Transfer disable_homescreen.sh to /data/local/tmp/ on your Raven

Give it execution permissions

raven:/ $ chmod +x /data/local/tmp/disable_homescreen.sh

Run these commands after a fresh boot, so that the root script is more likely to succeed

raven:/ $ pm enable com.amazon.tv.launcher

raven:/ $ pm disable-user com.amazon.firehomestarter

raven:/ $ /data/local/tmp/raven_shrinker

raven:/ # /data/local/tmp/disable_homescreen.sh

The script will run for 10 seconds, then automatically soft reboot the Cube. When it reloads the home button will go to whatever custom launcher you have installed.

How to re-enable the Amazon Homescreen?

Select 'Disable Custom Launcher' in Launcher Manager, press home button twice. Follow the instructions above to disable the Amazon homescreen again.
[Fire TV Original Android Development] shyguy88:
You, sir, are a genius!! I just tried it out and it works flawlessly, THANK YOU so very much!!! Settings/app store etc are still working and the stock launcher homepage is gone, so I could turn off the ADB hook for the custom launcher and I can even let the device go to sleep now to save power. Only thing I have not tried yet is the 'Disable Custom Launcher' to revert back (it wasn't working for me on LM 1.1.8/1.1.9, I was recommended to go back to 1.1.6 but have not tried it), but I don't see any reason to do that since I have access to everything I could possibly need with the full settings menu.

Absolutely perfect, thank you so very much!! Truly grateful for your help.

Note: I did find I had to remove the loop script that was running in LM because it was dragging me back from the settings menu to the custom launcher every 30 seconds when it ran, and the loop script seemed unnecessary now anyway.
[Fire TV Original Android Development] Pro-me3us:
If there's a problem with LM, the Amazon homescreen can be re-enabled with:

raven:/ $ pm disable com.amazon.tv.launcher

raven:/ $ pm enable com.amazon.tv.launcher

There isn't a fast way to disable the Amazon homescreen with temp root. Once re-enabled, those 4 commands need to be repeated each time. I'd make a shortcut to anything on the Amazon homescreen that needs regular visiting.

I don't know what commands you have looped. I can't think of anything that is worth being kept running.
[Fire TV Original Android Development] shyguy88:
Thank you very much for the through explanation! That shortcut app looks very handy too, hadn't heard of that before but I think I'll try using it, thank you!

The script I was running was posted here at #13, the script originally came from here on xda and was discussed over here. Since I had the updater disabled it probably didn't make too much of a difference though now in hindsight.

Now I just need to find a good screensaver where I can use my own locally saved photos as a kind of slideshow and this device will be perfect.

Thank you again very much for all your help!
[Fire TV Original Android Development] Pro-me3us:
Yeah that looped command is only useful if those packages can't be disabled.

raven:/ $ pm disable-user com.amazon.device.software.ota

raven:/ $ pm disable-user com.amazon.adep

No need to keep force-stopping the Amazon Launcher, you've disabled the launcher component of the app.

Aerial Views is a good screensaver for local, network and internet streamed videos. The developer is working on adding support for photos now. I'm sure there's other photocentric screensavers out there for Android too.
[Fire TV Original Android Development] boxster03:
I have not bothered watching anything on Prime video for the longest time but recently wanted to check something out on Prime. I thought I had moved it to the hidden apps (I use Wolf Launcher). But it's not there. When I go to Amazon launcher home screen and search, it has an "Update" button which when clicked nothing happens.

I'm pretty sure I did something to make it disappear earlier in the year but can't remember what I did.

Did Amazon change something? I don't see the Prime Video tile in Amazon launcher also. If possible, I like to be able to launch Prime Video.

I appreciate the help I get from this thread.
[Fire TV Original Android Development] Pro-me3us:
Try downloading and manually installing the latest version. Update the FireTV Player app too.
[Fire TV Original Android Development] boxster03:
@Pro-me3us Thanks for the reply. Is that one of your pages? I downloaded the latest linked file there to Prime Video to my laptop. What is the best way to install to my cube2? Is there adb commands to install remotely or do I move the file to downloads folder and install? Sorry basic questions. fyi, my cube2 used bootloader unlock and runs Fire OS 7292/2984. I just don't want to mess anything on my cube which is working very well thanks to your help here. Appreciate it.
[Fire TV Original Android Development] Pro-me3us:
I maintain the page, they're all direct links to Amazon's servers used by FireTV devices. Prime Video and FireTV Player aren't necessary components of FireOS, updating them is fine. The APKs can be sideloaded anyway you like. From your laptop you can run:

adb connect <cube-ip-address>

adb install /path-to-file-on-computer/<file-name.apk>

Or with ADBLink, use the 'Install APK' button.
[Fire TV Original Android Development] boxster03:
I installed both latest apk 's of Prime Video and FireTV Player and now I have Prime Video. I don't know why but now there are two Prime Video tiles: when clicked one goes to Prime Video other one does nothing. I am guessing it is the old one that wasn't working but still in there separate from the new installation (but app list only shows one). Not a big deal at all - I can leave the bad tile at bottom of screen and done with it. Thank you for your help w/ instructions and link to ADBLink - it is very easy to use.
[Fire TV Original Android Development] Pro-me3us:
The functional one is the Prime Video app, the other is the FireTV Player app, the media player for Prime Video.

The icon can be hidden with Wolf Launcher:

Wolf Launcher Menu / Launcher Settings / Hidden Apps
[Fire TV Original Android Development] boxster03:
Actually I found a 3rd Prime Video tile - there are 2 of Fire TV Player in the apps list (may be it keeps the older version in there? one does nothing the other shows Prime logo screen for a moment and then just goes away doing nothing). I was able to hide both those and only leaving the Prime Video app one. Thank you.

Edit: Actually only one FireTV Player under apps in Fire TV menu. Says Version FireTV.360.503801. I saw two items named FireTV Player in Wolf Launcher's "hide apps" list.
[Fire TV Original Android Development] Pro-me3us:
Ok had a look at FireTV Player v360.503801. The manifest has a duplicate intent, resulting in two icons showing for the app. It can be ignored, it's not using up any extra storage or resources.
[Fire TV Original Android Development] boxster03:
@Pro-me3us Thanks for looking up the FireTV stuff - it was more of a curiosity more than anything.
[Fire TV Original Android Development] boxster03:
I have about 3.7 GB of memory on the cube2 after moving apps to the usb flash drive that I have set up. As cache fills up It can go below 3GB. Is that enough?

"adb shell pm move-package" command doesn't work for amazon apps so I have amazon apps that I don't use regularly, taking up space on internal storage.

Since we have root I think we can move amazon apps to external storage, right? How can it be done? Is it worth doing? Any risks/downsides? Thank you.
[Fire TV Original Android Development] Pro-me3us:
3GB free space is more than enough, even 1GB would be ok.

I've not tried to move system apps to external storage, I'm sure it's possible. Before you worry about that though, you might want to get a better idea of where all your used storage has gone. The 12-13GB storage that shows up for the Cube only accounts for the data partition. Moving system apps to external storage doesn't help in a lot of instances because they are on the system partition (~1.5GB sequestered storage).

But updates to system apps are installed on the data partition, and all system app data is on the data partition, so it does have an impact.

Use the du command to check your storage.

raven:/ # du -hd 1 /data/

du on FireOS7 doesn't have a nice sorting option, so here's a more convoluted version that will manually sort the directories from largest to smallest.

raven:/ # du -d 1 /data/ | sort -k 1,1nr | awk '{print $2}' | xargs du -sh

In the above command, the value of 1 for -d means it will go one directory down, increase that number to go more directories deep. /data/ specifies the data partition.

The 3 places that use up most of your storage are:

1) /data/app/ - Installed app apks + system app apks that have been updated

2) /data/data/ - All app data both 3rd party and system apps stored here.

3) /sdcard/ - This is a shortcut to /data/media/0/ containing the regular user accessible folders like download, movies, music etc.

So for example to check space used by app data:

raven:/ # du -d 1 /data/data/ | sort -k 1,1nr | awk '{print $2}' | xargs du -sh

If you want, run the cache clearing command to clear all cache folders in /data/data/ . That will free up some space, but I don't know that there is much point to this, since file caching improves app performance.

raven:/ # pm trim-caches 100G
[Fire TV Original Android Development] boxster03:
@Pro-me3us ,

Good to know I have more than enough memory om my Cube with 3GB free. Are Amazon Kids, Amazon Photos, Prime Video etc considered system apps? Anyway I don't have to mess with moving Amazon apps to ext flash drive.

Thanks for the commands for checking storage (w/ sorting !). In my cube, 8.7G in /data/ which :

4.4G in /data/media/0/ (3G in /data/media/0/Download and 1.1G in data/media/0/Android/).

/data/app/ has 1.9G

/data/data/ has 1.7G

There are a few of .apk and .zip files in /data/media/0/Download folder. (May be I can delete them? or should I keep any of them after they have been installed.)

For eg. LSPosed-v1.8.6-6712-zygisk-release.zip

Magisk-d0c93842(26101).apk

terminal_systemizer_v17.4.1.zip

vivatv_1.6.3.apk

Thank you for the commands and the explanation of the memory allocation.
[Fire TV Original Android Development] Pro-me3us:
This is an easy area to reclaim some space. A lot of that stuff you have in your internal storage (/sdcard/ aka /data/media/0/) can either be deleted or moved to a USB drive. Aside from the Android folder there is another 3.3GB in the other folders under /sdcard/.

I'd backup any apk's and Magisk modules on a flash drive, or just delete them since they are available online.
[Fire TV Original Android Development] SentraXx:
My cube doesn't have the "USB Debugging" option, is there any way to force this or my cube just doesn't support this? I can use the network adb debugging, but installing firmware updates via TWRP becomes more complicated without USB Debugging support
[Fire TV Original Android Development] Pro-me3us:
There's two USB modes on the Cube:

1) Host mode - Connect USB mouse, keyboard, flash drive

2) Device mode - Connect computer to access USB ADB.

TWRP/FireOS boot in host mode by default. USB connect computer and Cube (microUSB to USB-A cable), reboot recovery and it will boot TWRP/FireOS with USB ADB access (device mode). TWRP flashing instructions here.

Or copy the firmware file over to the Cube in FireOS (WiFi ADB, flash drive, Downloader, etc), and use a USB mouse to navigate TWRP.

Reflash Magisk directly after flashing any firmware!!! And verify OTA updates are blocked after FireOS boots.
[Fire TV Original Android Development] SentraXx:
None of this worked, it's as if my cube didnt support usb connection for more than ethernet because usb debugging not working even with usb connected when booting to twrp and when I try to do it with the mouse, even though the mouse lights up meaning its receiving alimentation, it wont work.

I guess there isn't another workaround for updating the firmware right?
[Fire TV Original Android Development] Pro-me3us:
Sounds like an issue with the USB connection/cable.

Check that the USB cable supports data transfers (not a charging only cable), and that it's not an OTG cable (OTG forces host mode). Install the Fire TV drivers if you're using a Windows computer. If that checks out, try a different USB cable anyway, in case the first one is damaged.

For the mouse, wait until TWRP loads, plug in the mouse and tap the right mouse button to get a cursor to appear. Otherwise try a second mouse.

TWRP flashing instructions can be written in FireOS, to automate flashing when entering recovery. But if anything went wrong a USB connection would be needed to fix any problems, so I'd focus on getting USB working.
[Fire TV Original Android Development] EBRJR:
Guys, I have read the whole thread and more in other groups. Attached is what I have to work with. I tried to root/twrp about 6 months ago and realized that my particular version has some issues. However, I did manage to stop updates and run some launchers. But, I am still hoping for full root and twrp, if possible. Is it possible with what I have at this point?

Thanks for any inputs.
[Fire TV Original Android Development] Pro-me3us:
No, bootloader unlocking only works up to PS7292.

After that Amazon started enforcing anti-rollback so that downgrading the bootloader to use the unlock exploit would hard brick the Cube.
[Fire TV Original Android Development] EBRJR:
That is the conclusion I was starting to get but I am just not experienced enough to give up all hope!

I have several older models of the Fire TV lying around.. used to look like flat squares. They don't have the resolution etc that the cube has (or even the stick I am using) but might be worth a try!
[Fire TV Original Android Development] EBRJR:
OK. I found an old Fire TV box from awhile back. As shown, it runs off Fire OS which is no longer even updated! Nevertheless, after some reading, it appears that even this ancient device cannot be rooted and/or if some version ever was, it was only to create a temporary su (root) shell within ADB so that someone with a great deal more time than I have, could manually make changes! Am I correct in assuming that this device is not going to be rooted?

Parenthetically, I have rooted android for more years than I care to admit but the purpose behind my use of root has always been to maintain good "fences" between my personal life and the so-called institutional hackers (Samsung, Google and whatever). I don't use clouds. The Fire TV is first time I wanted to root to make a device work differently. I could see so much entertainment potential in it!

However, we can't always get what we want!

Thanks.
[Fire TV Original Android Development] Pro-me3us:
I don't know much about that device, this is the post you want to look at. It says it's offering bootloader unlocking, so you can do just about anything on it, full root too.
[Fire TV Original Android Development] EBRJR:
Oh that is a spark of good news! Thank you very much.

By today's standards, it is not all that powerful and it is a relic! But, in its day, I think it was the best media player out there.. unless you were willing to accept the limitations of apple TV. What is sort of odd is that Amazon suddenly discontinued it almost 17 months before introducing the Cube. That left us with an underpowered stick. Since the 2nd Gen devices were built like rocks (almost indestructible), we could keep using them. Again, I appreciate your response and I will let you know what happens.
[Fire TV Original Android Development] EBRJR:
I gave it a quick try last night. I think it possible but to use the particular exploit, I would have to downgrade (or the functional equivalent) by opening the physical case and short circuiting the device (bricking it) momentarily. As much as I would like to play around with it (and I can obsess over these things!), I have to remember the point of this - to have a rooted Amazon TV! One last question: assuming I were willing to purchase something new, are there ANY Amazon devices on the market that CAN be rooted easily? Somehow, after 2 weeks of reading, I get the sense that rooting is not pursued any longer.

Ed
[Fire TV Original Android Development] Pro-me3us:
The only FireTV currently sold from Amazon that has any sort of root option is the 3rd gen Cube. Either temp root or bootless Magisk.

Assuming you want a full unlock with unrestricted Magisk, the 3rd/Lite Sticks (2020) are the newest FireTV models that have that option. But they have to be on +2 year old firmware, so chances aren't good of getting old vulnerable stock directly from Amazon. Rooting didn't require opening up, just a copy of linux.

I don't know that rooting isn't pursed, it's just gotten much harder because of better security. Unlocking any new FireTV requires +2 hacks, lightning has strike twice.

The 2nd gen Cube is no longer sold by Amazon, but they are on eBay. They were sold with vulnerable firmware all the way up until they were discontinued. So any new sealed 2nd gen Cube is guaranteed fully rootable. IMO these have the easiest rooting procedure. Only need a PC, MAC, Linux or Android phone to copy over the files, from there it's just a matter of running a basic script directly on the Cube.

There are many NEW/SEALED eBay listings (here, here, here, here, here, here, here, and more). Some have best offer options to haggle down the price further.

You could gamble and buy a used one. This seller has sold dozens that include the old remote. That makes me think these are a bunch of refurbished units that have been sitting around unused for +1 years, and have a fair chance of still being on old vulnerable firmware.
[Fire TV Original Android Development] EBRJR:
Well, I might be in luck! We tend to upgrade devices maybe more than we need to! I was able to get temporary root but when I did that, I didn't fully understand the limits of "temporary" root and I never quite got Magisks to work, and could not flash TWRP at all. I was able to get the device such that it would never upgrade, and try some different launchers but that was it. I am currently using this for one purpose - to get my NYC and other TV while I am here in the Virgin Islands (I work down here) . When using and relying on a VPN, I have found it safer to dedicate one device with the permanent VPN.. the TV providers are quite clever at detecting that you might be somewhere else! I might even have a 2nd Gen Cube stored in NYC. So I can wait to see if I have the older 2nd Gen in some drawer!
[Fire TV Original Android Development] Pro-me3us:
TWRP won't work with temp root, neither will full Magisk, both require an unlocked bootloader (signature verification disabled).

What is still possible is bootless Magisk, which doesn't modify the boot partition. Bootless Magisk is started after FireOS has booted up completely, using temp root. The instructions automate the process so that a script runs after each reboot, to gain root and launch bootless Magisk. Because Magisk is being started late in the boot process, there are limitations. Most Magisk modules rely on early boot initiation, won't work. Bootless Magisk is mostly useful for granting SuperUser requests to apps.

Bootless Magisk bricked two people's 2nd gen Cubes, both were on PS7614, so it's not recommened using it on that FireOS version. My suggestion is to manually update PS7614 to PS7624. In general I don't recommend bootless Magisk unless you know you need it, it's still experimental.

I'm not sure what you require to do this? VPNs can be used without any root access, so I'm assuming you are taking some extra step?

It would have to have been offline since October 2022, or had OTA updates blocked, to be on PS7292 or older and fully rootable.
[Fire TV Original Android Development] EBRJR:
I hear you. I think that I am going to put the Amazon TV rooting idea on hold for now.

While I cannot use Apple TV down here in the VI (because of the nature of Apple's location services and restrictions on the way a VPN can be used), we nevertheless just changed to the latest Apple TV in NY. It is now faster than the Cube and the Amazon UI, which has always been cluttered, became even more so after its last update!
[Fire TV Original Android Development] boxster03:
Greeting @Pro-me3us and others,

Just wondering if there is a easy way to copy and paste to Kodi input screen of Cube from a laptop. I am able to do this from the Kore remote app on an Android phone. I couldn't do it from scrcpy from a laptop after connecting to Cube via adb. I can type from laptop via scrcpy but CTRL-V doesn't seem to work on it.

Oh..yeah.. there are a couple of issue I encountered a few times with scrcpy. Sometimes, scrcpy reset the cube as soon as I ran scrcpy.exe from the laptop??? scrcpy also closed itself a few times. I wonder why these happened.. I first connected the laptop via ADBLink. Then I executed scrcpy.exe file available on my laptop.
[Fire TV Original Android Development] Pro-me3us:
One way is to use the input text command.

raven:/ # input text 'text goes here'

ScrCpy copy & paste works when the FireOS onscreen keyboard isn't showing. Sometimes it's tricky to select a field without opening the keyboard. One work-around is to use a different onscreen keyboard like LeanKeyboard. There are instructions for setting it up here. It's easier to set if Launcher Manager is installed, open other settings, keyboard, select LeanKeyboard.

ScrCpy occasionally closing itself is normal for me. It's never rebooted my Cube. There may be differences in how it performs between platforms (Win, Mac, Linux) and ScrCpy versions.

I don't use ScrCpy on the 3rd gen Cube because it produces a lot of errors in the logs, and I suspect it might have soft bricked my gazelle twice. Never had any issues on raven other than ScrCpy occasionally closing.
[Fire TV Original Android Development] boxster03:
@Pro-me3us Thank you forthe quick reply.

input text command works (typed in) but I am not able to paste (cnrl V) when in # prompt. Don't know I am missing something on my windows laptop. It works in C:...> prompt but not in # prompt. (I am looking for paste option for eg. to input long api key.)

I have set Wolf Launcher (I used systemizer and got rid of Launcher Manager when I did that). Leankeyboard app asks to go to system preferences ? when I clicked activate. I ran the two adb commands in the instructions (first said "now enabled" , and second said "selected"). Do I have to do anything more? Any idea re: where system preferences are?
[Fire TV Original Android Development] Pro-me3us:
You might need to activate Ctrl key shortcuts. Right click on the window title bar, select properties, check the relevant boxes there. You can also right click on window title, select edit, and click paste.

You'll know when it's active next time you click on something that brings up the on-screen keyboard, the keyboard will look completely different. I haven't set the keyboard manually before.

You can install Launcher Manager (recommend v1.1.6) and not use the custom launcher setting feature. It's more of a toolbox app, and using it to set the keyboard is easy and quick.