1

I'm using a rooted XPeria Z1c. Recently I got myself a bigger SDCard (128 GB) and I decided to use 2 partitions. I started 'adb shell' then partitioned the card using

sm partition disk:<disk_id> mixed 50

After disconnecting the phone I formatted the 2nd partion as exFAT. Windows' disk manager is showing me 3 partitions on the SD: one exFAT plus 2 more that obviously aren't recognized. One of those 2 is quite small (16MB in size), the other one has roughly the size I'm expecting it to have. EDIT: formatting was done by the phone itself after I first inserted the freshly partitioned card, and I expected the format to be ext4.

My phone has no problems using both of the main partitions, so that's good.

On my PC I'm running a Linux device driver by Paragon enabling me to access extFS formatted sd cards an pendrives from Windows Explorer. But if I directly connect the card to my windows PC (using an SD card reader) only the exFAT partition is accessible. Apparently the other partition is not truly formatted as ext4. I tried various adb / terminal commands to access that special partition and find out what it is but I can't really access it (fdisk, mount, cat, df, ...).

Can anyone give me an idea how to handle this? What file system could be used for my internal SD card if it's not ext4?

EDIT2: (after comment from @Izzy): I just created a new (smaller) SD card with just one partition and formatted as ext4. After inserting it into my phone I had to prepare and format it as internal storage. After that I pulled it off my phone again and examined it using my PC. Result: the ext4 partition is readable in Windows (through the Paragon driver) and it also has an extra 16MB partition. No idea whatsoever what this is used for...

EDIT3: doing some more experiments with my smaller sd card I think that @Izzy pointed into the right direction; might as well close this question

6
  • I suppose MTP simply doesn't share non-FAT partitions. At least that was the case back then with UMS (only FAT partitions where shared – and AFAIR only the first FAT partition of an SD card).
    – Izzy
    Jan 4, 2018 at 17:52
  • 1
    @Izzy: no, I'm not talking MTP here. What I mean is pulling out the SD and directly connecting it to my PC using an SD card reader which has way better performance than MTP. I've been doing this for a while now and never had problems with SD cards that have a single ext4 partition. Maybe I have to clarify that in my question... (btw: connecting my phone through MTP both partitions are showing!)
    – ElEm
    Jan 4, 2018 at 19:50
  • 1
    Thanks for the detail in the last sentence – I wasn't sure about this! // As to your problem (and thanks for the update in question and comment), let me make another guess: is the other "invisible" partition by any chance used as adoptable storage? In that case, the explanation might be that it's encrypted (follow the link to our corresponding tag-wiki for details then).
    – Izzy
    Jan 4, 2018 at 20:41
  • encryption is an interesting idea; I'll have look at it. - i nregards to "the other invisible partition" I'll put a few more details into my question - makes it easier for others ;)
    – ElEm
    Jan 4, 2018 at 21:32
  • Hm - yes that could well be the case; didn't know about the encryption part. Thanks for pointing out! If you put it as an answer I cuold accept and close this question
    – ElEm
    Jan 4, 2018 at 22:05

1 Answer 1

2

As it turned out, your partitioning was due to the fact you wanted to use (and not, as one might assume, to use ). As our adoptable-storage tag-wiki points out, adopted storage will be encrypted – not just the files on it, but the entire partition. That explains two things:

  • attaching the card to your PC using a card reader, the PC cannot read the partition without having the encryption details. As you didn't provide them to the PC, it could not "open" it
  • attaching the device via MTP however shows the partition fine on your PC, as the Android device has decrypted it

Remains the mystic 3rd partition. The small size suggests it's some "control partition". A good guess as it turns out: if you list the label, you will find it's called android_meta (while your adopted partition will be labeled android_expand) – which you can find out e.g. by a Google search for "sm partition disk" 16m. Quoting from this Oopsmonk article on how adoptable storage creation works:

It will create two partitions (android_meta and android_expand) for adoptable storage, the android_meta is a reserved space for feature use and android_expand is the external storage which is encrypted via dm-crypt.

With that last detail, your puzzle should be complete 😇

2
  • just let me give a final comment to your very comprehensive answer: I'm running on LineageOS 14.1, i.e. Nougat, and I simply got tired of various apps giving me a hard time storing data on my sd card. So my solution was a) get a bigger card and b) split it into 2 partitions, one internal and one external. Would have been nice if I could have accessed my ext4/internal partition in the way described above.
    – ElEm
    Jan 5, 2018 at 1:17
  • 1
    @ElEm check the mentioned tag-wiki. If your PC runs Linux, there are ways to read the partition. But no easy ways. One of the reasons I avoid adoptable storage (some other reasons are you cannot easily take out the card at all without shutting down the system, and I have sufficient internal storage for my needs anyway :) Btw: Running LOS here as well :)
    – Izzy
    Jan 5, 2018 at 1:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .