Retrieving phone number of connected device?

Hello all,

I was wondering if there’s a way (through Appium or otherwise) to retrieve the phone number of a connected device? I’m running my tests in parallel on multiple devices (real and simulator, Android and iOS) and was hoping there would be a way of pulling the phone number of the device each thread is running on?

Has this ever came up before as a feature for Appium?


Hi Jordi,

You may get the phone number under setting-> sim setting for Android(7.1.1). In general you may follow this link to get the phone number.


Thanks for the reply saswatdash83. I was really looking for something like Appium or another package to do it automatically. I aim to plug in different devices from time to time and would like the number pulled and stored without having to manually do it.
I use the testvagrant mdb package to pull in things like UDID, Platform, Device Name, etc. but I don’t see any option to retrieve the connected devices phone number

It appears this can be done but the device needs to be rooted unfortunately