Fix test following -p removal.

Just use the environment variable.

Test: nose2
Bug: None
Change-Id: I020c737f8aa7416b46794ce387a12f7959a9ca2a
diff --git a/adb/test_device.py b/adb/test_device.py
index e44cc83..9ef4676 100644
--- a/adb/test_device.py
+++ b/adb/test_device.py
@@ -1144,10 +1144,16 @@
             temp_files = make_random_host_files(in_dir=full_dir_path, num_files=32)
 
             # Clean up any trash on the device.
-            device = adb.get_device(product=base_dir)
+            device = adb.get_device()  # pylint: disable=no-member
             device.shell(['rm', '-rf', self.DEVICE_TEMP_DIR])
 
+            old_product_out = os.environ.get('ANDROID_PRODUCT_OUT')
+            os.environ['ANDROID_PRODUCT_OUT'] = base_dir
             device.sync('data')
+            if old_product_out is None:
+                del os.environ['ANDROID_PRODUCT_OUT']
+            else:
+                os.environ['ANDROID_PRODUCT_OUT'] = old_product_out
 
             # Confirm that every file on the device mirrors that on the host.
             for temp_file in temp_files: