title: how to get imsi number in android using command line
body: <p>I want to get <code>IMSI</code> number of SIM of <code>Android</code> phone using command line.</p>
  
  <p>Is there any adb command or any shell command in android for this???</p>
  
  <p>I tried <code>adb shell getprop ril.IMSI</code> command in Samsung Galaxy ace, it works. It gives me <code>IMSI</code> number. But I tried the same command in Samsung Galaxy S3. It doesn't return anything.</p>
  
  <p>I want to get <code>IMSI</code> number of SIM card in <code>Samsung Galaxy S3</code> using command line only. (Not Android Application code) either using <code>adb</code> command or some shell command in <code>Android</code>.</p>
  
  <p>Also, I know there is a simple code in <code>JAVA</code> to run in Android Application which gives <code>IMSI</code> number:</p>
  
  <pre><code>TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
  String imsi = mTelephonyMgr.getSubscriberId();
  </code></pre>
  
  <p>Can I somehow run this <code>Android Java</code> code from command line? This will also solve my problem.</p>