FORUMS
Remove All Ads from XDA

Customizing the Fire TV Stick 4K (mantis) - Debloat - Replace launcher and Testing

309 posts
Thanks Meter: 53
 
By bnevets27, Senior Member on 27th December 2019, 10:18 AM
Post Reply Email Thread
TL; DR Version in the second post, it's also a short overall summary. Might be best to have a look so you don't get overwhelmed by this first post.

Just thought I would share my experience with the 4K. Just as an FYI this is my first firestick and I've only had it for about a week but I've been playing with it quite a bit.

Personally I'm interested in removing all amazon related products/apps/services etc. With the exception of the store as I would like to get some of my apps through it.
Making it as lean and fast as possible.
Getting as close to AndroidTV as possible without losing any functionally and keeping stability.
I'm primarily interested in Plex and/or Kodi (with no addon apps, just vanilla kodi).
Having root. I like to have the ability to do anything, and I personally found rooting the stick easy so I found no reason not to do it. With that in mind everything I did I had root. I have no idea if any of these steps work without root.

Pre info
I chose to not flash the Prerooted Stock Image due to the comment Sus_i made here. I updated, then rooted.

Step1
Plug it in, run through the setup and let it update. Go to settings -> My Fire TV -> Developer Options and enable ADB Debugging and Apps from Unknown Sources.

Step 2
Root it!
Guide here
This guide/post was helpful also. There is a good video of them opening up the firestick to access the necessary point to short/ground to allow the root script to work. Just be careful with what you use. I just used a small copper wire.
After getting root. Put it back in the case. and plug it in to your tv.

Step 3
Running commands with adb
Get and install adblink, link here
Information on how to use it is on the site. You will need to get the IP address of the firestick. Go to setting -> device -> network -> about
open adblink
click adb shell
type
Code:
reboot recovery
then enter
You'll now be in TWRP

Step 4
Install Magisk
Get the latest stable magisk zip from here
No need for the Magisk Manager apk, that will get installed with the above zip.
Put the zip in the same folder that the adblink.exe is in. (you can find that by clicking adb shell in adb link and then typing exit, then enter. It will show you where you should put the zip file)
Open adblink if you closed it (just leave it open)
click adb shell
which should show the bellow on screen
Code:
mantis:/$
type exit
then paste the following (replace the "Magisk-v20.1.zip" with the correct name of the magisk zip you downloaded)
Code:
adb push Magisk-v20.1.zip /sdcard/
then type
Code:
adb shell
echo "--update_package=/sdcard/Magisk-v20.1.zip" > /cache/recovery/command
echo "--wipe_cache" >> /cache/recovery/command
reboot recovery
It will reboot and install magisk, then reboot to the launcher.
You can now check if you like if magisk is installed correctly and if you have root (you should)

Step 5
Install [Magisk][Module] FireTV 4K Stick Add-Ons
This gets rid of the amazon launcher and does a few other things, including installing xposed framework.
Follow the instructions in that thread. But here's some additional info. Which is just a copy of how we installed magisk.
Download and put the zip in the same folder that the adblink.exe is in.
Open adblink if you closed it (just leave it open)
click adb shell
which should show the bellow on screen
Code:
mantis:/$
type exit
then paste the following (replace the "AFTV-MM-1.9.zip" with the correct name of the AFTV-MM .zip you downloaded)
Code:
adb push AFTV-MM-1.9.zipp /sdcard/
then type
Code:
adb shell
echo "--update_package=/sdcard/AFTV-MM-1.9.zip" > /cache/recovery/command
echo "--wipe_cache" >> /cache/recovery/command
reboot recovery
It will reboot and install AFTV-MM, then reboot to the launcher. It does some things automatically on first boot and may reboot on it's own just let it do it's thing. Some additional commands need to be run via ADB, go to the thread and follow the instructions there: [Magisk][Module] FireTV 4K Stick Add-Ons

Step 6
Remove amazon bloat. *More info below*
Now I've seen a few lists here and there and tried to guess which things to disable on my own until I found these scripts.
Now these scripts weren't made for the 4k (mantis) firestick as you can see from the compatibility list. But I assumed the packages installed would be close so I'm guessing this isn't a bad starting point. But just remember this clearly wasn't meant for this device.
Download the script from here All credit for the original script goes to esc0rtd3w.
and put it in your adblink folder.
Open adblink if you closed it (just leave it open)
click adb shell
which should show the bellow on screen
Code:
mantis:/$
type exit
Code:
adb push bloat-disable.sh /sdcard/
then type
Code:
adb shell
su
cp /sdcard/bloat-disable.sh /data/local/tmp/
chmod 755 /data/local/tmp/bloat-disable.sh
sh /data/local/tmp/bloat-disable.sh
The script will then disable all the bloat. If you would like to enable all the bloat then use this script, download it and follow the same instruction from above. If you just need to enable a single app/service then you can run:
Code:
adb shell 
su
pm enable com.amazon.dcp
replacing "com.amazon.dcp" with the app you want to enable.


