Home > other >  how to save cmd command's return warning
how to save cmd command's return warning

Time:08-24

how to save cmd command's return warning. The command I used:
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS > result.txt
then on cmd display the result and return message as follows:
Starting: Intent { act=android.settings.AIRPLANE_MODE_SETTINGS }
Warning: Activity not started, intent has been delivered to currently running top-most instance.
But in the result.txt file there is only save: Starting: Intent { act=android.settings.AIRPLANE_MODE_SETTINGS } and the Warning message is not saved. can someone explain and help me save the dc warning returned.

CodePudding user response:

Try adding 2>&1 to the end of your command. That redirects stderr to stdout, which is most likely where the error is being printed to

  • Related