[Xiaomi Poco F1 Guides, News, & Discussion] Sreekantt:
MIUI changes things so fast. These config files are reported to break many things on the latest beta releases. Use at your own risk and feel free to experiment as this is a systemless mod.

Prerequisites -

1. Unlocked Boot loader with Magisk & TWRP on it. (You can do this on a locked boot loader & without root using adb but it is risky on MIUI 10 as few bloatware apps are deeply linked to system services in MIUI 10)

2. Terminal Debloater Magisk module. Download it here or from Magisk Manager.

3. Any Terminal Emulator app.

4. Basic de-bloat or Extreme de-bloat config file.

5. Backup (Although this module is harmless if you have magisk & TWRP properly working as we can reinstall all the apps within the TWRP if system breaks but just in case to be on safe side.)

6. Magisk Mount script- Download it here

*Please download this Magisk mount script prior to doing anything because we can reinstall apps by mounting Magisk in TWRP if something breaks.

Switch on USB debugging security settings & Install apps over USB toggles in developer options prior to the de-bloat as they need the MI account to turn them 'ON' which will be inaccessible after the de-bloating. After switching them ON, sign out of MI account, switch off MI cloud sync & Find device(If it's ON) and continue ahead.

If you have everything handy it should be a matter of few seconds to de-bloat.

We're only gonna deal with system apps for now. Uninstall the user spyware apps like UC, Opera browser, Microsoft & Amazon apps by yourself which comes with MIUI.

Guide for starters -

1. Copy this Basic de-bloat or Extreme de-bloat config file to the folder /cache in the root.

2. Reboot into Recovery

3. Install the Terminal Debloater Magisk module using the Magisk Manager.

4. Reboot into the system.

4. Open the terminal emulator app > Type 'su' and press enter > Grant root permissions > Type debloat and press enter.

4. You will see the options to debloat in various categories which are self explanatory. As we have the config file which has a predefined app list to de-bloat stored in /cache folder in root already. Type 'i' which says import config and press enter 2 times.

If you don't want to use the Basic de-bloat or Extreme de-bloat config file, Feel free to debloat independent apps.

5. Reboot 2 times and you're done most probably if nothing breaks.

Read from here if something breaks

If it breaks the system or causes boot-loop which shouldn't be the case as I'm using the same device and thoroughly tested it on 8.9.11, Don't worry! It's damn easy to reinstall all of them in one click by TWRP.

Did you download the Magisk Mount script which I asked to earlier ? If yes, just flash it with TWRP and the magisk will be mounted and accessible in TWRP file explorer. If you didn't download the script earlier, Just adb sideload it in recovery.

After mounting the Magisk in TWRP > Click on Advanced and go to file explorer.

Then delete the app folder of the system app you've uninstalled in /Magisk/terminal_debloater/system/app (/sbin/.core/img/terminal_debloater/system/app) or /Magisk/terminal_debloater/system/priv-app (/sbin/.core/img/terminal_debloater/system/priv-app) then that should undo it.

----------------------

I left out few apps even though they're considered bloatware because they're deeply linked into the system.

For example, Removing chrome breaks apps like Swift Key, Standard Notes, Twitter etc. in MIUI 10. We're gonna de-bloat most of the so called security services found in the security app but few services like app scanning which is found in MIUI Security components app is mandatory for the package manager to properly install apps from unknown sources. Considering all these, after testing it for few runs- I pinned down the apps which are safe to remove without any impact for my usage. It may vary with yours but feel free to suggest or remove any app line from this Basic de-bloat or Extreme de-bloat config file.

Apps which will be de-bloated in basic config and please suggest if I miss something.

[B]Removed[/B]
AnalyticsCore
AntiSpam
MiPicks
BugReport
facebook-appmanager
CloudService
FileExplorerGlobal
FileExplorer_old
Gmail2
Videos
Music2
Duo
InMipay
LatinImeGoogle
PaymentService
MiuiVideoPlayer
UpnpService
MSA-Global
GlobalTrendNews
Netflix_activation
XiaomiAccount
HybridPlatform
MiLinkService
MiCloudSync
HybridAccessory
SYSOPT
VsimCore
KSICibaEngine
YouDaoEngine
XMCloudEngine
SecurityAdd
SecurityCoreAdd
PlayAutoInstallStubApp
MiuiDaemon
WMService
BTProductionLineTool
TranslationService
MiuiScreenRecorder
Notes
Stk
PersonalAssistantGlobal
Browser
Calendar
CleanMaster
facebook-installer
facebook-services
GameCenterGlobal
GoogleFeedback
CloudServiceSysbase
YellowPage
CloudBackup
MiWebView
Music
Backup
SoundRecorder
MiVRFramework

[B]Bloatware but not removed[/B]
Battery & Performance, Power detector - breaks battery stats (Remove it on your own if you don't need it or you use alternatives like Better Battery Stats)

Bluetooth MIUI - comes in handy sometimes and linked to system Bluetooth service (Removed in Extreme de-bloat config file.)

Calculator - I didn't care to remove it (Removed in Extreme de-bloat config file.)

Chrome - breaks many apps

CIT & CIT QR - I think you can remove it if you don't need hardware tests (Removed in Extreme de-bloat config file.)

Clock - handy app linked to core services (Removed in Extreme de-bloat config file.)

Compass - You can remove if you don't use (Removed in Extreme de-bloat config file.)

Default print service, Google text to speech engine, MI Wallpaper, Live wallpaper picker, Photo screen saver, Photos, Quick ball, Print service recommendation, print spooler, talkback, Youtube, Drive, Maps, Updater, Audio effect, Wallpaper cropper, Weather & Weather service provider- You can remove all of these if you don't use and hopefully it wouldn't cause issues like chrome did. (Removed in Extreme de-bloat config file.)

Joyose - breaks default SMS app. You can install any other messages app and remove this (Removed in Extreme de-bloat config file.)

RTMICloudEngine - breaks Phone app. You can install Google Dialer app and remove this (Removed in Extreme de-bloat config file.)

MI Security components - breaks app installation

Sms extra - sometimes it breaks default SMS app (Removed in Extreme de-bloat config file.)

Downloads & MI drop, for some strange reason, they won't go away (Remove them with Titanium backup or adb commands below)

Files - needed by some apps which don't have storage permission like Exif data remover

Google Play services & Play store - Almost everybody needs it (You can remove google app)

Poco launcher - didn't include it in the config file as many wouldn't have a backup launcher in hand which causes system UI to crash (You can remove it by installing any launcher you prefer) (Removed in Extreme de-bloat config file.)

Scanner - Strangely, this app breaks the package manager and causes it to crash (Removed in Extreme de-bloat config file and package manager won't crash anymore)

Security - biggest bloatware of MIUI which can't be uninstalled as it's deeply integrated into settings to access permissions, data usage, battery stats etc (Go into settings of this app and switch off everything especially the security scan which scans every app and sends the data to cloud.

Telemetry j service - It wouldn't go away with this magisk module. Disable it with Titanium backup app.

Updated and tested over new beta 8.9.20 (13/09/2018)

This is a new Extreme de-bloat config file. To use this config - Just follow the instructions which I have already mentioned above.

Debloated few other MIUI services like Dialer, SMS, Gallery apps & you can replace them with trusted alternatives of your choice. Removed RT MI Cloud SDK, Joyose, Xiaomi Service Framework(battery drainer) which were required by MIUI phone-SMS apps previously and we no longer need them as we have replaced most of the services.

This almost de-bloats everything including basic apps like Clock. Retained few services like battery & performance because removing such services causes some instability in settings app as they're deeply integrated but they do send data to Xiaomi IP addresses every minute which is very suspicious. Hence, use AF Wall+ or Net guard to block their network connections.

Few apps like Facebook services, Facebook app installer, Mi Drop refuse to uninstall with this Magisk Module. Kick them out using adb shell/Titanium backup app.

adb commands for removing leftovers

pm uninstall -k --user 0 com.facebook.katana
pm uninstall -k --user 0 com.facebook.system
pm uninstall -k --user 0 com.facebook.appmanager
pm uninstall -k --user 0 com.facebook.services
pm uninstall -k --user 0 com.xiaomi.midrop.overlay
pm uninstall -k --user 0 com.xiaomi.midrop
pm uninstall -k --user 0 com.mfashiongallery.emag
pm uninstall -k --user 0 com.miui.android.fashiongallery
pm uninstall -k --user 0 com.miui.videoplayer.overlay

This is the maximum I could get in this de-bloating journey of MIUI 10 so far and it's pretty stable. You can turn off MIUI optimizations in developer options for better RAM management. (Beware! Permissions & DPI gets reset and it's pretty easy to dial them back.)

Update (14/11/2018)

Considering the new update of the module which needed the new config files for the import to work, I Updated the entire OP with the new config files.

Procedure is still the same but it needs the new config files.

You can download the new config files here Basic de-bloat / Extreme de-bloat.

If you are still using the old version and need the config files - Grab them here Basic de-bloat or Extreme de-bloat

Credits

[MENTION=7296895]veez21[/MENTION] for his wonderful debloater module which is extremely safe & easy to use.

[MENTION=5220520]mohan_168[/MENTION] for giving me the basic idea of bloatware in MIUI 9 which helped to fasten the things.

MIUI team for spoiling the beautiful MIUI(5/6/7) and filled it with bloatware ads. UC browser & Game booster...seriously ??