mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
utils.adb_shell: Move from 'echo CMD | su' to '-c'
Move from the current implementation (piping the command to su) which has unexpected behaviours to the '-c' su flag (which then becomes required).
This commit is contained in:
parent
0d798f1c4f
commit
6b414cc291
@ -431,7 +431,7 @@ def adb_shell(device, command, timeout=None, check_exit_code=False,
|
|||||||
if device is not None:
|
if device is not None:
|
||||||
parts += ['-s', device]
|
parts += ['-s', device]
|
||||||
parts += ['shell',
|
parts += ['shell',
|
||||||
command if not as_root else 'echo {} | su'.format(quote(command))]
|
command if not as_root else 'su -c {}'.format(quote(command))]
|
||||||
|
|
||||||
logger.debug(' '.join(quote(part) for part in parts))
|
logger.debug(' '.join(quote(part) for part in parts))
|
||||||
# On older combinations of ADB/Android versions, the adb host command always
|
# On older combinations of ADB/Android versions, the adb host command always
|
||||||
|
Loading…
x
Reference in New Issue
Block a user