[General Topics] mayly:
This is not a question. As I understand the situation there is no good solution to this but I would like to open a discussion on the issue as this problem seems to appear more often recently but has not been documented online yet

If you have an old device with small internal storage and want to extend the lifespan using a more recent Version of Android (stock or custom ROM) you should take the following into consideration. This also applies to some new, but cheap devices, where you would like to extend your internal memory with a MicroSD card formatted (adoptable) as internal memory. Chances are you'll eventually lose data.

I've encountered persistent and reproducible issues with multiple Android devices (usually Android 9, 11 and 12 - stock ROMs and LineageOS) where the microSD card, formatted as internal storage, becomes corrupted and inaccessible after copying a certain amount of files. This issue has been observed across different microSD card manufacturers and after performing factory resets, suggesting a deeper underlying problem.

While copying files to the microSD card (DCIM/Camera, DCIM/Screenshots, or other directories), I consistently encounter a "Could Not Write File" error after copying a certain number of files. After that the target directory is usually unreadable. Also just making pictures or screenshots over time can trigger the problem when the directory gets more and more files.

I've used ADB to logcat the "Structure Needs Cleaning" error, but there is no `fsck` through ADB to fix the issue. Since the drive is encrypted one is out of luck in fixing it. If the problem is in a subdirectory of e.g. DCIM then one can put the broken folder aside by renaming the parent DCIM folder to get camera and screenshot functionality working again.

Recently even the Downloads folder broke which means downloading/saving files won't work anymore until going through the hurdle of reformatting, reinstalling the apps on the adaptible storage, and repopulating the storage with all your backupped files. This will result in half a day of work every time this happens.

Affected devices:

Motorola Moto G5 (2 devices) - Android 11 version of LineageOS - Android 9 version of LineageOS was not affected

Fairphone FP3 - Android 12 version of LineageOS for microG and Android 13 version of LineageOS

Prestigio Q pro (16GB internal storage!) - stock ROM (Android 9), new device (still available in local shops)

In recent days, as internal memory capacities have expanded across a wide array of devices, it appears that certain core functionalities are being taken for granted, resulting in a ripple effect of issues that disproportionately affect older devices and newer budget-friendly ones.

The "adoptable storage" feature, which enables users to expand their device's internal storage using a microSD card, has been a lifeline for countless users who rely on older devices or more affordable options. It allows them to accommodate the growing storage demands of modern apps, especially as apps developed by tech giants like Google continue to balloon in size with each update. This feature, in essence, ensures that the Android experience remains inclusive and functional for all users, regardless of the device they own.

However, it is disheartening to note that recent regressions and issues related to this feature seem to be overshadowed by the assumption that the abundance of internal memory renders this concern trivial. Devices that heavily rely on the "adoptable storage" feature are not just relics of the past; they are the backbone of access for many individuals who rely on budget-friendly options or continue to use their older devices. Ensuring that these devices remain viable and functional benefits the entire Android ecosystem... and our planet's ecosystem ;).