'How to give input to interactive shell on a linux device from windows prompt, communication is through adb b/w windows and device
Process for initiating program on device:
- open windows command prompt
- adb shell
- After entering device shell, run the c/c++ binary (ex: ./testAbc )
- this program prints outs the menu with options like(0,1,2) below and waits for use input. for example : 0 flash image A. 1 flash image B. 2 flash image C.
Problem statement: need to communicate user inputs to interactive program running on linux base device from windows command prompt
we tried below steps:
- we opened parallel windows cmd prompt
- adb shell
- inside linux device shell give "echo 0 > /proc/'pid of above binary'/fd/0"
we are able to see this 0 on the prompt but this program is not taking this input. also we are seeing some extra character is being printed on console which is not passed like [].
is this some kind of encoding problem? Any better way to communicate to this interactive program ? running on linux base device attached to windows PC.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
