Fixes bug where su binary is present but privilege is not granted to com.android.shell (#326)

This commit is contained in:
William Budington
2023-01-24 07:22:52 -08:00
committed by GitHub
parent 013e3421c8
commit cbd9158daf
+2 -1
View File
@@ -138,7 +138,8 @@ class AndroidExtraction(MVTModule):
:returns: Boolean indicating whether a `su` binary is present or not
"""
return bool(self._adb_command("command -v su"))
result = self._adb_command("command -v su && su -c true")
return bool(result) and "Permission denied" not in result
def _adb_root_or_die(self) -> None:
"""Check if we have a `su` binary, otherwise raise an Exception."""