[Xiaomi Mi A2 Lite Themes, Apps, and Mods] TogoFire:
Outhes Tweaks/Fixes:

I recommend using RootExplorer app.

# Allowed packages to use AUX camera vendor/system

vendor.camera.aux.packagelist=com.bsgmod.camera,com.google.android.GoogleCameraWide,com.android.camera,org.codeaurora.snapcam,com.android.camera,com.huaqin.factory,org.lineageos.snap

vendor.camera.aux.packagelist2=com.android.systemui,com.huaqin.cameraautotest,com.huaqin.runtime

camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,com.qualcomm.qti.qmmi

vendor.camera.aux.packagelist=com.dual.GCam,com.Wide.GCam,com.Tele.GCam,org.codeaurora.snapcam,com.android.camera,com.qualcomm.qti.qmmi,com.longcheertel.cit

# HAL1 apps list or force those apps to use hal1 - lagfix - vendor/system

vendor.camera.hal1.packagelist=com.android.camera,com.whatsapp,com.intsig.camscanner,com.instagram.android,com.facebook.orca,com.skype.raider,com.google.android.talk

camera.hal1.packagelist=com.skype.raider,com.google.android.talk,com.whatsapp, com.viber.voip,com.google.android.talk,com.instagram.android

# Enable Hal3 and Cam2api in build.prop and in vendor/build.prop

persist.camera.HAL3.enabled=1

persist.vendor.camera.HAL3.enabled=1

persist.vendor.camera.stats.test=5

persist.camera.stats.test=5

persist.camera.eis.enabled=1

# fix green cam

persist.camera.CDS=on

# Cam of WhatsApp and insta fix

camera.disable_treble=0

# Fix low volume in voice rec on whatsapp, telegram...

persist.vendor.audio.fluence.voicerec=false

## Camera Tweaks Supports Google Camera" >> /system/build.prop

persist.camera.HAL3.enabled=1 >> /system/build.prop

camera.HAL3.enabled=1 >> /system/build.prop

persist.camera.eis.enable=1 >> /system/build.prop

camera.eis.enable=1 >> /system/build.prop

persist.camera.is_mode=4 >> /system/build.prop

camera.is_mode=4 >> /system/build.prop

persist.camera.disable_zsl_mode=1 >> /system/build.prop

camera.disable_zsl_mode=1 >> /system/build.prop

persist.camera.gyro.android=4 >> /system/build.prop

camera.gyro.android=4 >> /system/build.prop

persist.camera.tof.direct=1 >> /system/build.prop

camera.tof.direct=1 >> /system/build.prop

persist.camera.tnr.preview=1 >> /system/build.prop

camera.tnr.preview=1 >> /system/build.prop

persist.camera.tnr.video=1 >> /system/build.prop

camera.tnr.video=1 >> /system/build.prop

ro.camera.notify_nfc=1 >> /system/build.prop

camera.notify_nfc=1 >> /system/build.prop

# Performance

sys.use_fifo_ui=1

debug.sf.latch_unsignaled=1

# Netflix custom property

ro.netflix.bsp_rev=Q660-13149-1

# bluetooth fix

persist.vendor.btstack.enable.splita2dp=false

persist.vendor.btstack.a2dp_offload_cap=false

# bt fix 2 Add this to vendor build prop

persist.bluetooth.bluetooth_audio_hal.disabled=true

# BT FIX 3 For fixing BT issue. Add this below lines in /vendor/build.prop

persist.vendor.btstack.enable.splita2dp=false

persist.vendor.btstack.a2dp_offload_cap=false

#BT FIX 4

1. Bluetooth audio connection fix

Backup the file /vendor/overlay/BluetoothResCommon.apk

Simply remove /vendor/overlay/BluetoothResCommon.apk by root explorer app

2. aptX HD

Install "Bluetooth stack audio bitrate changer for SBC + aptX & aptX-HD enabler" from Download of Magisk Manager.

3. build.prop

Open /vendor/build.prop and find "persist.vendor.bt.a2dp_offload_cap=sbc-aac" and replace "sbc-aac" to "sbc-aac-aptx-aptXHD" (Add -aptx-aptXHD)

Note: if you don't find the add "persist.vendor.bt.a2dp_offload_cap=sbc-aac-aptx-aptXHD"

add:

persist.bt.a2dp_offload_cap=sbc-aptx-aptxhd

persistent.bt.a2dp_offload_cap=sbc-aptx-aptXHD-aac-ldac

4. Restart device and test

#FIX BT(a2dp) 5:

qcom.bluetooth.soc=smd

outhers:

https://xdaforums.com/project-trebl...de-fix-bluetooth-audio-a2dp-aptx-gsi-t3950938

https://matjaz.it/simple-fix-for-bluetooth-audio-not-working-on-android-10/

https://www.reddit.com/r/oneplus/comments/d02ssd/is_aptxaptx_hd_working_for_anyone_after_the/

https://github.com/xamarin/xamarin-android/issues/3508

https://github.com/PixelExperience-...mmit/977444af69f10fc135d07e19f1e5f1183e73e9ff

##FiX BT 6 - system/buid.prop

#force disable Bluetooth AAC by default

persist.bt.a2dp.aac_disable=true

#system prop for wipower support

ro.bluetooth.emb_wp_mode=false

ro.bluetooth.wipower=false

#system prop for Bluetooth SOC type

vendor.bluetooth.soc=cherokee

ro.bluetooth.library_name=libbluetooth_qti.so

persist.vendor.btstack.enable.splita2dp=true

persist.vendor.btstack.a2dp_offload_cap=sbc-aptx-aptxhd-aac

ro.bluetooth.remote.autoconnect=true

ro.bluetooth.request.master=true

vendor/build.prop:

persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxhd-aac

ro.bluetooth.a2dp_offload.supported=true

persist.bluetooth.a2dp_offload.disabled=false

persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac

#Fix BT 7:

system prop for Bluetooth SOC type:

vendor.bluetooth.soc=cherokee

ro.bluetooth.library_name=libbluetooth_qti.so

persist.vendor.btstack.enable.splita2dp=false

persist.vendor.btstack.a2dp_offload_cap=false

#system prop for A4WP profile support

ro.bluetooth.a4wp=false

#system prop for wipower support

ro.bluetooth.emb_wp_mode=false

ro.bluetooth.wipower=false

# Navbar fix

persist.navbar_enabled=1

# fix - hide all icon

Write this in Terminal Emulator:

su

settings put secure sysui_rounded_content_padding 0

# insecure adb flag for roms

ro.debuggable=1

ro.secure=0

# Mtp fix

ro.adb.secure=0

persist.adb.notify=1

persist.service.adb.enable=1

persist.service.debuggable=1

persist.sys.usb.config=mtp,adb

# Fix Call

persist.vendor.audio.fluence.voicecall=true

# Fix dp4 can't add google account or #Optimize for MSM-8996 & MSM8953 system/build.prop vendor/build.prop

ro.sys.fw.dex2oat_thread_count=4

dalvik.vm.boot-dex2oat-threads=8

dalvik.vm.dex2oat-threads=4

dalvik.vm.image-dex2oat-threads=4

dalvik.vm.dex2oat-filter=speed

dalvik.vm.image-dex2oat-filter=speed

dalvik.vm.heapgrowthlimit=256m

dalvik.vm.heapstartsize=8m

dalvik.vm.heapsize=512m

dalvik.vm.heaptargetutilization=0.75

dalvik.vm.heapminfree=512k

dalvik.vm.heapmaxfree=8m

# Spectrum support:

spectrum.support=1

# https://xdaforums.com/mi-a2-lite/themes/spectrummorpho-xiaomi-devices-t3986071

# Volte FIX

persist.dbg.ims_volte_enable=1

persist.dbg.volte_avail_ovr=1

persist.dbg.vt_avail_ovr=1

persist.dbg.wfc_avail_ovr=1

persist.radio.rat_on=combine

persist.radio.data_ltd_sys_ind=1

persist.radio.data_con_rprt=1

persist.radio.calls.on.ims=1

#volstep_tweak

ro.config.media_vol_steps=25

ro.config.vc_call_vol_steps=25

# vendor fix message - there's an internal problem.. system/build.prop

ro.treble.enabled=false

#Or update defconfig and vintf

# Fix SafetyNet manually - ctsProfile work by setting this in build.prop

ro.system.build.fingerprint=xiaomi/tissot/tissot_sprout:8.0.0/OPR1.170623.026/8.1.10:user/release-keys

ro.build.description=tissot-user 8.0.0 OPR1.170623.026 8.1.10 release-keys

ro.build.fingerprint=xiaomi/tissot/tissot_sprout:8.0.0/OPR1.170623.026/8.1.10:user/release-keys

#enable wq_power_save, this can save some batterry if the tasks dont have priority

wq_power_save=1

#tweaks

echo "persist.sys.scrollingcache=3"

echo "profiler.force_disable_ulog=1"

echo "logcat.live=disable"

echo "ro.kernel.checkjni=0"

echo "ro.config.nocheckin=1"

echo "wifi.supplicant_scan_interval=300"

echo "pm.sleep_mode=2"

debug.composition.type=c2d

debug.egl.hw=1

debug.enabletr=true

debug.overlayui.enable=1

debug.performance.tuning=1

debug.qc.hardware=true

debug.qctwa.statusbar=1

debug.qctwa.preservebuf=1

debug.sf.hw=1