Step 7
If you want Kodi as the launcher
You can get a modified apk here The thread where this came from originally is here Discussion of an update here
Side load the apk with adblink. Should be self explanatory, click install apk. Once installed open LauncherHijack and select Kodi as the launcher.

Step 8
Setting Kodi (or any other launcher) as the launcher
Install Launcher Hijack (Clone Mod), get the apk here
Follow the instructions here to install it and get it working. By now you should be getting comfortable with abdlink, use it to install the apks and run the adb shell commands.

Other apps to install
Smart Youtube TV (no ads)

OpenVPN install if you want or need it. In my case I need to slightly deviate from the guide. I simply didn't need to create the login.conf file. I Just copied opvn config over and then in settings chose "Certificates" for type and insert the password in "private key password".

That's it for now. I'm curious what other modifications can be done on the 4K (mantis). I'm thinking about/planning on trying a few I've seen around. I think as long as I can get back to TWRP then worse case I should be able to flash the stock ROM to recover. Would be interested to hear what other people may have pulled off.


*Step 6 more info*
This script will remove all packages that esc0rtd3w deemed safe to remove as of Fire OS 5.2.7.2 on the FireStick2. It will leave the amazon launcher enabled and allow use of the amazon app store. The amazon app store can also be disabled but disabling the amazon launcher breaks access to the settings.
My slightly edited version of his script
esc0rtd3w firestick-loader github. All credit for the script goes to him.
List of services/packages that are new for Fire OS 6.2.6.8
If anyone can inform me of the packages/services that can be safely disabled, please let me know and I can include them in the script. For now they are left untouched/enabled.

Info I found and used for this post
[UNLOCK][ROOT][TWRP][UNBRICK] Fire TV Stick 4K (mantis)
[Magisk][Module] FireTV 4K Stick Add-Ons
[FireTVStick4k] Updated Info November 2019
[NEWBIE GUIDE] How to Unlock Bootloader/Root and install Addons FireStick 4k
FireTV4k Stick: Achieving Root With Magisk
[LAUNCHER] XBMC/Kodi for Fire TV (Root)
Updated Kodi 18.5 version by the developer elmerohuesoWhich is posted here
Install OpenVPN on fireTV (no root required)
Running scripts on the Firestick, in this case the disable-bloat.sh script
The Following 2 Users Say Thank You to bnevets27 For This Useful Post: [ View ] Gift bnevets27 Ad-Free
27th December 2019, 10:18 AM |#2  
OP Senior Member
Thanks Meter: 53
 
More
This assumes you have an understanding of how to use adb and if more detail of any of the following steps is necessary then follow the steps in the first post.

Step 1
Plug it in, run through the setup and let it update. Enable ADB and Unknown Sources.

Step 2
Root it!
Guide here

Step 3
Get adb installed

Step 4
Install Magisk

Step 5
Install [Magisk][Module] FireTV 4K Stick Add-Ons

Step 6
Remove amazon bloat.
Download the script from here
Run on firestick via ADB

Step 7
If you want Kodi as the launcher, See the first post.

Step 8
Setting Kodi (or any other launcher) as the launcher, See the first post.

Step 9
Install other apps
OpenVPN install Seeing first post for more info
Smart Youtube TV (no ads)

Step 10
Other Tweaks
Stop firestick from going to sleep/returning to the home screen.
27th December 2019, 10:19 AM |#3  
OP Senior Member
Thanks Meter: 53
 
More
Things that don't work or I'm interested in trying to get working.

-Can't "install" apps from amazon. The app store is there and can install from "the cloud" but can't search for new apps. Likely due to something being disabled., just not sure what. I assume installing from amazon web into the cloud or something like that could be a work around. Might be that the only way to search for apps is with the default launcher?

-Voice search doesn't work. Looks like some people have kind of gotten it to work but I have not.
-Chromecast support.

Both would likely have a better chance if google play services/store could be installed. I see there was some effort put forth in trying to do that on previous firetvstick models so I may try some of the info that is out there. Seeing as we now have root its a lot more possible.....I assume.
30th December 2019, 11:18 PM |#4  
OP Senior Member
Thanks Meter: 53
 
More
reserved 1
30th December 2019, 11:18 PM |#5  
OP Senior Member
Thanks Meter: 53
 
More
reserved 2
31st December 2019, 07:17 AM |#6  
Senior Member
Thanks Meter: 37
 
More
I keep meaning to test nanodroid with microg & the patched play store. I've not done it yet as I was afraid patching the system would screw everything up & I had so much difficulty getting bootloader patched to begin with. It may not be necessary to patch system, I recall using an xposed module for spoofing some time ago on an old phone so that could be a possibility.

