1

I have a Samsung A50 (A505F). I flashed it with stock Android 11, then rooted using Magisk, then flashed again, using the magisk patched AP.

How can I restore this user data partition to maximum size again?

There's no GParted for android.

I don't mind to delete and recreate this partition. The data is fully backed up.

Before the whole process the storage space was 128GB. Now it's only 3.7GB.

~ $ df -h
Filesystem                                        Size  Used Avail Use% Mounted on
tmpfs                                             1.7G  1.2M  1.7G   1% /dev
tmpfs                                             1.7G  3.6M  1.7G   1% /dev/5Q1
...
/dev/block/platform/13520000.ufs/by-name/userdata 3.8G  2.8G  923M  76% /data
tmpfs                                             1.7G     0  1.7G   0% /system/bin
/dev/5Q1/.magisk/block/system_root                5.0G  4.8G  191M  97% /system/bin/abb
/dev/fuse                                         3.7G  2.9G  903M  77% /storage/emulated

OTOH:

phone:/mnt/big # fdisk -l /dev/block/sda
Disk /dev/block/sda: 119.2 GiB, 127943049216 bytes, 31236096 sectors
Disklabel type: gpt

Device Start End Sectors Size Type /dev/block/sda1 1024 2175 1152 4.5M Microsoft basic data /dev/block/sda2 2176 4095 1920 7.5M Microsoft basic data ... ... ... /dev/block/sda30 1863168 1864447 1280 5M Microsoft basic data /dev/block/sda31 1864448 1869567 5120 20M Microsoft basic data /dev/block/sda32 1869568 31234815 29365248 112G Microsoft basic data

I mounted that partition: mount /dev/block/sda32 /mnt/big

but the size was still 3.7GB !

phone:/mnt/big $ df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              1.7G  1.2M  1.7G   1% /dev
tmpfs                              1.7G     0  1.7G   0% /mnt
/dev/block/sda27                   387M  136M  251M  36% /product
/dev/block/sda26                   775M  412M  363M  54% /vendor
tmpfs                              1.7G  3.6M  1.7G   1% /dev/5Q1
tmpfs                              1.7G     0  1.7G   0% /apex
/dev/block/sda29                    45M   24K   45M   1% /omr
/dev/block/sda28                   390M   60K  390M   1% /cache
tmpfs                              1.7G     0  1.7G   0% /mnt/sde
/dev/block/sda7                     16M  0.9M   15M   7% /efs
tmpfs                              1.7G  1.2M  1.7G   1% /system/bin
/dev/5Q1/.magisk/block/system_root 5.0G  4.8G  191M  97% /system/bin/abb
/dev/fuse                          3.7G  2.9G  880M  78% /storage/emulated
/dev/block/sda32                   3.8G  2.8G  900M  77% /mnt/big
Berry Tsakala
  • 175
  • 1
  • 6
  • 1
    there is parted for android but you must not use it (dangerous). it is known bug with Magisk, not with actual partition itself – alecxs Aug 17 '22 at 22:42
  • 1
    You need to recreate / resize the filesystem, not the partition. Partition is already of good size; 112 GB. Related answer: https://android.stackexchange.com/a/216443/218526 – Irfan Latif Aug 18 '22 at 09:02

1 Answers1

1

I have solved it by reflashing all the available images, at the same time, instead of flashing only AP image (in Odin).

The explanation I had read, is that flashing only a single partition can cause incorrect filesystem sizes.

Others (like @alecxs who commented here) claim it's a bug in magisk.

thanks.

Berry Tsakala
  • 175
  • 1
  • 6