how to echo out this list after the adb command
Posted: 14 Apr 2022 11:42
Hi All,
In Android project, adb is a much intensively used command. Now I have this command as below
Output is a list as below
List of devices attached
20ACCD801803 device product:DX8000 model:DX8000 device:DX8000 transport_id:1
2158CD823377 device product:DX8000 model:DX8000 device:DX8000 transport_id:3
Now my question is how to output the above list into a text file so that I can use it as a variable later. The reason for this is that the transport_id is dynamically changing after reboot, either from PC or a device.
So in case the PC or device reboot, I need a new variable for the transport_id so that I can use it for the next connection step to this particular device.
Any thoughts?
Thanks
In Android project, adb is a much intensively used command. Now I have this command as below
Code: Select all
adb devices -l
List of devices attached
20ACCD801803 device product:DX8000 model:DX8000 device:DX8000 transport_id:1
2158CD823377 device product:DX8000 model:DX8000 device:DX8000 transport_id:3
Now my question is how to output the above list into a text file so that I can use it as a variable later. The reason for this is that the transport_id is dynamically changing after reboot, either from PC or a device.
So in case the PC or device reboot, I need a new variable for the transport_id so that I can use it for the next connection step to this particular device.
Any thoughts?
Thanks