Allow DeviceState to accept base_cmd as a formattable string

Bug: 130375017
Test: unit tests
Change-Id: Ifeaab18541c1b45e7b04672843a0fd43a4c54c87
diff --git a/acts/framework/acts/test_utils/instrumentation/adb_command_types.py b/acts/framework/acts/test_utils/instrumentation/adb_command_types.py
index fe1b7ce..5c55734 100644
--- a/acts/framework/acts/test_utils/instrumentation/adb_command_types.py
+++ b/acts/framework/acts/test_utils/instrumentation/adb_command_types.py
@@ -37,9 +37,11 @@
         Args:
             values: The value(s) to run the command with
         """
-
-        return str.strip(' '.join(
-            [self._base_cmd] + [str(value) for value in values]))
+        try:
+            return self._base_cmd % values
+        except TypeError:
+            return str.strip(' '.join(
+                [self._base_cmd] + [str(value) for value in values]))
 
     def toggle(self, enabled):
         """Returns the command corresponding to the desired state.