Lines Matching refs:ad

84         self.ad = self.android_devices[0]
102 if self.ad.model in self.legacy_projects:
107 set_attenuator_gnss_signal(self.ad, self.attenuators,
109 _init_device(self.ad)
112 get_baseband_and_gms_version(self.ad)
113 clear_logd_gnss_qxdm_log(self.ad)
114 set_attenuator_gnss_signal(self.ad, self.attenuators,
116 if not verify_internet_connection(self.ad.log, self.ad, retries=3,
121 stop_qxdm_logger(self.ad)
122 stop_adb_tcpdump(self.ad)
123 if check_call_state_connected_by_adb(self.ad):
124 hangup_call(self.ad.log, self.ad)
125 if int(self.ad.adb.shell("settings get global airplane_mode_on")) != 0:
126 self.ad.log.info("Force airplane mode off")
127 force_airplane_mode(self.ad, False)
128 if self.ad.droid.wifiCheckState():
129 wifi_toggle_state(self.ad, False)
130 if int(self.ad.adb.shell("settings get global mobile_data")) != 1:
131 set_mobile_data(self.ad, True)
132 if int(self.ad.adb.shell(
134 set_wifi_and_bt_scanning(self.ad, True)
135 set_attenuator_gnss_signal(self.ad, self.attenuators,
139 self.ad.take_bug_report(test_name, begin_time)
140 get_gnss_qxdm_log(self.ad, self.qdsp6m_path)
141 get_tcpdump_log(self.ad, test_name, begin_time)
144 self.ad.take_bug_report(test_name, begin_time)
145 get_gnss_qxdm_log(self.ad, self.qdsp6m_path)
146 get_tcpdump_log(self.ad, test_name, begin_time)
154 self.ad.log.info("Radio image path is not defined in Test flag.")
160 self.ad.log.info("radio_image = %s" % paths["radio_image"])
163 self.ad.log.info("Unzip %s", zip_path)
168 self.ad.log.info("mbn_path = %s" % paths["mbn_path"])
169 self.ad.log.info(os.listdir(paths["mbn_path"]))
171 self.ad.log.info("No radio image is provided on X20. "
175 get_baseband_and_gms_version(self.ad, "Before flash radio")
176 flash_radio(self.ad, paths["radio_image"])
177 get_baseband_and_gms_version(self.ad, "After flash radio")
179 self.ad.log.info("No need to push mbn files")
183 mcfg_ver = self.ad.adb.shell(
186 self.ad.log.info("Before push mcfg, mcfg.version = %s",
189 self.ad.log.info("There is no mcfg.version before push, "
193 self.ad.log.info("There is no mcfg.version before push, "
196 get_baseband_and_gms_version(self.ad, "Before push mcfg")
198 remount_device(self.ad)
201 out = self.ad.adb.push(cmd)
202 self.ad.log.info(out)
203 reboot(self.ad)
205 self.ad.log.error("Push mbn files error %s", e)
207 get_baseband_and_gms_version(self.ad, "After push mcfg")
209 new_mcfg_ver = self.ad.adb.shell(
212 self.ad.log.info("New mcfg.version = %s", new_mcfg_ver)
214 self.ad.log.error("mcfg.version is the same before and "
218 self.ad.log.error("Unable to get new mcfg.version")
221 self.ad.log.error("cat mcfg.version with error %s", e)
238 start_qxdm_logger(self.ad, get_current_epoch_time())
239 start_adb_tcpdump(self.ad)
240 gnss_tracking_via_gtw_gpstool(self.ad, self.standalone_cs_criteria,
242 parse_gtw_gpstool_log(self.ad, self.pixel_lab_location, type="gnss")
259 error = self.ad.adb.shell("logcat -d | grep -E '%s'" % attr)
264 self.ad.log.info("\"%s\" is white-listed and removed "
268 self.ad.log.error("\n%s" % error)
270 self.ad.log.info("NO \"%s\" initialization error found." % attr)
287 self.ad.adb.shell(
289 self.ad.log.info("SUPL capabilities - %s" % capabilities_state)
306 sap_state = str(self.ad.adb.shell("cat vendor/etc/izat.conf | grep "
308 self.ad.log.info("SAP Valid Modes - %s" % sap_state)
326 start_qxdm_logger(self.ad, get_current_epoch_time())
327 start_adb_tcpdump(self.ad)
328 set_wifi_and_bt_scanning(self.ad, False)
331 self.ad, retries=3, location_type="networkLocationType=cell")
333 self.ad.log.info("Iteraion %d => %s" % (i, test_result))
334 set_wifi_and_bt_scanning(self.ad, True)
352 start_qxdm_logger(self.ad, get_current_epoch_time())
353 start_adb_tcpdump(self.ad)
354 set_wifi_and_bt_scanning(self.ad, True)
357 self.ad, retries=3, location_type="networkLocationType=wifi")
359 self.ad.log.info("Iteraion %d => %s" % (i, test_result))
378 start_qxdm_logger(self.ad, get_current_epoch_time())
379 start_adb_tcpdump(self.ad)
381 launch_google_map(self.ad)
382 test_result = check_location_api(self.ad, retries=3)
383 self.ad.send_keycode("HOME")
385 self.ad.log.info("Iteraion %d => %s" % (i, test_result))
404 start_qxdm_logger(self.ad, get_current_epoch_time())
405 start_adb_tcpdump(self.ad)
406 self.ad.adb.shell("settings put secure location_mode 1")
407 out = int(self.ad.adb.shell("settings get secure location_mode"))
408 self.ad.log.info("Modify current Location Mode to %d" % out)
410 launch_google_map(self.ad)
411 test_result = check_location_api(self.ad, retries=3)
412 self.ad.send_keycode("HOME")
414 self.ad.log.info("Iteraion %d => %s" % (i, test_result))
415 check_location_service(self.ad)
435 start_qxdm_logger(self.ad, get_current_epoch_time())
436 start_adb_tcpdump(self.ad)
437 set_battery_saver_mode(self.ad, True)
439 launch_google_map(self.ad)
440 test_result = check_location_api(self.ad, retries=3)
441 self.ad.send_keycode("HOME")
443 self.ad.log.info("Iteraion %d => %s" % (i, test_result))
444 set_battery_saver_mode(self.ad, False)
462 start_qxdm_logger(self.ad, begin_time)
463 start_adb_tcpdump(self.ad)
464 kill_xtra_daemon(self.ad)
465 self.ad.droid.setVoiceCallVolume(25)
466 initiate_call(self.ad.log, self.ad, "99117")
468 if not check_call_state_connected_by_adb(self.ad):
470 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
471 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
472 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
474 result = check_ttff_data(self.ad, ttff_data, ttff_mode="Cold Start",
492 start_qxdm_logger(self.ad, begin_time)
493 start_adb_tcpdump(self.ad)
494 kill_xtra_daemon(self.ad)
496 args=(self.ad, "https://speed.hetzner.de/10GB.bin",
500 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
501 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
502 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
506 result = check_ttff_data(self.ad, ttff_data, ttff_mode="Cold Start",
524 start_qxdm_logger(self.ad, begin_time)
525 start_adb_tcpdump(self.ad)
526 kill_xtra_daemon(self.ad)
527 self.ad.droid.setMediaVolume(25)
528 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
529 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
530 start_youtube_video(self.ad,
533 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
535 result = check_ttff_data(self.ad, ttff_data, ttff_mode="Cold Start",
553 start_qxdm_logger(self.ad, get_current_epoch_time())
554 start_adb_tcpdump(self.ad)
555 kill_xtra_daemon(self.ad)
558 gnss_trigger_modem_ssr_by_mds(self.ad)
559 if not verify_internet_connection(self.ad.log, self.ad, retries=3,
562 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
563 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=3)
564 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
567 self.ad, ttff_data, ttff_mode="Cold Start",
569 self.ad.log.info("SUPL after Modem SSR test %d times -> %s"
589 start_qxdm_logger(self.ad, begin_time)
590 start_adb_tcpdump(self.ad)
591 self.ad.log.info("Turn airplane mode on")
592 force_airplane_mode(self.ad, True)
593 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
594 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
595 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
597 result = check_ttff_data(self.ad, ttff_data, ttff_mode="Cold Start",
615 start_qxdm_logger(self.ad, begin_time)
616 start_adb_tcpdump(self.ad)
617 kill_xtra_daemon(self.ad)
618 set_mobile_data(self.ad, False)
619 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
620 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
621 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
623 result = check_ttff_data(self.ad, ttff_data, ttff_mode="Cold Start",
645 start_qxdm_logger(self.ad, get_current_epoch_time())
646 start_adb_tcpdump(self.ad)
648 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
649 self.ad.log.info("Let device do GNSS tracking for 1 minute.")
651 set_attenuator_gnss_signal(self.ad, self.attenuators,
653 self.ad.log.info("Let device stay in no GNSS signal for 5 minutes.")
655 set_attenuator_gnss_signal(self.ad, self.attenuators,
657 supl_no_gnss_signal = check_location_api(self.ad, retries=3)
658 start_gnss_by_gtw_gpstool(self.ad, False)
659 self.ad.log.info("SUPL without GNSS signal test %d times -> %s"
678 set_attenuator_gnss_signal(self.ad, self.attenuators,
681 start_qxdm_logger(self.ad, begin_time)
682 start_adb_tcpdump(self.ad)
683 kill_xtra_daemon(self.ad)
684 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
685 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
686 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
688 result = check_ttff_data(self.ad, ttff_data, ttff_mode="Cold Start",
706 fastboot_factory_reset(self.ad)
707 self.ad.unlock_screen(password=None)
708 _init_device(self.ad)
710 start_qxdm_logger(self.ad, begin_time)
711 start_adb_tcpdump(self.ad)
712 kill_xtra_daemon(self.ad)
713 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
714 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
715 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
717 if not check_ttff_data(self.ad, ttff_data, ttff_mode="Cold Start",
721 self.ad.log.info("SUPL after Factory Reset test %d times -> "
738 disable_supl_mode(self.ad)
740 start_qxdm_logger(self.ad, begin_time)
741 start_adb_tcpdump(self.ad)
742 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
743 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="ws", iteration=10)
744 ws_ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
746 ws_result = check_ttff_data(self.ad,
752 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
753 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
754 cs_ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
756 cs_result = check_ttff_data(self.ad,
780 disable_supl_mode(self.ad)
781 set_attenuator_gnss_signal(self.ad, self.attenuators,
784 start_qxdm_logger(self.ad, begin_time)
785 start_adb_tcpdump(self.ad)
786 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
787 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="ws", iteration=10)
788 ws_ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
790 ws_result = check_ttff_data(self.ad,
796 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
797 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
798 cs_ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
800 cs_result = check_ttff_data(self.ad,
823 disable_supl_mode(self.ad)
825 start_qxdm_logger(self.ad, begin_time)
826 start_adb_tcpdump(self.ad)
827 self.ad.log.info("Turn airplane mode on")
828 force_airplane_mode(self.ad, True)
829 wifi_toggle_state(self.ad, True)
831 self.ad, self.ssid_map[self.pixel_lab_network[0]["SSID"]])
832 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
833 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="ws", iteration=10)
834 ws_ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
836 ws_result = check_ttff_data(self.ad,
842 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
843 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=10)
844 cs_ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
846 cs_result = check_ttff_data(self.ad,
867 disable_supl_mode(self.ad)
869 start_qxdm_logger(self.ad, get_current_epoch_time())
870 start_adb_tcpdump(self.ad)
873 gnss_trigger_modem_ssr_by_mds(self.ad)
874 if not verify_internet_connection(self.ad.log, self.ad, retries=3,
877 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
878 start_ttff_by_gtw_gpstool(self.ad, ttff_mode="cs", iteration=3)
879 ttff_data = process_ttff_by_gtw_gpstool(self.ad, begin_time,
882 self.ad, ttff_data, ttff_mode="Cold Start",
884 self.ad.log.info("XTRA after Modem SSR test %d times -> %s"
904 disable_supl_mode(self.ad)
905 start_qxdm_logger(self.ad, get_current_epoch_time())
906 start_adb_tcpdump(self.ad)
909 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
911 start_gnss_by_gtw_gpstool(self.ad, False)
912 mobile_xtra_result = check_xtra_download(self.ad, begin_time)
913 self.ad.log.info("Iteration %d => %s" % (i, mobile_xtra_result))
933 disable_supl_mode(self.ad)
934 start_qxdm_logger(self.ad, get_current_epoch_time())
935 start_adb_tcpdump(self.ad)
936 self.ad.log.info("Turn airplane mode on")
937 force_airplane_mode(self.ad, True)
938 wifi_toggle_state(self.ad, True)
940 self.ad, self.ssid_map[self.pixel_lab_network[0]["SSID"]])
943 process_gnss_by_gtw_gpstool(self.ad, self.standalone_cs_criteria)
945 start_gnss_by_gtw_gpstool(self.ad, False)
946 wifi_xtra_result = check_xtra_download(self.ad, begin_time)
948 self.ad.log.info("Iteraion %d => %s" % (i, wifi_xtra_result))
967 enable_supl_mode(self.ad)
968 reboot(self.ad)
969 start_qxdm_logger(self.ad, get_current_epoch_time())
970 start_adb_tcpdump(self.ad)
971 start_toggle_gnss_by_gtw_gpstool(self.ad, iteration=10)