How to read my device OS version?

On iOS devices I would like to read out the iOS version, and on Android devices I would like to read out the Android version. How can I do this using Appium?

1 Like

I don’t think Appium itself provides this, please correct me if i’m wrong.

For Android you can do this :

adb shell getprop | grep build.version.release

For iOS i will check for a solution but at the moment i don’t know how…

Do you know how can I get Android version during my test in Ruby with a method which can returns me the android version ?


try to do the unix command i provided above, and check this stackoverflow page to get the idea of running unix commands from ruby scripts;

Oh thanks I will try !

Hi drapostolos,

I am unable to starting iOS webkit debug proxy server and get iPhone information( UDID, Device Name and Device Version) from Terminal Using Java Code in mac machine. Is it possible to get the iOS device information from terminal using java code in mac machine. This is priority work for me. Please help me.

Thanks in advance.

In java, you can get device version with the following:


Even if you provided a false version when creating driver (or didn’t provide any), Appium will correct it when opening the session. Just make sure it is written after the driver = new AnroidDriver… line.

1 Like

Hi Alexis,

Thanks for reply.

Could you please tell me, how to start iOS webkit debug proxy server programmatically using java code.

Doesn’t seem to be true. If I don’t provide it, I get “null” when I call this method after driver has been created.

I realize that this is an old topic, but I’d like to help if possible.
Ruby has a method that might be of use here -


I think it’s doing the same thing Alexis is doing. It returns true or false.

How to get device name and app version?

I am able to get the version of the device, but is it possible to programmatically feed the appium with the device that is connected?

Like everytime a new OS version is connected, instead of manually going and selecting in the appium the OS version, how would you feed it programatically?