I would like to get the cell phone number of any android device using the command line.
I have tried using:
adb shell service call iphonesubinfo 4
and
adb shell service call iphonesubinfo 5/6/7/8
and it returns Permission denied
.
I was wondering if anyone has another solution?
Ps: phones are android 4.1 and above
Thanks you in advance.
You have to obtain root access by using :
Then you'll find those command work. Usually the phone number will be returned by :
or by :
It depends on the device is single or dual sim. You'll need to do some string parsing work if you need this result to be recognized by machine.