Loading core/java/android/os/IMountService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,11 @@ interface IMountService */ void unmountSecureContainer(String id); /* * Rename an unmounted secure container. */ void renameSecureContainer(String oldId, String newId); /* * Returns the filesystem path of a mounted secure container. */ Loading media/sdutils/sdutil.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,12 @@ static void asec_unmount(const char *id) { gMountService->unmountSecureContainer(sId); } static void asec_rename(const char *oldId, const char *newId) { String16 sOldId(oldId); String16 sNewId(newId); gMountService->renameSecureContainer(sOldId, sNewId); } static int asec_path(const char *id) { String16 sId(id); gMountService->getSecureContainerPath(sId); Loading Loading @@ -212,7 +218,13 @@ int main(int argc, char **argv) } else if (!strcmp(argument, "destroy")) { return android::asec_destroy(id); } else if (!strcmp(argument, "mount")) { if (argc == 6) return android::asec_mount(id, argv[4], atoi(argv[5])); } else if (!strcmp(argument, "rename")) { if (argc == 5) { android::asec_rename(id, argv[4]); return 0; } } else if (!strcmp(argument, "unmount")) { android::asec_unmount(id); return 0; Loading @@ -233,6 +245,7 @@ usage: " sdutil asec destroy <id>\n" " sdutil asec mount <id> <key> <ownerUid>\n" " sdutil asec unmount <id>\n" " sdutil asec rename <oldId, newId>\n" " sdutil asec path <id>\n" ); return -1; Loading services/java/com/android/server/MountService.java +5 −0 Original line number Diff line number Diff line Loading @@ -1056,6 +1056,11 @@ class MountService extends IMountService.Stub mConnector.doCommand(cmd); } public void renameSecureContainer(String oldId, String newId) throws IllegalStateException { String cmd = String.format("rename_asec %s %s", oldId, newId); mConnector.doCommand(cmd); } public String getSecureContainerPath(String id) throws IllegalStateException { ArrayList<String> rsp = mConnector.doCommand("asec_path " + id); Loading Loading
core/java/android/os/IMountService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,11 @@ interface IMountService */ void unmountSecureContainer(String id); /* * Rename an unmounted secure container. */ void renameSecureContainer(String oldId, String newId); /* * Returns the filesystem path of a mounted secure container. */ Loading
media/sdutils/sdutil.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,12 @@ static void asec_unmount(const char *id) { gMountService->unmountSecureContainer(sId); } static void asec_rename(const char *oldId, const char *newId) { String16 sOldId(oldId); String16 sNewId(newId); gMountService->renameSecureContainer(sOldId, sNewId); } static int asec_path(const char *id) { String16 sId(id); gMountService->getSecureContainerPath(sId); Loading Loading @@ -212,7 +218,13 @@ int main(int argc, char **argv) } else if (!strcmp(argument, "destroy")) { return android::asec_destroy(id); } else if (!strcmp(argument, "mount")) { if (argc == 6) return android::asec_mount(id, argv[4], atoi(argv[5])); } else if (!strcmp(argument, "rename")) { if (argc == 5) { android::asec_rename(id, argv[4]); return 0; } } else if (!strcmp(argument, "unmount")) { android::asec_unmount(id); return 0; Loading @@ -233,6 +245,7 @@ usage: " sdutil asec destroy <id>\n" " sdutil asec mount <id> <key> <ownerUid>\n" " sdutil asec unmount <id>\n" " sdutil asec rename <oldId, newId>\n" " sdutil asec path <id>\n" ); return -1; Loading
services/java/com/android/server/MountService.java +5 −0 Original line number Diff line number Diff line Loading @@ -1056,6 +1056,11 @@ class MountService extends IMountService.Stub mConnector.doCommand(cmd); } public void renameSecureContainer(String oldId, String newId) throws IllegalStateException { String cmd = String.format("rename_asec %s %s", oldId, newId); mConnector.doCommand(cmd); } public String getSecureContainerPath(String id) throws IllegalStateException { ArrayList<String> rsp = mConnector.doCommand("asec_path " + id); Loading