diff --git a/model/PublicVolume.cpp b/model/PublicVolume.cpp
index 98c897f..efdb687 100644
--- a/model/PublicVolume.cpp
+++ b/model/PublicVolume.cpp
@@ -14,10 +14,11 @@
  * limitations under the License.
  */
 
-#include "fs/Vfat.h"
 #include "PublicVolume.h"
 #include "Utils.h"
 #include "VolumeManager.h"
+#include "fs/Exfat.h"
+#include "fs/Vfat.h"
 
 #include <android-base/stringprintf.h>
 #include <android-base/logging.h>
@@ -93,19 +94,23 @@
 }
 
 status_t PublicVolume::doMount() {
-    // TODO: expand to support mounting other filesystems
     readMetadata();
 
-    if (mFsType != "vfat") {
+    if (mFsType == "vfat" && vfat::IsSupported()) {
+        if (vfat::Check(mDevPath)) {
+            LOG(ERROR) << getId() << " failed filesystem check";
+            return -EIO;
+        }
+    } else if (mFsType == "exfat" && exfat::IsSupported()) {
+        if (exfat::Check(mDevPath)) {
+            LOG(ERROR) << getId() << " failed filesystem check";
+            return -EIO;
+        }
+    } else {
         LOG(ERROR) << getId() << " unsupported filesystem " << mFsType;
         return -EIO;
     }
 
-    if (vfat::Check(mDevPath)) {
-        LOG(ERROR) << getId() << " failed filesystem check";
-        return -EIO;
-    }
-
     // Use UUID as stable name, if available
     std::string stableName = getId();
     if (!mFsUuid.empty()) {
@@ -130,10 +135,17 @@
         return -errno;
     }
 
-    if (vfat::Mount(mDevPath, mRawPath, false, false, false,
-            AID_MEDIA_RW, AID_MEDIA_RW, 0007, true)) {
-        PLOG(ERROR) << getId() << " failed to mount " << mDevPath;
-        return -EIO;
+    if (mFsType == "vfat") {
+        if (vfat::Mount(mDevPath, mRawPath, false, false, false, AID_MEDIA_RW, AID_MEDIA_RW, 0007,
+                        true)) {
+            PLOG(ERROR) << getId() << " failed to mount " << mDevPath;
+            return -EIO;
+        }
+    } else if (mFsType == "exfat") {
+        if (exfat::Mount(mDevPath, mRawPath, AID_MEDIA_RW, AID_MEDIA_RW, 0007)) {
+            PLOG(ERROR) << getId() << " failed to mount " << mDevPath;
+            return -EIO;
+        }
     }
 
     if (getMountFlags() & MountFlags::kPrimary) {
@@ -238,7 +250,7 @@
 }
 
 status_t PublicVolume::doFormat(const std::string& fsType) {
-    if (fsType == "vfat" || fsType == "auto") {
+    if ((fsType == "vfat" || fsType == "auto") && vfat::IsSupported()) {
         if (WipeBlockDevice(mDevPath) != OK) {
             LOG(WARNING) << getId() << " failed to wipe";
         }
@@ -246,6 +258,14 @@
             LOG(ERROR) << getId() << " failed to format";
             return -errno;
         }
+    } else if ((fsType == "exfat" || fsType == "auto") && exfat::IsSupported()) {
+        if (WipeBlockDevice(mDevPath) != OK) {
+            LOG(WARNING) << getId() << " failed to wipe";
+        }
+        if (exfat::Format(mDevPath)) {
+            LOG(ERROR) << getId() << " failed to format";
+            return -errno;
+        }
     } else {
         LOG(ERROR) << "Unsupported filesystem " << fsType;
         return -EINVAL;
