0

I've a 16 GB MicroSD card that's apparently faking its size. Using H2testw I found that only the first 7.8 GB are usable. Before buying a new one, I want to see if I can "fix" it. The idea is to have Android format the card "as internal", unmount it, and then either through a rooted Android or a Linux/Windows desktop downsize the three resulting partitions to fit inside the first 7.8 GB of the card.

Is there any reason why this wouldn't work? My only concern is that the Android phone might have its own record of the sector ranges of each partition, which I would be changing.

I'm not just trying it out, because I don't have a card reader on hand, and want to find out if it's likely to work, before I invest time into it.

6
  • So you are asking this only theoretical? because I would not make experiments with a card that has a manipulated firmware. In the end you earlier or later loose your data. Anyway a new 16GB card costs nearly the same as sd-card reader. – Robert Oct 10 '19 at 15:50
  • @Robert no, I intend to try it out, if it makes sense. I guess you could consider this an exercise. I think I can presume that if I try to use this card, with properly resized partitions, and the firmware is defective enough to cause problems, I'll notice it quickly. Unless its treatment of bad sectors is bad or something. I don't keep important information on my phone, so I don't feel like I'm risking much. – Dominykas Mostauskis Oct 10 '19 at 15:56
  • If you bought a 16GB card and only ~8GB are usable, you likely got a defective or counterfeit card (a more common occurrence than people think). Just replace it. – acejavelin Oct 10 '19 at 15:57
  • @acejavelin I realise that. The idea is to make it work anyway; knowing that it might malfunction in some other way. – Dominykas Mostauskis Oct 10 '19 at 16:03
  • 1
    @Dominykas The problem is that you can't determine where each sector is located in the flash. Additionally because of wear-leveling algorithm the sd-card reallocate the sectors at any time (and of course it can reallocate it into the non-existent flash part). Therefore the problems can arise at any time! – Robert Oct 10 '19 at 16:07
0

I'm abandoning the project, since the card I was going to do this with is counterfeit and apparently unsalvageable (or at least not in the way I envisioned). To quote Robert: "because of wear-leveling algorithm the sd-card [can] reallocate the sectors at any time (and of course it can reallocate it into the non-existent flash part)".

Anyway, for people trying to find out how to work with these Android SD partitions, here's a few links from my research:

http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html

I want to split one MicroSD card into two parts: part adoptable storage, and part normal storage. How can I do this?

One of the tools used in the above posts is adb shell sm (or just sm). It can manipulate the partitions on the SD card. I didn't look into it further, but if I wanted to go through with this, the sm command is what I'd investigate next.

Of course, one of the things to know about working with Android's adoptable storage partitions is that one of them is encrypted, so unless you decrypt it, you can only manage it with the phone that encrypted it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.