@@ -82,25 +82,27 @@ public class AndroidConnectivityUtil {
8282 /** ADB shell template for connecting to wifi without password. Should fill with: wifi ssid. */
8383 @ VisibleForTesting
8484 static final String ADB_SHELL_TEMPLATE_CONNECT_WIFI_WITHOUT_PASSWORD =
85- "am instrument -e method connectToNetwork -e ssid %s "
85+ "am instrument -e method connectToNetwork -e ssid %s -e disableMacRandomization true "
8686 + "-w com.google.devtools.mobileharness.platform.android.app.binary.wifiutil/.WifiUtil" ;
8787
8888 /**
8989 * ADB shell template for connecting to wifi with password. Should fill with: wifi ssid, password.
9090 */
9191 @ VisibleForTesting
9292 static final String ADB_SHELL_TEMPLATE_CONNECT_WIFI_WITH_PASSWORD =
93- "am instrument -e method connectToNetwork -e ssid %s -e psk %s -w"
94- + " com.google.devtools.mobileharness.platform.android.app.binary.wifiutil/.WifiUtil" ;
93+ "am instrument -e method connectToNetwork -e ssid %s -e psk %s "
94+ + "-e disableMacRandomization true "
95+ + "-w com.google.devtools.mobileharness.platform.android.app.binary.wifiutil/.WifiUtil" ;
9596
9697 /**
9798 * ADB shell template for connecting to wifi with password and scan_ssid. Should fill with: wifi
9899 * ssid, password, and scan_ssid.
99100 */
100101 @ VisibleForTesting
101102 static final String ADB_SHELL_TEMPLATE_CONNECT_WIFI_WITH_PASSWORD_AND_SCAN_SSID =
102- "am instrument -e method connectToNetwork -e ssid %s -e psk %s -e scan_ssid %s -w"
103- + " com.google.devtools.mobileharness.platform.android.app.binary.wifiutil/.WifiUtil" ;
103+ "am instrument -e method connectToNetwork -e ssid %s -e psk %s -e scan_ssid %s "
104+ + "-e disableMacRandomization true "
105+ + "-w com.google.devtools.mobileharness.platform.android.app.binary.wifiutil/.WifiUtil" ;
104106
105107 /** ADB shell template for dumpsys. Should fill with: type. */
106108 @ VisibleForTesting static final String ADB_SHELL_TEMPLATE_DUMP_SYS = "dumpsys %s" ;
0 commit comments