It might not work, but there's probably less that can go wrong as there's less "deep" system integration than using official gapps. Just an idea if you fancy trying it.
10th January 2020, 04:03 AM |#7  
Junior Member
Thanks Meter: 2
 
More
Booting between FireOS and TWRP
Below are the first steps in rooting the firestick 4k:
Once it reboot’s into TWRP do you now have root privs?
Can you stop here and not install a “pre-rooted image”?
Can I now boot between FireOS and TWRP if so How?
Thank You,

1.Boot the ISO
2.Download and extract the exploit package.
3.Open a terminal in the kamakiri directory
Run
Code:
4. ./bootrom-step.sh
Short one of the points in the attached photo to ground (the cage of the shielding).
Ideally you want to use DAT0, since that is tiny it might be easier to short the point marked CLK instead.
It is very important that you use a piece of soft wire or aluminum foil or something similar for shorting. Don't use tweezers as that makes it incredibly easy to knock of the capacitor off the PCB and kill the board!
5. Connect the stick to your computer (while keeping it shorted)Both USB and HDMI ???
6. The script should tell you to release the short and hit enter
Once finished run
Code:
7. ./fastboot-step.sh
Your device will now reboot into TWRP
10th January 2020, 05:25 PM |#8  
OP Senior Member
Thanks Meter: 53
 
More
Quote:
Originally Posted by RPM99

Below are the first steps in rooting the firestick 4k:

Once it reboot’s into TWRP do you now have root privs? (Yes, but you need to install magisk to manage su)

Can you stop here and not install a “pre-rooted image”? (Yes, you don't need to install the image)

Can I now boot between FireOS and TWRP if so How? (adb commands or the reboot menu if you have the magisk module installed. For adb, insure you have adb debugging turned on, then log into the firestick (that's all in the guide) and run "reboot recovery")

Thank You,



1.Boot the ISO

2.Download and extract the exploit package.

3.Open a terminal in the kamakiri directory

Run

Code:

4. ./bootrom-step.sh

Short one of the points in the attached photo to ground (the cage of the shielding).

Ideally you want to use DAT0, since that is tiny it might be easier to short the point marked CLK instead.

It is very important that you use a piece of soft wire or aluminum foil or something similar for shorting. Don't use tweezers as that makes it incredibly easy to knock of the capacitor off the PCB and kill the board!

5. Connect the stick to your computer (while keeping it shorted)Both USB and HDMI ??? (hdmi isn't needed, just usb)

6. The script should tell you to release the short and hit enter

Once finished run

Code:

7. ./fastboot-step.sh

Your device will now reboot into TWRP

I replied inline in brackets. On mobile so a pain to in another way.
10th January 2020, 08:26 PM |#9  
Junior Member
Thanks Meter: 2
 
More
Thanks for the clarification
Quote:
Originally Posted by bnevets27

I replied inline in brackets. On mobile so a pain to in another way.

Hi,
Inline with great answers is just fine, thank you.

I will investigate magisk, I didn't realize that's what it is for.
And "reboot recovery" at the adb command line will put me back in TWRP mode - This was great info!!

I ordered a new firestick to try this on, it will be here next week so I have some time to read up.

Thanks again,
Steve
10th January 2020, 10:35 PM |#10  
Junior Member
Thanks Meter: 2
 
More
More questions if you can please
Quote:
Originally Posted by RPM99

Hi,
Inline with great answers is just fine, thank you.

I will investigate magisk, I didn't realize that's what it is for.
And "reboot recovery" at the adb command line will put me back in TWRP mode - This was great info!!

I ordered a new firestick to try this on, it will be here next week so I have some time to read up.

Thanks again,
Steve

When you short to ground and then plug into usb to boot firestick is that considered bootloader mode?
At what point is the greatest risk of bricking the firestick?
Thanks,
Steve
11th January 2020, 12:45 AM |#11  
OP Senior Member
Thanks Meter: 53
 
More
Quote:
Originally Posted by RPM99

When you short to ground and then plug into usb to boot firestick is that considered bootloader mode?

At what point is the greatest risk of bricking the firestick?

Thanks,

Steve

I guess that would probably be technically correct.

Only time there's a chance of bricking, usually for flash anything, is during the writing process. Or a corrupt file.

I've done a hand full and haven't had any issues. Just take normal precautions like do what you can to prevent a power outage during the flash and once it's plugged in and flashing don't touch anything till its finished.

Personally I plugged in the mirco USB into the firestick first, then lined up the USB into the computer but didn't push it in. Held a small solid copper wire against the rf shield (the metal that surrounds the chip) and touched the side of what I think is a capacitor (you can't get to clk without taking the surrounding metal piece off). It's the "other" point they mention you can use. While doing that with one hand I plug in the USB to the computer. Remember the script has to be run first, waiting to see the stick before you plug it in.

If you miss time it or don't make the connection, the script just won't tell you to remove the short and press enter, so you'll just have to try again.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes