How to store 'adb devices -l' output to a text file?
You can use &gt; after any command followed by file name or file path where you want to save the file. It  would look like this:

adb devices -l &gt; FILE_NAME