Skip to content

Instantly share code, notes, and snippets.

@mrlnc
Created March 4, 2021 12:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrlnc/5686f7f1ec07e23c88fd1a8f7740d18d to your computer and use it in GitHub Desktop.
Save mrlnc/5686f7f1ec07e23c88fd1a8f7740d18d to your computer and use it in GitHub Desktop.
adb: get 5G-NR connection status

I need to use ADB and check if the phone is currently on 5GNR or not. gsm.network.type doesn't indicate if 5G-NSA bearers are active. No matter if LTE, LTE+ or 5G indicators are shown, the network type remains the same:

OnePlus8:/ # getprop gsm.network.type                                                                                     
LTE,Unknown

Workaround:

logcat /data/com.android.providers.telephony/databases/telephony.db | grep -i update5GIcon

LTE: iconType = 0 5GNR: iconType = 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment