vold: allow to store key in a file on another partition
Add support for keeping the keys in a separate file on another partition,
for devices with no space reserved for a footer after the userdata filesystem.
Add support for encrypting the volumes managed by vold, if they meet certain
criteria, namely being marked as nonremovable and encryptable in vold.fstab.
A bit of trickiness is required to keep vold happy.
Change-Id: Idf0611f74b56c1026c45742ca82e0c26e58828fe
diff --git a/VolumeManager.h b/VolumeManager.h
index 11b5ed3..48bb59a 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -19,6 +19,7 @@
#include <pthread.h>
+#ifdef __cplusplus
#include <utils/List.h>
#include <sysutils/SocketListener.h>
@@ -121,13 +122,26 @@
static char *asecHash(const char *id, char *buffer, size_t len);
+ Volume *lookupVolume(const char *label);
+ int getNumDirectVolumes(void);
+ int getDirectVolumeList(struct volume_info *vol_list);
+
private:
VolumeManager();
void readInitialState();
- Volume *lookupVolume(const char *label);
bool isMountpointMounted(const char *mp);
inline bool massStorageAvailable() const { return mUsbMassStorageEnabled && mUsbConnected; }
void notifyUmsAvailable(bool available);
};
+
+extern "C" {
+#endif /* __cplusplus */
+ int vold_unmountVol(const char *label);
+ int vold_getNumDirectVolumes(void);
+ int vold_getDirectVolumeList(struct volume_info *v);
+#ifdef __cplusplus
+}
+#endif
+
#endif