| OLD | NEW |
| 1 # [devil.android.device_utils](https://github.com/catapult-project/catapult/blob
/master/devil/devil/android/device_utils.py) | 1 # [devil.android.device_utils](https://github.com/catapult-project/catapult/blob
/master/devil/devil/android/device_utils.py) |
| 2 | 2 |
| 3 *This page was autogenerated by `devil/utils/markdown.py --module-link https://g
ithub.com/catapult-project/catapult/blob/master/devil/devil/android/device_utils
.py`* | 3 *This page was autogenerated by `devil/utils/markdown.py --module-link https://g
ithub.com/catapult-project/catapult/blob/master/devil/devil/android/device_utils
.py`* |
| 4 | 4 |
| 5 ## DeviceUtils | 5 ## DeviceUtils |
| 6 | 6 |
| 7 ### DeviceUtils.\_\_init\_\_ | 7 ### DeviceUtils.\_\_init\_\_ |
| 8 | 8 |
| 9 DeviceUtils constructor. | 9 DeviceUtils constructor. |
| 10 ``` | 10 ``` |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 Returns: | 852 Returns: |
| 853 A dict mapping process name to a list of PIDs for each process that | 853 A dict mapping process name to a list of PIDs for each process that |
| 854 contained the provided |process_name|. | 854 contained the provided |process_name|. |
| 855 | 855 |
| 856 Raises: | 856 Raises: |
| 857 CommandTimeoutError on timeout. | 857 CommandTimeoutError on timeout. |
| 858 DeviceUnreachableError on missing device. | 858 DeviceUnreachableError on missing device. |
| 859 ``` | 859 ``` |
| 860 | 860 |
| 861 | 861 |
| 862 ### DeviceUtils.GetEnforce |
| 863 |
| 864 Get the current mode of SELinux. |
| 865 ``` |
| 866 Args: |
| 867 timeout: timeout in seconds |
| 868 retries: number of retries |
| 869 |
| 870 Returns: |
| 871 True (enforcing), False (permissive), or None (disabled). |
| 872 |
| 873 Raises: |
| 874 CommandFailedError on failure. |
| 875 CommandTimeoutError on timeout. |
| 876 DeviceUnreachableError on missing device. |
| 877 ``` |
| 878 |
| 879 |
| 880 ### DeviceUtils.SetEnforce |
| 881 |
| 882 Modify the mode SELinux is running in. |
| 883 ``` |
| 884 Args: |
| 885 enabled: a boolean indicating whether to put SELinux in encorcing mode |
| 886 (if True), or permissive mode (otherwise). |
| 887 timeout: timeout in seconds |
| 888 retries: number of retries |
| 889 |
| 890 Raises: |
| 891 CommandFailedError on failure. |
| 892 CommandTimeoutError on timeout. |
| 893 DeviceUnreachableError on missing device. |
| 894 ``` |
| 895 |
| 896 |
| 862 ### DeviceUtils.TakeScreenshot | 897 ### DeviceUtils.TakeScreenshot |
| 863 | 898 |
| 864 Takes a screenshot of the device. | 899 Takes a screenshot of the device. |
| 865 ``` | 900 ``` |
| 866 Args: | 901 Args: |
| 867 host_path: A string containing the path on the host to save the | 902 host_path: A string containing the path on the host to save the |
| 868 screenshot to. If None, a file name in the current | 903 screenshot to. If None, a file name in the current |
| 869 directory will be generated. | 904 directory will be generated. |
| 870 timeout: timeout in seconds | 905 timeout: timeout in seconds |
| 871 retries: number of retries | 906 retries: number of retries |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 | 1032 |
| 998 ### RestartServer | 1033 ### RestartServer |
| 999 | 1034 |
| 1000 Restarts the adb server. | 1035 Restarts the adb server. |
| 1001 ``` | 1036 ``` |
| 1002 Raises: | 1037 Raises: |
| 1003 CommandFailedError if we fail to kill or restart the server. | 1038 CommandFailedError if we fail to kill or restart the server. |
| 1004 ``` | 1039 ``` |
| 1005 | 1040 |
| 1006 | 1041 |
| OLD | NEW |