Fail to get the output of the command "adb devices" on Win7 X64

motori_ks

New member
Jan 24, 2013
0
0
0
Visit site
I have a program which launches "adb" to get the adb devices list. This program have been working well on my winxp machine. Recently I found it could not work normally on my Win7 X64 pro SP1 PC. After I debugged, I found the parent process failed to get the output of adb. If I added "fflush" after "printf" in the source code of adb, the parent process can get the output.
If run "adb devices" on windows command line directly, the result looks fine. However, if run "adb devices > file.txt", there is no content in ?file.txt?.
Moreover, the output of "adb version" can be captured.
I've been searching the relevant problems these days, but I haven't found anything useful up to now.
I've been stucked for a long time, do anyone have some ideas?