[Android Q&A, Help & Troubleshooting] edevoucoux:
Hello,

I am using a Samsung Galaxy A3 (2017) (A320FL) smartphone whose internal memory is 16GB with a 256GB SDCard. I flashed a LineageOS 17.1 (Android 10 Q) Custom ROM on it and rooted it.

The internal memory is full as an egg and instead of subjecting myself to planned obsolescence, I have been trying for quite some time to use the SDCard or part of the SDCard to increase this internal memory. To do so, I tried several methods, all of which where unsuccessful:

Use of the App2SD and Link2SD applications, which both lead to the same issue: at each reboot, the app tells me that it could not mount the partition intended to accommodate the applications linked to the internal memory and asks me to do a Soft Reboot. After the Soft Reboot, the partition is effectively mounted but the applications that were linked to it have all disappeared from the partition and from the system (Settings - Applications) and all I have to do is reinstall them. Well-known problem and commented on the web. I found the mount script and tried to play it at boot before the start of App2SD or Link2SD and suppressed the mount script in both apps. This second partition is effectively mounted on reboot but the issue is still the same.

Using adb shell (https://fr.xiaomitoday.it/guide-configure-a-micro-sd-like-internal-memory-on-your-xiaomi.html & https://xdaforums.com/t/how-to-extend-storage-using-sd-card-space.3614396/). Everything goes well until the command to partition the SDCard. I tried the mixed option, which I wanted (sm partition disk:179,32 mixed 66) and the full integration option (sm partition disk:179,32 private) with the same result: while partitioning, the smartphone reboots, presents its white home page (Samsung Galaxy A3, ....) and tries to boot (the LineageOS trebuchet in this case) then the boot fails and the smartphone presents its home page again, etc..., etc..., etc... I observed the resulting partitioning of the SDCard on Windows via Paragon HDM (see attachment). This is the last disk and the result looks consistent:View attachment 5662067

first partition of 157GB (~66%) as exFAT intended to be the future SDCard

second partition of 16 MB ??? Its presence is systematic

third partition of 81Go (~33%) intended to be integrated into the internal memory, these last two partitions not being formatted.

I then tried to format the last two partitions in different ways unsuccessfully. I tried to work using the Terminal built into TWRP but not all shell commands are present there and it is impossible to complete BusyBox applets. Starting to suspect a system related hang, I looked into the system properties and attempted to change via getprop and setprop the system properties vold.has_adoptable=1 and ro.boot.selinux=permissive whithout success though I was root and supervisor.

Finally I used the command Parameters - Storage - SDCard - format as internal memory which led to the same result: permanent reboot.

All this makes me think that there is somewhere in the system a parameter or parameters preventing the adoption of part or all of the SDCard.

Hoping that one of you has already faced this kind of problem and solved it or has any idea, please let me know.

Thanks in advance for your help and ideas.

Best regards

Eric