[Xiaomi Poco F3 / Xiaomi Mi 11X / Redmi K40] Rstment ^m^:
This is a GSI Image for alioth, fixes audio distortion,sets default renderer to Vulkan and increases Dalvik and dex2oat for smoother performance.

Not working:

Telephony - Fully broken, they don't hear you and you don't hear them... Both mic and speakers work fine I'll try looking into this

Camera - Works just like in any other aosp rom xd meaning stock app freezes when switching sensors, no auto focus/rly bad autofocus.

Bluetooth - only SBC/AAC codecs.

(Fingerprint works as long as you are on Miui 13 before flashing GSI12 , If you are flashing GSI11 Miui 12 will work. If you are having issue update stock miui)

Any ideas on how to fix these or any other issues I would like to hear. Guide below let's you mount system image fully , so editing/adding files is as simple as drag and drop.

( Since 128gb is smallest variant of this phone there's plenty of space to reserve 2GB for increased performance of apps , no reason to use default 500mb ).

For best performance first flash back to stock miui via fastboot !!! #MIUI 13 PREFERRED

( You want original vendor partitions alongside everything else for the best compatibility with GSI image )

Vanilla variant only without GMS (Playstore)

Idk the license agreement for it so I won't be sharing GMS variant, as far as I am aware vanilla one should be free to share as long as you provide source.If you want GMS variant it's not hard to make - use any linux distro , follow steps below to mount system.img , when mounted you can replace default build.prop from /system/build.prop with the one provided or modify build.prop yourself - explained below.

Download and unzip in a new folder:

DOWNLOAD

Steps for flashing:

Download Platform Tools from google, unzip them, open unzipped folder , open terminal inside - right click inside folder ( Windows: right click + shift ) click open terminal/command window/powershell

./fastboot reboot fastboot ( This is a must , before this reboot phone , hold power down while rebooting to enter fastboot and then issue this command )

./fastboot --disable-verification flash vbmeta ( Drag and drop vbmeta.img from GSI folder to terminal, when done press enter )

./fastboot erase system

./fastboot flash system ( Drag and drop system.img from GSI folder to terminal , when done press enter )

./fastboot -w

./fastboot reboot

That's it. As far as I know everything works , magisk should work as well as long as you followed steps and didn't delete logic parition by following some other guide - you need to install magisk yourself xd

- to enable 120fps wait for phone to boot up . Enable USB debugging , connect to pc and issue these:

./adb shell settings put system peak_refresh_rate 120

./adb shell settings put system min_refresh_rate 120

#########################################################

Process behind this :

Downloaded GSI from: https://developer.android.com/about/versions/12/gsi-release-notes

Image later processed:

Opwn terminal in GSI folder

mkdir system

fallocate -l 5G system.img

fallocate -l 5G system.img

e2fsck -y -E unshare_blocks system.img

sudo mount -t ext4 -o loop system.img system

sudo nautilus - locate the folder where you unzipped the GSI

edit build.prop to add these lines OR use buid.prop provided below to replace the whole file:

ro.audio.ignore_effects=true

debug.hwui.renderer=vulkan

dalvik.vm.image-dex2oat-Xmx=128m

dalvik.vm.dex2oat-Xmx=2048m

pm.dexopt.first-boot=speed

pm.dexopt.boot=speed

pm.dexopt.boot-after-ota=speed

pm.dexopt.post-boot=extract

pm.dexopt.install=speed

pm.dexopt.install-fast=speed

pm.dexopt.install-bulk=speed

pm.dexopt.install-bulk-secondary=speed

pm.dexopt.install-bulk-downgraded=speed

pm.dexopt.install-bulk-secondary-downgraded=extract

pm.dexopt.bg-dexopt=speed

dalvik.vm.minidebuginfo=false

dalvik.vm.dex2oat-minidebuginfo=false

persist.traced.enable=0

sudo umount system

e2fsck -yf system.img

resize2fs -M system.img

e2fsck -yf system.img