Index: devil/devil/android/flag_changer.py |
diff --git a/devil/devil/android/flag_changer.py b/devil/devil/android/flag_changer.py |
index 4267f117a07df65da62ec90f57c00559197c874b..01b407cd89bd0f4e34d644df89c338f5405102c6 100644 |
--- a/devil/devil/android/flag_changer.py |
+++ b/devil/devil/android/flag_changer.py |
@@ -24,9 +24,11 @@ class FlagChanger(object): |
""" |
self._device = device |
- # Unrooted devices have limited access to the file system. |
+ # Unrooted devices have limited access to the file system, |
+ # as do all devices on Nougat thanks to tighter SELinux controls. |
# Place files in /data/local/tmp/ rather than /data/local/ |
- if not device.HasRoot() and not '/data/local/tmp/' in cmdline_file: |
+ if ((not device.HasRoot() or device.build_type in ('eng', 'userdebug')) |
+ and not '/data/local/tmp/' in cmdline_file): |
self._cmdline_file = cmdline_file.replace('/data/local/', |
'/data/local/tmp/') |
else: |