Lines Matching refs:os
17 import os
27 ABS_PATH = os.path.split(os.path.realpath(__file__))[0]
34 self.local_cache_dir = os.path.join(ABS_PATH, 'binary_cache')
35 if not os.path.isdir(self.local_cache_dir):
36 os.makedirs(self.local_cache_dir)
79 for root, _, files in os.walk(lib_dir):
97 build_id = get_build_id(os.path.join(root, filename))
105 os.path.join(root, filename), bin_file)
112 target_file = target_file.replace('/', os.sep)
113 target_file = os.path.join(self.local_cache_dir, target_file)
114 target_dir = os.path.dirname(target_file)
116 if not os.path.isdir(target_dir):
117 os.makedirs(target_dir)
129 binary_cache_file = binary[1:].replace('/', os.sep)
130 local_cache_file = os.path.join(self.local_cache_dir,
141 if os.path.isfile(local_cache_file):
150 target_dir = os.path.dirname(local_cache_file)
151 if not os.path.isdir(target_dir):
152 os.makedirs(target_dir)
153 if os.path.isfile(local_cache_file):
154 os.remove(local_cache_file)
172 os.path.join('/data/local/tmp/', filename),
175 os.path.join('/data/local/tmp/', filename)])
181 build_id = get_build_id(os.path.join(host_path))
188 os.remove(host_path)
192 file_path = os.path.join(self.local_cache_dir, 'kallsyms')
193 if os.path.isfile(file_path):
194 os.remove(file_path)
196 old_kptr_restrict = os.popen('hdc shell cat /proc/sys/kernel/kptr_restrict').read()