[Redmi K20 / Xiaomi Mi 9T Themes, Apps, and Mods] kpirnie:
DEVELOPMENT HAS STOPPED. I NO LONGER HAVE THIS DEVICE​

KevP75's set of tweaks and services to keep your device running buttery smooth and keep that battery pumpin.

What's it work on.

Should work fine on both AOSP and MIUI 11 based Roms.

Issues

Other than the above, I have found 0 issues. During my testing I received 2 full days of battery life, with 6.5hrs SOT, and no performance issues. Your mileage will probably vary as I am sure you use your device differently than I do.

What's it do?

During the install process it takes a backup of your /system/build.prop and your /system/etc/init/init.qcom.rc file, and then modifies the orginals by injecting some memory management, battery management, and performance properties.

backups are located in /data/local/kevp75/BACKUP

Tweaks some schedutil parameters lowering the min frequency, and ramp up periods for high speed loads

Disables some unnecessary logging

Few file system tweaks for better UI responsiveness

Tweaks the low memory killer a bit

Trims a few of your mounts once per week, and on boot

Forces the disabling of the wake locks property on some packages

Forces the disabling of the run-in-background property on some packages

Some packages reset these settings when you re-open the apps. These "blockers" run every hour and on boot.

There is a set of "log" files located at: /data/local/kevp75/logs

You can add packages to exclude for these.

/data/local/kevp75/data/rib_allowed is used for the "Run In Background" blocker. Add your packages to exclude, on new lines to /data/local/kevp75/USER/rib_allowed

/data/local/kevp75/data/wl_allowed is used for the "Wake Locks" blocker. Add your packages to exclude, on new lines to /data/local/kevp75/USER/wl_allowed

Lowers the swappiness... we have 6G of RAM in these, if you are using that much RAM, you should consider closing some apps more frequently.

Does a bit of cleaning

Injects true /system/etc/init.d support

How do I install it?

Download the zip file: Kevp75-Tweaks.v.#####.zip

Copy the zip file to your favorite location, then reboot to TWRP.

Tap install

Browse to the zip file and install it

Wait until it finishes

Reboot

Enjoy

How do I uninstall it?

Download the zip file: Kevp75-Tweaks.Uninstaller.zip

Copy the zip file to your favorite location, then reboot to TWRP.

Tap install

Browse to the zip file and install it

Wait until it finishes

Reboot

Enjoy

SUPPORT

Look, I can only support so much. From now on, if you have a Doze app installed, or any other tweaks installed, I WILL IGNORE YOU. From now on, if you DO NOT provide me logs, I will ignore you. Google how to get your devices logs if you do not know how to do this..

One thing I will tell you... before posting your question... look at the logs in /data/local/kevp75 Primaly the WL and RIB logs. Most likely you will need to add more packages to the allowed lists.

WHITELISTING APPS

From v2.5.4 we now have user configurable whitelists.

RUN IN BACKGROUND -> /data/local/kevp75/USER/rib_allowed

WAKELOCK -> /data/local/kevp75/USER/wl_allowed

YOU MUST LEAVE THESE FILES WHERE THEY ARE! If you are finding some of your apps are not running properly, figure out what the package name of it is, and add it to a new line to these files. On next loop through, it will be ignored.

STOCK ALLOWED LISTS

The following files are the "whitelists" of apps that are allowed to "keep" the RUN IN BACKGROUN and WAKELOCK flags. LEAVE THESE ALONE!

/data/local/kevp75/data/rib_allowed <- THIS IS THE RUN_IN_BACKGROUND WHITELIST

AOSP

com.android.calendar
com.android.contacts
com.android.deskclock
com.android.email
com.android.exchange
com.android.mediacenter
com.android.phone
com.google.android.apps.messaging
com.google.android.syncadapters.contacts
com.google.android.syncadapters.calendar
com.huawei.wifiprobqeservice
com.android.carrierconfig
com.android.cellbroadcastreceiver
com.android.cellbroadcastreceiver.overlay.common
com.android.emergency
com.android.managedprovisioning
com.android.mms
com.android.providers.blockednumber
com.android.providers.contacts
com.android.smspush
com.android.proxyhandler
com.google.ar.core
com.google.ar.lens
com.qualcomm.qti.simcontacts
com.qualcomm.timeservice
com.qualcomm.location

MIUI

com.android.calendar
com.android.contacts
com.android.deskclock
com.android.email
com.android.exchange
com.android.mediacenter
com.android.phone
com.google.android.apps.messaging
com.google.android.syncadapters.contacts
com.google.android.syncadapters.calendar
com.huawei.android.totemweather
com.huawei.android.totemweatherwidget
com.huawei.wifiprobqeservice
com.android.incallui
com.android.providers.media
com.android.settings
com.google.android.gms
com.qti.ltebc
com.xiaomi.bluetooth
android.autoinstalls.config.Xiaomi.davinci
com.android.bips
com.android.bluetoothmidiservice
com.android.calllogbackup
com.android.captiveportallogin
com.android.carrierconfig
com.android.carrierdefaultapp
com.android.cellbroadcastreceiver
com.android.certinstaller
com.android.companiondevicemanager
com.android.cts.ctsshim
com.android.cts.priv.ctsshim
com.android.dreams.basic
com.android.dreams.phototable
com.android.emergency
com.android.externalstorage
com.android.hotspot2
com.android.internal.display.cutout.emulation.corner
com.android.internal.display.cutout.emulation.double
com.android.internal.display.cutout.emulation.tall
com.android.internal.systemui.navbar.gestural
com.android.internal.systemui.navbar.gestural_extra_wide_back
com.android.internal.systemui.navbar.gestural_narrow_back
com.android.internal.systemui.navbar.gestural_wide_back
com.android.internal.systemui.navbar.threebutton
com.android.internal.systemui.navbar.twobutton
com.android.managedprovisioning
com.android.mms
com.android.mtp
com.android.pacprocessor
com.android.providers.blockednumber
com.android.providers.calendar
com.android.providers.contacts
com.android.providers.downloads
com.android.providers.downloads.ui
com.android.providers.userdictionary
com.android.proxyhandler
com.android.settings.intelligence
com.android.sharedstoragebackup
com.android.simappdialog
com.android.smspush
com.android.soundrecorder
com.android.statementservice
com.android.storagemanager
com.android.thememanager
com.android.thememanager.module
com.android.traceur
com.android.updater
com.android.vending
com.android.vpndialogs
com.fido.asm
com.fido.xiaomi.uafclient
com.google.android.apps.maps
com.google.android.apps.photos
com.google.android.apps.turbo
com.google.android.apps.walletnfcrel
com.google.android.apps.wellbeing
com.google.android.calendar
com.google.android.configupdater
com.google.android.ext.services
com.google.android.ext.shared
com.google.android.feedback
com.google.android.gms.location.history
com.google.android.gsf
com.google.android.modulemetadata
com.google.android.onetimeinitializer
com.google.android.packageinstaller
com.google.android.partnersetup
com.google.android.permissioncontroller
com.google.android.printservice.recommendation
com.google.android.syncadapters.calendar
com.google.android.tts
com.google.android.webview
com.google.android.youtube
com.lbe.security.miui
com.mi.globallayout
com.milink.service
com.mipay.wallet.id
com.mipay.wallet.in
com.miui.analytics
com.miui.audioeffect
com.miui.cloudbackup
com.miui.cloudservice
com.miui.core
com.miui.extraphoto
com.miui.fm
com.miui.global.packageinstaller
com.miui.guardprovider
com.miui.hybrid
com.miui.hybrid.accessory
com.miui.micloudsync
com.miui.miservice
com.miui.mishare.connectivity
com.miui.miwallpaper
com.miui.msa.global
com.miui.phrase
com.miui.player
com.miui.powerkeeper
com.miui.securityadd
com.miui.securitycenter
com.miui.smsextra
com.miui.videoplayer
com.miui.weather2
com.qti.confuridialer
com.qualcomm.atfwd
com.qualcomm.embms
com.qualcomm.qti.improvetouch.service
com.qualcomm.qti.ims
com.qualcomm.qti.performancemode
com.qualcomm.qti.qms.service.connectionsecurity
com.qualcomm.qti.qms.service.telemetry
com.qualcomm.qti.qms.service.trustzoneaccess
com.qualcomm.qti.remoteSimlockAuth
com.qualcomm.qti.simcontacts
com.qualcomm.timeservice
com.xiaomi.account
com.xiaomi.bsp.gps.nps
com.xiaomi.cameratools
com.xiaomi.discover
com.xiaomi.finddevice
com.xiaomi.glgm
com.xiaomi.micloud.sdk
com.xiaomi.midrop
com.xiaomi.mipicks
com.xiaomi.miplay_client
com.xiaomi.mircs
com.xiaomi.mirecycle
com.xiaomi.payment
com.xiaomi.scanner
com.xiaomi.simactivate.service
com.xiaomi.smarthome
com.xiaomi.xmsf
com.xiaomi.xmsfkeeper
com.qualcomm.location

/data/local/kevp75/data/wl_allowed <- THIS IS THE WAKELOCK WHITELIST

AOSP

android
com.android.bluetooth
com.android.networkstack
com.android.nfc
com.android.phone
com.android.providers.calendar
com.android.providers.media
com.android.server.telecom
com.android.systemui
com.android.vending
com.caf.fmradio
com.google.android.apps.messaging
com.google.android.apps.photos
com.google.android.apps.safetyhub
com.google.android.apps.tachyon
com.google.android.calendar
com.google.android.deskclock
com.google.android.dialer
com.google.android.gms
com.google.android.googlequicksearchbox
com.google.android.ims
com.google.android.inputmethod.latin
com.google.android.youtube
com.qualcomm.qcrilmsgtunnel
com.qualcomm.timeservice
org.codeaurora.ims
com.qualcom.location
com.google.android.carrier
com.android.providers.telephony
com.google.android.apps.maps
com.qualcomm.location

MIUI

android
com.android.bluetooth
com.android.networkstack
com.android.nfc
com.android.phone
com.android.providers.calendar
com.android.providers.media
com.android.server.telecom
com.android.systemui
com.android.vending
com.caf.fmradio
com.google.android.apps.messaging
com.google.android.apps.photos
com.google.android.apps.safetyhub
com.google.android.apps.tachyon
com.google.android.apps.vega
com.google.android.apps.wellbeing
com.google.android.calendar
com.google.android.deskclock
com.google.android.dialer
com.google.android.gms
com.google.android.googlequicksearchbox
com.google.android.ims
com.google.android.inputmethod.latin
com.google.android.youtube
com.qualcomm.qcrilmsgtunnel
com.qualcomm.timeservice
org.codeaurora.ims
org.codeaurora.snapcam
com.android.deskclock
com.android.incallui
com.android.mms
com.android.networkstack.inprocess
com.mi.health
com.miui.aod
com.miui.daemon
com.miui.fm
com.xiaomi.finddevice
com.qualcom.location
com.google.android.carrier
com.android.providers.telephony
com.google.android.apps.maps
com.mi.android.globalminusscreen
com.qualcomm.location

DOWNLOADS​

REPO: https://gitlab.com/westernmass-hosting/android/xiaomi-mi9t-davinci

CHECK THE PROPER FOLDER IN THE REPO FOR THE DOWNLOADS​