last day (15 days later) » 

18:15
0
A: Shrinking encrypted ext4 partition

alecxsAndroid 6.0 Adoptable Storage is FDE encrypted Android 7.0-8.1 does not support Adoptable Storage for FBE encrypted devices Android 9+ Adoptable Storage is FDE and/or FBE encrypted this for FDE encrypted Adoptable storage only you can partition mixed from sm Split external SD card partially into ...

thanks so much: that really helps explain my issues around it with Android 8. Will it be any different if I turn that encryption off? The patch unmasking Adoptable Storage feature in my phone was supposed to turn it off but it doesn't seem to be able to do it as encryption is there.
I don't have any there: they're all under / (this is SM-A320FL) and neither of them has such parameter. The patch I'm using appends ",encryptable=userdata" behind any occurence of "voldmanaged=sdcard:auto" it comes across, which I understand is mandatory for the card to be considered an Adoptable Storage candidate (and not for its immediate encryption during adoption) based on this: source.android.com/docs/core/storage/config#adoptable_storag‌​e
SM-A320FL is FDE regardless of the android version, so no need to disable encryption
But when I plug the card into Linux it won't open unless I decrypt it using dmcrypto and the key under /data/misc/vold. Meanwhile TWRP opens it just fine somehow...
TWRP does the same as you manually do in linux, it decrypted adoptable storage with /data/misc/vold so no need to disable encryption at all
Aha clear now (and thank you for explaining that /data is encrypted by Samsung encryption, hence differently). Now back to the point: you advise using sm to create a mixed partition card. My experience with sm so far: SM-A320FL running 8 does nothing upon entering "sm partition..." - it just returns the prompt in <1s and there are no changes whatsoever on the card (btw same on SM-A310F running 7). I only got it working properly on SM-G965F running 10 so far and even that one crashes at the end of the process albeit producing a seemingly well partitioned card. Stock ROM implied.
Meanwhile my sm seems to get broken by the famous Adoptable Storage patch once I flash it: sm starts returning Killed on whatever options I try running it with. But even if it survived the patch it would've likely behaved same as w/o the patch anyway. That's what made me research cloning the card to a bigger one in that separate thread, which doesn't see to work either...
18:15
your question suggest that adoptable storage is supported. if you can use private it should work for mixed too, but I have no experience
Adoptable Storage is supported indeed (purely due to the patch) and it's capable of partitioning entire card as adoptable (I guess that's what private is), but sadly not mixed... I'm unsure it even uses sm for its partitioning functionality.
if you don't rely in encryption use Link2SD instead. instead of 2nd partition it's possible to loop mount a file into /data/sdext2
Nothing wrong with Link2SD, it just reminds me of decade old events where I had to do something similar on Orange San Francisco running a custom 2.3. After a lot of research I settled on the INT2EXT script family and one of them worked perfectly well back then. Do you think they'd work likewise well on Samsung with stock 8? Talking about these: forum.xda-developers.com/t/…
IIRC they completely deprive one from internal storage as they substitute it for the "adopted" one on the card, but I wouldn't mind at all...
I also dual partitioned the card manually back then (using Minitool Partition Wizard or the like) with the 1st partition FAT32 and the 2nd partition ext4. Worked a treat due to no ext4 encryption.
18:47
@dandreye don't take a sledgehammer to crack a nut. mounting SD card as /data would decrease performance and the unused internal storage is a waste. Link2SD will move it on app base, it can even mix, move only apk and leave app data
19:11
@alecxs I'll definitely refresh my memory on Link2SD and digest your suggestion above. One thing I remember disliking one of such tools (can't remember which one) is placing the apps and/or data onto the portable partition, so every time it's taken out all sorts of errors pop up. Not all those tools were like that though. I even recall Link2SD getting integrated into 2.3 or right after.
19:28
Correction: not taken out but the phone connected to a Windows laptop and file transfer mode selected (there was probably no MTP there yet).
19:53
@dandreye taking out MicroSD card is indeed dangerous, as the package manager purges apps android cannot access. once inserted back, all app data may be deleted from MicroSD card accidentally
(for apps whose uid differ after inserting)
20:09
@alecxs Noted: thank you. I shouldn't really need to ever take it out though, except in some emergency cases when I can just turn the phone off beforehand for the duration of the card absence. Will need to experiment with Link2SD then.

last day (15 days later) »