[Galaxy S6 General] avidichard:
I assume that you already have TWRP setup on your phone so I will not go through that process here.

Android version and Phone model

My tests are based off the latest stock ROM of the Canadian SM-G920W8 SIM unlocked model. The latest supported version of Android for the Samsung Galaxy S6 is Nougat version 7.0. Versions higher than that have serious camera issues, and yes, I tried MANY ROMs. Activating API2, trying other camera apps. They all sum up to be pretty much all the same with their different sets of problems. This is why I chose the latest v7.0 stock ROM. I have not fell on any v7.1.1 ROMs and v7.1.2 have camera issues too. So, I took the latest that does not come with camera issues.

Hardware key combinations to remember

Urgent/Bootloop shutdown and reboot: Volume DOWN + Home + Power

Enter TWRP: Volume UP + Home + Power

Assayyed Kitchen: XDA Thread

This tool is the best and easiest one I have found for Windows. I just do not use the debloat and deknox options as I do it myself with a personal webserver in PHP I wrote for myself. Assayyed Kitchen uses 3 main folders for working. PLACE, WORK and READY.

PLACE: You put there a zipped ROM or any Stock files in there. Assayyed will do all the unzipping for you.

WORK: Once Assayyed has done it's magic, you should see your needed files there where "system" is the most important one we will focus on here.

READY: That's where your final zip file is created for you to copy on your phone and install.

You do not need to use the PLACE folder if you already have a full uncompressed "system" folder. Simply copy and paste the "system" folder inside the WORK folder and use Assayyed skipping the #1 step of creating a project.

I will answer these questions:

Which files do I need to delete to remove KNOX, also known as deknox the rom?

Which files and apps can I safely remove to boot my phone with a clean Android system also known as debloat?

Now, debloating is still in a work in progress on my side because I have a very ambitious debloating project, like many. The aim of this debloation is to:

Remove all Google apps,framework and libs

Remove all useless Samsung apps that do not interfere with proper working equipement.

Remove all other additional apps

All I want is to keep the barebones of a functionning Android system while maintaining some needed functionalities such as a photo gallery, calendar and the camera.

Many ROM creators have their very own definition of DEBLOAT. They not only debloat the ROM but REBLOAT them with their own personal bloatwares INCLUDING magisk and sql lite and other hacks and apps for advanced configs. The goal of my ROM is to be able to install ON MY OWN Magisk, Open GApps and other stuff if I want AND not limited to versions that are included in the ROM. ROMs with Magisk, for example, use Magisk version uploaded at the time but Magisk evolves with time and newer version become available. So I hated to have all that stuff to take care about. It's the very basic stock rom debloated with nothing more than what stock offered. No kernels, no additional software, just a pure debloated and deknoxed ROM.

Here are the lists of what I have successfully debloated with a successfull boot for now. Note that I did not add the ".apk" because those files are usually inside their respective folders BUT, should you have no folders inside the app or priv-app folder, then simply add ".apk" at the end of the name. Other thing to mention, the root directory is "system". SInce my server works with the "system" folder directly, I did not add the "system/" at the beginning of every line. The complete lists are files and folders contained inside the "system" folder. Note that some files have no extentions too and should not be mistaken for folders.

Remove KNOX or comonly said DEKNOX

// ====

// Knox

// ====

app/KNOXStub

app/KNOXStore

app/KnoxAttestationAgent

app/KNOXAgent

app/KLMSAgent

app/ContainerAgent

app/ContainerEventsRelayManager

app/KnoxFolderContainer2

app/KnoxRemoteContentsProvider

app/KnoxAppsUpdateAgent

app/KnoxFolderContainer

app/KnoxSetupWizardClient

app/KnoxSwitcher

app/MyKNOXSetupWizard

app/KnoxMigrationAgent

app/KnoxSetupWizardStub

app/SamsungDLPService

app/BBCAgent

app/SecurityLogAgent

priv-app/MyKNOXSetupWizard

priv-app/KLMSAgent

priv-app/SPDClient

priv-app/SKMSAgent

container

tima_measurement_info

framework/knoxsdk.jar

framework/knoxvpnuidtag.jar

etc/secure_storage/com.sec.knox.store

etc/secure_storage/com.sec.knox.store!dex

// ==========================================================

// Phone will FAIL to boot if the following files are deleted

// ==========================================================

//etc/permissions/knoxsdk_edm.xml

//etc/permissions/knoxsdk_mdm.xml

//lib/libknox_encryption.so

//lib/libknox_km.so

//lib/libknox_legacy_ode_km.so

//lib/libknox_migration.so

//lib/libknoxvpnfdsender.so

//lib64/libknox_encryption.so

//lib64/libknox_km.so

//lib64/libknox_legacy_ode_km.so

//lib64/libknox_migration.so

//lib64/libknoxvpnfdsender.so

//framework/arm64/boot-knoxsdk.art

//framework/arm64/boot-knoxsdk.oat

//framework/arm64/boot-knoxvpnuidtag.art

//framework/arm64/boot-knoxvpnuidtag.oat

//framework/arm/boot-knoxsdk.art

//framework/arm/boot-knoxsdk.oat

//framework/arm/boot-knoxvpnuidtag.art

//framework/arm/boot-knoxvpnuidtag.oat

Incomplete but functional Samsung apps safe to remove

// =======

// Samsung

// =======

app/SamsungSans

app/VirtualTour_N_OS

app/VideoTrimmer_Dream

app/VideoEditorLite_Dream_N

app/VideoCollage_Grace_N

app/SlowMotion_Dream_N

app/EasterEgg

app/EasyOneHand3

app/GameOptimizer

app/WallpaperBackup

app/Weather2017_SE

app/WeatherWidget2017_SE

app/SmartRemote_zero

app/SmartSwitchAgent

app/SmartcardService

app/SecFactoryPhoneTest

app/SecurityProviderSEC

app/STalkback

app/OneNote_Compact_Samsung

app/GearManagerStub

app/SecMemo3

app/AllshareFileShare

app/AllshareMediaShare

app/SBrowser_5.0

app/SPrintSpooler7

app/CloudGateway2017

priv-app/GalaxyAppsWidget_Phone

priv-app/SamsungPayStub

priv-app/SamsungBilling

priv-app/GalaxyApps_3xh

priv-app/GalaxyCare

priv-app/GalaxyThemes

priv-app/PowerPoint_SamsungStub

priv-app/SamsungAccount_Dream

priv-app/SamsungCloud

priv-app/HealthService

priv-app/LegacySmartManagerProvider

priv-app/SamsungPass_1.1

priv-app/VoiceNote_5.0

priv-app/Word_SamsungStub

priv-app/ThemeCenter

priv-app/SecLiveWallpapersPicker

priv-app/SHealth5

priv-app/SmartManager_v5

priv-app/SmartManager_v5_DeviceSecurity

priv-app/EasyLauncher2_Zero

priv-app/SVoicePLM

priv-app/SmartcardManager

priv-app/SVoiceLang_EnglishPack_US_1.0

priv-app/SVoiceLang_FrenchPack_1.0

priv-app/SamsungMagnifier3

priv-app/SecEmail_N

priv-app/SecureFolderStub

priv-app/EasySetup

priv-app/GameHome

priv-app/GameTools

priv-app/OneDrive_Samsung_v2

etc/sysconfig/samsungaccount.xml

etc/sysconfig/samsungauthframework.xml

etc/sysconfig/samsungemail.xml

etc/sysconfig/samsungfidouafasm.xml

etc/sysconfig/samsungfidouafclient.xml

etc/sysconfig/samsungpushservice.xml

framework/gamemanager.jar

// ================================================

// Phone will have an EmergencyModeService has stopped

// if only the Launcher is removed and bootloop if the other

// 2 are removed so might as well keep them all.

// ================================================

// app/EmergencyLauncher

// app/EmergencyModeService

// priv-app/EmergencyInfo

Audio files debloat

These are extra Audio files that are not necessary for the phone to boot and like most people, you will probably customize your own ringtones. I kept a few basic ringtons and sounds so the phone can have something to work with on startup, but these files, to me are extras and unecessary.

media\audio\ringtones\A_Rustling_in_the_Trees.ogg

media\audio\ringtones\Basic_Bell.ogg

media\audio\ringtones\Basic_Tone.ogg

media\audio\ringtones\Beep_Once.ogg

media\audio\ringtones\Beginning.ogg

media\audio\ringtones\Bunny_Hopping.ogg

media\audio\ringtones\Chimes.ogg

media\audio\ringtones\Crossing_a_River.ogg

media\audio\ringtones\Dance_Party.ogg

media\audio\ringtones\Day_by_Day.ogg

media\audio\ringtones\Drifting_Downstream.ogg

media\audio\ringtones\Ecliptic.ogg

media\audio\ringtones\First_Light.ogg

media\audio\ringtones\Fresh_Morning.ogg

media\audio\ringtones\Mystic_Tone.ogg

media\audio\ringtones\Ocean_Voyage.ogg

media\audio\ringtones\One_Step_Forward.ogg

media\audio\ringtones\Prelude.ogg

media\audio\ringtones\Scampering_Tone.ogg

media\audio\ringtones\Somewhere.ogg

media\audio\ringtones\Ticktac.ogg

media\audio\ringtones\Warm_Greetings.ogg

media\audio\notifications\Beep_Once.ogg

media\audio\notifications\Good_Time.ogg

media\audio\notifications\Run.ogg

media\audio\notifications\S_Harmonics.ogg

media\audio\notifications\S_Opener.ogg

media\audio\notifications\S_Temple_Bell.ogg

media\audio\notifications\Sweet_Favour.ogg

media\audio\notifications\Whisper.ogg

media\audio\notifications\Hello.ogg

media\audio\notifications\Peanut.ogg

media\audio\notifications\S_Bubbles.ogg

media\audio\notifications\S_Charming_Bell.ogg

media\audio\notifications\S_Dew_drops.ogg

media\audio\notifications\S_Knock.ogg

media\audio\notifications\S_Tickety_Tock.ogg

WIP - Revove all Google framework and apps

I went through the entire apk, framework and lib folders from a full Open GApps zip file and tried to remove all of what it installs and I get a Bootloop, So working on trying to figure out what causes this.

I found some answers at these links concerning files that makes the phone fail to boot and other usefull information.

Project-Deep-Clean

Remove all Google apps from an android phone

Other lists to come soon when I am able to get my phone to boot with my removed apps...

In the mean time...

ROOTED phones: Removing unwanted apps WITHOUT using TWRP

So, I came upon a few things for the brave amongst you who wish to debloat their phones with root access but without using scripts in TWRP. Here is what you need to know.

Paths at the root of the phone, NOT sdcard...ROOT

/data/user/0 : This is where your installed apps are BUT they are saved under their package name and not their APK names. If you delete anything in this folder, you need to reboot after you are done cleaning in here.

/system/app : These apps re-install on phone reboot if not present

/system/priv-app : Same as above, these apps re-install on reboot if not present

File browser with ROOT access

I use Total Commander which can be downloaded from the Google Play Store. Once you open it, you need to enable root access by going into the app's settings using the "Configure..." option in it's menu. The scroll down to the bottom and check the box "Root functions everywhere". If you installed Magisk, the root permissions granting popup should appear for you to grant forever. Now, you can explore the entirety of your phone to delete those pesky apps.