Home | History | Annotate | Download | only in installd

Lines Matching refs:pkgName

79 int create_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags,
84 auto path = create_data_user_ce_package_path(uuid, userid, pkgname);
89 if (selinux_android_setfilecon(path.c_str(), pkgname, seinfo, uid) < 0) {
95 auto path = create_data_user_de_package_path(uuid, userid, pkgname);
101 if (selinux_android_setfilecon(path.c_str(), pkgname, seinfo, uid) < 0) {
108 const std::string profile_path = create_data_user_profile_package_path(userid, pkgname);
120 const std::string ref_profile_path = create_data_ref_profile_package_path(pkgname);
134 int migrate_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags) {
140 auto ce_path = create_data_user_ce_package_path(uuid, userid, pkgname);
141 auto de_path = create_data_user_de_package_path(uuid, userid, pkgname);
216 static bool clear_reference_profile(const char* pkgname) {
217 std::string reference_profile_dir = create_data_ref_profile_package_path(pkgname);
222 static bool clear_current_profile(const char* pkgname, userid_t user) {
223 std::string profile_dir = create_data_user_profile_package_path(user, pkgname);
228 static bool clear_current_profiles(const char* pkgname) {
232 success &= clear_current_profile(pkgname, user);
237 int clear_app_profiles(const char* pkgname) {
239 success &= clear_reference_profile(pkgname);
240 success &= clear_current_profiles(pkgname);
244 int clear_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags,
258 auto path = create_data_user_ce_package_path(uuid, userid, pkgname, ce_data_inode) + suffix;
264 auto path = create_data_user_de_package_path(uuid, userid, pkgname) + suffix;
270 if (!clear_current_profile(pkgname, userid)) {
278 static int destroy_app_reference_profile(const char *pkgname) {
280 create_data_ref_profile_package_path(pkgname),
284 static int destroy_app_current_profiles(const char *pkgname, userid_t userid) {
286 create_data_user_profile_package_path(userid, pkgname),
290 int destroy_app_profiles(const char *pkgname) {
294 result |= destroy_app_current_profiles(pkgname, user);
296 result |= destroy_app_reference_profile(pkgname);
300 int destroy_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags,
305 create_data_user_ce_package_path(uuid, userid, pkgname, ce_data_inode));
309 create_data_user_de_package_path(uuid, userid, pkgname));
310 destroy_app_current_profiles(pkgname, userid);
314 destroy_app_reference_profile(pkgname);
579 int get_app_size(const char *uuid, const char *pkgname, int userid, int flags, ino_t ce_data_inode,
593 auto path = create_data_user_ce_package_path(uuid, userid, pkgname, ce_data_inode);
597 auto path = create_data_user_de_package_path(uuid, userid, pkgname);
606 int get_app_data_inode(const char *uuid, const char *pkgname, int userid, int flags, ino_t *inode) {
610 auto path = create_data_user_ce_package_path(uuid, userid, pkgname);
652 const char* output_file_name, const char *pkgname ATTRIBUTE_UNUSED, const char *instruction_set)
1027 static fd_t open_primary_profile_file(userid_t user, const char* pkgname) {
1028 std::string profile_dir = create_data_user_profile_package_path(user, pkgname);
1032 static fd_t open_reference_profile(uid_t uid, const char* pkgname, bool read_write) {
1033 std::string reference_profile_dir = create_data_ref_profile_package_path(pkgname);
1049 static void open_profile_files(uid_t uid, const char* pkgname,
1052 *reference_profile_fd = open_reference_profile(uid, pkgname, /*read_write*/ true);
1060 fd_t profile_fd = open_primary_profile_file(user, pkgname);
1129 static bool analyse_profiles(uid_t uid, const char* pkgname) {
1132 open_profile_files(uid, pkgname, &profiles_fd, &reference_profile_fd);
1143 ALOGV("PROFMAN (MERGE): --- BEGIN '%s' ---\n", pkgname);
1158 LOG(WARNING) << "profman failed for package " << pkgname << ": " << return_code;
1173 LOG(WARNING) << "Bad profiles for package " << pkgname;
1181 LOG(WARNING) << "IO error while reading profiles for package " << pkgname;
1188 LOG(WARNING) << "Unknown error code while processing profiles for package " << pkgname
1201 clear_current_profiles(pkgname);
1204 clear_reference_profile(pkgname);
1255 // Dumps the contents of a profile file, using pkgname's dex files for pretty
1257 bool dump_profile(uid_t uid, const char* pkgname, const char* code_path_string) {
1260 std::string out_file_name = StringPrintf("/data/misc/profman/%s.txt", pkgname);
1262 ALOGV("PROFMAN (DUMP): --- BEGIN '%s' ---\n", pkgname);
1264 open_profile_files(uid, pkgname, &profile_fds, &reference_profile_fd);
1270 ALOGE("profman dump: no profiles to dump for '%s'", pkgname);
1309 LOG(WARNING) << "profman failed for package " << pkgname << ": "
1387 bool merge_profiles(uid_t uid, const char *pkgname) {
1388 return analyse_profiles(uid, pkgname);
1391 int dexopt(const char* apk_path, uid_t uid, const char* pkgname, const char* instruction_set,
1410 CHECK(pkgname != nullptr);
1411 CHECK(pkgname[0] != 0);
1416 if (!is_public && pkgname[0] != '*') {
1418 reference_profile_fd = open_reference_profile(uid, pkgname, /*read_write*/ false);
1534 run_patchoat(input_fd, out_fd, input_file, out_path, pkgname, instruction_set);
1585 clear_reference_profile(pkgname);
1636 int linklib(const char* uuid, const char* pkgname, const char* asecLibDir, int userId)
1641 std::string _pkgdir(create_data_user_ce_package_path(uuid, userId, pkgname));
1814 int restorecon_app_data(const char* uuid, const char* pkgName, userid_t userid, int flags,
1821 if (!pkgName || !seinfo) {
1828 auto path = create_data_user_ce_package_path(uuid, userid, pkgName);
1835 auto path = create_data_user_de_package_path(uuid, userid, pkgName);