Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell command arguments not executed #185

Closed
enty8080 opened this issue Aug 4, 2021 · 2 comments
Closed

Shell command arguments not executed #185

enty8080 opened this issue Aug 4, 2021 · 2 comments

Comments

@enty8080
Copy link

enty8080 commented Aug 4, 2021

Description

I tried to execute ls in shell(), then it executes, but when I try to execute ls /bin it executes only ls without /bin argument.

Log

From python3 adb_shell

device1.shell('ls')

output:

Reserve0   default.prop                init.usb.rc      sdcard     
acct       dev                         init.zygote32.rc storage    
bin        etc                         lost+found       sys        
bugreports file_contexts.bin           mnt              system     
cache      init                        odm              tmp-mksh   
charger    init.environ.rc             oem              ueventd.rc 
config     init.rc                     proc             vendor     
d          init.recovery.sun50iw6p1.rc product          verity_key 
data       init.usb.configfs.rc        sbin         

with /bin:

device1.shell('ls /bin')

output:

Reserve0   default.prop                init.usb.rc      sdcard     
acct       dev                         init.zygote32.rc storage    
bin        etc                         lost+found       sys        
bugreports file_contexts.bin           mnt              system     
cache      init                        odm              tmp-mksh   
charger    init.environ.rc             oem              ueventd.rc 
config     init.rc                     proc             vendor     
d          init.recovery.sun50iw6p1.rc product          verity_key 
data       init.usb.configfs.rc        sbin 

NOTE: But if use generic adb from android-platform-tools then ls /bin executes as ls /bin, but not as ls

P.S.: If you try to execute touch somefile, shell() will execute only touch and then the error appears:

touch: Needs 1 argument (see "touch --help")
@enty8080 enty8080 changed the title Shell commands arguments not execute Shell commands arguments not executed Aug 4, 2021
@enty8080 enty8080 changed the title Shell commands arguments not executed Shell command arguments not executed Aug 4, 2021
@JeffLIrion
Copy link
Owner

That's odd, I don't have that issue. Could you please attach a debug log, as described in the issue template: https://github.com/JeffLIrion/adb_shell/blob/master/.github/ISSUE_TEMPLATE/bug_report.md

@enty8080
Copy link
Author

enty8080 commented Aug 4, 2021

@JeffLIrion Sorry, it's problem in my code

@enty8080 enty8080 closed this as completed Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants