Skip to content

Instantly share code, notes, and snippets.

@riverfor
Created January 30, 2020 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riverfor/ae54eff48069d1c4c866c5648d2cb850 to your computer and use it in GitHub Desktop.
Save riverfor/ae54eff48069d1c4c866c5648d2cb850 to your computer and use it in GitHub Desktop.
import time
from androidhelper import Android
droid = Android()
droid.startTrackingPhoneState()
time.sleep(1)
pstate = droid.readPhoneState().result
print("phone state:"+str(pstate))
droid.stopTrackingPhoneState()
celllocation = droid.getCellLocation().result
print("cell location:"+str(celllocation))
pnoperator = droid.getNetworkOperator().result
print("network operator:"+str(pnoperator))
pnoperatorname = droid.getNetworkOperatorName().result
print("network operator:"+str(pnoperatorname))
pnetworktype = droid.getNetworkType().result
print("network type:"+str(pnetworktype))
ptype = droid.getPhoneType().result
print("phone type:"+str(ptype))
psimcountryiso = droid.getSimCountryIso().result
print("phone sim country iso:"+str(psimcountryiso))
psimoperator = droid.getSimOperator().result
print("phone sim operator:"+str(psimoperator))
psimoperatorname = droid.getSimOperatorName().result
print("phone sim operator name:"+str(psimoperatorname))
psimserialnumber = droid.getSimSerialNumber().result
print("phone sim serial number:"+str(psimserialnumber))
psimstate= droid.getSimState().result
print("phone sim state:"+str(psimstate))
psubscribeid= droid.getSubscriberId().result
print("phone subscribeid:"+str(psubscribeid))
pvmailalphatag= droid.getVoiceMailAlphaTag().result
print("phone voice mail alpha tag:"+str(pvmailalphatag))
pvmailnumber= droid.getVoiceMailNumber().result
print("phone voice mail number:"+str(pvmailnumber))
pchecknetworkroaming= droid.checkNetworkRoaming().result
print("phone check nametowk roaming:"+str(pchecknetworkroaming))
pdeviceid = droid.getDeviceId().result
print("phone deviceid:"+str(pdeviceid))
pdevicesoftversion = droid.getDeviceSoftwareVersion().result
print("phone device software version:"+str(pdevicesoftversion))
pline1number= droid.getLine1Number().result
print("phone line1 number:"+str(pline1number))
pneighbor= droid.getNeighboringCellInfo().result
print("phone neighboring cellinfo:"+str(pneighbor))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment