2

I've been poking around using GParted on my 128GB microSD card so it can use two partitions for link2sd. Problem is, no matter what I do, each time I place the card in my phone, it says that the card is corrupted. I had been using the card just as storage (it was formatted by Android itself).

Technical details:
Phone: Samsung Galaxy Express 3 (SM-J120A)(sometimes called Samsung Galaxy J1)
Version: 6.0 Marshmellow
SD Card: Samsung EVO Select 128GB
Root status: Rooted

When I look at the partition after the phone formats it, it is an exFat partition with the Flags "boot" and "lba". Reformatting it myself to exFat with no Flags causes it to give an error in the phone "This card won't work". If I try to give it flags, only the "boot" flag is applied. Anytime I press the "lba" flag option, it won't even check the box (its not greyed out). Other flags work fine. Even if I use the command-line (Parted) it still won't apply the lba flag.

To confirm that the card isn't broken, I have stuck it back into the phone for it to format. Works perfectly. I've even formatted the entire card to Fat32. Stuck it in the phone, no problems. Fat32 and ext4 partition combo does work.

Other than that, it simply will not accept a exFat/ext4 combo. Or even exFat alone. What I really want is to have 32 GB as an ext4 partition, and the rest being exFat. I don't want to be limited by Fat32's 4GB file size. Though aside from video, I'm not sure what large files I might have (emergency storage?).

Recommendations, advice, and solution(s) would be most appreciated.

  • You could try a partitioning app directly on the Android device (not tried that myself; disclosure: link goes to my Android site). – Izzy Jan 13 '18 at 15:49
  • Tried AParted, it partitions, but second partition is considered "corrupted" by Android. Android's way of saying that it's no good. – ConductedForce Jan 14 '18 at 1:48
  • OK, was worth a try. Sad it didn't work out better. Maybe you've gotta stay with FAT32+Ext4. By the way, have you tried to "switch" their order? I've never partitioned my SD, but it always sounded like the FAT partition should come first. – Izzy Jan 14 '18 at 10:53
  • 1
    Both of the app movers say they expect the Ext2/4 partition to be the Second partition. So that's the way I've been doing it. – ConductedForce Jan 14 '18 at 22:41
1

Try to use this app for Windows to partition sd card: MiniTool Partition Wizard.

Then use App2SD Pro: All in One Tool [ROOT] to create a mount script for the second partition.

  • Took FOREVER for that software to do it, but it worked. Much slower than GParted. Made an Ext3 partition at 32 GB and the rest being an exFat partition. – ConductedForce Jan 13 '18 at 22:21
  • Jumped the gun initially. The exfat partition works. But now the second partition (made it ext2 at this point) is seen as a second SD card which android considers corrupted. – ConductedForce Jan 13 '18 at 23:37
0

I'm now using Apps2SD instead. It has a built-in partition editor.

Though I went and verified other things. Turned out my GParted was old, got a newer version and formatted a FAT32/Ext2 combo. Works with Apps2SD. Link2SD might be broken. I'm content with FAT32 for now. I think Apps2SD does ExFat though. Tried Link2SD because I thought it might work when Apps2SD did. Does not. Not sure why. Read somewhere that Link2SD might also be dying, but that's speculation.

0

If your phone is rooted you can emulate ext4 partition instead of formatting:

  • install a ext4 image file located on external microSD Card

    busybox dd if=/dev/zero of=/sdcard/.data.sdext2.img bs=4k count=1048576
    busybox mke2fs -T ext4 -F -q /sdcard/.data.sdext2.img
    

Due the limitation of FAT32 file systems, the maximum file size is 4 GB. However, some busybox binaries are compiled without large file support and cannot create files bigger then 2 GB.

  • fix the mount script. pre-mounting the sdcard first, then mounting the ext4 image file (all mount options are just examples, check "mount" for real uid/gid)

    #!/system/bin/sh
    /system/xbin/busybox sleep 4
    
    # use this if mount point is missing on boot
    /system/xbin/busybox mount -o remount,rw /
    mkdir /storage/sdcardtmp
    /system/xbin/busybox mount -o remount,ro /
    
    /system/xbin/busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015 /dev/block/mmcblk1p1 /storage/sdcardtmp
    
    /system/xbin/busybox sleep 1
    
    # use this to overwrite old LinkSD settings
    /system/xbin/busybox umount -l /data/sdext2
    
    /system/xbin/busybox mount -t ext4 -o loop,rw,nosuid,nodev,noatime,noauto_da_alloc,data=ordered /storage/sdcardtmp/.data.sdext2.img /data/sdext2
    

After this, Link2SD now detects 2. partition on boot. but instead of a 2. partition you just have a single image file on sdcard (which can easily copied via MTP for backup)

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.