On Tue, Mar 23, 2010 at 6:52 PM, perumal316 <[email protected]> wrote:

> Hi All,
>
> I want to log down the numbers to which SMS was send or calls being
> placed to. Is it possible to do so by monitoring the system calls?
>
> I tried to monitor the sys_socketcall system call, but it is not
> passing the numbers as parameters.
>
> Is there any other system call that I can monitor to get the numbers?
>
> Thanks in Advance,
> Perumal
>
>
Searching through Sony Ericson's download for Android source codes (which
comes with Android sources + modified kernel sources - for SE's drivers) I
only show some lines that have "phone number" embedded in it:

./arch/arm/mach-msm/board-semc_mogami.c:
 * in the phone's serial number.

./arch/arm/mach-msm/board-semc_zeus.c:
 * in the phone's serial number.

./drivers/isdn/hisax/l3dss1.c:
        for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.');
subp++) len_phone++; /* len of phone number */
        *p++ = 0x30;  /* sequence phone number */

./drivers/isdn/hisax/l3ni1.c:
        for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.');
subp++) len_phone++; /* len of phone number */
        *p++ = 0x30;  /* sequence phone number */

./drivers/isdn/i4l/isdn_common.c:
/* Get peer phone number of a connected
/* Add a phone-number to a network-interface */
/* Get list of phone-numbers of a network-interface */
/* Delete a phone-number of a network-interface */

./drivers/isdn/i4l/isdn_net.c:
        u_char *phone_number;
/* Initiate dialout. Set phone-number-pointer to first number
printk(KERN_WARNING "%s: phone number deleted?\n",
/* Setup interface, dial current phone-number, switch to next number.
 * If list of phone-numbers is exhausted, increment
printk(KERN_WARNING "%s: phone number deleted?\n",
                                        phone_number = lp->dial->num;
                                        if ((*phone_number == 'v') ||
    (*phone_number == 'V')) { /* DOV call */
strcpy(cmd.parm.setup.phone, phone_number);
     "No phone number");
 * configured phone-numbers. If callback-flag is set, initiate
printk(KERN_WARNING "isdn_net: %s: No phone number\n",
 * Add a phone-number to an interface.
 * Copy a string of all phone-numbers of an interface to user space.
 * Copy a string containing the peer's phone number of a connected interface
 * Delete a phone-number from an interface.
 * Delete all phone-numbers of an interface.

./drivers/isdn/i4l/isdn_tty.c:
 * Get phone-number from modem-commandbuffer

./drivers/isdn/isdnloop/isdnloop.c:
 * phone number.
 *   phone  = pointer phone number.
 *   pointer to new phone number.

./net/phonet/sysctl.c:
{ .procname = "phonet", .ctl_name = CTL_UNNUMBERED, },

./include/linux/netfilter/nf_conntrack_pptp.h:
__be16 phoneNumberLength;
__u8 phoneNumber[64];

./include/linux/isdn.h:
  isdn_net_phone         *phone[2];    /* List of remote-phonenumbers
 */
       /* phone[0] = Incoming Numbers      */
       /* phone[1] = Outgoing Numbers      */
  isdn_net_phone         *dial;        /* Pointer to dialed number
*/
                                 /* Last phone-number              */

./include/linux/isdnif.h:
    unsigned char phone[32]; /* Remote Phone-Number */

And here is the external/qemu branch:

./android/console.c:
    /* check that we have a phone number made of digits */
        control_write( client, "KO: missing argument, try 'gsm call
<phonenumber>'\r\n" );
        control_write( client, "KO: bad phone number format, use digits, #
and + only\r\n" );
        control_write( client, "KO: missing argument, try 'gsm call
<phonenumber>'\r\n" );
        control_write( client, "KO: bad phone number format, use digits, #
and + only\r\n" );
    /* check that we have a phone number made of digits */
        control_write( client, "KO: missing argument, try 'gsm busy
<phonenumber>'\r\n" );
        control_write( client, "KO: missing argument, try 'gsm out hold
<phonenumber>'\r\n" );
        control_write( client, "KO: missing argument, try 'gsm accept
<phonenumber>'\r\n" );
    "'gsm in create <phonenumber>' creates a new inbound phone call, placed
in\r\n"
    "'gsm call <phonenumber>' allows you to simulate a new inbound
call\r\n", NULL,
    "'gsm cancel <phonenumber>' allows you to simulate the end of an
inbound or outbound call\r\n", NULL,
    /* check that we have a phone number made of digits */
        control_write( client, "KO: missing argument, try 'sms send
<phonenumber> <text message>'\r\n" );
        control_write( client, "KO: bad phone number format, must be
[+](0-9)*\r\n" );
    /* check that we have a phone number made of digits */
    "'sms send <phonenumber> <message>' allows you to simulate a new
inbound sms message\r\n", NULL,

./telephony/remote_call.c:
        D("%s: phone number '%s' is not decimal or remote", __FUNCTION__,
to_number);

./telephony/remote_call.h:
/* convert a base console port into a remote phone number, -1 on error */
/* convert a remote phone number into a remote console port, -1 on error */

The general pattern is that the drivers will have knowledge of the number,
but userspace tools communicate with these drivers through some protocol to
deliver the phone numbers to the lower layer.   Industry standard have
always use the AT command (some of the lines above actually show how AT
command are used to communicate with the hardware).   Similarly, if u buy a
GSM module from SPARKfun, and then connect to the PC, and setup AT command
u can talk to your phone over GSM.

-- 
Regards,
Peter Teoh

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel

Reply via email to