Question: One way of getting a phone number via the shell would be to dial anther phone using the

```
service call phone

```

Is there a way I could get the phone number using the adb shell on a rooted phone without having to call out?

For example, a scenario would be a pre-paid sim which has no balance, hence cannot call out. Therefore using a service to call would not work

Answer: 
This worked in my case: Nexus 5 rooted phone.

```
service call iphonesubinfo 8

```
Try this, it worked on my un-rooted Galaxy S3. 
Dumping the phone state seems to take a little while (couple of minutes) so be patient. 

Open a terminal in the sdk/platform-tools directory

```
./adb shell dumpstate | grep 'Line 1'

```

here is the list of "other" adb shell commands , documented in the developer guide, which can be found here -> <http://developer.android.com/tools/help/adb.html#shellcommands>

```
Other shell commands

For a list of all the available shell programs, use the following command:

adb shell ls /system/bin
Help is available for most of the commands.

Table 5 lists some of the more common adb shell commands.

Table 5. Some other adb shell commands
Shell Command   Description Comments
dumpsys Dumps system data to the screen.    The Dalvik Debug Monitor Server (DDMS) tool offers integrated debug environment that you may find easier to use.
dumpstate   Dumps state to a file.
logcat [option]... [filter-spec]... Enables system and app logging and prints output to the screen.
dmesg   Prints kernel debugging messages to the screen.
start   Starts (restarts) an emulator/device instance.   
stop    Stops execution of an emulator/device instance.  

```