Advertisement
metalx1000

ADB Android Cellular Signal Strength

Oct 17th, 2017
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.28 KB | None | 0 0
  1. #https://android.stackexchange.com/questions/74952/interpretting-the-output-of-dumpsys-telephony-registry
  2. #get Cellular Signal Strength from an android device
  3. while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength;done
  4.  
  5. #Narrow it down some for LTE
  6. while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength|awk '{print $10}';done
  7.  
  8. #Narrow it down some for GSM
  9. while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength|awk '{print $2}';done
  10.  
  11. #Narrow it down some for both
  12. while [ 1 ];do adb shell dumpsys telephony.registry | grep -i signalstrength|awk '{print "GSM:"$2 "  LTE:"$10}';done
  13.  
  14. #If you haven't set permissions for your user you may need to use 'sudo'
  15. sudo killall adb
  16. sudo adb shell echo test
  17.  
  18. #more info on output
  19. public String toString() {
  20.     return ("SignalStrength:"
  21.             + " " + mGsmSignalStrength
  22.             + " " + mGsmBitErrorRate
  23.             + " " + mCdmaDbm
  24.             + " " + mCdmaEcio
  25.             + " " + mEvdoDbm
  26.             + " " + mEvdoEcio
  27.             + " " + mEvdoSnr
  28.             + " " + mLteSignalStrength
  29.             + " " + mLteRsrp
  30.             + " " + mLteRsrq
  31.             + " " + mLteRssnr
  32.             + " " + mLteCqi
  33.             + " " + (isGsm ? "gsm|lte" : "cdma"));
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement