Lines Matching refs:vold
68 using android::vold::BuildDataPath;
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::writeStringToFile;
176 android::vold::destroyKey(other_path); in fixate_user_ce_key()
187 android::vold::FsyncDirectory(directory_path); in fixate_user_ce_key()
191 const android::vold::KeyAuthentication& auth, in read_and_fixate_user_ce_key()
287 const android::vold::KeyAuthentication& auth) { in read_and_install_user_ce_key()
335 if (!android::vold::storeKeyAtomically(ce_key_path, user_key_temp, kEmptyAuthentication, in create_and_install_user_keys()
340 if (!android::vold::storeKeyAtomically(get_de_key_path(user_id), user_key_temp, in create_and_install_user_keys()
416 if (!android::vold::reloadKeyFromSessionKeyring(DATA_MNT_POINT, it.second)) { in try_reload_ce_keys()
444 if (!android::vold::writeStringToFile(options_string, options_filename)) return false; in fscrypt_initialize_systemwide_keys()
447 if (!android::vold::writeStringToFile(device_policy.key_raw_ref, ref_filename)) return false; in fscrypt_initialize_systemwide_keys()
455 if (!android::vold::writeStringToFile(per_boot_policy.key_raw_ref, per_boot_ref_filename)) in fscrypt_initialize_systemwide_keys()
459 if (!android::vold::FsyncDirectory(device_key_dir)) return false; in fscrypt_initialize_systemwide_keys()
469 if (!android::vold::pathExists(get_de_key_path(0))) { in fscrypt_init_user0()
493 if (fscrypt_is_native() && android::vold::isFsKeyringSupported()) { in fscrypt_init_user0()
530 if (android::vold::isFsKeyringSupported()) { in drop_caches_if_needed()
544 success &= android::vold::evictKey(DATA_MNT_POINT, policy); in evict_ce_key()
560 android::vold::evictKey(DATA_MNT_POINT, de_policy); in fscrypt_destroy_user_key()
567 success &= android::vold::destroyKey(path); in fscrypt_destroy_user_key()
570 if (android::vold::pathExists(de_key_path)) { in fscrypt_destroy_user_key()
571 success &= android::vold::destroyKey(de_key_path); in fscrypt_destroy_user_key()
614 if (android::vold::HexToStr(hex, *result) != 0) { in parse_hex()
621 static std::optional<android::vold::KeyAuthentication> authentication_from_hex( in authentication_from_hex()
624 if (!parse_hex(token_hex, &token)) return std::optional<android::vold::KeyAuthentication>(); in authentication_from_hex()
625 if (!parse_hex(secret_hex, &secret)) return std::optional<android::vold::KeyAuthentication>(); in authentication_from_hex()
629 return android::vold::KeyAuthentication(token, secret); in authentication_from_hex()
645 if (android::vold::pathExists(secdiscardable_path)) { in read_or_create_volkey()
646 if (!android::vold::readSecdiscardable(secdiscardable_path, &secdiscardable_hash)) in read_or_create_volkey()
653 if (!android::vold::createSecdiscardable(secdiscardable_path, &secdiscardable_hash)) in read_or_create_volkey()
661 android::vold::KeyAuthentication auth("", secdiscardable_hash); in read_or_create_volkey()
674 if (!android::vold::pathExists(path)) return true; in destroy_volkey()
675 return android::vold::destroyKey(path); in destroy_volkey()
679 const android::vold::KeyAuthentication& retrieve_auth, in fscrypt_rewrap_user_key()
680 const android::vold::KeyAuthentication& store_auth) { in fscrypt_rewrap_user_key()
699 if (!android::vold::storeKeyAtomically(ce_key_path, user_key_temp, store_auth, ce_key)) in fscrypt_rewrap_user_key()
701 if (!android::vold::FsyncDirectory(directory_path)) return false; in fscrypt_rewrap_user_key()
759 if (!emulated_unlock(android::vold::BuildDataSystemCePath(user_id), 0771) || in fscrypt_unlock_user_key()
760 !emulated_unlock(android::vold::BuildDataMiscCePath(user_id), 01771) || in fscrypt_unlock_user_key()
761 !emulated_unlock(android::vold::BuildDataMediaCePath("", user_id), 0770) || in fscrypt_unlock_user_key()
762 !emulated_unlock(android::vold::BuildDataUserCePath("", user_id), 0771)) { in fscrypt_unlock_user_key()
777 if (!emulated_lock(android::vold::BuildDataSystemCePath(user_id)) || in fscrypt_lock_user_key()
778 !emulated_lock(android::vold::BuildDataMiscCePath(user_id)) || in fscrypt_lock_user_key()
779 !emulated_lock(android::vold::BuildDataMediaCePath("", user_id)) || in fscrypt_lock_user_key()
780 !emulated_lock(android::vold::BuildDataUserCePath("", user_id))) { in fscrypt_lock_user_key()
791 if (0 != android::vold::ForkExecvp( in prepare_subdirs()
807 auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); in fscrypt_prepare_user_storage()
808 auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id); in fscrypt_prepare_user_storage()
809 auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); in fscrypt_prepare_user_storage()
812 auto system_de_path = android::vold::BuildDataSystemDePath(user_id); in fscrypt_prepare_user_storage()
813 auto misc_de_path = android::vold::BuildDataMiscDePath(user_id); in fscrypt_prepare_user_storage()
814 auto vendor_de_path = android::vold::BuildDataVendorDePath(user_id); in fscrypt_prepare_user_storage()
815 auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
848 auto system_ce_path = android::vold::BuildDataSystemCePath(user_id); in fscrypt_prepare_user_storage()
849 auto misc_ce_path = android::vold::BuildDataMiscCePath(user_id); in fscrypt_prepare_user_storage()
850 auto vendor_ce_path = android::vold::BuildDataVendorCePath(user_id); in fscrypt_prepare_user_storage()
851 auto media_ce_path = android::vold::BuildDataMediaCePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
852 auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id); in fscrypt_prepare_user_storage()
880 android::vold::RestoreconRecursive(system_ce_path); in fscrypt_prepare_user_storage()
881 android::vold::RestoreconRecursive(vendor_ce_path); in fscrypt_prepare_user_storage()
882 android::vold::RestoreconRecursive(misc_ce_path); in fscrypt_prepare_user_storage()
899 auto system_ce_path = android::vold::BuildDataSystemCePath(user_id); in fscrypt_destroy_user_storage()
900 auto misc_ce_path = android::vold::BuildDataMiscCePath(user_id); in fscrypt_destroy_user_storage()
901 auto vendor_ce_path = android::vold::BuildDataVendorCePath(user_id); in fscrypt_destroy_user_storage()
902 auto media_ce_path = android::vold::BuildDataMediaCePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
903 auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
920 auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); in fscrypt_destroy_user_storage()
921 auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id); in fscrypt_destroy_user_storage()
922 auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); in fscrypt_destroy_user_storage()
925 auto system_de_path = android::vold::BuildDataSystemDePath(user_id); in fscrypt_destroy_user_storage()
926 auto misc_de_path = android::vold::BuildDataMiscDePath(user_id); in fscrypt_destroy_user_storage()
927 auto vendor_de_path = android::vold::BuildDataVendorDePath(user_id); in fscrypt_destroy_user_storage()
928 auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id); in fscrypt_destroy_user_storage()
980 res &= android::vold::runSecdiscardSingle(secdiscardable_path); in fscrypt_destroy_volume_keys()