This is the information on the simulator:
01-29 02:42:41.962: V/PhoneInfo(1002): DeviceID = 00000000000000001-29 02:42:41.992: V/PhoneInfo(1002): DeviceSoftwareVer = null01-29 02:42:41.992: V/PhoneInfo(1002): Line1Number = 1555521555401-29 02:42:41.992: V/PhoneInfo(1002): NetworkCountryIso = us01-29 02:42:41.992: V/PhoneInfo(1002): NetworkOperator = 31026001-29 02:42:41.992: V/PhoneInfo(1002): NetworkOperatorName = Android01-29 02:42:41.992: V/PhoneInfo(1002): NetworkType = 301-29 02:42:41.992: V/PhoneInfo(1002): PhoneType = 101-29 02:42:42.002: V/PhoneInfo(1002): SimCountryIso = us01-29 02:42:42.002: V/PhoneInfo(1002): SimOperator = 31026001-29 02:42:42.002: V/PhoneInfo(1002): SimOperatorName = Android01-29 02:42:42.002: V/PhoneInfo(1002): SimSerialNumber = 8901410321111851072001-29 02:42:42.002: V/PhoneInfo(1002): SimState = 501-29 02:42:42.002: V/PhoneInfo(1002): SubscriberId = 31026000000000001-29 02:42:42.002: V/PhoneInfo(1002): VoiceMailAlphaTag = Voicemail01-29 02:42:42.002: V/PhoneInfo(1002): VoiceMailNumber = +1555217504901-29 02:42:42.002: V/PhoneInfo(1002): ----------------------------------------------------------------01-29 02:42:42.002: V/PhoneInfo(1002): Build.VERSION.Codename = REL01-29 02:42:42.002: V/PhoneInfo(1002): Build.VERSION.Incremental = 4354601-29 02:42:42.012: V/PhoneInfo(1002): Build.VERSION.Release = 2.201-29 02:42:42.012: V/PhoneInfo(1002): Build.VERSION.SdkInt = 801-29 02:42:42.012: V/PhoneInfo(1002): Build.Device = generic01-29 02:42:42.012: V/PhoneInfo(1002): Build.Display = google_sdk-eng 2.2 FRF91 43546 test-keys01-29 02:42:42.022: V/PhoneInfo(1002): Build.Fingerprint = generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys01-29 02:42:42.022: V/PhoneInfo(1002): Build.Hardware = goldfish01-29 02:42:42.022: V/PhoneInfo(1002): Build.Host = e-honda.mtv.corp.google.com01-29 02:42:42.022: V/PhoneInfo(1002): Build.ID = FRF9101-29 02:42:42.022: V/PhoneInfo(1002): Build.Manufacturer = unknown01-29 02:42:42.022: V/PhoneInfo(1002): Build.Model = google_sdk01-29 02:42:42.022: V/PhoneInfo(1002): Build.Product = google_sdk01-29 02:42:42.022: V/PhoneInfo(1002): Build.Type = eng01-29 02:42:42.033: V/PhoneInfo(1002): Build.User = android-build
This is the information obtained on the mobile phone:
01-29 10:44:11. 319: V/phoneinfo (15919): DeviceID = 35651304127 ***** 01-29 10:44:11. 319: V/phoneinfo (15919): devicesoftwarever = 356513041279 ***** 01-29 10:44:11. 319: V/phoneinfo (15919): line1number = 01-29 10:44:11. 319: V/phoneinfo (15919): networkcountryiso = cn01-29 10:44:11. 319: V/phoneinfo (15919): networkoperator = 4600001-29 10:44:11. 319: V/phoneinfo (15919): networkoperatorname = China Mobile 01-29 10:44:11. 319: V/phoneinfo (15919): networktype = 201-29 10:44:11. 319: V/phoneinfo (15919): phonetype = 101-29 10:44:11. 319: V/phoneinfo (15919): simcountryiso = cn01-29 10:44:11. 319: V/phoneinfo (15919): simoperator = 4600001-29 10:44:11. 319: V/phoneinfo (15919): simoperatorname = 01-29 10:44:11. 319: V/phoneinfo (15919): simserialnumber = 8986008019031505 ***** 01-29 10:44:11. 319: V/phoneinfo (15919): simstate = 501-29 10:44:11. 319: V/phoneinfo (15919): subscriberid = 46000886810 ***** 01-29 10:44:11. 319: V/phoneinfo (15919): voicemailalphatag = voicemail 01-29 10:44:11. 319: V/phoneinfo (15919): voicemailnumber = null01-29 10:44:11. 319: V/phoneinfo (15919): ------------------------------------------------------------------ 01-29 10:44:11. 319: V/phoneinfo (15919): build. version. codename = REL01-29 10:44:11. 319: V/phoneinfo (15919): build. version. incremental = 131835936001-29 10:44:11. 319: V/phoneinfo (15919): build. version. release = 2.3.601-29 10:44:11. 319: V/phoneinfo (15919): build. version. sdkint = 1001-29 10:44:11. 319: V/phoneinfo (15919): build. device = umts_jordan01-29 10:44:11. 319: V/phoneinfo (15919): build. display = 4.5.1-134_dfp-13701-29 10:44:11. 319: V/phoneinfo (15919): build. fingerprint = Moto/mb526_rtnord/umts_jordan: 2.3.6/4.5.1-134_dfp-tables/1318359360: User/release-keys01-29 10:44:11. 319: V/phoneinfo (15919): build. hardware = mapphone_umts01-29 10:44:11. 319: V/phoneinfo (15919): build. host = il93lnxdroid5401-29 10:44:11. 319: V/phoneinfo (15919): build. id = 4.5.1-134_dfp-13701-29 10:44:11. 319: V/phoneinfo (15919): build. manufacturer = motorola01-29 10:44:11. 342: V/phoneinfo (15919): build. model = MB52601-29 10:44:11. 342: V/phoneinfo (15919): build. product = MB526_RTNORD01-29 10:44:11. 342: V/phoneinfo (15919): build. type = user01-29 10:44:11. 342: V/phoneinfo (15919): build. user = hudsoncm
This is the program code (mainactivity. Java ):
package com.example.phoneinfo;import java.util.ArrayList;import java.util.List;import android.os.Bundle;import android.app.Activity;import android.content.Context;import android.os.Build;import android.telephony.TelephonyManager;import android.util.Log;import android.view.Menu;import android.widget.ArrayAdapter;import android.widget.ListView;public class MainActivity extends Activity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);initInfoList();}@Overridepublic boolean onCreateOptionsMenu(Menu menu) {getMenuInflater().inflate(R.menu.activity_main, menu);return true;}private void initInfoList() {TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);List<String> infos = new ArrayList<String>();infos.add("DeviceID = " + tm.getDeviceId());infos.add("DeviceSoftwareVer = " + tm.getDeviceSoftwareVersion());infos.add("Line1Number = " + tm.getLine1Number());infos.add("NetworkCountryIso = " + tm.getNetworkCountryIso());infos.add("NetworkOperator = " + tm.getNetworkOperator());infos.add("NetworkOperatorName = " + tm.getNetworkOperatorName());infos.add("NetworkType = " + tm.getNetworkType());infos.add("PhoneType = " + tm.getPhoneType());infos.add("SimCountryIso = " + tm.getSimCountryIso());infos.add("SimOperator = " + tm.getSimOperator());infos.add("SimOperatorName = " + tm.getSimOperatorName());infos.add("SimSerialNumber = " + tm.getSimSerialNumber());infos.add("SimState = " + tm.getSimState());infos.add("SubscriberId = " + tm.getSubscriberId());infos.add("VoiceMailAlphaTag = " + tm.getVoiceMailAlphaTag());infos.add("VoiceMailNumber = " + tm.getVoiceMailNumber());infos.add("----------------------------------------------------------------");infos.add("Build.VERSION.Codename = " + Build.VERSION.CODENAME);infos.add("Build.VERSION.Incremental = " + Build.VERSION.INCREMENTAL);infos.add("Build.VERSION.Release = " + Build.VERSION.RELEASE);infos.add("Build.VERSION.SdkInt = " + Build.VERSION.SDK_INT);infos.add("Build.Device = " + Build.DEVICE);infos.add("Build.Display = " + Build.DISPLAY);infos.add("Build.Fingerprint = " + Build.FINGERPRINT);infos.add("Build.Hardware = " + Build.HARDWARE);infos.add("Build.Host = " + Build.HOST);infos.add("Build.ID = " + Build.ID);infos.add("Build.Manufacturer = " + Build.MANUFACTURER);infos.add("Build.Model = " + Build.MODEL);infos.add("Build.Product = " + Build.PRODUCT);infos.add("Build.Type = " + Build.TYPE);infos.add("Build.User = " + Build.USER);ListView listView = (ListView) findViewById(R.id.infoListView);listView.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_2, android.R.id.text2, infos));for (String line:infos)Log.v("PhoneInfo", line);}}
To run the program properly, you must add the following permissions to manifest. xml:
<Uses-Permission Android: Name = "android. Permission. read_phone_state"/>