Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to save cmd command's return warning

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.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading