diff --git a/localCoverage/push_coverage_so/push_coverage.py b/localCoverage/push_coverage_so/push_coverage.py index 7e5c5c83a74191798e64191fd4da71fe98fef91d..42468bd9729cba0fc4a731f2425cc9af7d30c09b 100644 --- a/localCoverage/push_coverage_so/push_coverage.py +++ b/localCoverage/push_coverage_so/push_coverage.py @@ -136,6 +136,8 @@ def push_coverage_so(so_dict: dict): for device in device_sn_list: cmd = "shell mount -o rw,remount /" hdc_command(device_ip, device_port, device, cmd) + cmd_mount = "target mount" + hdc_command(device_ip, device_port, device, cmd_mount) for source_path, dest_paths in so_dict.items(): if not os.path.exists(source_path): logger("{} not exist.".format(source_path), "ERROR") diff --git a/localCoverage/resident_service/init_gcov.py b/localCoverage/resident_service/init_gcov.py index 6bf9c79f793249b95661d852bf2cf5191a2922a8..f6ef3206ab914dbff6cd3fa6f2f91e21b0edb21e 100644 --- a/localCoverage/resident_service/init_gcov.py +++ b/localCoverage/resident_service/init_gcov.py @@ -74,6 +74,8 @@ def modify_init_file(developer_path, hdc_str): return print("%s shell mount -o rw,remount / > /dev/null 2>&1" % hdc_str) coverage_command("%s shell mount -o rw,remount / > /dev/null 2>&1" % hdc_str) + print(""%s target mount" % hdc_str) + coverage_command("%s target mount" % hdc_str) print("%s file send %s %s" % (hdc_str, cfg_file_path, "/etc/")) coverage_command("%s file send %s %s" % (hdc_str, cfg_file_path, "/etc/")) coverage_command("%s shell param set persist.appspawn.client.timeout 120 > /dev/null 2>&1" % hdc_str) @@ -84,6 +86,7 @@ def modify_faultloggerd_file(developer_path, hdc_str): _, enforce = subprocess.getstatusoutput("%s shell getenforce" % hdc_str) coverage_command("%s shell mount -o rw,remount /" % hdc_str) print("%s shell mount -o rw,remount /" % hdc_str) + coverage_command("%s target mount" % hdc_str) if enforce != "Permissive": coverage_command("%s shell sed -i 's/enforcing/permissive/g' /system/etc/selinux/config" % hdc_str) diff --git a/localCoverage/resident_service/pull_service_gcda.py b/localCoverage/resident_service/pull_service_gcda.py index e8b2ac774403ba95efe7b14734f395475ba2bec6..d4c4ed0fa09cce5bb4f8ef0aab65b0cce3682c51 100644 --- a/localCoverage/resident_service/pull_service_gcda.py +++ b/localCoverage/resident_service/pull_service_gcda.py @@ -38,6 +38,8 @@ def restore_config(device_ip, device_port, device_sn, cfg_path): """ remount_cmd = "shell mount -o rw,remount /" hdc_command(device_ip, device_port, device_sn, remount_cmd) + remount_cmd_mount = "target mount" + hdc_command(device_ip, device_port, device_sn, remount_cmd_mount) origin_foundation = os.path.join(cfg_path, "foundation_origin.json") restore_foundation_cmd = "file send {} /system/profile/foundation.json".format(origin_foundation) hdc_command(device_ip, device_port, device_sn, restore_foundation_cmd) @@ -59,6 +61,7 @@ def attach_pid(device_ip, device_sn, process_str, component_gcda_dict, developer print("%s shell chmod 777 /data/gcov -R" % hdc_str) coverage_command("%s shell chmod 777 /data/gcov -R" % hdc_str) coverage_command("%s shell mount -o rw,remount /" % hdc_str) + coverage_command("%s target mount" % hdc_str) local_sh_path = os.path.join(resident_service_path, "resources", "gcov_flush.sh") coverage_command("dos2unix %s" % local_sh_path) print("%s file send %s %s" % (hdc_str, local_sh_path, "/data/"))