Still his question is not answered. Let me rephrase his question:
I've two devices connected on two different appium nodes and I run my tests in parallel.
Consider in some place, I would like to execute some adb commands. Since I've two devices connected, I'll have to use adb -s to trigger the adb command on the particular device.
Is there anyway we can retrieve the device id from the appium node?
@Ravi: Kindly correct me if I understand your question correctly.