Lines Matching full:vold
66 using android::vold::BuildDataPath;
67 using android::vold::IsDotOrDotDot;
68 using android::vold::IsFilesystemSupported;
69 using android::vold::kEmptyAuthentication;
70 using android::vold::KeyBuffer;
71 using android::vold::KeyGeneration;
72 using android::vold::retrieveKey;
73 using android::vold::retrieveOrGenerateKey;
74 using android::vold::SetDefaultAcl;
75 using android::vold::SetQuotaInherit;
76 using android::vold::SetQuotaProjectId;
86 const std::string user_key_dir = std::string() + DATA_MNT_POINT + "/misc/vold/user_keys";
91 std::string() + DATA_MNT_POINT + "/misc/vold/volume_keys";
132 return android::vold::neverGen(); in makeGen()
205 android::vold::destroyKey(other_path); in fixate_user_ce_key()
212 if (!android::vold::RenameKeyDir(to_fix, current_path)) return false; in fixate_user_ce_key()
215 if (need_sync && !android::vold::FsyncDirectory(directory_path)) return false; in fixate_user_ce_key()
220 const android::vold::KeyAuthentication& auth, in read_and_fixate_user_ce_key()
272 if (!android::vold::pathExists(sysfs_path)) { in DoesHardwareSupportOnly32DunBits()
276 if (android::vold::pathExists(sysfs_path)) { in DoesHardwareSupportOnly32DunBits()
383 if (android::vold::PrepareDir(dir, mode, uid, gid, 0) != 0) { in prepare_dir()
393 if (android::vold::pathExists(dir)) { in prepare_dir_with_policy()
405 if (android::vold::pathExists(tmp_dir)) { in prepare_dir_with_policy()
406 android::vold::DeleteDirContentsAndDir(tmp_dir); in prepare_dir_with_policy()
417 android::vold::pathExists(tmp_dir + "/subdir"); in prepare_dir_with_policy()
438 return android::vold::pathExists(get_de_key_path(user_id)); in de_key_exists()
445 if (android::vold::pathExists(get_ce_key_current_path(directory_path))) return true; in ce_key_exists()
449 return android::vold::pathExists(directory_path) && !get_ce_key_paths(directory_path).empty(); in ce_key_exists()
455 if (!ephemeral && !android::vold::storeKeyAtomically(get_de_key_path(user_id), user_key_temp, in create_de_key()
555 if (!android::vold::writeStringToFile(options_string, options_filename)) return false; in fscrypt_initialize_systemwide_keys()
558 if (!android::vold::writeStringToFile(s_device_policy.key_raw_ref, ref_filename)) return false; in fscrypt_initialize_systemwide_keys()
567 if (!android::vold::writeStringToFile(per_boot_policy.key_raw_ref, per_boot_ref_filename)) in fscrypt_initialize_systemwide_keys()
585 if (android::vold::IsSymlink(data_user_0_dir) && android::vold::Unlink(data_user_0_dir) != 0) in prepare_special_dirs()
608 if (android::vold::BindMount(data_data_dir, data_user_0_dir) != 0) return false; in prepare_special_dirs()
614 // directories, by design only vold can write to it. As a side effect of in prepare_special_dirs()
615 // that, vold must create /data/media/obb. in prepare_special_dirs()
619 if (android::vold::pathExists(media_obb_dir)) { in prepare_special_dirs()
691 success &= android::vold::evictKey(BuildDataPath(""), policies.internal); in evict_user_keys()
693 success &= android::vold::evictKey(BuildDataPath(volume_uuid), policy); in evict_user_keys()
715 success &= android::vold::destroyKey(path); in fscrypt_destroy_user_keys()
722 if (android::vold::pathExists(de_key_path)) { in fscrypt_destroy_user_keys()
723 success &= android::vold::destroyKey(de_key_path); in fscrypt_destroy_user_keys()
731 static android::vold::KeyAuthentication authentication_from_secret( in authentication_from_secret()
737 return android::vold::KeyAuthentication(secret_str); in authentication_from_secret()
742 return misc_path + "/vold/volume_keys/" + volume_uuid + "/default"; in volkey_path()
753 if (android::vold::pathExists(secdiscardable_path)) { in read_or_create_volkey()
754 if (!android::vold::readSecdiscardable(secdiscardable_path, &secdiscardable_hash)) in read_or_create_volkey()
757 if (!android::vold::MkdirsSync(secdiscardable_path, 0700)) return false; in read_or_create_volkey()
758 if (!android::vold::createSecdiscardable(secdiscardable_path, &secdiscardable_hash)) in read_or_create_volkey()
762 if (!android::vold::MkdirsSync(key_path, 0700)) return false; in read_or_create_volkey()
763 android::vold::KeyAuthentication auth(secdiscardable_hash); in read_or_create_volkey()
777 if (!android::vold::pathExists(path)) return true; in destroy_volkey()
778 return android::vold::destroyKey(path); in destroy_volkey()
843 if (!android::vold::storeKeyAtomically(ce_key_path, user_key_temp, auth, ce_key)) return false; in fscrypt_set_ce_key_protection()
850 if (android::vold::cp_needsCheckpoint()) { in fscrypt_set_ce_key_protection()
912 if (0 != android::vold::ForkExecvp( in prepare_subdirs()
929 !android::vold::pathExists(android::vold::BuildDataMiscDePath("", user_id))) { in fscrypt_prepare_user_storage()
935 !android::vold::pathExists(android::vold::BuildDataMiscCePath("", user_id))) { in fscrypt_prepare_user_storage()
944 auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); in fscrypt_prepare_user_storage()
945 auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); in fscrypt_prepare_user_storage()
949 auto system_de_path = android::vold::BuildDataSystemDePath(user_id); in fscrypt_prepare_user_storage()
950 auto misc_de_path = android::vold::BuildDataMiscDePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
951 auto vendor_de_path = android::vold::BuildDataVendorDePath(user_id); in fscrypt_prepare_user_storage()
952 auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
964 auto misc_de_empty_volume_path = android::vold::BuildDataMiscDePath("", user_id); in fscrypt_prepare_user_storage()
991 auto system_ce_path = android::vold::BuildDataSystemCePath(user_id); in fscrypt_prepare_user_storage()
992 auto misc_ce_path = android::vold::BuildDataMiscCePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
993 auto vendor_ce_path = android::vold::BuildDataVendorCePath(user_id); in fscrypt_prepare_user_storage()
994 auto media_ce_path = android::vold::BuildDataMediaCePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
995 auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
1007 auto misc_ce_empty_volume_path = android::vold::BuildDataMiscCePath("", user_id); in fscrypt_prepare_user_storage()
1040 android::vold::RestoreconRecursive(system_ce_path); in fscrypt_prepare_user_storage()
1041 android::vold::RestoreconRecursive(vendor_ce_path); in fscrypt_prepare_user_storage()
1042 android::vold::RestoreconRecursive(misc_ce_path); in fscrypt_prepare_user_storage()
1059 auto system_ce_path = android::vold::BuildDataSystemCePath(user_id); in fscrypt_destroy_user_storage()
1060 auto misc_ce_path = android::vold::BuildDataMiscCePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
1061 auto vendor_ce_path = android::vold::BuildDataVendorCePath(user_id); in fscrypt_destroy_user_storage()
1062 auto media_ce_path = android::vold::BuildDataMediaCePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
1063 auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
1073 auto misc_ce_empty_volume_path = android::vold::BuildDataMiscCePath("", user_id); in fscrypt_destroy_user_storage()
1081 auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); in fscrypt_destroy_user_storage()
1082 auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); in fscrypt_destroy_user_storage()
1085 auto system_de_path = android::vold::BuildDataSystemDePath(user_id); in fscrypt_destroy_user_storage()
1086 auto misc_de_path = android::vold::BuildDataMiscDePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
1087 auto vendor_de_path = android::vold::BuildDataVendorDePath(user_id); in fscrypt_destroy_user_storage()
1088 auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
1099 auto misc_de_empty_volume_path = android::vold::BuildDataMiscDePath("", user_id); in fscrypt_destroy_user_storage()
1149 res &= android::vold::runSecdiscardSingle(secdiscardable_path); in fscrypt_destroy_volume_keys()