Home
last modified time | relevance | path

Searched full:path (Results 1 – 25 of 1416) sorted by relevance

12345678910>>...57

/system/apex/apexd/
Dapexd_utils_test.cpp53 TemporaryFile child_file_1(root_dir.path); in TEST()
54 TemporaryFile child_file_2(root_dir.path); in TEST()
55 std::string child_dir = StringPrintf("%s/child-dir", root_dir.path); in TEST()
59 auto content = ReadDir(root_dir.path, [](auto _) { return true; }); in TEST()
63 auto del_result = DeleteDirContent(root_dir.path); in TEST()
65 content = ReadDir(root_dir.path, [](auto _) { return true; }); in TEST()
73 auto result = FindFirstExistingDirectory(first_dir.path, second_dir.path); in TEST()
75 ASSERT_EQ(*result, first_dir.path); in TEST()
81 auto result = FindFirstExistingDirectory(first_dir.path, second_dir); in TEST()
83 ASSERT_EQ(*result, first_dir.path); in TEST()
[all …]
Dapex_file_repository_test.cpp81 fs::copy(GetTestFile("apex.apexd_test.apex"), built_in_dir.path); in TEST()
83 built_in_dir.path); in TEST()
86 fs::copy(GetTestFile("apex.apexd_test.apex"), data_dir.path); in TEST()
87 fs::copy(GetTestFile("apex.apexd_test_different_app.apex"), data_dir.path); in TEST()
91 instance.AddPreInstalledApex({{partition, built_in_dir.path}})); in TEST()
92 ASSERT_RESULT_OK(instance.AddDataApex(data_dir.path)); in TEST()
108 ASSERT_EQ(StringPrintf("%s/%s", built_in_dir.path, apex_name.c_str()), in TEST()
127 instance.AddPreInstalledApex({{partition, built_in_dir.path}})); in TEST()
128 ASSERT_RESULT_OK(instance.AddDataApex(data_dir.path)); in TEST()
136 fs::copy(GetTestFile("apex.apexd_test.apex"), built_in_dir.path); in TEST()
[all …]
/system/extras/simpleperf/demo/SimpleperfExampleJava/app/src/main/res/drawable/
Dic_launcher_background.xml7 <path
10 <path
15 <path
20 <path
25 <path
30 <path
35 <path
40 <path
45 <path
50 <path
[all …]
/system/extras/simpleperf/demo/CppApi/app/src/main/res/drawable/
Dic_launcher_background.xml7 <path
10 <path
15 <path
20 <path
25 <path
30 <path
35 <path
40 <path
45 <path
50 <path
[all …]
/system/extras/simpleperf/demo/JavaApi/app/src/main/res/drawable/
Dic_launcher_background.xml7 <path
10 <path
15 <path
20 <path
25 <path
30 <path
35 <path
40 <path
45 <path
50 <path
[all …]
/system/extras/simpleperf/demo/SimpleperfExampleCpp/app/src/main/res/drawable/
Dic_launcher_background.xml7 <path
10 <path
15 <path
20 <path
25 <path
30 <path
35 <path
40 <path
45 <path
50 <path
[all …]
/system/extras/simpleperf/demo/SimpleperfExampleKotlin/app/src/main/res/drawable/
Dic_launcher_background.xml7 <path
10 <path
15 <path
20 <path
25 <path
30 <path
35 <path
40 <path
45 <path
50 <path
[all …]
/system/extras/simpleperf/scripts/
Dbinary_cache_builder.py25 import os.path
26 from pathlib import Path
42 def __init__(self, binary_dir: Path): argument
45 def get_path_in_cache(self, device_path: str, build_id: str) -> Path:
46 """ Given a binary path in perf.data, return its corresponding path in the cache.
53 # For elf file without build id, we can only follow its path on device. Otherwise,
57 # 2) It may exceed path limit on windows.
61 return Path(os.path.join(self.binary_dir, device_path))
72 binaries: maps from binary path to its build_id in perf.data.
76 def read_build_id(self, path: Path): argument
[all …]
/system/unwinding/libunwindstack/benchmarks/
DMapsBenchmark.cpp81 CreateMap(initial_maps.path, kNumSmallMaps, 2); in BM_local_updatable_maps_reparse_double_initial_small()
84 CreateMap(reparse_maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_double_initial_small()
86 ReparseBenchmark(state, initial_maps.path, kNumSmallMaps / 2, reparse_maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_double_initial_small()
92 CreateMap(initial_maps.path, kNumLargeMaps, 2); in BM_local_updatable_maps_reparse_double_initial_large()
95 CreateMap(reparse_maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_double_initial_large()
97 ReparseBenchmark(state, initial_maps.path, kNumLargeMaps / 2, reparse_maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_double_initial_large()
104 CreateMap(maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_same_maps_small()
106 ReparseBenchmark(state, maps.path, kNumSmallMaps, maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_same_maps_small()
112 CreateMap(maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_same_maps_large()
114 ReparseBenchmark(state, maps.path, kNumLargeMaps, maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_same_maps_large()
[all …]
/system/incremental_delivery/incfs/include/
Dpath.h26 namespace android::incfs::path {
36 std::string readlink(std::string_view path);
37 bool isAbsolute(std::string_view path);
38 std::string normalize(std::string_view path);
56 inline std::string_view baseName(std::string_view path) { in baseName() argument
58 if (path.empty()) { in baseName()
61 if (path == "/"sv) { in baseName()
64 auto pos = path.rfind('/'); in baseName()
65 while (!path.empty() && pos == path.size() - 1) { in baseName()
66 path.remove_suffix(1); in baseName()
[all …]
/system/libvintf/
DFileSystem.cpp31 status_t FileSystemImpl::fetch(const std::string& path, std::string* fetched, in fetch() argument
33 if (!android::base::ReadFileToString(path, fetched, true /* follow_symlinks */)) { in fetch()
36 *error = "Cannot read " + path + ": " + strerror(saved_errno); in fetch()
43 status_t FileSystemImpl::listFiles(const std::string& path, std::vector<std::string>* out, in listFiles() argument
45 std::unique_ptr<DIR, decltype(&closedir)> dir(opendir(path.c_str()), closedir); in listFiles()
49 *error = "Cannot open " + path + ": " + strerror(saved_errno); in listFiles()
63 *error = "Failed while reading directory " + path + ": " + strerror(saved_errno); in listFiles()
69 status_t FileSystemImpl::modifiedTime(const std::string& path, timespec* mtime, in modifiedTime() argument
72 if (stat(path.c_str(), &stat_buf) != 0) { in modifiedTime()
75 *error = "Cannot open " + path + ": " + strerror(saved_errno); in modifiedTime()
[all …]
/system/apex/tools/
Dapexd_host.py29 $ apexd_host --apex_path /path/to/apex --system_path /path/to/system
48 def DirectoryType(path): argument
49 if not os.path.exists(path):
51 if not os.path.isdir(path):
52 raise argparse.ArgumentTypeError(f'{path} is not a directory')
53 return os.path.realpath(path)
56 def ExistentDirectoryType(path): argument
57 if not os.path.exists(path):
58 raise argparse.ArgumentTypeError(f'{path} is not found')
59 return DirectoryType(path)
[all …]
Dapexer_with_DCLA_preprocessing_test.py29 TEST_PRIVATE_KEY = os.path.join('testdata', 'com.android.example.apex.pem')
81 if os.path.isdir(i):
99 extract_dir = os.path.join(apex_dir, 'payload_extract')
105 lost_and_found = os.path.join(extract_dir, 'lost+found')
106 etc_dir = os.path.join(extract_dir, 'etc')
107 os.remove(os.path.join(extract_dir, 'apex_manifest.pb'))
108 if os.path.isdir(lost_and_found):
110 if os.path.isdir(etc_dir):
124 apexer_wrapper = os.path.join(host_tools_dir, 'apexer_with_DCLA_preprocessing')
127 key_file = os.path.join(host_tools_dir, 'key.pem')
[all …]
Dapex_elf_checker.py43 parser.add_argument('apex', help='Path to the APEX')
57 exec_path = os.path.realpath(sys.argv[0])
59 script_name = os.path.basename(exec_path)[:-3]
63 tool_path = os.environ['PATH']
67 path = os.path.join(p, name)
68 if os.path.exists(path):
69 return path
83 def IsElfFile(path): argument
84 with open(path, 'rb') as f:
90 def ParseElfNeeded(path, tools): argument
[all …]
/system/incremental_delivery/incfs/
Dpath.cpp17 #include "path.h"
32 namespace android::incfs::path { namespace
66 bool isAbsolute(std::string_view path) { in isAbsolute() argument
67 return !path.empty() && path[0] == '/'; in isAbsolute()
70 std::string normalize(std::string_view path) { in normalize() argument
71 if (path.empty()) { in normalize()
74 if (path.starts_with("../"sv)) { in normalize()
79 if (isAbsolute(path)) { in normalize()
80 path.remove_prefix(1); in normalize()
91 for (; end != path.npos; start = end + 1) { in normalize()
[all …]
/system/libbase/
Dfile_test.cpp48 ASSERT_NE(tf.fd, -1) << tf.path; in TEST()
49 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) in TEST()
52 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
61 ASSERT_EQ(0, unlink(link.path)); in TEST()
62 ASSERT_EQ(0, symlink(target.path, link.path)); in TEST()
63 ASSERT_FALSE(android::base::WriteStringToFile("foo", link.path, false)); in TEST()
65 ASSERT_TRUE(android::base::WriteStringToFile("foo", link.path, true)); in TEST()
68 ASSERT_FALSE(android::base::ReadFileToString(link.path, &s)); in TEST()
70 ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true)); in TEST()
80 ASSERT_NE(tf.fd, -1) << tf.path; in TEST()
[all …]
Dfile.cpp57 std::wstring path; in mkstemp() local
58 CHECK(android::base::UTF8ToWide(name_template, &path)) in mkstemp()
59 << "path can't be converted to wchar: " << name_template; in mkstemp()
60 if (_wmktemp_s(path.data(), path.size() + 1) != 0) { in mkstemp()
66 int fd = _wopen(path.c_str(), O_CREAT | O_EXCL | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR); in mkstemp()
72 CHECK(android::base::WideToUTF8(path, &path_utf8)) << "path can't be converted to utf8"; in mkstemp()
74 << "utf8 path can't be assigned back to name_template"; in mkstemp()
80 std::wstring path; in mkdtemp() local
81 CHECK(android::base::UTF8ToWide(name_template, &path)) in mkdtemp()
82 << "path can't be converted to wchar: " << name_template; in mkdtemp()
[all …]
/system/core/healthd/
DBatteryMonitor.cpp289 static int readFromFile(const String8& path, std::string* buf) { in readFromFile() argument
291 if (android::base::ReadFileToString(path.c_str(), buf)) { in readFromFile()
297 static bool writeToFile(const String8& path, int32_t in_value) { in writeToFile() argument
298 return android::base::WriteStringToFile(std::to_string(in_value), path.c_str()); in writeToFile()
301 static BatteryMonitor::PowerSupplyType readPowerSupplyType(const String8& path) { in readPowerSupplyType() argument
321 if (readFromFile(path, &buf) <= 0) { in readPowerSupplyType()
334 static bool getBooleanField(const String8& path) { in getBooleanField() argument
338 if (readFromFile(path, &buf) > 0) in getBooleanField()
346 static T getIntField(const String8& path) { in getIntField() argument
350 if (readFromFile(path, &buf) > 0) in getIntField()
[all …]
DBatteryMonitor_v1.cpp230 static int readFromFile(const String8& path, std::string* buf) { in readFromFile() argument
232 if (android::base::ReadFileToString(path.c_str(), buf)) { in readFromFile()
238 static BatteryMonitor::PowerSupplyType readPowerSupplyType(const String8& path) { in readPowerSupplyType() argument
258 if (readFromFile(path, &buf) <= 0) { in readPowerSupplyType()
271 static bool getBooleanField(const String8& path) { in getBooleanField() argument
275 if (readFromFile(path, &buf) > 0) in getBooleanField()
282 static int getIntField(const String8& path) { in getIntField() argument
286 if (readFromFile(path, &buf) > 0) in getIntField()
295 String8 path; in isScopedPowerSupply() local
296 path.appendFormat("%s/%s/scope", POWER_SUPPLY_SYSFS_PATH, name); in isScopedPowerSupply()
[all …]
/system/vold/
DVoldNativeServiceValidation.cpp76 binder::Status CheckArgumentPath(const std::string& path) { in CheckArgumentPath() argument
77 if (path.empty()) { in CheckArgumentPath()
78 return Exception(binder::Status::EX_ILLEGAL_ARGUMENT, "Missing path"); in CheckArgumentPath()
80 if (path[0] != '/') { in CheckArgumentPath()
82 StringPrintf("Path %s is relative", path.c_str())); in CheckArgumentPath()
84 if (path.find("/../"sv) != path.npos || android::base::EndsWith(path, "/.."sv)) { in CheckArgumentPath()
86 StringPrintf("Path %s is shady", path.c_str())); in CheckArgumentPath()
88 for (const char& c : path) { in CheckArgumentPath()
91 StringPrintf("Path %s is malformed", path.c_str())); in CheckArgumentPath()
108 binder::Status CheckIncrementalPath(IncrementalPathKind kind, const std::string& path) { in CheckIncrementalPath() argument
[all …]
/system/unwinding/libunwindstack/tools/
Dstrip.py33 def strip(path): argument
34 proc = subprocess.run(["readelf", "--file-header", "--sections", path],
39 if name == ".text" and os.path.basename(path) in ["vdso", "vdso.so", "libc.so"]:
43 print("Warning: {} not found in {}".format(name, path))
46 with open(path, "r+b") as f:
58 with open(path, 'rb') as src, gzip.open(path + ".gz", 'wb') as dst:
60 os.remove(path)
67 for path in args.target:
68 if os.path.isdir(path):
69 for path in glob.glob(os.path.join(path, "**/*"), recursive=True):
[all …]
/system/tools/hidl/hashing/
DHash.cpp34 Hash& Hash::getMutableHash(const std::string& path) { in getMutableHash() argument
37 auto it = hashes.find(path); in getMutableHash()
39 if (hashes.find(path) == hashes.end()) { in getMutableHash()
40 it = hashes.insert(it, {path, Hash(path)}); in getMutableHash()
46 const Hash& Hash::getHash(const std::string& path) { in getHash() argument
47 return getMutableHash(path); in getHash()
50 void Hash::clearHash(const std::string& path) { in clearHash() argument
51 getMutableHash(path).mHash = kEmptyHash; in clearHash()
54 static std::vector<uint8_t> sha256File(const std::string& path) { in sha256File() argument
55 std::ifstream stream(path); in sha256File()
[all …]
/system/core/libcutils/
Dfs.cpp42 static int fs_prepare_path_impl(const char* path, mode_t mode, uid_t uid, gid_t gid, in fs_prepare_path_impl() argument
49 // Check if path needs to be created in fs_prepare_path_impl()
52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { in fs_prepare_path_impl()
56 ALOGE("Failed to lstat(%s): %s", path, strerror(errno)); in fs_prepare_path_impl()
64 ALOGE("Not a %s: %s", (prepare_as_dir ? "directory" : "regular file"), path); in fs_prepare_path_impl()
76 ALOGE("Expected path %s with owner %d:%d but found %d:%d", in fs_prepare_path_impl()
77 path, uid, gid, sb.st_uid, sb.st_gid); in fs_prepare_path_impl()
80 ALOGW("Expected path %s with mode %o but found %o", in fs_prepare_path_impl()
81 path, mode, (sb.st_mode & ALL_PERMS)); in fs_prepare_path_impl()
88 ? TEMP_FAILURE_RETRY(mkdir(path, mode)) in fs_prepare_path_impl()
[all …]
/system/core/init/
Dutil_test.cpp44 EXPECT_RESULT_OK(WriteFile(tf.path, s)); in TEST()
45 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0620, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
46 auto file_contents = ReadFile(tf.path); in TEST()
55 EXPECT_RESULT_OK(WriteFile(tf.path, s)); in TEST()
56 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0602, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
57 auto file_contents = ReadFile(tf.path); in TEST()
90 EXPECT_RESULT_OK(WriteFile(tf.path, contents)); in TEST()
92 auto read_back_contents = ReadFile(tf.path); in TEST()
101 std::string path = android::base::StringPrintf("%s/does-not-exist", test_dir.path); in TEST() local
102 EXPECT_RESULT_OK(WriteFile(path, s)); in TEST()
[all …]
/system/media/audio_route/
Daudio_route.c95 parsed values are updated to either setting value within a path,
121 struct mixer_path *path; member
160 /* path functions */
201 static void path_print(struct audio_route *ar, struct mixer_path *path)
206 ALOGE("Path: %s, length: %d", path->name, path->length);
207 for (i = 0; i < path->length; i++) {
208 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index);
212 for (j = 0; j < path->setting[i].num_values; j++)
213 ALOGE(" id=%d value=0x%02x", j, path->setting[i].value.bytes[j]);
215 for (j = 0; j < path->setting[i].num_values; j++)
[all …]

12345678910>>...57