Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://android.stackexchange.com/questions/74952/interpretting-the-output-of-dumpsys-telephony-registry
- #get Cellular Signal Strength from an android device
- while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength;done
- #Narrow it down some for LTE
- while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength|awk '{print $10}';done
- #Narrow it down some for GSM
- while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength|awk '{print $2}';done
- #Narrow it down some for both
- while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength|awk '{print "GSM:"$2 " LTE:"$10}';done
- #If you haven't set permissions for your user you may need to use 'sudo'
- sudo killall adb
- sudo adb shell echo test
- #more info on output
- public String toString() {
- return ("SignalStrength:"
- + " " + mGsmSignalStrength
- + " " + mGsmBitErrorRate
- + " " + mCdmaDbm
- + " " + mCdmaEcio
- + " " + mEvdoDbm
- + " " + mEvdoEcio
- + " " + mEvdoSnr
- + " " + mLteSignalStrength
- + " " + mLteRsrp
- + " " + mLteRsrq
- + " " + mLteRssnr
- + " " + mLteCqi
- + " " + (isGsm ? "gsm|lte" : "cdma"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement