• Home
  • Raw
  • Download

Lines Matching refs:c_str

129     return binder::Status::fromExceptionCode(code, String8(msg.c_str()));  in exception()
138 return binder::Status::fromServiceSpecificError(errno, String8(msg.c_str())); in error()
143 return binder::Status::fromServiceSpecificError(code, String8(msg.c_str())); in error()
174 StringPrintf("UUID %s is malformed", uuid->c_str())); in checkArgumentUuid()
179 if (!uuid || strcmp(uuid->c_str(), kTestUuid) == 0) { in checkArgumentUuidTestOrNull()
183 StringPrintf("UUID must be null or \"%s\", got: %s", kTestUuid, uuid->c_str())); in checkArgumentUuidTestOrNull()
192 StringPrintf("Package name %s is malformed", packageName.c_str())); in checkArgumentPackageName()
202 StringPrintf("Path %s is relative", path.c_str())); in checkArgumentPath()
206 StringPrintf("Path %s is shady", path.c_str())); in checkArgumentPath()
211 StringPrintf("Path %s is malformed", path.c_str())); in checkArgumentPath()
330 if (lgetfilecon(path.c_str(), &before) < 0) { in restorecon_app_data_lazy()
334 if (selinux_android_restorecon_pkgdir(path.c_str(), seInfo.c_str(), uid, 0) < 0) { in restorecon_app_data_lazy()
338 if (lgetfilecon(path.c_str(), &after) < 0) { in restorecon_app_data_lazy()
350 if (selinux_android_restorecon_pkgdir(path.c_str(), seInfo.c_str(), uid, in restorecon_app_data_lazy()
368 return restorecon_app_data_lazy(StringPrintf("%s/%s", parent.c_str(), name), seInfo, uid, in restorecon_app_data_lazy()
373 if (fs_prepare_dir_strict(path.c_str(), target_mode, uid, uid) != 0) { in prepare_app_dir()
397 if (fs_prepare_dir_strict(profile_dir.c_str(), 0700, uid, uid) != 0) { in prepare_app_profile_dir()
401 if (selinux_android_restorecon(profile_dir.c_str(), 0)) { in prepare_app_profile_dir()
419 if (fs_prepare_dir(ref_profile_path.c_str(), 0770, AID_SYSTEM, shared_app_gid) != 0) { in prepare_app_profile_dir()
435 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in createAppData()
436 const char* pkgname = packageName.c_str(); in createAppData()
452 bool existing = (access(path.c_str(), F_OK) == 0); in createAppData()
486 bool existing = (access(path.c_str(), F_OK) == 0); in createAppData()
547 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in migrateAppData()
548 const char* pkgname = packageName.c_str(); in migrateAppData()
559 if (getxattr(ce_path.c_str(), kXattrDefault, nullptr, 0) == -1 in migrateAppData()
560 && getxattr(de_path.c_str(), kXattrDefault, nullptr, 0) == -1) { in migrateAppData()
561 if (setxattr(ce_path.c_str(), kXattrDefault, nullptr, 0, 0) != 0) { in migrateAppData()
570 if (getxattr(target.c_str(), kXattrDefault, nullptr, 0) == -1) { in migrateAppData()
576 if (rename(source.c_str(), target.c_str()) != 0) { in migrateAppData()
608 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in clearAppData()
609 const char* pkgname = packageName.c_str(); in clearAppData()
619 if (access(path.c_str(), F_OK) == 0) { in clearAppData()
640 if (access(path.c_str(), F_OK) == 0) { in clearAppData()
667 auto path = StringPrintf("%s/Android/data/%s/cache", extPath.c_str(), pkgname); in clearAppData()
675 auto path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname); in clearAppData()
679 path = StringPrintf("%s/Android/media/%s", extPath.c_str(), pkgname); in clearAppData()
728 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in destroyAppData()
729 const char* pkgname = packageName.c_str(); in destroyAppData()
770 auto path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname); in destroyAppData()
775 path = StringPrintf("%s/Android/media/%s", extPath.c_str(), pkgname); in destroyAppData()
779 path = StringPrintf("%s/Android/obb/%s", extPath.c_str(), pkgname); in destroyAppData()
799 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in fixupAppData()
806 char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), nullptr }; in fixupAppData()
921 const char* volume_uuid = volumeUuid ? volumeUuid->c_str() : nullptr; in snapshotAppData()
922 const char* package_name = packageName.c_str(); in snapshotAppData()
937 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in snapshotAppData()
945 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in snapshotAppData()
959 int rc = create_dir_if_needed(to.c_str(), kRollbackFolderMode); in snapshotAppData()
970 if (access(from.c_str(), F_OK) == 0) { in snapshotAppData()
971 rc = copy_directory_recursive(from.c_str(), to.c_str()); in snapshotAppData()
982 if (access(from_ce.c_str(), F_OK) != 0) { in snapshotAppData()
1011 int rc = create_dir_if_needed(to.c_str(), kRollbackFolderMode); in snapshotAppData()
1021 rc = copy_directory_recursive(from.c_str(), to.c_str()); in snapshotAppData()
1051 const char* volume_uuid = volumeUuid ? volumeUuid->c_str() : nullptr; in restoreAppDataSnapshot()
1052 const char* package_name = packageName.c_str(); in restoreAppDataSnapshot()
1060 (access(from_ce.c_str(), F_OK) == 0); in restoreAppDataSnapshot()
1062 (access(from_de.c_str(), F_OK) == 0); in restoreAppDataSnapshot()
1085 int rc = copy_directory_recursive(from_ce.c_str(), to_ce.c_str()); in restoreAppDataSnapshot()
1095 int rc = copy_directory_recursive(from_de.c_str(), to_de.c_str()); in restoreAppDataSnapshot()
1100 if (delete_dir_contents(ce_data.c_str(), 1, nullptr) != 0) { in restoreAppDataSnapshot()
1123 const char* volume_uuid = volumeUuid ? volumeUuid->c_str() : nullptr; in destroyAppDataSnapshot()
1124 const char* package_name = packageName.c_str(); in destroyAppDataSnapshot()
1154 const char* volume_uuid = volumeUuid ? volumeUuid->c_str() : nullptr; in destroyCeSnapshotsNotSpecified()
1158 std::unique_ptr<DIR, decltype(&closedir)> dir(opendir(base_path.c_str()), closedir); in destroyCeSnapshotsNotSpecified()
1195 const char* from_uuid = fromUuid ? fromUuid->c_str() : nullptr; in moveCompleteApp()
1196 const char* to_uuid = toUuid ? toUuid->c_str() : nullptr; in moveCompleteApp()
1197 const char* package_name = packageName.c_str(); in moveCompleteApp()
1203 auto to_app_package_path = StringPrintf("%s/%s", to_app_package_path_parent.c_str(), in moveCompleteApp()
1204 android::base::Basename(fromCodePath).c_str()); in moveCompleteApp()
1208 int rc = copy_directory_recursive(fromCodePath.c_str(), to_app_package_path_parent.c_str()); in moveCompleteApp()
1214 …if (selinux_android_restorecon(to_app_package_path.c_str(), SELINUX_ANDROID_RESTORECON_RECURSE) !=… in moveCompleteApp()
1225 if (access(from_ce.c_str(), F_OK) != 0) { in moveCompleteApp()
1240 int rc = copy_directory_recursive(from.c_str(), to.c_str()); in moveCompleteApp()
1250 int rc = copy_directory_recursive(from.c_str(), to.c_str()); in moveCompleteApp()
1272 if (delete_dir_contents(to_app_package_path.c_str(), 1, nullptr) != 0) { in moveCompleteApp()
1279 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in moveCompleteApp()
1285 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in moveCompleteApp()
1299 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in createUserData()
1317 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in destroyUserData()
1355 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in freeCache()
1386 char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), in freeCache()
1387 (char*) media_path.c_str(), nullptr }; in freeCache()
1513 targetFreeBytes, data_path.c_str(), free)); in freeCache()
1525 const char* path = codePath.c_str(); in rmdex()
1526 const char* instruction_set = instructionSet.c_str(); in rmdex()
1640 d = opendir(path.c_str()); in collectManualStats()
1665 calculate_tree_size(StringPrintf("%s/%s", path.c_str(), name), &size); in collectManualStats()
1691 d = opendir(path.c_str()); in collectManualStatsForUser()
1711 collectManualStats(StringPrintf("%s/%s", path.c_str(), name), stats); in collectManualStatsForUser()
1721 char *argv[] = { (char*) path.c_str(), nullptr }; in collectManualExternalStatsForUser()
1793 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getAppSize()
1802 "obb", packageName.c_str()); in getAppSize()
1826 const char* pkgname = packageNames[i].c_str(); in getAppSize()
2000 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getUserSize()
2127 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getExternalSize()
2165 char *argv[] = { (char*) path.c_str(), nullptr }; in getExternalSize()
2208 create_data_media_path(uuid_, userId).c_str()); in getExternalSize()
2240 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getAppCrates()
2285 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getUserCrates()
2386 if ((unlink(snapshot.c_str()) != 0) && (errno != ENOENT)) { in destroyProfileSnapshot()
2394 return data ? data->c_str() : default_value; in getCStr()
2416 const char* instruction_set = instructionSet.c_str(); in dexopt()
2422 const char* apk_path = apkPath.c_str(); in dexopt()
2424 const char* compiler_filter = compilerFilter.c_str(); in dexopt()
2442 const char* apk_path = apkPath.c_str(); in compileLayouts()
2443 const char* package_name = packageName.c_str(); in compileLayouts()
2444 const char* out_dex_file = outDexFile.c_str(); in compileLayouts()
2458 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in linkNativeLibraryDirectory()
2459 const char* pkgname = packageName.c_str(); in linkNativeLibraryDirectory()
2460 const char* asecLibDir = nativeLibPath32.c_str(); in linkNativeLibraryDirectory()
2467 const char* pkgdir = _pkgdir.c_str(); in linkNativeLibraryDirectory()
2468 const char* libsymlink = _libsymlink.c_str(); in linkNativeLibraryDirectory()
2553 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in restoreconAppData()
2554 const char* pkgName = packageName.c_str(); in restoreconAppData()
2555 const char* seinfo = seInfo.c_str(); in restoreconAppData()
2560 if (selinux_android_restorecon_pkgdir(path.c_str(), seinfo, uid, seflags) < 0) { in restoreconAppData()
2566 if (selinux_android_restorecon_pkgdir(path.c_str(), seinfo, uid, seflags) < 0) { in restoreconAppData()
2579 const char* oat_dir = oatDir.c_str(); in createOatDir()
2580 const char* instruction_set = instructionSet.c_str(); in createOatDir()
2604 if (validate_apk_path(packageDir.c_str())) { in rmPackageDir()
2620 const char* relative_path = relativePath.c_str(); in linkFile()
2621 const char* from_base = fromBase.c_str(); in linkFile()
2622 const char* to_base = toBase.c_str(); in linkFile()
2650 const char* apk_path = apkPath.c_str(); in moveAb()
2651 const char* instruction_set = instructionSet.c_str(); in moveAb()
2652 const char* oat_dir = outputPath.c_str(); in moveAb()
2666 const char* apk_path = apkPath.c_str(); in deleteOdex()
2667 const char* instruction_set = instructionSet.c_str(); in deleteOdex()
2668 const char* oat_dir = outputPath ? outputPath->c_str() : nullptr; in deleteOdex()
2712 ::android::base::unique_fd wfd(open(filePath.c_str(), O_WRONLY)); in installApkVerity()
2768 ::android::base::unique_fd rfd(open(filePath.c_str(), O_RDONLY)); in installApkVerity()
2790 ::android::base::unique_fd fd(open(filePath.c_str(), O_RDONLY)); in assertFsverityRootHashMatches()
2896 const char* uuid_ = uuid->c_str(); in tryMountDataMirror()
2900 if (fs_prepare_dir(mirrorVolCePath.c_str(), 0711, AID_SYSTEM, AID_SYSTEM) != 0) { in tryMountDataMirror()
2905 if (fs_prepare_dir(mirrorVolDePath.c_str(), 0711, AID_SYSTEM, AID_SYSTEM) != 0) { in tryMountDataMirror()
2909 auto cePath = StringPrintf("%s/user", create_data_path(uuid_).c_str()); in tryMountDataMirror()
2910 auto dePath = StringPrintf("%s/user_de", create_data_path(uuid_).c_str()); in tryMountDataMirror()
2912 if (access(cePath.c_str(), F_OK) != 0) { in tryMountDataMirror()
2915 if (access(dePath.c_str(), F_OK) != 0) { in tryMountDataMirror()
2920 if (stat(cePath.c_str(), &ceStat) != 0) { in tryMountDataMirror()
2923 if (stat(mirrorVolCePath.c_str(), &mirrorCeStat) != 0) { in tryMountDataMirror()
2935 if (TEMP_FAILURE_RETRY(mount(cePath.c_str(), mirrorVolCePath.c_str(), NULL, in tryMountDataMirror()
2941 if (TEMP_FAILURE_RETRY(mount(dePath.c_str(), mirrorVolDePath.c_str(), NULL, in tryMountDataMirror()
2961 const char* uuid_ = uuid->c_str(); in onPrivateVolumeRemoved()
2970 if (TEMP_FAILURE_RETRY(umount(mirrorCeVolPath.c_str())) != 0) { in onPrivateVolumeRemoved()
2972 res = error(StringPrintf("Failed to umount %s %s", mirrorCeVolPath.c_str(), in onPrivateVolumeRemoved()
2981 if (TEMP_FAILURE_RETRY(umount(mirrorDeVolPath.c_str())) != 0) { in onPrivateVolumeRemoved()
2983 res = error(StringPrintf("Failed to umount %s %s", mirrorDeVolPath.c_str(), in onPrivateVolumeRemoved()
2996 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in findDataMediaPath()
2997 auto path = StringPrintf("%s/media", create_data_path(uuid_).c_str()); in findDataMediaPath()
3003 return StringPrintf("%s/%u", resolved.c_str(), userid); in findDataMediaPath()