• Home
  • Raw
  • Download

Lines Matching refs:c_str

115     return binder::Status::fromExceptionCode(code, String8(msg.c_str()));  in exception()
124 return binder::Status::fromServiceSpecificError(errno, String8(msg.c_str())); in error()
129 return binder::Status::fromServiceSpecificError(code, String8(msg.c_str())); in error()
160 StringPrintf("UUID %s is malformed", uuid->c_str())); in checkArgumentUuid()
165 if (!uuid || strcmp(uuid->c_str(), kTestUuid) == 0) { in checkArgumentUuidTestOrNull()
169 StringPrintf("UUID must be null or \"%s\", got: %s", kTestUuid, uuid->c_str())); in checkArgumentUuidTestOrNull()
178 StringPrintf("Package name %s is malformed", packageName.c_str())); in checkArgumentPackageName()
188 StringPrintf("Path %s is relative", path.c_str())); in checkArgumentPath()
192 StringPrintf("Path %s is shady", path.c_str())); in checkArgumentPath()
197 StringPrintf("Path %s is malformed", path.c_str())); in checkArgumentPath()
314 if (lgetfilecon(path.c_str(), &before) < 0) { in restorecon_app_data_lazy()
318 if (selinux_android_restorecon_pkgdir(path.c_str(), seInfo.c_str(), uid, 0) < 0) { in restorecon_app_data_lazy()
322 if (lgetfilecon(path.c_str(), &after) < 0) { in restorecon_app_data_lazy()
334 if (selinux_android_restorecon_pkgdir(path.c_str(), seInfo.c_str(), uid, in restorecon_app_data_lazy()
352 return restorecon_app_data_lazy(StringPrintf("%s/%s", parent.c_str(), name), seInfo, uid, in restorecon_app_data_lazy()
357 if (fs_prepare_dir_strict(path.c_str(), target_mode, uid, uid) != 0) { in prepare_app_dir()
381 if (fs_prepare_dir_strict(profile_dir.c_str(), 0700, uid, uid) != 0) { in prepare_app_profile_dir()
399 if (fs_prepare_dir(ref_profile_path.c_str(), 0770, AID_SYSTEM, shared_app_gid) != 0) { in prepare_app_profile_dir()
415 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in createAppData()
416 const char* pkgname = packageName.c_str(); in createAppData()
432 bool existing = (access(path.c_str(), F_OK) == 0); in createAppData()
463 bool existing = (access(path.c_str(), F_OK) == 0); in createAppData()
492 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in migrateAppData()
493 const char* pkgname = packageName.c_str(); in migrateAppData()
504 if (getxattr(ce_path.c_str(), kXattrDefault, nullptr, 0) == -1 in migrateAppData()
505 && getxattr(de_path.c_str(), kXattrDefault, nullptr, 0) == -1) { in migrateAppData()
506 if (setxattr(ce_path.c_str(), kXattrDefault, nullptr, 0, 0) != 0) { in migrateAppData()
515 if (getxattr(target.c_str(), kXattrDefault, nullptr, 0) == -1) { in migrateAppData()
521 if (rename(source.c_str(), target.c_str()) != 0) { in migrateAppData()
553 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in clearAppData()
554 const char* pkgname = packageName.c_str(); in clearAppData()
564 if (access(path.c_str(), F_OK) == 0) { in clearAppData()
585 if (access(path.c_str(), F_OK) == 0) { in clearAppData()
603 auto path = StringPrintf("%s/Android/data/%s/cache", extPath.c_str(), pkgname); in clearAppData()
611 auto path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname); in clearAppData()
615 path = StringPrintf("%s/Android/media/%s", extPath.c_str(), pkgname); in clearAppData()
619 path = StringPrintf("%s/Android/obb/%s", extPath.c_str(), pkgname); in clearAppData()
666 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in destroyAppData()
667 const char* pkgname = packageName.c_str(); in destroyAppData()
697 auto path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname); in destroyAppData()
701 path = StringPrintf("%s/Android/media/%s", extPath.c_str(), pkgname); in destroyAppData()
705 path = StringPrintf("%s/Android/obb/%s", extPath.c_str(), pkgname); in destroyAppData()
725 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in fixupAppData()
732 char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), nullptr }; in fixupAppData()
847 const char* volume_uuid = volumeUuid ? volumeUuid->c_str() : nullptr; in snapshotAppData()
848 const char* package_name = packageName.c_str(); in snapshotAppData()
863 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in snapshotAppData()
871 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in snapshotAppData()
881 if (access(from_ce.c_str(), F_OK) != 0) { in snapshotAppData()
910 int rc = create_dir_if_needed(to.c_str(), kRollbackFolderMode); in snapshotAppData()
920 rc = copy_directory_recursive(from.c_str(), to.c_str()); in snapshotAppData()
934 int rc = create_dir_if_needed(to.c_str(), kRollbackFolderMode); in snapshotAppData()
944 rc = copy_directory_recursive(from.c_str(), to.c_str()); in snapshotAppData()
974 const char* volume_uuid = volumeUuid ? volumeUuid->c_str() : nullptr; in restoreAppDataSnapshot()
975 const char* package_name = packageName.c_str(); in restoreAppDataSnapshot()
983 (access(from_ce.c_str(), F_OK) == 0); in restoreAppDataSnapshot()
985 (access(from_de.c_str(), F_OK) == 0); in restoreAppDataSnapshot()
1008 int rc = copy_directory_recursive(from_ce.c_str(), to_ce.c_str()); in restoreAppDataSnapshot()
1017 int rc = copy_directory_recursive(from_de.c_str(), to_de.c_str()); in restoreAppDataSnapshot()
1022 if (delete_dir_contents(ce_data.c_str(), 1, nullptr) != 0) { in restoreAppDataSnapshot()
1044 const char* volume_uuid = volumeUuid ? volumeUuid->c_str() : nullptr; in destroyAppDataSnapshot()
1045 const char* package_name = packageName.c_str(); in destroyAppDataSnapshot()
1079 const char* from_uuid = fromUuid ? fromUuid->c_str() : nullptr; in moveCompleteApp()
1080 const char* to_uuid = toUuid ? toUuid->c_str() : nullptr; in moveCompleteApp()
1081 const char* package_name = packageName.c_str(); in moveCompleteApp()
1082 const char* data_app_name = dataAppName.c_str(); in moveCompleteApp()
1093 int rc = copy_directory_recursive(from.c_str(), to_parent.c_str()); in moveCompleteApp()
1099 if (selinux_android_restorecon(to.c_str(), SELINUX_ANDROID_RESTORECON_RECURSE) != 0) { in moveCompleteApp()
1110 if (access(from_ce.c_str(), F_OK) != 0) { in moveCompleteApp()
1125 int rc = copy_directory_recursive(from.c_str(), to.c_str()); in moveCompleteApp()
1135 int rc = copy_directory_recursive(from.c_str(), to.c_str()); in moveCompleteApp()
1158 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in moveCompleteApp()
1165 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in moveCompleteApp()
1171 if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { in moveCompleteApp()
1185 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in createUserData()
1203 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in destroyUserData()
1241 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in freeCache()
1272 char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), in freeCache()
1273 (char*) media_path.c_str(), nullptr }; in freeCache()
1399 targetFreeBytes, data_path.c_str(), free)); in freeCache()
1411 const char* path = codePath.c_str(); in rmdex()
1412 const char* instruction_set = instructionSet.c_str(); in rmdex()
1502 d = opendir(path.c_str()); in collectManualStats()
1527 calculate_tree_size(StringPrintf("%s/%s", path.c_str(), name), &size); in collectManualStats()
1553 d = opendir(path.c_str()); in collectManualStatsForUser()
1573 collectManualStats(StringPrintf("%s/%s", path.c_str(), name), stats); in collectManualStatsForUser()
1583 char *argv[] = { (char*) path.c_str(), nullptr }; in collectManualExternalStatsForUser()
1655 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getAppSize()
1664 "obb", packageName.c_str()); in getAppSize()
1688 const char* pkgname = packageNames[i].c_str(); in getAppSize()
1762 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getUserSize()
1900 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in getExternalSize()
1954 char *argv[] = { (char*) path.c_str(), nullptr }; in getExternalSize()
1997 create_data_media_path(uuid_, userId).c_str()); in getExternalSize()
2081 if ((unlink(snapshot.c_str()) != 0) && (errno != ENOENT)) { in destroyProfileSnapshot()
2089 return data == nullptr ? default_value : data->c_str(); in getCStr()
2110 const char* apk_path = apkPath.c_str(); in dexopt()
2112 const char* instruction_set = instructionSet.c_str(); in dexopt()
2114 const char* compiler_filter = compilerFilter.c_str(); in dexopt()
2132 const char* apk_path = apkPath.c_str(); in compileLayouts()
2133 const char* package_name = packageName.c_str(); in compileLayouts()
2134 const char* out_dex_file = outDexFile.c_str(); in compileLayouts()
2143 const char* instruction_set = instructionSet.c_str(); in markBootComplete()
2148 android_data_dir.c_str(), in markBootComplete()
2168 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in linkNativeLibraryDirectory()
2169 const char* pkgname = packageName.c_str(); in linkNativeLibraryDirectory()
2170 const char* asecLibDir = nativeLibPath32.c_str(); in linkNativeLibraryDirectory()
2177 const char* pkgdir = _pkgdir.c_str(); in linkNativeLibraryDirectory()
2178 const char* libsymlink = _libsymlink.c_str(); in linkNativeLibraryDirectory()
2254 StringPrintf("%d", idmap_fd).c_str(), (char*)nullptr); in run_idmap()
2261 StringPrintf("%d", idmap_fd).c_str(), (char*)nullptr); in run_verify_idmap()
2349 const char* target_apk = targetApkPath.c_str(); in idmap()
2350 const char* overlay_apk = overlayApkPath.c_str(); in idmap()
2436 const char* overlay_apk = overlayApkPath.c_str(); in removeIdmap()
2463 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in restoreconAppData()
2464 const char* pkgName = packageName.c_str(); in restoreconAppData()
2465 const char* seinfo = seInfo.c_str(); in restoreconAppData()
2470 if (selinux_android_restorecon_pkgdir(path.c_str(), seinfo, uid, seflags) < 0) { in restoreconAppData()
2476 if (selinux_android_restorecon_pkgdir(path.c_str(), seinfo, uid, seflags) < 0) { in restoreconAppData()
2489 const char* oat_dir = oatDir.c_str(); in createOatDir()
2490 const char* instruction_set = instructionSet.c_str(); in createOatDir()
2514 if (validate_apk_path(packageDir.c_str())) { in rmPackageDir()
2530 const char* relative_path = relativePath.c_str(); in linkFile()
2531 const char* from_base = fromBase.c_str(); in linkFile()
2532 const char* to_base = toBase.c_str(); in linkFile()
2560 const char* apk_path = apkPath.c_str(); in moveAb()
2561 const char* instruction_set = instructionSet.c_str(); in moveAb()
2562 const char* oat_dir = outputPath.c_str(); in moveAb()
2575 const char* apk_path = apkPath.c_str(); in deleteOdex()
2576 const char* instruction_set = instructionSet.c_str(); in deleteOdex()
2577 const char* oat_dir = outputPath ? outputPath->c_str() : nullptr; in deleteOdex()
2621 ::android::base::unique_fd wfd(open(filePath.c_str(), O_WRONLY)); in installApkVerity()
2677 ::android::base::unique_fd rfd(open(filePath.c_str(), O_RDONLY)); in installApkVerity()
2699 ::android::base::unique_fd fd(open(filePath.c_str(), O_RDONLY)); in assertFsverityRootHashMatches()
2789 const char* uuid_ = uuid ? uuid->c_str() : nullptr; in findDataMediaPath()
2790 auto path = StringPrintf("%s/media", create_data_path(uuid_).c_str()); in findDataMediaPath()
2796 return StringPrintf("%s/%u", resolved.c_str(), userid); in findDataMediaPath()