yashsingh1/xdaforums huggingface dataset:
[Fire TV Android Development] Akki67:
Hi Skel40

i'm testing your new built image in zip format, had tried it before, did you get it right?

However, I have a question about the available free Storage memory on the

FireStick 4K. Despite the fact that you have learned many things from the image, I only have 4.62GB of the 5.3GB free.

I can remember that even with your ftvs4kdebloatedv1.1.zip image I got up to 4.95GB of free Storage memory.

Is it because of my 4k stick or is the size of the available memory the same for you.
[Fire TV Android Development] Pachacouti:
Lol, I noticed this too, answer? It only APPEARS we have full root. Havent figured it out yet, but I have a theory: I was once a docsis pentester, moved onto lte, but when what we called d3 came out, it turned out they mirrored the flash we were hacking, if one dont match the other byte for byte... I found that while in twrp, I wanted to wipe system, but it is not found?? So I ask the question, is the system we're deleting from, the ACTUAL system?

With regards to magisk, after latest crash, I booted into twrp, flashed the rooted stock, knew not to flash magisk yet, I then rebooted, had no choice but to accept update, (negating the debloat rom), rebooted back into twrp, flashed magisk, rebooted.

Notice i did not say wipe dalvik, or cache etc?

If you dont wipe them, debugging is still on.

At this point I would reflash the debloat, and nothing else, but previous files from previous rom are also still there.

If we had a list of SAFE apps we can remove to maximise space... trial and error, here we go
[Fire TV Android Development] Skel40:
4.77 GB on my end with my new release! You don't have to debloat it more than you need to now! Everything else is important for the operating system
[Fire TV Android Development] Akki67:
4.77GB is a good value, I can't even get there when I install your new image.

If I have 4.62GB after installation without installing other apps I can be happy.

When I delete the contents of the cache folder after downloading the system updates, the free memory

not anymore.

Something must be blocking Amazon by the updates, but what?
[Fire TV Android Development] Skel40:
Unfortunately its the mbcache Amazon provides to com.amazon.tv.launcher which can be deleted in data/data/com.amazon.tv.launcher/databases/mbcache (all three mbcache files can be deleted) then reboot

I deleted device software ota override since its useless so that's why its not updating
[Fire TV Android Development] Sus_i:
Wait, what? Two /system partitions? :eek:

That cannot be true ;)

A debloated /system (with some system-apps deleted) won't free space everywhere, it free up space on the /system partition.

You won't see that space at all as it's not on data or /sdcard.

Free space on system is pointless, disabling apps instead deleting is enough, except someone likes to mess with some old systemmode installs (like gapps or exposed...) , but that is also pointless, since we can do that fully systemless with magisk addons.

If you don't want that app updates take space on userdata, simply run that in adb shell:

su
pm disable com.amazon.device.software.ota
pm clear com.amazon.device.software.ota
exit
exit
[Fire TV Android Development] Sus_i:
Nope. Amonet-kamakiri is the exploit (the messages are from the exploits microloader) and mantis is the name of the device ;)
[Fire TV Android Development] Pachacouti:
Stumped

Ok, I get it. What I dont get, is being unable to use su in twrp. I've been round in circles, never saving any space. I can delete files from priv-app while in the amazon os, and watch the space free up, but after a reboot, that space is taken up again. I cannot wipe system in twrp, but I can mount system in twrp. When doing:

mount -o rw,remount /system

in twrp, it works, I see everything, tried cd'ing to system, it worked, but ls (list) did not, so could not view priv-app folder, thinking I could delete from here.

I could see the amonet-blah.sh file, in root while in twrp by using mount -o rw,remount /

It's the technically lost system that DID exist for me to wipe using twrp origionally that has gone.

Files I have downloaded into Download folder when in amazon os are not erased, even after the amazon reset, nothing is being wiped for me to start over. I say to myself, I'll just use amazon to wipe everything, but if I delete one wrong priv-app file and have to start over with the fireos, I use rooted r1, reboot, login, enable debug and unknown sources (ps, we might need unknown sources enabled as well as adb in this debloat, for magisk is unknown to amazon), reboot, flashed magisk, got same error, already exists, but magisk installed, though wants me to update/install in gui, to version I just flashed, learnt not to touch that, cause su works in amazon os.

