/development/scripts/ |
D | symbol.py | 24 import os 32 ANDROID_BUILD_TOP = str(os.environ["ANDROID_BUILD_TOP"]) 39 saveddir = os.getcwd() 40 os.chdir(ANDROID_BUILD_TOP) 45 return os.path.join(ANDROID_BUILD_TOP, str(stream.read().strip())) 49 os.chdir(saveddir) 129 os._exit(0) 142 return glob.glob(os.path.join(toolchain, "*-" + tool))[0] 170 if not os.path.exists(ToolPath("addr2line", toolchain)): 292 if not os.path.exists(symbols): [all …]
|
D | gdbclient.py | 22 import os 42 config_path = os.path.join(root, 'build', 'soong', 'cc', 'config', 67 debugger_path = os.path.join(toolchain_path, "bin", lldb_name) 68 if os.path.isfile(debugger_path): 80 return os.path.join(root, clang_base, "linux-x86", 133 target_device = os.environ["TARGET_PRODUCT"] 185 local_path = os.path.join(sysroot, interp.lstrip("/")) 186 if os.path.exists(local_path): 193 local_path = os.path.join(sysroot, interp_real.lstrip("/")) 194 if os.path.exists(local_path): [all …]
|
D | boardconfig_usage_analysis.py | 6 import os 16 TOP = os.environ.get('ANDROID_BUILD_TOP') 17 OUT = os.environ.get('OUT') 53 for root, dirs, files in os.walk(os.path.join(TOP, folder), topdown=True): 57 ret.append(os.path.join(root, file)) 74 out_system_path = os.path.join(OUT[len(TOP) + 1:], 'system') 76 with open(os.path.join(OUT, 'module-info.json')) as module_info_json: 91 makefile = os.path.join(TOP, path, 'Android.mk') 124 if not os.path.isfile(makefile): 213 if not os.path.isfile(os.path.join(OUT, 'module-info.json')):
|
/development/vndk/tools/definition-tool/tools/ |
D | update_dataset_auto.py | 7 import os 12 UPDATE_DATASET = os.path.abspath(os.path.join( 15 LIST_VNDK_MODULE = os.path.abspath(os.path.join( 20 dirname, basename = os.path.split(path) 22 os.close(tmp_fd) 33 os.rename(tmp_path, path) 37 dirname, basename = os.path.split(path) 39 os.close(tmp_fd) 46 cmd.append(os.path.join(build_top, 'Android.bp')) 51 os.rename(tmp_path, path) [all …]
|
/development/gsi/gsi_util/gsi_util/utils/tests/ |
D | file_utils_unittest.py | 19 import os 32 self.assertTrue(os.path.exists(f)) 33 self.assertEqual(0, os.path.getsize(f)) 34 self.assertRegexpMatches(os.path.basename(f), r'prefix.+suffix') 35 self.assertEqual(tempfile.gettempdir(), os.path.dirname(f)) 36 self.assertFalse(os.path.exists(f)) 40 self.assertTrue(os.path.exists(f)) 41 os.unlink(f) 42 self.assertFalse(os.path.exists(f)) 43 self.assertFalse(os.path.exists(f)) [all …]
|
/development/testrunner/coverage/ |
D | coverage.py | 23 import os 43 _EMMA_JAR = os.path.join("external", "emma", "lib", "emma.jar") 48 _CORE_TARGET_PATH = os.path.join("development", "testrunner", 52 _VENDOR_TARGET_PATH = os.path.join("vendor", "*", "tests", "testinfo", 56 _TARGET_INTERMEDIATES_BASE_PATH = os.path.join("target", "common", 62 self._output_root_path = os.path.join(self._out_path, 64 self._emma_jar_path = os.path.join(self._root_path, self._EMMA_JAR) 93 output_path = os.path.join(self._out_path, 100 coverage_local_path = os.path.join(output_path, 104 report_path = os.path.join(output_path, [all …]
|
/development/testrunner/ |
D | android_build.py | 21 import os 43 root_path = os.getenv("ANDROID_BUILD_TOP") 62 host_out_path = os.getenv("ANDROID_HOST_OUT") 79 root_path = os.getenv("OUT_DIR") 81 root_path = os.path.join(GetTop(), "out") 99 path = os.path.join(GetHostOutDir(), "bin") 100 if not os.path.exists(path): 120 path = os.getenv("ANDROID_PRODUCT_OUT") 140 path = os.path.join(GetProductOut(), "data", "nativetest") 141 if not os.path.exists(path): [all …]
|
/development/build/tools/ |
D | mk_sources_zip.py | 19 import os 119 if not os.path.isfile(p.PROPS): 121 if not os.path.isdir(p.SRC): 133 if not os.path.exists(srcdir): 137 for filename in os.listdir(srcdir): 138 filepath = os.path.join(srcdir, filename) 139 if filename.endswith(".java") and os.path.isfile(filepath): 155 pkg = pkg.replace(".", os.path.sep) # e.g. android.view => android/view 160 elif os.path.isdir(filepath): 188 arc_path = os.path.join(TOP_FOLDER, dest_pkg, os.path.basename(filepath)) [all …]
|
/development/vndk/tools/definition-tool/tests/ |
D | test_elfdump.py | 5 import os 15 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 16 VNDK_DEF_TOOL = os.path.join(SCRIPT_DIR, '..', 'vndk_definition_tool.py') 18 INPUT_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'input') 19 EXPECTED_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'expected') 52 cls.expected_dir = os.path.join(EXPECTED_DIR, target_name) 53 cls.test_dir = os.path.join(cls.test_dir_base, target_name) 58 src_file = os.path.join(INPUT_DIR, 'main.c') 59 obj_file = os.path.join(cls.test_dir, 'main.o') 63 out_file = os.path.join(cls.test_dir, 'main.out') [all …]
|
D | test_vndk_lib_dir.py | 3 import os 12 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 139 input_dir = os.path.join( 143 [os.path.join(input_dir, 'system')], 144 [os.path.join(input_dir, 'vendor')]) 150 input_dir = os.path.join( 154 [os.path.join(input_dir, 'system')], 155 [os.path.join(input_dir, 'vendor')]) 161 input_dir = os.path.join( 166 [os.path.join(input_dir, 'system')], [all …]
|
D | ndk_toolchain.py | 6 import os 13 ndk_dir = os.getenv('NDK') 26 if not os.path.exists(ndk_dir): 36 for name in os.listdir(os.path.join(ndk_dir, 'platforms')): 56 return os.path.join(ndk_dir, 'toolchains', arch, 'prebuilt', host) 60 return os.path.join(ndk_dir, 'toolchains', 'llvm', 'prebuilt', host) 64 return os.path.join(ndk_dir, 'platforms', api, *subdirs) 83 if os.path.exists(path): 88 ld_exeutable = os.path.join( 100 clang = os.path.join(self.clang_dir, 'bin', 'clang') [all …]
|
D | test_dex_file.py | 5 import os 14 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 15 INPUT_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_dex_file') 79 zip_file.write(path, os.path.basename(path)) 91 smali_file = os.path.join(INPUT_DIR, 'Hello.smali') 92 classes_dex = os.path.join(tmp_dir, 'classes.dex') 106 smali_file = os.path.join(INPUT_DIR, 'Hello.smali') 107 classes_dex = os.path.join(tmp_dir, 'classes.dex') 110 smali_file = os.path.join(INPUT_DIR, 'Example.smali') 111 classes2_dex = os.path.join(tmp_dir, 'classes2.dex') [all …]
|
/development/tools/repo_diff/ |
D | repo_diff_android.py | 14 import os 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") 131 if not os.path.exists(workspace): 132 os.makedirs(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) [all …]
|
/development/vndk/snapshot/ |
D | update.py | 22 import os 42 branch=branch_name, dir=os.getcwd())) 50 if os.path.isfile(file): 51 os.unlink(file) 52 elif os.path.isdir(file): 77 os.chdir(temp_artifact_dir) 88 os.chdir(install_dir) 93 artifacts = glob.glob(os.path.join(artifact_dir, artifact_pattern)) 105 os.makedirs(common_notices_dir) 107 notices_dir_per_arch = os.path.join(arch, utils.NOTICE_FILES_DIR_NAME) [all …]
|
D | gen_buildfiles.py | 22 import os 81 self._root_bpfile = os.path.join(install_dir, utils.ROOT_BP_PATH) 82 self._common_bpfile = os.path.join(install_dir, utils.COMMON_BP_PATH) 84 os.path.basename(self._etc_paths['vndkcore.libraries.txt'])) 86 os.path.basename(self._etc_paths['vndksp.libraries.txt'])) 88 os.path.basename(self._etc_paths['vndkprivate.libraries.txt'])) 96 etc_pattern = '{}*'.format(os.path.splitext(etc_module)[0]) 98 os.path.join(self._install_dir, utils.CONFIG_DIR_PATH_PATTERN, 117 abs_path_of_txt = os.path.join(self._install_dir, txt_path) 125 os.path.join(self._install_dir, utils.NOTICE_FILES_DIR_PATH, [all …]
|
D | utils.py | 21 import os 31 COMMON_BP_PATH = os.path.join(COMMON_DIR_PATH, 'Android.bp') 36 NOTICE_FILES_DIR_PATH = os.path.join(COMMON_DIR_PATH, NOTICE_FILES_DIR_NAME) 61 ANDROID_BUILD_TOP = os.getenv('ANDROID_BUILD_TOP') 70 return os.path.realpath(os.path.join(root, *args)) 74 return os.path.realpath(os.getenv(env_var, default)) 94 basename = os.path.basename(file) 95 if os.path.isdir(file) and basename != COMMON_DIR_NAME: 132 for root, _, files in os.walk(path): 135 abspath = os.path.abspath(os.path.join(root, file_name)) [all …]
|
/development/vndk/tools/sourcedr/files/ |
D | list_app_shared_uid.py | 24 import os 58 product_out = os.path.abspath(product_out) 64 partition_dir = os.path.join(product_out, partition) 65 for base, _, filenames in os.walk(partition_dir): 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') 81 for app_dir_name in os.listdir(apps_dir): 83 app_dir = os.path.join(apps_dir, app_dir_name) 85 apk_file = os.path.join(app_dir, 'package.apk') [all …]
|
/development/testrunner/test_defs/ |
D | native_test.py | 21 import os 55 build_path = os.path.join(android_build.GetTop(), self.GetBuildPath()) 56 os.path.walk(build_path, self._CollectTestSources, source_list) 85 full_path = os.path.join(os.sep, "data", "nativetest", f) 118 (name, ext) = os.path.splitext(f) 122 test_list.append(str(os.path.join(dirname, f))) 139 binary = os.path.basename(f) 140 binary = os.path.splitext(binary)[0] 143 binary = os.path.relpath(os.path.abspath(found), 144 os.path.abspath(path)) [all …]
|
/development/vndk/tools/ |
D | system_image_diff.py | 7 import os 33 system_path = os.path.normpath(os.path.join(out_path, 'system')) 34 system_path_dirs = system_path.split(os.sep) 36 return os.path.join(*system_path_dirs[out_index:]) 42 system_prefix = os.path.join(path, 'system') 46 for root, dirs, files in os.walk(system_prefix, topdown=True): 49 if not os.path.islink(os.path.join(root, file)): 50 system_files.append(os.path.join(root[system_prefix_len:], file)) 62 with open(os.path.join(path, 'module-info.json')) as module_info_json: 89 system_prefix = os.path.join(path, 'system') [all …]
|
/development/vndk/tools/header-checker/tests/ |
D | gen_all.py | 3 import os 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')) 27 for base, dirnames, filenames in os.walk(INPUT_DIR): 33 input_path = os.path.join(base, filename) 35 output_path = os.path.join(EXPECTED_DIR, input_rel_path) 38 os.makedirs(os.path.dirname(output_path), exist_ok=True)
|
D | test.py | 3 import os 10 import_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) 11 import_path = os.path.abspath(os.path.join(import_path, 'utils')) 18 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) 19 INPUT_DIR = os.path.join(SCRIPT_DIR, 'input') 20 EXPECTED_DIR = os.path.join(SCRIPT_DIR, 'expected') 22 REF_DUMP_DIR = os.path.join(SCRIPT_DIR, 'reference_dumps') 26 dump_dir = os.path.join(reference_dump_dir, module.arch) 27 os.makedirs(dump_dir, exist_ok=True) 28 dump_path = os.path.join(dump_dir, module.get_dump_name()) [all …]
|
/development/vndk/tools/header-checker/utils/ |
D | utils.py | 4 import os 12 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) 15 AOSP_DIR = os.environ['ANDROID_BUILD_TOP'] 22 os.path.join(AOSP_DIR, 'bionic', 'libc', 'include'), 23 os.path.join(AOSP_DIR, 'external', 'libcxx', 'include'), 24 os.path.join(AOSP_DIR, 'prebuilts', 'clang-tools', 'linux-x86', 88 reference_dump_path = os.path.join( 89 reference_dump_dir, os.path.basename(lib_path)) 92 os.makedirs(os.path.dirname(reference_dump_path), exist_ok=True) 108 input_ext = os.path.splitext(input_path)[1] [all …]
|
/development/python-packages/adb/ |
D | test.py | 16 import os 24 self.android_serial = os.getenv('ANDROID_SERIAL') 25 if 'ANDROID_SERIAL' in os.environ: 26 del os.environ['ANDROID_SERIAL'] 30 os.environ['ANDROID_SERIAL'] = self.android_serial 32 if 'ANDROID_SERIAL' in os.environ: 33 del os.environ['ANDROID_SERIAL'] 44 os.environ['ANDROID_SERIAL'] = 'foo' 51 os.environ['ANDROID_SERIAL'] = 'bar' 60 os.environ['ANDROID_SERIAL'] = 'baz'
|
/development/gsi/repack_super_image/ |
D | repack_super_image.py | 20 import os 37 abs_path = os.path.abspath(path) 38 if not os.path.exists(abs_path): 57 for root_dir, dir_names, file_names in os.walk( 58 os.path.join(output_dir, BIN_DIR_NAME)): 60 file_path = os.path.join(root_dir, file_name) 61 file_stat = os.stat(file_path) 62 os.chmod(file_path, file_stat.st_mode | permissions) 167 if os.path.isdir(args.ota_tools): 181 simg2img_path = os.path.join(ota_tools_dir, BIN_DIR_NAME, "simg2img") [all …]
|
/development/vendor_snapshot/ |
D | update.py | 22 import os 34 return os.path.join('NOTICE_FILES', module_name+'.txt') 79 if os.path.isdir(os.path.join(bp_dir, path)): 167 stem64 = os.path.basename(arch_props[arch]['src']) 169 stem32 = os.path.basename(arch_props[arch]['src']) 212 install_dir = os.path.join('prebuilts', 'vendor', 'v'+str(args.snapshot_version)) 218 for root, _, files in os.walk(install_dir): 222 full_path = os.path.join(root, file_name) 223 rel_path = os.path.relpath(full_path, install_dir) 228 bp_dir = os.path.join(install_dir, target_arch) [all …]
|