Get Android OS version of device connected via ADB [duplicate]
I know , you already got the correct solution , & here is my solution only for additional information.
You will get every details by cat
ing the /system/build.prop
file like
adb shell cat /system/build.prop