How do I format my SD card via terminal/Termux?



  • I'm running a MIUI 12.5.5 xiaomi.eu ROM on a rooted Redmi Note 9 Pro. I'm trying to format my 128GB micro SD Card via Settings > Storage > Format SD Card, but this causes the device to reboot. I suspect it's something to do with the ROM, so I'd like to format it via terminal or Termux if needed.

    How should I proceed? Also, should I format it to exFAT or FAT32?



  • for devices with UFS flash memory
    from MIUI

    mkfs.exfat /dev/block/mmcblk0p1
    

    from TWRP

    mkexfatfs /dev/block/mmcblk0p1
    

    (mmcblk1p1 for devices with eMMC flash memory)




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2