1

I am without PC right now, but I need to Format USB Drive (to FAT32 or Ext4) with Samsung S8 (Android 9) and change label. But I can't find any app that can do this. I can format USB drive in Storage Menu, but without any options, it just gives it Random number name (I can see it in Total commander) and I think it's Ext4, but again no options. Is there any option to rename the Label?

I found they there is Aparted app (port of gparted) but it needs ROOT and also it gives random label.

I also tried to rename drive in Total commander, but it says it's ranamed, but in reality it has old label. Thanks for any help :).

1
  • Renaming of volumes usually requires root permission. As Android does not allow to set a label when formatting the volume any other app without root permission will not be able to change the label.
    – Robert
    Jun 24, 2019 at 11:31

1 Answer 1

0

It's not possible to create filesystem or set label without root access. Block devices in /dev/block/ are created with ownership 0:0, mode 0600. Also apps aren't allowed to access SELinux context device or block_device set on /dev and /dev/block. You can use a rooted device or custom recovery like TWRP. Or use a PC (if available). On Linux and Android command-line is same.

I need to Format USB Drive (to FAT32 or Ext4)

Use mkfs.fat -F32 -n <LABEL> or mkfs.ext4 -L <LABEL> to create filesystem with required label. Or later use fatlabel/mlabel or e2label/tune2fs to change label of an already created filesystem.

I can format USB drive in Storage Menu, but without any options, it just gives it Random number name

The random number is not name (or label), it's filesystem UUID (32-digits long string on Linux filesystems like ext2/3/4) or Volume ID (8-digits long string on Windows filesystems like NTFS/FAT32/exFAT). Similarly GUID partitions have a PARTUUID and PARTLABEL (as reported by blkid).

USB OTG and external SD card is mounted by Volume Daemon (vold) on Android. Since Android 6 by default vold uses filesystem UUID or VolumeID to create a mount path (which is not an actual path in case of USB OTG) like /storage/[UUID]:

"Developers may continue to build paths dynamically or statically depending on their use case. Including the UUID in the path identifies each card to make location clearer for developers. (For example, /storage/ABCD-1234/report.txt is clearly a different file than /storage/DCBA-4321/report.txt.)"

So even if you set label, whatever filesystem you choose, you will see the random number in path. However, like label, you can also set UUID/VolumeID of your choice (in case you want to retain same file path after formatting). Some file explorers, though, show filesystem label as storage name along with path.

You must log in to answer this question.

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