Before I did the system wipe that removed a system I have been unable to wipe since, when re-installing magisk it worked with no error, but since erasing system in twrp, magisk produces the error already installed.

Quite simply, an erased system is no longer accessible to wipe even after countless reflashes of rooted r1, or any debloat. It is not erasing even after an amazon gui reset to factory. Factory restore is not wiping anything. I hope I make sense here.

These are my observations while testing and I hope to restore whatever system was wiped in twrp that prevents amazon Factory restore from erasing my previous work. Nothing is being erased, and there is no system to wipe in twrp, alas, all else APPEARS to work.

Idea, what if that update that is not an update is amazons cloud mirror image of my previous work being restored after my factory reset, this would explain files not being deleted, or simply put back?
[Fire TV Android Development] Skel40:
Version 1.3.4 features adb debugging on setup wizard every time among many other tweaks like the device powering off completely once the TV is powered off. All of these tweaks can be safely removed by recovering the .bak of the prop file and by simply rebooting. If you have any questions relating to this debloated rom, I can edit the rom again and make more trim downs, etc. This may be a guaranteed chance for set up without relying on the Amazon services and actually get most out of your device thanks to adb connectivity from the adb debugging tweak, and bypassing Amazon's registration screen. I don't know how to remove all the Amazon Services while keeping the performance stable but there's so many options and tools out there to modify packages

Edit: It was my Xbox One auto detecting the power source so its turned off when my TV is offline
[Fire TV Android Development] Pachacouti:
I tested this, and I think it's faster, but even after an amazon factory reset, my previous work is still there, when it should be deleted. I know you have adb debugging enabled, handy :), but unknown scources is needed too. I cant see any space improvements due to my problem, nothing is being wiped to appreciate your debloat!

Ps, your debloat is not the problem, this problem has existed through at least 10 factory restores, nothing is being deleted, since twrp wipe /system!
[Fire TV Android Development] Skel40:
It may be the tweaks. Try recovering the .bak and see if that fixes the problem. Unknown sources isn't necessarily required if you already have an adb connection. Adb install example.apk will install the apk without the unknown sources enabled. Its only there if you choose to install apks outside the store on your device rather with adb its able to install any apk you choose if that makes sense. Android is a complex operating system and I've learned and still continue to learn what the operating system exactly does so I may not know why adb debugging can install apks though the setting unknown sources is turned off. Oh its not the issue?
[Fire TV Android Development] Pachacouti:
Hmmm...

I get ya, but this is not what I mean.

Since testing ADTVMM2.2.zip, I have lost 'A' system in twrp, the one we take for granted we can wipe or not.

That system no longer exists. I can wipe everything else, but twrp states system not found, tried cat /proc/mounts etc, no joy.

Tried updating stock rom, still same error, in twrp, cannot do twrp wipe system, any attempt states not found.

I reckon this system is responsible for wiping my files in the downloads folder when I do an amazon factory restore, which wipes nothing.

It's like amazon are restoring my work from a cloud backup, but I dont use backup's!!

Edit:Correction ADTVMM2.2.zip should be AFTVMM.2.2.zip
[Fire TV Android Development] Sus_i:
In case you install a new system (rom), your old system gets wiped too.

The reason why the amaz. factory reset from inside the OS won't propperly work, is because you replaced (during the exploit) the android stock recovery with TWRP.

You use TWRP over adb? Maybe grab an OTG cable and try the TWRP GUI.

I guess the addon.d errors in your log are probably caused by the AFTVMM.2.2.zip. Maybe it's time to wipe userdata (data and internal sd), but don't forget to backup at least system and data.
[Fire TV Android Development] Sus_i:
The command for wipe data in TWRP is:

adb shell
twrp wipe data

Anyway. If you like to try a factory reset with fastboot... boot into TWRP shell, then reboot into hacked fastboot with:

adb shell
reboot-amonet

Then run:

fastboot devices

and in case you see the serial of the stick, run:

fastboot erase userdata

then

fastboot reboot

That will do the factory reset for sure.
[Fire TV Android Development] Pachacouti:
Dunno about that...

C:\adb>adb shell

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

~ # ←[6nreboot-amonet

C:\adb>fastboot devices

G070VM1602140DDA fastboot

C:\adb>fastboot erase userdata

