About AT Command in Linux System Calls of Nexus 4

970 views
Skip to first unread message

Shuang Liang

unread,
Jun 18, 2013, 10:40:26 PM6/18/13
to android...@googlegroups.com
Dear Android Engineers,
I am doing a research about monitoring SMS and Phone Call activities by hooking the kernel system calls. The version of Android I am using is 4.2.2 JellyBeans and the kernel version is 3.4. 

My hooking program runs as LKM (loadable kernel module) and it works pretty well with the goldfish emulator. When I send the SMS messages, the program can capture the corresponding "AT+CMGS=" AT command. 

However, when I moved all my work from emulator to nexus 4, I can not capture any AT commands any more. I searched and got to know nexus 4 uses Qualcomm MDM9215 modem. I was wondering if anyone had some experience with the AT command on specific devices like nexus 4. 

Any suggestions on why it didn't work when I moved to nexus 4 would be appreciated!

Thanks folks for your time!

Kolja Dummann

unread,
Jun 19, 2013, 12:34:27 PM6/19/13
to android...@googlegroups.com
Hi,

Real devices unlike the emulator don't issue AT commands to the modem over serial devices. The Android userland vendor part of the radio interface layer (RIL) is using proprietary interface to talk to the modem. E.g. Samsung uses shared memory or USB protocols to talk to their modems.

If you want to capture commands sent to the modem there is generic way to do this in the kernel. Many kernel drivers that implement the interface logic to talk to the modem are open source, but the protocols aren't.

-Kolja

Kolja Dummann
Sulzbacher Str. 27

90489 Nürnberg
M: 0176 840 39 172


--
--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
---
You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-kerne...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Shuang Liang

unread,
Jun 19, 2013, 2:42:57 PM6/19/13
to android...@googlegroups.com

Thanks Kolja! I think I should work with real device instead of the emulator at the beginning. I'm heading the wrong way with the emulator. Thanks for your directions, I'm going to hack the modem interface in the kernel. But BTW, do you know the reason vendors abandoned AT commands by serial device? Is that because the rate is not high enough for modern modem devices that supports 3G, 4G communication or for the security issues?

Kerr Yuandan

unread,
Jun 21, 2013, 10:48:49 PM6/21/13
to android...@googlegroups.com
i think it is because the hardware architecture,also for data communication consideration.

Anirudh Gargi

unread,
Jul 19, 2013, 10:30:18 AM7/19/13
to android...@googlegroups.com
The Qualcomm MDM9216 might be using a USB HSIC type of interface to communicate with the modem. The messages sent over this ( hsic device driver) are often wrapped in propriety packet formats to be understood between the RIL (user space) and the modem only. 

Also nowadays the AT commands might be complimented along with RPC to communicate with the modem. 
Which further makes difficult to tap the AT commands. (Refer http://forum.xda-developers.com/showthread.php?t=1471241 ). 

Also i can't comment further unless i know how exactly your LKM was sniffing the AT commands in goldfish setup. 

AFAIK it can be tapped (but dump might not be useful ,being vendor (qualcomm) specific packets wrapped over AT commands) by reading the /dev/xxx nodes the RIL uses to communicate with the bus device drivers (shared mem or HSIC ) after knowing what are those /dev nodes in Nexus 4. 

i hope this is of some help. 


Regards,
Anirudh

pwningis...@gmail.com

unread,
Feb 1, 2016, 4:28:59 PM2/1/16
to Android Linux Kernel Development
Hello everyone,

I have same issue with Nexus 4. Now, I'm hookig all system calls but i don't see any AT commands. Also, i wrote LKM for hook "ch_read" kernel function with jprobe, but i don't see any AT commands too.

Any idea?

Thanks.

Shree Kumar

unread,
Feb 1, 2016, 8:10:24 PM2/1/16
to android...@googlegroups.com

IMO, hooking at the kernel level is not the right approach for Android. Please hook at the higher levels - maybe the RIL, or API/framework. Such approach may also work better across devices.

--
--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
---
You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-kerne...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages