[Redmi Note 10S] florian1612:
I think this was misstake by myself. On the phone under "\cache\mqsas\RescuePartyLog\system" i found "uiderrors.txt":

06.04.23 21:07: Upgrading from Redmi/rosemary_eea/rosemary:12/SP1A.210812.016/V13.0.9.0.SKLEUXM:user/release-keys to 94bad4f019239befbc2e74c021cfae2e1d79c47c

06.04.23 21:07: Upgrading to Redmi/rosemary_eea/rosemary:13/TP1A.220624.014/V14.0.2.0.TKLEUXM:user/release-keys

10.08.23 21:29: First boot of Redmi/rosemary_eea/rosemary:13/TP1A.220624.014/V14.0.2.0.TKLEUXM:user/release-keys

After this the phone was deleting an recovering files until:

10.08.23 21:29: Failed to create app data for com.google.android.inputmethod.latin, but trying to recover: com.android.server.pm.Installer$InstallerException: Failed to prepare /data/user_de/0/com.google.android.inputmethod.latin

10.08.23 21:29: Recovery succeeded!

10.08.23 21:30: Failed rescue level RESET_SETTINGS_UNTRUSTED_DEFAULTS: Failed to reset secure settings for 0: Attempt to invoke interface method 'android.app.ContentProviderHolder android.app.IActivityManager.getContentProvider(android.app.IApplicationThread, java.lang.String, java.lang.String, int, boolean)' on a null object reference

10.08.23 21:30: Failed rescue level RESET_SETTINGS_UNTRUSTED_CHANGES: Failed to reset secure settings for 0: Attempt to invoke interface method 'android.app.ContentProviderHolder android.app.IActivityManager.getContentProvider(android.app.IApplicationThread, java.lang.String, java.lang.String, int, boolean)' on a null object reference

10.08.23 21:31: Failed rescue level RESET_SETTINGS_TRUSTED_DEFAULTS: Failed to reset secure settings for 0: Attempt to invoke interface method 'android.app.ContentProviderHolder android.app.IActivityManager.getContentProvider(android.app.IApplicationThread, java.lang.String, java.lang.String, int, boolean)' on a null object reference

10.08.23 21:31: Finished rescue level WARM_REBOOT

10.08.23 21:32: Finished rescue level CONFIG_RESET for package null

10.08.23 21:32: Preparing to delete files: /data/system/users/0/settings_secure.xml.fallback

10.08.23 21:32: Preparing to delete files: /data/system/users/0/settings_secure.xml

10.08.23 21:32: Preparing to delete files: /data/system/users/0/app_idle_stats.xml

10.08.23 21:32: Preparing to delete files: /data/system/users/0/settings_system.xml

10.08.23 21:32: Preparing to delete files: /data/system/users/0/settings_system.xml.fallback

10.08.23 21:32: Finished rescue level FACTORY_RESET

10.08.23 21:33: Finished rescue level FACTORY_RESET

10.08.23 21:36: Finished rescue level FACTORY_RESET

10.08.23 21:39: Finished rescue level FACTORY_RESET

I remember that the phone was in my pocket. I took it out of my pocket and saw the Redmi logo on the screen.

In this moment i did not know what the phone was doing, so I tried to restart the phone. Since then it was bootlooping and just starts stock recovery mode, where you can select "wipe data" etc.

That's why i think it is my fault. Before this the bootloader was not unlocked.

I took backup of all partitions with mtkclient and unlocked bootloader with mtkclient, to flash empty vbmeta and twrp via fastboot.

After renaming the key folders on metadata partition twrp was able to mount data.