/development/vndk/tools/elfcheck/elfcheck/ |
D | android.py | 19 import os.path 22 def find_android_build_top(path): argument 25 path = os.path.dirname(os.path.abspath(path)) 27 while prev != path: 28 if os.path.exists(os.path.join(path, '.repo', 'manifest.xml')): 29 return path 30 prev = path 31 path = os.path.dirname(path)
|
/development/vndk/tools/sourcedr/ninja/ |
D | list_installed_file_from_source.py | 47 installed_dirs = '|'.join('(?:' + re.escape(posixpath.normpath(path)) + ')' 48 for path in args.installed_filter.split(':')) 55 '|'.join('(?:' + re.escape(posixpath.normpath(path)) + ')' 56 for path in args.source_filter.split(':'))) 63 for path in build.explicit_outs: 64 outs[path] = build 65 for path in build.implicit_outs: 66 outs[path] = build 76 for path in paths: 77 if source_filter.match(path): [all …]
|
D | list_ninja_build_dep.py | 69 for path in build.explicit_outs: 70 graph[path] = build 71 for path in build.implicit_outs: 72 graph[path] = build 85 for path in build.explicit_outs: 86 print(' explicit_out:', path) 87 for path in build.implicit_outs: 88 print(' implicit_out:', path) 89 for path in build.explicit_ins: 90 print(' explicit_in:', path) [all …]
|
D | list_source_file.py | 91 def _normalize_path(path): argument 92 if path.startswith(out_dir + '/target'): 93 return path 94 return posixpath.join(out_product_dir, path) 96 installed_filter = [_normalize_path(path) for path in args.installed_filter] 105 for path in build.explicit_outs: 106 graph[path] = build 107 for path in build.implicit_outs: 108 graph[path] = build 111 matched_files = [path for path in graph if installed_filter.match(path)] [all …]
|
/development/tools/external_crates/rooted_path/src/ |
D | lib.rs | 18 use std::path::{Path, PathBuf}; 35 path: PathBuf, field 40 pub fn new<P: Into<PathBuf>>(root: P, path: impl AsRef<Path>) -> Result<RootedPath, Error> { in new() 45 let path = path.as_ref(); in new() localVariable 46 if !path.is_relative() { in new() 47 return Err(Error::PathNotRelative(path.to_path_buf())); in new() 49 let path = root.join(path); in new() localVariable 50 Ok(RootedPath { root, path }) in new() 58 self.path.strip_prefix(&self.root).unwrap() in rel() 62 self.path.as_path() in abs() [all …]
|
/development/vndk/tools/ |
D | system_image_diff.py | 33 system_path = os.path.normpath(os.path.join(out_path, 'system')) 36 return os.path.join(*system_path_dirs[out_index:]) 38 def system_files(path): argument 42 system_prefix = os.path.join(path, 'system') 49 if not os.path.islink(os.path.join(root, file)): 50 system_files.append(os.path.join(root[system_prefix_len:], file)) 54 def system_files_to_package_map(path): argument 58 system_prefix = _get_relative_out_path_from_root(path) 62 with open(os.path.join(path, 'module-info.json')) as module_info_json: 79 def package_to_vendor_map(path): argument [all …]
|
/development/vndk/tools/header-checker/src/utils/ |
D | source_path_utils_test.cpp | 30 const std::filesystem::path header_dir = in TEST() 31 std::filesystem::path(temp_dir.path) / "include"; in TEST() 35 const std::filesystem::path header = header_dir / "header.h"; in TEST() 38 const std::filesystem::path no_ext_header = header_dir / "header"; in TEST() 41 const std::filesystem::path subdir = header_dir / "subdir"; in TEST() 45 const std::filesystem::path subdir_link = header_dir / "subdir_link"; in TEST() 49 const std::filesystem::path hidden_subdir_link = header_dir / ".subdir_link"; in TEST() 53 const std::filesystem::path header_link = subdir / "header_link.h"; in TEST() 57 const std::filesystem::path hidden_header_link = subdir / ".header_link.h"; in TEST() 61 const std::filesystem::path non_header_link = subdir / "header_link.txt"; in TEST() [all …]
|
D | source_path_utils.cpp | 41 static bool PathEndsWith(llvm::StringRef path, in PathEndsWith() argument 43 auto path_it = llvm::sys::path::rbegin(path); in PathEndsWith() 46 if (path_it == llvm::sys::path::rend(path)) { in PathEndsWith() 70 std::string_view path; in ParseRootDirs() local 74 path = arg.substr(0, colon_index); in ParseRootDirs() 77 path = arg; in ParseRootDirs() 82 llvm::sys::path::remove_dots(norm_replacement, /* remove_dot_dot = */ true); in ParseRootDirs() 83 root_dirs.emplace_back(NormalizePath(path, {}), in ParseRootDirs() 93 return first.path.size() > second.path.size(); in ParseRootDirs() 96 if (root_dirs[index - 1].path == root_dirs[index].path) { in ParseRootDirs() [all …]
|
/development/vndk/snapshot/ |
D | utils.py | 32 COMMON_BP_PATH = os.path.join(COMMON_DIR_PATH, 'Android.bp') 37 NOTICE_FILES_DIR_PATH = os.path.join(COMMON_DIR_PATH, NOTICE_FILES_DIR_NAME) 86 return os.path.realpath(os.path.join(root, *args)) 90 return os.path.realpath(os.getenv(env_var, default)) 110 basename = os.path.basename(file) 111 if os.path.isdir(file) and basename != COMMON_DIR_NAME: 116 def prebuilt_arch_from_path(path): argument 125 return path.split('/')[1].split('-')[1] 128 def snapshot_arch_from_path(path): argument 137 return path.split('/')[0] [all …]
|
D | update.py | 50 if os.path.isfile(file): 52 elif os.path.isdir(file): 93 artifacts = glob.glob(os.path.join(artifact_dir, artifact_pattern)) 114 notices_dir_per_arch = os.path.join(arch, utils.NOTICE_FILES_DIR_NAME) 115 if os.path.isdir(notices_dir_per_arch): 118 if os.path.isfile(notice_file): 119 rel_path = os.path.relpath(notice_file, notices_dir_per_arch) 120 target_path = os.path.join(common_notices_dir, rel_path) 121 if not os.path.isfile(target_path): 122 os.makedirs(os.path.dirname(target_path), exist_ok=True) [all …]
|
/development/gsi/repack_super_image/ |
D | mix_ssi_with_device_image.py | 75 if not os.path.exists(ssi_target_files): 83 return os.path.join(output_dir, "IMAGES") 88 if not os.path.exists(device_img_artifact): 92 return os.path.join(output_dir, "super.img") 99 img_path = os.path.join(ssi_dir, f"{part_img}.img") 100 if os.path.exists(img_path): 121 if not os.path.isdir(output_dir): 127 if os.path.isdir(args.ssi_files): 135 if os.path.isdir(args.device_image_files): 137 super_img = os.path.join(device_image_dir, "super.img") [all …]
|
/development/tools/external_crates/crate_tool/src/ |
D | pseudo_crate.rs | 34 path: RootedPath, field 52 &self.path in get_path() 56 for line in read(self.path.join(filename)?)?.lines() { in read_crate_list() 74 self.path.join("crate-list.txt")?, in regenerate_crate_list() 78 self.path.join("deleted-crates.txt")?, in regenerate_crate_list() 93 .current_dir(&self.path) in deps() 115 return Ok(krate.path()); in vendored_dir_for() 132 .current_dir(&self.path) in crates() 135 let mut crates = CrateCollection::new(self.path.root()); in crates() 141 PseudoCrate { path: self.path, extra: CargoVendorDirty {} } in mark_dirty() [all …]
|
/development/scripts/ |
D | update_crate_tests.py | 147 self.path = os.path.join(env.ANDROID_BUILD_TOP, "build", "bazel", "bin", "bazel") 148 soong_ui = os.path.join(env.ANDROID_BUILD_TOP, "build", "soong", "soong_ui.bash") 160 def query_modules(self, path): argument 162 cmd = self.path + " query --config=queryview /" + path + ":all" 174 cmd = (self.path + " query --config=queryview \'rdeps(//..., " + 183 for path in EXCLUDE_PATHS: 184 if module.startswith(path): 189 def find_all_test_mapping_files(self, path): argument 191 for root, dirs, files in os.walk(path): 193 result.append(os.path.join(root, "TEST_MAPPING")) [all …]
|
/development/tools/external_crates/checksum/src/ |
D | lib.rs | 22 path::{Path, PathBuf, StripPrefixError}, 75 let resolved_path = if entry.path().is_symlink() { in generate() 76 if let Ok(canonicalized) = canonicalize(entry.path()) { in generate() 94 entry.path().to_path_buf() in generate() 99 let filename = entry.path().strip_prefix(crate_dir)?.to_string_lossy().to_string(); in generate() 123 let resolved_path = if entry.path().is_symlink() { in verify() 125 let canonical = canonicalize(entry.path())?; in verify() 132 entry.path().to_path_buf() in verify() 137 let filename = entry.path().strip_prefix(crate_dir)?.to_string_lossy().to_string(); in verify() 183 write(temp_dir.path().join("foo"), "foo").expect("Failed to write temporary file"); in round_trip() [all …]
|
/development/tools/external_crates/crate_tool/ |
D | Cargo.toml | 26 checksum = { path = "../checksum" } 27 crate_config = { path = "../crate_config" } 28 crates_io_util = { path = "../crates_io_util" } 29 google_metadata = { path = "../google_metadata"} 30 license_checker = { path = "../license_checker" } 31 name_and_version = { path = "../name_and_version" } 32 repo_config = { path = "../repo_config" } 33 rooted_path = { path = "../rooted_path" } 34 test_mapping = { path = "../test_mapping" }
|
/development/tools/repo_diff/ |
D | repo_diff_android.py | 27 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 28 DEFAULT_EXCLUSIONS_FILE = os.path.join(SCRIPT_DIR, "android_exclusions.txt") 73 cwd=os.path.dirname(workspace), shell=True) 123 path = os.path.join(workspace, "build", "core", "build_id.mk") 124 return subprocess.check_output("source %s && echo $BUILD_ID" % path, 131 if not os.path.exists(workspace): 134 manifest_path = os.path.join(workspace, ".repo", "manifests") 152 workspace = os.path.abspath(DOWNSTREAM_WORKSPACE) 153 upstream_workspace = os.path.abspath(UPSTREAM_WORKSPACE) 181 output_folder = os.path.abspath(tag.replace(" ", "_")) [all …]
|
D | repo_diff_trees.py | 46 path = project.get('path', project.get('name')) 47 path = os.path.abspath(os.path.join(source_tree, path)) 51 if not os.path.exists(path): 54 projects[name] = path 220 for name, path in projects.iteritems(): 224 filtered[name] = path 316 def find_root_commits_in_path(path): argument 318 print('Analyzing history of ' + path) 319 rev_list = git(['-C', path, 'rev-list', '--max-parents=0', 'HEAD']) 326 for name, path in projects.iteritems(): [all …]
|
/development/tools/external_crates/test_mapping/src/ |
D | lib.rs | 25 path::PathBuf, 70 path: RootedPath, field 82 pub fn read(path: RootedPath) -> Result<TestMapping, Error> { in read() 83 let bpfile = path.join("Android.bp").unwrap(); in read() 88 let test_mapping_path = path.join("TEST_MAPPING").unwrap(); in read() 94 Ok(TestMapping { path, json, bp }) in read() 135 if import.path.starts_with("external/rust/crates") { in fix_import_paths() 137 .path in fix_import_paths() 139 if self.path.with_same_root(new_path.clone()).unwrap().abs().exists() { in fix_import_paths() 140 import.path = new_path; in fix_import_paths() [all …]
|
/development/vndk/tools/header-checker/tests/ |
D | gen_all.py | 7 import_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) 8 import_path = os.path.abspath(os.path.join(import_path, 'utils')) 9 sys.path.insert(1, import_path) 34 input_path = os.path.join(base, filename) 36 output_path = os.path.join(EXPECTED_DIR, input_rel_path) 39 os.makedirs(os.path.dirname(output_path), exist_ok=True)
|
/development/vndk/tools/sourcedr/files/ |
D | list_app_shared_uid.py | 58 product_out = os.path.abspath(product_out) 64 partition_dir = os.path.join(product_out, partition) 67 name, ext = os.path.splitext(filename) 69 return os.path.join(base, filename)[prefix_len:] 79 apps_dir = os.path.join(product_out, 'obj', 'APPS') 83 app_dir = os.path.join(apps_dir, app_dir_name) 85 apk_file = os.path.join(app_dir, 'package.apk') 86 if not os.path.exists(apk_file): 90 apk_unpacked = os.path.join(app_dir, 'package') 91 if not os.path.exists(apk_unpacked): [all …]
|
/development/tools/external_crates/license_checker/src/ |
D | license_file_finder.rs | 18 path::{Path, PathBuf}, 40 pub(crate) fn find_license_files(path: impl AsRef<Path>) -> Result<BTreeSet<PathBuf>, Error> { in find_license_files() 41 multiglob(path, LICENSE_GLOBS.iter()) in find_license_files() 52 path: impl AsRef<Path>, in multiglob() 55 let path = path.as_ref(); in multiglob() localVariable 58 let pattern = path.join(pattern.as_ref()); in multiglob() 62 matches.insert(file.strip_prefix(path)?.to_owned()); in multiglob()
|
/development/vndk/tools/sourcedr/blueprint/ |
D | analyze_manifest_split.py | 41 path = project.getAttribute('path') 42 if path: 43 dir_project_dict[path] = name 53 '|'.join('(' + re.escape(path) + '(?:/|$))' 54 for path, project in self._projects)) 56 def find(self, path): argument 57 match = self._matcher.match(path) 87 def add_module(self, path, rule, attrs): argument 89 ent = (rule, path, name) 138 for rule, path, name in sorted(modules): [all …]
|
/development/vndk/tools/image-diff-tool/ |
D | diff.py | 53 if os.path.exists(tmp_filepath): 79 if not os.path.isfile(allowlist): 105 pathname = os.path.join(target, filename) 106 if not os.path.isfile(pathname): 132 def run(path): argument 133 is_executable_component = silent_call(["llvm-objdump", "-a", path]) 134 is_apk = path.endswith(".apk") 136 return strip_and_sha1sum(path) 138 return sha1sum_without_signing_key(path) 140 return sha1sum(path) [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/content/ |
D | ExternalStorage.java | 185 File path = Environment.getExternalStoragePublicDirectory( in createExternalStoragePublicPicture() local 187 File file = new File(path, "DemoPicture.jpg"); in createExternalStoragePublicPicture() 191 path.mkdirs(); in createExternalStoragePublicPicture() 211 public void onScanCompleted(String path, Uri uri) { in createExternalStoragePublicPicture() 212 Log.i("ExternalStorage", "Scanned " + path + ":"); in createExternalStoragePublicPicture() 227 File path = Environment.getExternalStoragePublicDirectory( in deleteExternalStoragePublicPicture() local 229 File file = new File(path, "DemoPicture.jpg"); in deleteExternalStoragePublicPicture() 238 File path = Environment.getExternalStoragePublicDirectory( in hasExternalStoragePublicPicture() local 240 File file = new File(path, "DemoPicture.jpg"); in hasExternalStoragePublicPicture() 253 File path = getExternalFilesDir(Environment.DIRECTORY_PICTURES); in createExternalStoragePrivatePicture() local [all …]
|
/development/vndk/tools/sourcedr/blueprint/tests/ |
D | test_module_path.py | 43 parser = Parser(Lexer(content, path='test_path')) 52 test_dir = os.path.join( 53 os.path.dirname(__file__), 'testdata', 'example') 54 test_root_file = os.path.join(test_dir, SUBNAME) 61 self.assertEqual(os.path.join(test_dir, 'foo', SUBNAME), 63 self.assertEqual(os.path.join(test_dir, 'bar', SUBNAME),
|