Lines Matching refs:vold
64 using android::vold::kEmptyAuthentication;
65 using android::vold::KeyBuffer;
66 using android::vold::writeStringToFile;
171 android::vold::destroyKey(other_path); in fixate_user_ce_key()
182 android::vold::FsyncDirectory(directory_path); in fixate_user_ce_key()
186 const android::vold::KeyAuthentication& auth, in read_and_fixate_user_ce_key()
192 if (android::vold::retrieveKey(ce_key_path, auth, ce_key)) { in read_and_fixate_user_ce_key()
203 const android::vold::KeyAuthentication& auth) { in read_and_install_user_ce_key()
208 if (!android::vold::installKey(ce_key, &ce_raw_ref)) return false; in read_and_install_user_ce_key()
237 if (!android::vold::randomKey(&de_key)) return false; in create_and_install_user_keys()
238 if (!android::vold::randomKey(&ce_key)) return false; in create_and_install_user_keys()
248 if (!android::vold::storeKeyAtomically(ce_key_path, user_key_temp, kEmptyAuthentication, in create_and_install_user_keys()
253 if (!android::vold::storeKeyAtomically(get_de_key_path(user_id), user_key_temp, in create_and_install_user_keys()
258 if (!android::vold::installKey(de_key, &de_raw_ref)) return false; in create_and_install_user_keys()
261 if (!android::vold::installKey(ce_key, &ce_raw_ref)) return false; in create_and_install_user_keys()
326 if (!android::vold::retrieveKey(key_path, kEmptyAuthentication, &key)) return false; in load_all_de_keys()
328 if (!android::vold::installKey(key, &raw_ref)) return false; in load_all_de_keys()
347 if (!android::vold::retrieveAndInstallKey(true, kEmptyAuthentication, device_key_path, in fscrypt_initialize_global_de()
354 if (!android::vold::writeStringToFile(modestring, mode_filename)) return false; in fscrypt_initialize_global_de()
357 if (!android::vold::writeStringToFile(device_ref.key_raw_ref, ref_filename)) return false; in fscrypt_initialize_global_de()
361 if (!android::vold::FsyncDirectory(device_key_dir)) return false; in fscrypt_initialize_global_de()
372 if (!android::vold::pathExists(get_de_key_path(0))) { in fscrypt_init_user0()
429 success &= android::vold::evictKey(raw_ref); in evict_ce_key()
445 lookup_key_ref(s_de_key_raw_refs, user_id, &raw_ref) && android::vold::evictKey(raw_ref); in fscrypt_destroy_user_key()
452 success &= android::vold::destroyKey(path); in fscrypt_destroy_user_key()
455 if (android::vold::pathExists(de_key_path)) { in fscrypt_destroy_user_key()
456 success &= android::vold::destroyKey(de_key_path); in fscrypt_destroy_user_key()
499 if (android::vold::HexToStr(hex, *result) != 0) { in parse_hex()
518 if (android::vold::pathExists(secdiscardable_path)) { in read_or_create_volkey()
519 if (!android::vold::readSecdiscardable(secdiscardable_path, &secdiscardable_hash)) in read_or_create_volkey()
526 if (!android::vold::createSecdiscardable(secdiscardable_path, &secdiscardable_hash)) in read_or_create_volkey()
534 android::vold::KeyAuthentication auth("", secdiscardable_hash); in read_or_create_volkey()
535 if (!android::vold::retrieveAndInstallKey(true, auth, key_path, key_path + "_tmp", in read_or_create_volkey()
547 if (!android::vold::pathExists(path)) return true; in destroy_volkey()
548 return android::vold::destroyKey(path); in destroy_volkey()
561 secret.empty() ? kEmptyAuthentication : android::vold::KeyAuthentication(token, secret); in fscrypt_add_user_key_auth()
572 if (!android::vold::storeKeyAtomically(ce_key_path, user_key_temp, auth, ce_key)) return false; in fscrypt_add_user_key_auth()
573 if (!android::vold::FsyncDirectory(directory_path)) return false; in fscrypt_add_user_key_auth()
604 android::vold::KeyAuthentication auth(token, secret); in fscrypt_unlock_user_key()
613 if (!emulated_unlock(android::vold::BuildDataSystemCePath(user_id), 0771) || in fscrypt_unlock_user_key()
614 !emulated_unlock(android::vold::BuildDataMiscCePath(user_id), 01771) || in fscrypt_unlock_user_key()
615 !emulated_unlock(android::vold::BuildDataMediaCePath("", user_id), 0770) || in fscrypt_unlock_user_key()
616 !emulated_unlock(android::vold::BuildDataUserCePath("", user_id), 0771)) { in fscrypt_unlock_user_key()
631 if (!emulated_lock(android::vold::BuildDataSystemCePath(user_id)) || in fscrypt_lock_user_key()
632 !emulated_lock(android::vold::BuildDataMiscCePath(user_id)) || in fscrypt_lock_user_key()
633 !emulated_lock(android::vold::BuildDataMediaCePath("", user_id)) || in fscrypt_lock_user_key()
634 !emulated_lock(android::vold::BuildDataUserCePath("", user_id))) { in fscrypt_lock_user_key()
645 if (0 != android::vold::ForkExecvp( in prepare_subdirs()
661 auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); in fscrypt_prepare_user_storage()
662 auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id); in fscrypt_prepare_user_storage()
663 auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); in fscrypt_prepare_user_storage()
666 auto system_de_path = android::vold::BuildDataSystemDePath(user_id); in fscrypt_prepare_user_storage()
667 auto misc_de_path = android::vold::BuildDataMiscDePath(user_id); in fscrypt_prepare_user_storage()
668 auto vendor_de_path = android::vold::BuildDataVendorDePath(user_id); in fscrypt_prepare_user_storage()
669 auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
703 auto system_ce_path = android::vold::BuildDataSystemCePath(user_id); in fscrypt_prepare_user_storage()
704 auto misc_ce_path = android::vold::BuildDataMiscCePath(user_id); in fscrypt_prepare_user_storage()
705 auto vendor_ce_path = android::vold::BuildDataVendorCePath(user_id); in fscrypt_prepare_user_storage()
706 auto media_ce_path = android::vold::BuildDataMediaCePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
707 auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
737 android::vold::RestoreconRecursive(system_ce_path); in fscrypt_prepare_user_storage()
738 android::vold::RestoreconRecursive(vendor_ce_path); in fscrypt_prepare_user_storage()
739 android::vold::RestoreconRecursive(misc_ce_path); in fscrypt_prepare_user_storage()
756 auto system_ce_path = android::vold::BuildDataSystemCePath(user_id); in fscrypt_destroy_user_storage()
757 auto misc_ce_path = android::vold::BuildDataMiscCePath(user_id); in fscrypt_destroy_user_storage()
758 auto vendor_ce_path = android::vold::BuildDataVendorCePath(user_id); in fscrypt_destroy_user_storage()
759 auto media_ce_path = android::vold::BuildDataMediaCePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
760 auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
777 auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); in fscrypt_destroy_user_storage()
778 auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id); in fscrypt_destroy_user_storage()
779 auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); in fscrypt_destroy_user_storage()
782 auto system_de_path = android::vold::BuildDataSystemDePath(user_id); in fscrypt_destroy_user_storage()
783 auto misc_de_path = android::vold::BuildDataMiscDePath(user_id); in fscrypt_destroy_user_storage()
784 auto vendor_de_path = android::vold::BuildDataVendorDePath(user_id); in fscrypt_destroy_user_storage()
785 auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
837 res &= android::vold::runSecdiscardSingle(secdiscardable_path); in fscrypt_destroy_volume_keys()