******** Did you mean to fastboot format this partition?

erasing 'userdata'...

OKAY [ 0.540s]

finished. total time: 0.540s

C:\adb>fastboot reboot

rebooting...

finished. total time: 0.000s

C:\adb>

Got past black logo, onto white, died in half the time, led to dimmed tv screen appearing like it's off, need to fireiso again, due to no adb, no bootloop, just black screen on tv :( - I did notice two red error's, but it all scrolled too fast to see, but suspect system and data still not found were the errors.

Edit, went straight to fire iso, reflashed kamakiri, then in twrp, reflashed, I now have 4.25g of space, instead of 5mb at last! Thanks ever so much for your help, wiping userdata cleared the crap, though I have still to suss where the system went, i'll do that another day.

One thing though, after Kamakiri, I flashed your 1.3.4.zip, and still had to login to enable adb, thought I should let you know, it was not enabled after flashing. Perhaps it appeared on yours to work if you never wiped anything in twrp after flashing it? Right now I'm happy with this debloat, thanks again :)
[Fire TV Android Development] Sus_i:
Your stick was really messed up, I'm glad that fastboot erase finally worked for you :good:

[MENTION=10414053]Skel40[/MENTION] ;)
[Fire TV Android Development] Pretoriano80:
I doubt that insecure ADB will work without enabling it in the ramdisk. Did you modified that too, or just the build prop?

What "completely powering off" means? AFAIK there's no way to power of such a device well, at least not without removing the power source.
[Fire TV Android Development] Pachacouti:
Haha, it's prob still messed up, gave up on it for now, but thought I'd also point out your dns 1.1.1.1 setting were not there either, in fact it's like I've had a restore, yet many 'debloat' apps are there still, if the txt files list what you have removed, then many have returned, yet the free space is currently 4.05, so im not complaining, just gona try replacing the amazon launcher, cause I have tested so much I'm convinced its amazon pushing all these adverts onscreen, stealing my bandwidth, that causes my stbemu to crash, cause in previous tests, i used the replacement and stbemu worked flawless for more than 10 minutes, its defo adverts, cause at the end of a movie or adbreak time on music channels is when stbemu freezes, but that again is prob amazon in a huf cause we dont want to use their products, just the toys lol
[Fire TV Android Development] Pretoriano80:
There are many possible reasons why stbemu would crash/freeze, not necessarily related to ADS or FireTV Launcher.

If you really wanna start fresh, then flash a stock (un-rooted) firmware, wipe data again, install Magisk (possibly install a module that blocks ADS) and then start disabling unnecessary services/apps one by one (you can find info about safe to disable services here in these forums) and then test stbEMU.
[Fire TV Android Development] Pachacouti:
Thanks 4 the advice m8, I do actually know my stuff in shell, but I also know of two hackers in Scotland, one created the tap n track app used for the virus and bought by the gov here in the uk, and he said to me, with his 9 degree's in computer science's, he never thought he'd meet anyone who could teach him, I guess I'm the 2nd best here in Scotland lol, that's no joke, If I put my older alias's here, half would be like we're not worthy, and the other half would be like so lame they'd play the h8 game, am just a bit rusty, back pains rippin into the skull, and the components are too small for me to work with nowadays. I'm a manual exploit finder, I find the exploit's, then pass them to others to write the apps and profit, a good hacker is allowed to play ;)

Yup my stick is in a mess, but if it aint broke, dont fix it, even if the system is gone lol.. :cool:
[Fire TV Android Development] tokoam:
the last 2 steps you posted are they required ? My remote works fine after installing your debloated rom
[Fire TV Android Development] Pachacouti:
I found this too, I did not require the remote settings, my remote worked anyway... makes sense if he's had his working when he made the backup, which would probably retain his remote settings.

Perhaps many setting's cannot be transfered from one device to another?
[Fire TV Android Development] DirtyAngelicaSecured:
Can you post your debloat list, please?
[Fire TV Android Development] DirtyAngelicaSecured:
Also, what do you mean by "ADB now is automatically enabled upon setup wizard and does not disable not matter how many times you factory reset!" ? I want to be able to turn ADB off once I am done tweaking. Can that be done with your debloated ROM?
[Fire TV Android Development] Skel40:
What I meant by that is ADB is automatically enabled due to a tweak that sets it up on boot. Try restoring the build.prop with the given build.prop.bak inside the /system directory if you wanted to turn it off along with the tweaks enabled or edit the build.prop that's modified and remove the line that says ADB then reboot
[Fire TV Android Development] Skel40:
I will in a few days. On a trip at the moment
[Fire TV Android Development] DirtyAngelicaSecured:
Is it actually possible to turn off

Remote

ADB with your ROM without turning off other tweaks? Remote ADB is not something I would like to keep enabled at all times, only when making adjustments, but I would want other tweaks from your ROM to stay!
[Fire TV Android Development] Skel40:
Yes!! There's no way to turn off the tweak though removing the line is the only way to do it.
[Fire TV Android Development] Heyitsradin:
Is it possible to use on a non-4K gen 2 stick?
[Fire TV Android Development] DirtyAngelicaSecured:
Great! A bit off-topic, but 4K rooting requires that tin-foil mod and when I look up guides about it, none of them show you what to do once you unlocked the bootloader. Do you remove the tin-foil? Can you put it the whole thing back together with tin-foil left in it?
[Fire TV Android Development] Skel40:
Yes you have to remove the tin foil after it tells you to remove the short because it's temporarily detecting the short for it to work properly. If you keep the tin foil stuck in the stick while it's back together, it'll throw run time serial mismatch error so it's best to keep the foil in the component it tells you until it's asking you to remove it and press enter afterwards. I've tried it myself and it didn't work
[Fire TV Android Development] DirtyAngelicaSecured:
Do you have to do the tinfoil thing every time you flash ROM (to update) or just once (assuming OTA update is properly disabled during tweaking or in your ROM)?

---------- Post added at 08:56 PM ---------- Previous post was at 08:42 PM ----------

Also, about that Cloudflare DNS tweak. Is it the same one from Magisk module? I had issues with it when running along with AdGuard AdBlocker in VPN Mode. That module prevented AdGuard AdBlocker from using Cloudflare's DNS-over-HTTPS. It would just use 1.1.1.1.
[Fire TV Android Development] Skel40:
Nope. You only have to use the tinfoil if you end up bricking the stick and can't boot. I think so since I used 1.1.1.1 and 1.0.0.1 and it's worth a try connecting to AdGuard and see if any issue is occurring
[Fire TV Android Development] DirtyAngelicaSecured:
Thanks so much! Is debloated version 6.2.7.2 coming any time soon? I was going to debloat + Magisk-root everything on my own for a learning experience, but I wouldn't know what to edit/tweak for performance improvements to get rid of those nasty stutters.
[Fire TV Android Development] Pachacouti:
It is best to remove the foil. I actually find it easier to place the point of a needle on the 3rd component from right of chip, then lower needle to metal chasis, as the foil can actually rip components off, as it did mine, the 3rd component came away, because the foil was too soft to get a decent connection, it took off that 3rd component, but I applied a needle to left solder point of third component, and lowered needle onto chasis, and it still worked with component missing. In testing I found two other points that work, as the foil dropped when using it, onto other components left of the chip, but riskier than the choice we have. Also, there is another component right of the pinhole mark, that works for this. Basically, anything that crashes the chip will work.

After using fireiso, boot into twrp, wipe userdata, then exit twrp shell to adb in console, to push debloat, then type adb shell, then flash this debloat, let it boot up, then reboot into twrp to flash magisk 20.4, I then did the launcher thread to remove amazon gui, big difference.

---------- Post added at 07:27 AM ---------- Previous post was at 07:01 AM ----------

Simple:

adb reboot recovery

cntrl + c (to exit frozen adb)

adb kill-server (to refresh adb)

then adb connect (your device ip)

adb shell (taking you into twrp)

twrp wipe userdata

exit (exit twrp to adb in same console window)

adb push debloat.zip to /storage/emulated/0

adb shell

twrp install /storage/emulated/0/debloat.zip

reboot -p

boot into gui, then set up your account, enable adb/unknown scources then

adb push Magisk-v20.4.zip /storage/emulated/0/

adb reboot recovery

cntrl + c (to exit frozen adb)

adb kill-server (to refresh adb)

then adb connect (your device ip)

adb shell (taking you into twrp)

