yashsingh1/xdaforums huggingface dataset:
[Fire TV General] virtuacool:
You cannot permanently kill the launcher. Something makes it come back after a few minutes, so it kills it in loop.

We newer firestick you can have multiple ADB connections simultaneously.

The script solution from post nº 1.704 of Starmina might be good, with some changes in code (to be run on firestick not externally).

Installed on the firestick in the /data/local/tmp folder, it should run well on older firesticks, as in this case the script is only executed every 1 minute, leaving the ADB free during that period.

The execution of the script could be given through LM, with "sh /data/local/tmp/script.sh"
[Fire TV General] Starmina:
Hmm 🤔 my script is restarting every 1 min, but it actually does a command every 5 seconds and kill the launcher every 10. And it doesn’t disconnect ADB so I’m not sure about what you’re talking about ? Also, I doubt the firestick can run shell script ?
[Fire TV General] SyCoREAPER:
@Starmina & @virtuacool

While this workaround/exploit works (and I'm not judging), it is a bit inelegant and unreliable in terms of me being comfortable putting it on family's sticks if I can't be there to fix it if it goes wrong or an update breaks it etc..

For now I'll just rely on remote macros to force the launcher. But will definitely continue following this thread. This latest workaround is the first that I recall that works since the native LM build months back.
[Fire TV General] martytoo:
I think you have figured this out. I reset the number to 3 as you suggested above. At first all was fine and I saw the loop cause a blackout on the Amazon home page every 30 seconds. I then rebooted the Firestick and the script did not restart. I went to Lauchner Manager and restarted it and it again closed the Amazon home every 30 seconds.

Is there a way to run a script on boot with some other program? I wonder which sticks have that problem. The abusive user that called someone here an expletive posted that he is not on 6.2.9.7 as I am with my Firestick.
[Fire TV General] Finnzz:
Do you have the 'execute on boot' box checked in LM under your command loop? If you use another app to run the ADB loop on boot, that will use up your one ADB connection and LM needs that connection for the home button remapping.

You could use Tasker to do the home button remapping and run any looped commands you want. Tasker has the benefit of not being a blacklisted app, but it is more involved setting up.

4K Max with Tasker to launch Wolf on Home button

Bascially this one is by xnappo but I had quite some problems to follow his guide here: https://xdaforums.com/t/app-firetv-noroot-launcher-manager-change-launcher-without-root.4176349/page-66#post-87928085 I wrote it again to make it a bit...

xdaforums.com

The LM execute on boot option for ADB commands should work in FireOS6, but Amazon is always adding more barriers so who knows.

The looped command in @virtuacool's post that I assume the social media guys are also posting is to close Amazon Launcher once every 300sec. The counter is for 30, and each loop is 10sec. As others have pointed out, you can change the timing to whatever fits your needs.

The Amazon Launcher has been a protected package since PS7273 (PS6287 on FireOS6), and can't be disabled with pm disable-user anymore.

In terms of using up your one ADB connection in FireOS6, LM is already using it to do the button mapping. If you don't give LM that connection there's no way to efficiently remap the home button on firmware above PS6287. Same goes for Tasker, which is doing the same thing LM is.

There are a number of options now to use LM.

1) use LM with command loop to avoid blacklist & block updates

2) use Tasker which isn't on the blacklist, and add any additional looped commands you want like blocking updates

3) use LM + firewall app (Netguard, Rethink etc) to individually block app communication, to disable updates and the blacklist

4) use LM + DNS filtering to block the domain names that are associated with the blacklist and ota updates
[Fire TV General] pitsensas:
Hello,

I'm using Tasker to remap Home button with Wolf Launcher on FOS 6.2.8.7 (4K model)

Where is the instructions to disable FOS update with Firewall ?

Blokada can do the job ?

Thanks in advance
[Fire TV General] martytoo:
Of course I did. As I said, I think you figured it out. For whatever reason, the command doesn't start on Reboot of the Firestick.
[Fire TV General] BigBrosMo:
Well something happened and LM disappeared again. I've been using the kill script and rethink with the updates and app blocking enabled. No issues for a couple weeks now. But when I turned on the TV tonight it started into WL as usual. Then I pressed Home at one point and it went to Amazon. Odd. So then I manually started WL... And LM is gone. The only thing different is that the power went out today so the stick would've been hard cycled. Whereas usually I just use the Amazon remote to turn the TV on and off. But then why would WL have launched when I turned the TV on??
[Fire TV General] Finnzz:
What FireTV device and firmware version? How are you blocking in Rethink? By domain name (which ones) or by app name? What version of Rethink?

Sorry, have to state the obvious to make sure we're on the same page. Try ADB on Boot to test if that can run the ADB command when FireOS starts up. I don't know that you'll be able to use that and LM together, but at least you can use it for testing.

Do you have Mouse Toggle or any other app that uses ADB and autostarts on boot installed?

I haven't seen a guide here. The two I'm aware of are Netguard and RethinkDNS. Netguard is simpler and more fireTV remote friendly. Block Internet access to these two apps: AdeptFOS and DeviceSoftwareOTA/System Updates. Maybe @virtuacool can add a couple screenshots from Netguard to his ADB loop instructions post.

I've never used Blockada, so I can't say how well it works.

If you are domain blocking via DNS, then block:

arcus-uswest.amazon.com

softwareupdates.amazon.com

You can also block these:

d1s31zyz7dcc2d.cloudfront.net

prod.ota-cloudfront.net

d1s31zyz7dcc2d.cloudfront.prod.ota-cloudfront.net
[Fire TV General] virtuacool:
TechDoctorUK has already done the job!

It's in the video below, and also the downloads!

Block Amazon Updates 2023 | TechDoctorUK

www.techdoctoruk.com

In NetGuard you can also block this.

Any questions I'll be here.

A hint:

When installing NetGuard for the first time, several "OK"s appear on the main page.

Click "OK" on all of them, as it is just information and frees up space on the screen.

View attachment 5962591 View attachment 5962593
[Fire TV General] pitsensas:
I have blocked the 5 domains with Blokada and now, when I check OS update, I have the errror !

Many thanks for your great support !

I have done this operation on the 2 Fire 4K where I have installed LM+Wolf before the 1st update. So, Wolf is the default launcher.

On my 3rd Fire 4K, I have installed LM+Wolf after the 1st update, so KFTV launcher is still active and I'm using Tasker to launch Wolf when Home Button is pressed. On this box, LM is in version 1.1.6 (just to access to "Settings") so Amazon never blocks it.

PS: could you have a look on this request ?

https://xdaforums.com/t/cache-cleaner-with-fire-os-6-6-2-9-7-on-4k-model.4608687/
[Fire TV General] Finnzz:
Well the app says it requires FireOS7.

You don't need it anyway, the same thing can be accomplished with one command.

EDIT: Only works on FireOS7

LM | Other Settings | ADB Commands

Add a new command

Name: Clear Cache

Command: pm trim-caches 32G

That's it. Go to the list and tap on 'Clear Cache' whenever you want to trigger it. You can use the option in the top right corner of the ADB commands screen to make a shortcut on your homescreen to the LM ADB section.

The cache serves a purpose so I don't recommend doing it automatically on each boot or in a loop.

If clearing all app cache is something people really want, you might be able to convince @SweenWolf to add it to LM as a native menu option.
[Fire TV General] pitsensas:
Unfortunately, this command "pm trim-caches 32G" doesn't work !

I have tried with ADB on my computer with the command 'adh shell pm trim-caches 32G" and I receive an error:

C:\androidSDK\platform-tools>adb shell pm trim-caches 32G
Operation not allowed: java.lang.SecurityException: Neither user 2000 nor current process has android.permission.CLEAR_APP_CACHE.
[Fire TV General] Finnzz:
That explains why the cleaner app is only available for FireOS7.

Amazon is requiring root to run pm trim-caches on FireOS6.

There is no other user command to delete an app's cache. There's only pm clear, and that deletes the app data with the cache.

The app cache is stored in /data/data/ which requires root to access, so it can't be deleted manually either.
[Fire TV General] virtuacool:
Just a reminder.

The loop script must always be the last ADB command, because as it enters a loop, it does not move on to the next command:

View attachment 5963035

That's why I created lines that don't execute anything, so that in the future I can insert whatever I want, and the loop script will continue to be the last one on the list.

View attachment 5963041
[Fire TV General] martytoo:
I did have a mouse toggle running but just disabled it and have the same result. The script is not running on reboot. I don't think I have any other ADB dependent programs running.

I may try ADB on boot even though I know it might not work.
[Fire TV General] martytoo:
Hmmm, I am talking to myself.

I did get the three apps working on boot. The three are (listed in order on the Notification area of the Firestick):

NetGuard

ADB on Boot

Launcher Manager

All three appear to be running. ADB on boot seems to start the script that Launcher Manager won't. Perhaps LM can be rewritten but as Finnzz has pointed out, it may be a limitation that Amazon tried to use to stop LM. But it is obvious that ADB on Boot is using different code to start the ADB script than LM as the LM run on boot did not work ON MY FIRETICK 4K running 6.2.9.7
[Fire TV General] NeoNblu:
A little update.

In the post above, I mentioned that I had a glitch where I would press the home button and It would stay on the stock launcher. It would not happen often, but sometimes it was annoying. I’ve been tweaking the script, thanks to virtuacool

and this seems to be the sweet spot, I put it at 60 seconds.

while sleep 10; do ((++n%06)) || am force-stop com.amazon.tv.launcher; pm clear com.amazon.device.software.ota; pm clear com.amazon.adep; done

so far so good. 🤞
[Fire TV General] virtuacool:
Are you using "ADB on Boot" or LM?

Test in LM the same configuration and feedback so we all know. 👍

Thanks! 👌
[Fire TV General] NeoNblu:
I’m using LM

For the record, LM never disappeared since running this script and blocking with NETGUARD. 😎View attachment 5964191
[Fire TV General] Osh1:
while sleep 10; do ((++n%06)) || am force-stop com.amazon.tv.launcher; pm clear com.amazon.device.software.ota; pm clear com.amazon.adep; done

In the script shouldn't it be ((++n%60)) or as you've shown it? seeing as it was ((++n%30)) before which I take was 30 secs?
[Fire TV General] Starmina:
Yes it's %60 for every 60 seconds to kill the launcher and all the other command after every 10 seconds.
[Fire TV General] NeoNblu:
Good question!

What you do is you multiply that number by 10 and that will give you the number of seconds. So 06×10 is 60 so 60 seconds.
[Fire TV General] Starmina:
Guys does any of you have an up-to-date tutorial on how to install Tasker with Google Play Store license ? Thanks I have the 4K Max. I already installed F-Droid but really not sure about the whole thing. Also I can't login into MicroG because it stuck on "Who will use this device" and I can't click abything to go beyond this panel, it just allow me to select between the two options which are "Just for me" or "My children" (or something along that)

Thanks
[Fire TV General] Osh1:
Thanks for answering, much appreciated
[Fire TV General] NeoNblu:
Osh1, just to be crystal clear and for others.​

You said "In the script shouldn't it be ((++n%60)) or as you've shown it? seeing as it was ((++n%30)) before which I take was 30 secs?"

Answer: ((++n%30)) equates to 300 seconds or 5 mins
[Fire TV General] Starmina:
uh year sorry, I was totally wrong I'm sorry misguiding everyone omg

Let me make up for it and explains the whole command :

while sleep 10; do ((++n%6)) || am force-stop com.amazon.tv.launcher; pm clear com.amazon.device.software.ota; pm clear com.amazon.adep; done

It runs a script that run every 10 seconds. "n" variable increment +1 every 10 seconds (every loop, basically). And IF and ONLY IF n%6 (n modulo 6) equals 0, it runs the command "am force-stop com.amazon.tv.launcher", which makes it run every 6 loops, that is, every minute. Since 6%6 = 0, 12%6 = 0, and so on indefinitely.

However, everything after the semicolon

;

is run every loop, every 10 seconds in this case.

So of course, if you decide to change the sleep time, you have to take that in account to calculate the modulo number you want to use.
[Fire TV General] Osh1:
Thanks for the clarification,
[Fire TV General] virtuacool:
The reason for the 10 seconds is explained in my post nº 1.645
[Fire TV General] xnappo:
It is much easier to buy a license on Patreon, that is what I did for my second box, but I just follwed the instructions here, installing 'Fake store':

Installation

Free implementation of Play Services. Contribute to microg/GmsCore development by creating an account on GitHub.

github.com
[Fire TV General] virtuacool:
Over here, everything works great! 👍

Perfect, perfect was to put a black layer on the firestick's startup, before entering the Wolf Launcher, so as not to see any "garbage". 🤔
[Fire TV General] axel007:
Looks like Amazon has deployed a new tactic to interfere with this latest method. I just bought a new FireTV Stick 3rd Gen. I didn't know about any of these shenanigans so I let it auto-update. It's on FireOS 7.6.4.6 now.

First blocking OTA updates with NetGuard and then installing Launch Manager 1.1.8 with the adb script discussed in this thread does still work but only up to a point.

It looks like starting certain apps now interferes with Launcher Manager. Reliably, after I've started Prime Video, for example, when I press the Home button afterward. the stock launcher will reappear. Hitting the Home button at that point no longer triggers the custom launcher. I can manually restart the custom launcher after such an event and that still works.

Any ideas how we can defeat this latest bull****?
[Fire TV General] NeoNblu:
@axel007, I am on the same firmware as you and I was also seeing the same behavior. Try the script set at 1 minute like above see if it helps.
[Fire TV General] virtuacool:
You must first follow this guide from TechDoctorUK, to clear the blacklist and block updates (I'm also on Fire OS 7.6.4.6).

This step is important because if AdeptOS is up to date you cannot install LM, as it is on the block list.

Then with NetGuard, block the services described in the video. (Watch the video calmly and follow all the steps!!!)

Block Amazon Updates 2023 | TechDoctorUK

www.techdoctoruk.com

Then follow this tutorial to install LM and the script.

It is important not to miss any characters in the script, nor to add more or less spaces. The script must be STRICTLY the same as shown, otherwise it won't work!

Custom Launcher For FireOS 6+ Device (2023 Method) | TechDoctorUK

www.techdoctoruk.com

- Don't forget that the developer option must always be active.

- It is important to disable fire stick sleep. During sleep, the firestick deactivates the developer mode, inhibiting the execution of the script (it is described in the 2nd video above), You can use the screensaver without problems.

- As a last resort, use the modified LM that is in this post: nº 1.461 (this version is not on Amazon's block list). Follow Netguard's instructions, and all the instructions in the 2 video I posted.

Note that the videos are at the bottom of the page, and the necessary software.

Guaranteed everything is working!!!
[Fire TV General] axel007:
@NeoNblu I have tried 1 minute intervals and several others. No use, it still happens. Maybe you have slightly older versions of the apps in question that never got updated. Maybe I have updated versions that now trigger the stock launcher? It doesn't happen every time though. Very weird.

@virtuacool By clearing the blacklist you mean running that ADB script from Launch Manager, or is there some other move I've overlooked? I have followed Techdoctor's videos in every detail, both the one about blocking updates, and the one about installing Launch Manager. I copied and pasted the ADB script and besides, if you read my comment calmly, you will understand that LM and Wolf are in fact running fine. It's just that every once in a while, the stock launcher re-asserts itself.

Thanks for pointing out the renamed package. I may try that. Better yet, I may try a different launcher.
[Fire TV General] axel007:
UPDATE. No new Amazon tricks are involved (for now), it seems. I think I've stumbled on the cause of my trouble or rather the missing piece. When I posted my comment describing my problem I had not yet installed the FireTV Debloater that can also be obtained from the Techdoctor. A couple of hours ago, I did install and run that app. I ticked most of the things it lists though not the ones that break Prime Video. Since running the Debloater, the problem is gone, even after several reboots and after replicating the behaviors that triggered the stock launcher multiple times.

I think this is pretty key information so I'll let the Techdoctor know about this as well if the problem doesn't reoccur in the next 24 hours.
[Fire TV General] Finnzz:
The Debloat Toolbox is available on post #2, without ads. Wolf made it, no apparent contribution from TUK other than being an opportunist taking credit for other people's work.

The 3rd gen / Lite Stick may have issues keeping the home button hook active because it only has 1GB of RAM. Disabling apps you don't use will give you a little slack.
[Fire TV General] axel007:
Well, whether it's the extra RAM freed up using the Debloater or something else, so far it has kept the stock launcher out of the picture. Knock on wood!

Is there anything else I can do to keep as much RAM as possible available?

Good to know where else to find the Debloater, thanks.

BTW, my understanding is that Techdoctor has Wolf's permission. I find Techdoctor's tutorials rather helpful. Trying to piece together from this forum what he serves up in a straightforward form is not something I'd recommend to anyone.
[Fire TV General] Finnzz:
I have no issue with video tutorials and understand they help a lot of people

The specific criticism is with the many TUK branded apps written completely by Wolf. Rather than just give Wolf full credit, he injects himself and presents Wolf as "my employee", "my developer", " my team", to elevate TUK's own perceived expertise, at the expense of someone else's skill and generosity.

Wolf has implemented many suggestions and requests from this thread, but that doesn't make him our employee, or his apps any less his 😄

Regarding RAM, 1GB is just very little to work with for FireOS7. About all you can do is keep disabling more apps that you don't need.

Make sure you have at least 1GB of free storage space so that the Stick has something to use for swap memory.

If you are struggling to clear out at least 1GB storage, clear all your caches with

pm trim-caches 32G

View attachment 5970339

Make sure it's at the top of your ADB command list. Or run the command in Remote ADB Shell

I'm skeptical that app killers, force-stopping background apps, improves performance much, for very long.
[Fire TV General] axel007:
Fair enough.

Thank you. Will do. This stick has very limited purposes so the number of apps will remain minimal.
[Fire TV General] virtuacool:
I made a script, very laborious, that does an "am force-stop" to all system packages (all without exception). I just didn't do the user packages.

I only tested it on my Firestick 4K MAX with Fire OS 7.6.4.6.​

Strangely I gained 1.25GB!!!

I went from 1.5GB to 2.75GB!!!

It was only enough to do this once.

Whenever I turn on the firestick I always have this memory available.

View attachment 5970865

Then I copied the list of packages to notepad (copy/paste).

I removed the packages of my applications from the list, leaving only the system ones (all!)

Then I put the command "am force-stop <package>" on all of them (see image).

I saved the file and copied it to the /data/local/tmp folder and ran it with sh /data/local/tmp/kill_all_system.sh

And I have a lot of memory.

I emphasize that isot does not delete any files.

It only kills the packages running in the 1st and 2nd plane of the system.

View attachment 5970893

Below how to copy and run the "script".

The "kill_all_system.sh" file must be on the Desktop.

View attachment 5970901

Whoever runs it, give feedback!

I only tested it on my Firestick 4K MAX with Fire OS 7.6.4.6.​

👍
[Fire TV General] axel007:
Is something like Prime Video considered a system, or a user package?

And won't the system packages restart automatically, sooner or later?
[Fire TV General] virtuacool:
I considered Prime Video as a system, so it's dead in this script. However when prompted it opens normally.

I didn't kill LM, Wolf Launcher, NetGuard, Widgets, etc... These cannot be killed obviously.

Strangely, they don't boot again, even after restarting, I still have high memory.

My Firestick is working beautifully!
[Fire TV General] axel007:
So this basically does the same thing as the Debloater from Wolf/Techdoctor?
[Fire TV General] virtuacool:
No! O Debloat does "uninstall" of the chosen packages and they are left without "inactive" state.

What this script does is it forces everything to stop, and it only starts what the system needs, because they are just stopped !
[Fire TV General] axel007:
I see.

Thanks for sharing, I may give this a try in due course!
[Fire TV General] Finnzz:
@virtuacool To simplify that, you can force close all system apps with

pm list packages -s | sed -e "s/.*://" | while read package; do am force-stop $package; done

-s specifies system apps

-3 specifies 3rd party apps

Nothing specifies all apps

Eg close all 3rd party apps

pm list packages -3 | sed -e "s/.*://" | while read package; do am force-stop $package; done

I'm not sure how force-stopping apps freed up 1GB of storage space, that's not an expected behavior. 'App Killers' force-stop apps, with the purpose of freeing up RAM. Check the 'System Status Monitor' app before and after doing a mass force-stop, and you'll see the available RAM increase. Most of these apps will start up again on their own over time, and the available RAM will again decrease.

There's no question you get a temporary boost in RAM, the real question is does it boost performance, and for how long. I think the benefits of doing this are arguable, Android already manages RAM pretty effectively.

Debloat apps are different, they disable, not uninstall, apps (at least Wolf's Debloat app). This will prevent an app from ever becoming active and using RAM, CPU or more storage space. Most debloat apps don't clear the package data, so you still have to do that manually if you want that space back. Clearing system app data indiscriminately is a bad idea, so I'd avoid scripting that.

The trim-caches command clears the cache of all apps, but does not touch the app data.
[Fire TV General] virtuacool:
Thanks @Finnzz!

You are the master!

Strangely, I only did it once and when I restart I still have high memory.

As my memory is high, I can't test your minified script to see if it works the same.

I only clean the system packages. Have you ever used it on your Firestick with -s and increased memory?