diff --git a/CommandListener.cpp b/CommandListener.cpp
index 1f89b6a..89a7a09 100644
--- a/CommandListener.cpp
+++ b/CommandListener.cpp
@@ -185,13 +185,21 @@
         // mkdirs [path]
         return sendGenericOkFail(cli, vm->mkdirs(argv[2]));
 
-    } else if (cmd == "start_user" && argc > 2) {
-        // start_user [user]
-        return sendGenericOkFail(cli, vm->startUser(atoi(argv[2])));
+    } else if (cmd == "user_added" && argc > 3) {
+        // user_added [user] [serial]
+        return sendGenericOkFail(cli, vm->onUserAdded(atoi(argv[2]), atoi(argv[3])));
 
-    } else if (cmd == "cleanup_user" && argc > 2) {
-        // cleanup_user [user]
-        return sendGenericOkFail(cli, vm->cleanupUser(atoi(argv[2])));
+    } else if (cmd == "user_removed" && argc > 2) {
+        // user_removed [user]
+        return sendGenericOkFail(cli, vm->onUserRemoved(atoi(argv[2])));
+
+    } else if (cmd == "user_started" && argc > 2) {
+        // user_started [user]
+        return sendGenericOkFail(cli, vm->onUserStarted(atoi(argv[2])));
+
+    } else if (cmd == "user_stopped" && argc > 2) {
+        // user_stopped [user]
+        return sendGenericOkFail(cli, vm->onUserStopped(atoi(argv[2])));
 
     } else if (cmd == "mount" && argc > 2) {
         // mount [volId] [flags] [user]
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 9306363..6f783a2 100755
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -426,28 +426,38 @@
     return 0;
 }
 
-int VolumeManager::startUser(userid_t userId) {
+int VolumeManager::onUserAdded(userid_t userId, int userSerialNumber) {
+    mAddedUsers[userId] = userSerialNumber;
+    return 0;
+}
+
+int VolumeManager::onUserRemoved(userid_t userId) {
+    mAddedUsers.erase(userId);
+    return 0;
+}
+
+int VolumeManager::onUserStarted(userid_t userId) {
     // Note that sometimes the system will spin up processes from Zygote
     // before actually starting the user, so we're okay if Zygote
     // already created this directory.
     std::string path(StringPrintf("%s/%d", kUserMountPath, userId));
     fs_prepare_dir(path.c_str(), 0755, AID_ROOT, AID_ROOT);
 
-    mUsers.push_back(userId);
+    mStartedUsers.insert(userId);
     if (mPrimary) {
         linkPrimary(userId);
     }
     return 0;
 }
 
-int VolumeManager::cleanupUser(userid_t userId) {
-    mUsers.remove(userId);
+int VolumeManager::onUserStopped(userid_t userId) {
+    mStartedUsers.erase(userId);
     return 0;
 }
 
 int VolumeManager::setPrimary(const std::shared_ptr<android::vold::VolumeBase>& vol) {
     mPrimary = vol;
-    for (userid_t userId : mUsers) {
+    for (userid_t userId : mStartedUsers) {
         linkPrimary(userId);
     }
     return 0;
@@ -462,7 +472,8 @@
         disk->destroy();
         disk->create();
     }
-    mUsers.clear();
+    mAddedUsers.clear();
+    mStartedUsers.clear();
     return 0;
 }
 
diff --git a/VolumeManager.h b/VolumeManager.h
index f29a7fd..3207de8 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -26,6 +26,8 @@
 #include <list>
 #include <mutex>
 #include <string>
+#include <unordered_map>
+#include <unordered_set>
 
 #include <cutils/multiuser.h>
 #include <utils/List.h>
@@ -118,8 +120,10 @@
 
     nsecs_t benchmarkVolume(const std::string& id);
 
-    int startUser(userid_t userId);
-    int cleanupUser(userid_t userId);
+    int onUserAdded(userid_t userId, int userSerialNumber);
+    int onUserRemoved(userid_t userId);
+    int onUserStarted(userid_t userId);
+    int onUserStopped(userid_t userId);
 
     int setPrimary(const std::shared_ptr<android::vold::VolumeBase>& vol);
 
@@ -198,7 +202,8 @@
     std::list<std::shared_ptr<DiskSource>> mDiskSources;
     std::list<std::shared_ptr<android::vold::Disk>> mDisks;
 
-    std::list<userid_t> mUsers;
+    std::unordered_map<userid_t, int> mAddedUsers;
+    std::unordered_set<userid_t> mStartedUsers;
 
     std::shared_ptr<android::vold::VolumeBase> mInternalEmulated;
     std::shared_ptr<android::vold::VolumeBase> mPrimary;
