From 065523721743a9d3d1bad18ad001f8235fd0ab46 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Wed, 29 Mar 2017 16:43:22 +0100 Subject: [PATCH] Target: Fixes __setup_list_directory issue on production devices. As per issue #102, not all devices have permission to list the root directory causing the ls command to be incorrectly determined. This commit changes the directory to be checked to the working directory to ensure sufficient permissions. --- devlib/target.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/target.py b/devlib/target.py index c9b0121..b6b9d5e 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -894,7 +894,7 @@ class AndroidTarget(Target): # so we try the new version, and if it fails we use the old version. self.ls_command = 'ls -1' try: - self.execute('ls -1 /', as_root=False) + self.execute('ls -1 {}'.format(self.working_directory), as_root=False) except TargetError: self.ls_command = 'ls'