get cellinfo with adb shell I have just installed adb and I am trying to retrieve information on the cellular tower which my phone is connected to. My phone is a Samsung Galaxy Trend Lite running Jelly Bean OS (4.1.2). I have rooted the phone and I am using the adb shell as super user.

I tried to use dumpsys telephony.registry from the shell, which gave me a cellInfo parameter, but it's equal to null.

I would like to retrieve a string with info like MCC, MNC, LAC, and CID possibly. Is this feasible? Is this the right way or is there a better one?

UPDATE 1

As suggested by @xavier_fakerat I opened a terminal in ubuntu and I typed adb logcat | grep -E 'MCC|MNC'. However I received the following message which does not seem useful to me (maybe I'm wrong...)

I/SA ( 2688): [OR] onReceive log=[SA = 1.6.0125 V = 16 HWD = 800X480 1.5 dpi = 240 SIZE = 2 LOCALE = it_IT CSC = ITV MCC = 0 MNC 0 T = user DEVICE = kylevess P = kylevessxx I = JZO54K M = GT-S7390 OKLEFT false DIS JZO54K.S7390XXUAOI1 PSS = 3.979127307850313 ]


UPDATE 2

I also tried the suggestion of @Ali Said and I was able to get the cid, although the output sometimes is equal to 0, sometimes is 68. I did the second option he proposed

adb logcat -b radio | grep "cid"


and received many rows like

D/RIL     ( 1391): RIL:[AP][RPC EN] msgid=0x413a str=MSG_MS_GET_ELEMENT_REQ tid 472 cid 68


or

D/RIL     ( 1391): RIL:[AP][RPC DE] msgid=0x204 str=MSG_RSSI_IND tid 0 cid 0


So now I think I am left with finding the LAC code only. Nevertheless, none of the solutions so far allowed me to retrieve all the info i was looking for at the same time. Also, option 1 of @Ali Said (adb logcat -b radio | grep ": +CREG:") seems what I REALLY need, but it doesn't output anything. Maybe it's a matter of the +CREG command (if it is an AT command as far as I can understand), which is not supported by my phone. Just a guess, I went very far for my possibilities, but I am pretty sure I am approaching the solution...

Finally, the output from adb logcat -b radio | grep "MCC" is

D/RIL     ( 1391): GetSamsungPLMNname:: GetSamsungPLMNname ::  deci MCC=222, MNC=88

while here is a link to the logcat from the cid info. Hope this could be of interest if someone wants to help me out.
Both of these worked for me:

Option1: grep AT command for cell info

$&gt; adb logcat -b radio | grep ": +CREG:" 
D/AT      (  873): +CREG: 2,1,"2444","0FA2A694",6
D/AT      (  873): +CREG: 2,1,"2444","0FA2A694",6
D/AT      (  873): +CREG: 2,1,"2444","0FA2A694",6


[1] phone is registered with the network 
[2444] hex : Location Area Code (LAC) 
[0FA2A694] hex : Cell Id (cid).

Option 2 : you can grep "cid" from logact -b radio you should get it this. note it is decimal this time.

$&gt; adb logcat -b radio | grep "cid"
D/use-Rlog/RLOG-RIL( 9193): cid: 262317716
D/use-Rlog/RLOG-RIL( 9193): cid: 262317716
D/use-Rlog/RLOG-RIL( 9193): cid: 262317716




Option1 is my personal preference. hope that helps.