I wrote a simple android app which has the following code snippet
when I am executing this app with adb 1.0.36 as adb shell /system/bin/myapp printf is not getting printed and once I give any input then it prints. If I add fflush(stdout) after printf then it prints first and then waits for user input. But same piece of code executes as expected with adb 1.0.32 without adding fflush(stdout). If I remove getchar() , app has only printf statement then the behaviour is same on both adbs. Same stdout buffering issue is seen when I am debugging some other android app with lldb debugger, Here this app is waiting for debugger to connect and its not printing anything with adb 1.0.36. stdout is getting buffered with apps that are waiting for something with adb 1.0.36. Did anyone see this kind of issue on adb 1.0.36 ? where can find the bugs list with this adb. if I enter into adb shell and run /system/bin/myapp I dont see this issue |
$ adb shell stop
$ adb shell setprop log.redirect-stdio true
$ adb shell start