Index: tools/telemetry/telemetry/core/backends/android_rndis.py |
diff --git a/tools/telemetry/telemetry/core/backends/android_rndis.py b/tools/telemetry/telemetry/core/backends/android_rndis.py |
index c2c0e4bbd98a561681ac4442643abdaa9c41c8db..71367469ce7989491557ecc02b5ecc3530a05207 100644 |
--- a/tools/telemetry/telemetry/core/backends/android_rndis.py |
+++ b/tools/telemetry/telemetry/core/backends/android_rndis.py |
@@ -113,7 +113,7 @@ class RndisForwarderWithRoot(object): |
['sudo', 'bash', '-c', 'echo -e "%s" > %s' % (contents, path)]) |
def _DisableRndis(self): |
- self._adb.RunShellCommand('setprop sys.usb.config adb') |
+ self._adb.system_properties['sys.usb.config'] = 'adb' |
self._WaitForDevice() |
def _EnableRndis(self): |
@@ -326,8 +326,8 @@ doit & |
default_routes = [route[0] for route in routes if route[1] == '00000000'] |
return ( |
default_routes[0] if default_routes else None, |
- self._adb.RunShellCommand('getprop net.dns1')[0], |
- self._adb.RunShellCommand('getprop net.dns2')[0], |
+ self._adb.system_properties['net.dns1'], |
+ self._adb.system_properties['net.dns2'], |
) |
def _OverrideDns(self, iface, dns1, dns2): |
@@ -341,12 +341,11 @@ doit & |
return # If there is no route, then nobody cares about DNS. |
# DNS proxy in older versions of Android is configured via properties. |
# TODO(szym): run via su -c if necessary. |
- self._adb.RunShellCommand('setprop net.dns1 ' + dns1) |
- self._adb.RunShellCommand('setprop net.dns2 ' + dns2) |
- dnschange = self._adb.RunShellCommand('getprop net.dnschange')[0] |
+ self._adb.system_properties['net.dns1'] = dns1 |
+ self._adb.system_properties['net.dns2'] = dns2 |
+ dnschange = self._adb.system_properties['net.dnschange'] |
if dnschange: |
- self._adb.RunShellCommand('setprop net.dnschange %s' % |
- (int(dnschange) + 1)) |
+ self._adb.system_properties['net.dnschange'] = int(dnschange) + 1 |
# Since commit 8b47b3601f82f299bb8c135af0639b72b67230e6 to frameworks/base |
# the net.dns1 properties have been replaced with explicit commands for netd |
self._adb.RunShellCommand('ndc netd resolver setifdns %s %s %s' % |