1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 10:50:51 +01:00

Merge pull request #92 from ionela-voinescu/force_adb_root

android: add support for forced adb root
This commit is contained in:
setrofim 2017-02-24 14:43:23 +00:00 committed by GitHub
commit 05215e7e1b

View File

@ -1043,9 +1043,9 @@ class AndroidTarget(Target):
def adb_reboot_bootloader(self, timeout=30):
adb_command(self.adb_name, 'reboot-bootloader', timeout)
def adb_root(self, enable=True):
def adb_root(self, enable=True, force=False):
if enable:
if self._connected_as_root:
if self._connected_as_root and not force:
return
adb_command(self.adb_name, 'root', timeout=30)
self._connected_as_root = True