Raj Raj - 1 year ago 331
Android Question

getting cellular network status via ADB shell

Is it possible to check via ADB if the phone is connected to a cellular network?

I had a look at ConnectivityManager, but it is for android application development.

Answer Source

Certainly using the command from shell :

dumpsys telephony.registry

or directly from adb :

adb shell dumpsys telephony.registry

The values of mServiceState or mDataConnectionState will help you. I tried in Plane mode mServiceState=3 / mDataConnectionState=0 and connected to the cellular network : mServiceState=0 / mDataConnectionState=2

PS: I'm using an Android 4.4 phone.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download