#Support HDR & FHD

sys.display-size= "YOU_RESOLUTION" - Daisy is 2280x1080

video.accelerate.hw=1

ro.media.enc.jpeg.quality=100

ro.media.dec.jpeg.memcap=8000000

ro.media.enc.hprof.vid.bps=8000000

ro.media.enc.hprof.vid.fps=65

#Tweaks for RAM

ro.config.fha_enable=true

ro.sys.fw.bg_apps_limit=32

ro.config.dha_cached_max=16

ro.config.dha_empty_max=42

ro.config.dha_empty_init=32

ro.config.dha_lmk_scale=0.545

ro.config.dha_th_rate=2.3

ro.config.sdha_apps_bg_max=64

ro.config.sdha_apps_bg_min=8

#Internet Velocity

net.tcp.buffersize.default = 4096,87380,256960,4096, 16384,256960

net.tcp.buffersize.wifi = 4096,87380,256960,4096,163 84,256960

net.tcp.buffersize.umts = 4096,87380,256960,4096,163 84,256960

net.tcp.buffersize.gprs = 4096,87380,256960,4096,163 84,256960

net.tcp.buffersize.edge = 4096,87380,256960,4096,163 84,256960

net.tcp.buffersize.hspda = 4096,87380,256960,4096,16 384,256960

net.tcp.buffersize.hspa = 4096,87380,256960,4096,163 84,256960

#Signal Performance

ro.telephony.call_ring.delay=0

ring.delay=0

#Save Battery Without Performance Drop

pm.sleep_mode=1

ro.ril.disable.power.collapse=0

ro.security.mdpp.ux=Disabled

wifi.supplicant_scan_interval=180

persist.sys.storage_preload=0

wlan.wfd.hdcp=disable

profiler.force_disable_ulog=true

profiler.force_disable_err_rpt=true

#Launcher Is Kept in Memory

ro.HOME_APP_ADJ=1

#Allow Purge of Assets To Free Ram

persist.sys.purgeable_assets=1

#Smooth Video Stream

media.stagefright.enable-player=true

media.stagefright.enable-meta=true

media.stagefright.enable-scan=false

media.stagefright.enable-http=true

#Force GPU Render On 2D Operations

debug.sf.hw=1

#Increase General Performance

debug.performance.tuning=1

#Google Assistant

ro.opa.eligible_device=true

#Sim Slot

ro.multisim.simslotcount=2

#Enable Faster Boot

ro.config.hw_quickpoweron=true

#Boot & Shutdown Animation FPS Boost

boot.fps=32

shutdown.fps=32

#Hibernate Device

persist.sys.shutdown.mode=hibernate

#Gaming Tweaks

persist.sys.NV_FPSLIMIT=60

persist.sys.NV_POWERMODE=1

persist.sys.NV_PROFVER=15

persist.sys.NV_STEREOCTRL=0

persist.sys.NV_STEREOSEPCHG=0

persist.sys.NV_STEREOSEP=20

#set default rendering to opengl from skiagl

debug.hwui.renderer=skiagl

#FDE CHANGE NAME

in terminal

setprop com.feravolt.fdeai.name AI_NAME

OR

put it in build.prop

com.feravolt.fdeai.name=InsertNameHere

#force the app to use 2.0 or vulkan

debug.hwui.renderer=vulkan

#Improve performance - Adreno Gpu gamers add these lines to build.prop and then restart the device. game perfomance should get better

com.qc.hardware=true

debug.composition.type=gpu

debug.egl.hw=1

debug.egl.profiler=1

debug.enabletr=true

debug.gralloc.enable_fb_ubwc=1

debug.overlayui.enable=1

debug.performance.tuning=1

debug.qc.hardware=true

debug.qctwa.preservebuf=1

debug.qctwa.statusbar=1

debug.sf.hw=1

debug.sf.latch_unsignaled=1

dev.pm.dyn_samplingrate=1

hw3d.force=1

hwui.disable_vsync=true

hwui.render_dirty_regions=false

ro.config.enable.hw_accel=true

ro.fb.mode=1

ro.product.gpu.driver=1

ro.sf.compbypass.enable=0

#misc/outhers

profiler.force_disable_err_rpt=1

profiler.force_disable_ulog=1

ro.min_pointer_dur=1

ro.max.fling_velocity=12000

ro.min.fling_velocity=8000

wifi.supplicant_scan_interval=600

logcat.live=disable

ro.ril.disable.power.collapse=0

ro.ril.power_collapse=1

ro.mot.eri.losalert.delay=1000

ro.kernel.android.checkjni=0

ro.kernel.checkjni=0

ro.config.nocheckin=1

windowsmgr.max_events_per_sec=150

# sys.use_fifo_ui=1

# persist.sys.scrollingcache=3

# windowsmgr.max_events_per_sec=300

# ro.max.fling_velocity=13800

# ro.min.fling_velocity=10500

# debug.kill_allocating_task=0

MIN_HIDDEN_APPS=false

ACTIVITY_INACTIVE_RESET_TIME=false

MIN_RECENT_TASKS=false

PROC_START_TIMEOUT=false

CPU_MIN_CHECK_DURATION=false

GC_TIMEOUT=false

SERVICE_TIMEOUT=false

MIN_CRASH_INTERVAL=false

ENFORCE_PROCESS_LIMIT=false

# ro.config.fha_enable=true

# ro.config.dha_cached_max=16

# ro.config.dha_empty_max=32

# ro.config.dha_empty_init=32

# ro.config.dha_lmk_scale=0.990

# ro.config.dha_th_rate=1.4

ro.config.sdha_apps_bg_max=64

ro.config.sdha_apps_bg_min=8

# Disable fast dormancy

ro.fast.dormancy=0

ro.config.hw_fast_dormancy=0

ro.ril.fast.dormancy.rule=0

# Enable fast dormancy

ro.fast.dormancy=1

ro.config.hw_fast_dormancy=1

ro.ril.fast.dormancy.rule=1

ro.semc.enable.fast_dormancy=true

# Disable IMS debug logs

# persist.ims.disableDebugLogs=1

# Disable quality control

# persist.radio.oem_socket=false

# set prefer network type

# LTE, GSM, WCDMA(9)

ro.telephony.default_network=10

telephony.lteOnCdmaDevice=1

telephony.lteOnGsmDevice=1

telephony.lte.cdma.device=1

telephony.lte.gsm.device=1

ro.ril.def.preferred.network=10

# Doze parameters

pm.sleep_mode=1

doze.display.supported=true

doze.pulse.notifications=true

doze.use.accelerometer=0

doze.pickup.vibration.threshold=2000

doze.pulse.brightness=5

doze.pulse.delay.in=200

doze.pulse.duration.in=1000

doze.pulse.duration.out=1000

doze.pulse.duration.visible=3000

doze.pulse.proxcheck=0

doze.pulse.schedule=1s,10s,30s,60s,120s

doze.pulse.schedule.resets=3

doze.pulse.sigmotion=0

doze.shake.acc.threshold=10

doze.vibrate.sigmotion=0

debug.doze.component=0

# Doze parameters

pm.sleep_mode=1

# Faster boot mode

# persist.sys.shutdown.mode=hibernate

# ro.config.hw_quickpoweron=true

# Set default power mode to low power for encoder

# vidc.debug.perf.mode=2

# Additional modified props

ro.config.nocheckin=1

ro.kernel.checkjni=0

ro.kernel.android.checkjni=0

wifi.supplicant_scan_interval=360

#miracast props

PRODUCT_PROPERTY_OVERRIDES += \

persist.debug.wfd.enable=1

#fix video calls have an audio echo problem - Add this to vendor's prop

ro.vendor.audio.sdk.fluencetype=fluence

#How to improve better signal reception/Fix signal

persist.cust.tel.eons=1

ro.config.hw_fast_dormancy=1

#[FIX] NEW PUBGM UPDATE NOTCH

search for this "ro.product.model" set the value from "POCO F1" to "MI 8"

##FIX GPLAY

1. Clear App Data of Google Pay

2. Reboot to TWRP

3. Go to Advanced / File Manager

4. Navigate to file /data/data/com.google.android.gms/databases/dg.db

5. Select chmod, enter "440" and confirm

6. Reboot to System and you should be able to use Google Pay

##Magisk HIDE - Fix for vendor mismatch popup:

1. Install "magsisk hide props config" module from magisk downloads.

2. Install any terminal emulator from play store, I use terminus (as I use it for my ssh too). On terminus go to terminals>connect>local terminal.

3. Type su and hit enter.

4. Type props and hit enter.

5. Follow the instructions on screen to edit the fingerprint. Select your device in later steps. Reboot.

#FP FIX

TWRP, mount persist, /persist/data or /data/persist and remove all fingerprint_0_0 etc,

#FP FIX 2

download selinux switcher app, for example https://labs.xda-developers.com/store/app/com.ibuprophen.selinux set selinux for permissive, reboot phone, add fingerprint, then set selinux back to enforcing, and finally reboot. proof.

#Fix headphone volume - incall volume when your on a phone call:

Go to vendor>etc>mixer paths tasha (with an root explorer, edit it RX0 is default set to 84, set it to 90 or 92

Change it to 90-91 or 92

Save and reboot

Only change the RX0

MAY HAPPEN FROM ENTERING IN BOOTLOOP, I DON'T RESPONSIBLE FOR DAMAGE CAUSED OR DATE LOST BY USING THIS.