diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index 1b85b16..7a29514 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -67,6 +67,21 @@
 
 }  // namespace
 
+Status cp_supportsCheckpoint(bool& result) {
+    result = false;
+    auto fstab_default = std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)>{
+        fs_mgr_read_fstab_default(), fs_mgr_free_fstab};
+    if (!fstab_default) return Status::fromExceptionCode(EINVAL, "Failed to get fstab");
+
+    for (int i = 0; i < fstab_default->num_entries; ++i) {
+        if (fs_mgr_is_checkpoint(&fstab_default->recs[i])) {
+            result = true;
+            return Status::ok();
+        }
+    }
+    return Status::ok();
+}
+
 Status cp_startCheckpoint(int retry) {
     if (retry < -1) return Status::fromExceptionCode(EINVAL, "Retry count must be more than -1");
     std::string content = std::to_string(retry + 1);
diff --git a/Checkpoint.h b/Checkpoint.h
index eac2f94..64ceed3 100644
--- a/Checkpoint.h
+++ b/Checkpoint.h
@@ -23,6 +23,8 @@
 namespace android {
 namespace vold {
 
+android::binder::Status cp_supportsCheckpoint(bool& result);
+
 android::binder::Status cp_startCheckpoint(int retry);
 
 android::binder::Status cp_commitChanges();
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index c58ff01..1001d2b 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -864,5 +864,12 @@
     return cp_abortChanges();
 }
 
+binder::Status VoldNativeService::supportsCheckpoint(bool* _aidl_return) {
+    ENFORCE_UID(AID_SYSTEM);
+    ACQUIRE_LOCK;
+
+    return cp_supportsCheckpoint(*_aidl_return);
+}
+
 }  // namespace vold
 }  // namespace android
diff --git a/VoldNativeService.h b/VoldNativeService.h
index 161acb8..7db3e5c 100644
--- a/VoldNativeService.h
+++ b/VoldNativeService.h
@@ -129,6 +129,7 @@
     binder::Status restoreCheckpoint(const std::string& mountPoint);
     binder::Status markBootAttempt();
     binder::Status abortChanges();
+    binder::Status supportsCheckpoint(bool* _aidl_return);
 };
 
 }  // namespace vold
diff --git a/binder/android/os/IVold.aidl b/binder/android/os/IVold.aidl
index 976eab1..4b21078 100644
--- a/binder/android/os/IVold.aidl
+++ b/binder/android/os/IVold.aidl
@@ -104,6 +104,7 @@
     void prepareCheckpoint();
     void restoreCheckpoint(@utf8InCpp String device);
     void markBootAttempt();
+    boolean supportsCheckpoint();
 
     @utf8InCpp String createStubVolume(@utf8InCpp String sourcePath,
             @utf8InCpp String mountPath, @utf8InCpp String fsType,
diff --git a/vdc.cpp b/vdc.cpp
index e971d52..35775a7 100644
--- a/vdc.cpp
+++ b/vdc.cpp
@@ -105,6 +105,10 @@
         checkStatus(vold->mountFstab(args[2]));
     } else if (args[0] == "cryptfs" && args[1] == "encryptFstab" && args.size() == 3) {
         checkStatus(vold->encryptFstab(args[2]));
+    } else if (args[0] == "checkpoint" && args[1] == "supportsCheckpoint" && args.size() == 2) {
+        bool supported = false;
+        checkStatus(vold->supportsCheckpoint(&supported));
+        return supported ? 1 : 0;
     } else if (args[0] == "checkpoint" && args[1] == "startCheckpoint" && args.size() == 3) {
         int retry;
         if (!android::base::ParseInt(args[2], &retry)) exit(EINVAL);