twrp install /storage/emulated/0/Magisk-v20.4.zip

reboot -p

Voila!
[Fire TV Android Development] DirtyAngelicaSecured:
Thanks! Does this Debloat preserve Amazon Prime function? I tried a different Debloat app that didn't require rooting and it broke Amazon Prime. I hope version 6.2.7.2 of this ROM is going to get released soon.
[Fire TV Android Development] Pretoriano80:
6.2.7.2? Is that even out, i haven't received any OTA on my FireTV 4k?!
[Fire TV Android Development] rutinh:
Lost Youtube Cast

I cannot cast YouTube to Fire stick 4K when flashed the Debloated Rom. When using the YouTube app from phone, it could not fine any amazon device to cast. Please help!
[Fire TV Android Development] Pachacouti:
Without a working list..?

One other thing I found is that the names of some system apps have different name's, and so I found it difficult to remove certain packages, due to different naming structure, I also noted that even tho I used 4k like other's, that each rom/debloat I tested used different packages altogether, yet they probably did same thing. I only use stbemu, and a few apkmody apps for movies, and removed amazon playstore, replaced the player with vlc/mxplayer, but without a list made by a few tester's, stating which apps they needed to run what-ever... I should start a thread for this inf, but I'm sure a young pup could do that quicker than me, I dont just work with stick's, but would be willing to show my stock priv-app list, then folks can compare names that we can find what is safe to delete... so many list's, most files are same, but significant ones are different, and differ by country.

I also noticed something today while using stbemu pro to stream. I've read many sites mentioning Stbemu pro (latest) cutting out, freezing, and noted certain possible causes. The first, seems dependant on which server I stream from, what happens is, at the end of whatever movie, it freezes, need to exit app to get back into that server, and the selection re: country is always reset, it never remembered previous selection in order for me to go right to channel viewed.

The 2nd, and I think this is the cause of it freezing, is every so often, maybe 5-10 minutes, while in full screen, the channel information screen pops up from the bottom, showing only time and channel name, (I would call this the OSD (on screen (channel) display) , as if I had pressed a button on the remote. I only noticed it, because every time this happens, seconds later, the freeze happens. I also noted that while in small screen, with channels on the left, we have the teletext coloured buttons at the bottom of the screen, which appeared to raise like the channel information screen, again, second's later, the freeze.

So I try another server, and noted that yes, every time either the channel information screen at bottom pop's up, or the teletext buttons while in small screen mode, the freeze happened, but the better the server, the less chance of the freeze actually happening. If someone knows how to stop the channel information screen randomly popping up as if you touched the remote (my remote was on the table), we might find this is the cause of the freezes, and be able to stop freezes, just a heads up.

Edit: It would probably be wiser if we made a list of apps required to keep whatever we want running instead of debloating first, by keeping the requirement's we can then know its safe to delete anything else. Safe to keep v Safe to delete, I reckon we need to know what we need to keep first.
[Fire TV Android Development] Skel40:
Updated the OP with a fix! You need to re-add a package back into the /system/priv-app folder then install it and do a reboot
[Fire TV Android Development] Skel40:
I completely agree with this! I will add the remote app functionalities and other things back into the rom in a future release. Posting a list of what I removed may be a little time consuming but is definitely worth considering a try so those who would like to know what I removed know is very helpful and necessary. Thank you for the suggestion!
[Fire TV Android Development] Pachacouti:
Ahh... Dont do anything based on what I write unless it's an improvement, I was more kinda hoping someone may list what we need to keep, then as long as we keep the bare essential's, anything else can go without fear of deleting something that saves us reflashing lol, thanks for the reply :)
[Fire TV Android Development] rutinh:
It did not work. After put the FireTVDefaultMediaReceiver folder back to the /system/priv-app folder, then install the .apk. However, an error message appears: "App not installed. This app isn't compatible with your TV"
[Fire TV Android Development] bennebartsch:
mantis:/system/priv-app/FireTVDefaultMediaReceiver # pm install /system/priv-app/FireTVDefaultMediaReceiver/FireTVDefaultMediaReceiver.apk

Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY: Package couldn't be installed in /data/app/com.amazon.awvflingreceiver-1: Package com.amazon.awvflingreceiver requires unavailable shared library com.amazon.whisperplay; failing!]