asha_mail has asked for the wisdom of the Perl Monks concerning the following question:

I would like to know whether it is possible to access mobile phone data like messages,phonebook,etc with the help of PERL script?

Replies are listed 'Best First'.
Re: Accessing Mobile Phone data
by thomas895 (Deacon) on Dec 26, 2011 at 07:02 UTC

    First of all, Perl is not an acronym(not that that really matters, but I thought I'd say).

    Next, you would have to know some things where and how you will access the data.
    Will the connection be via a USB bus? If that is the case, you will need to search CPAN for a good module.
    Will the connection be via bluetooth? If that is so, you will also need to find a good module on CPAN.
    Or will the script run directly on the phone(via PerlDroid or whatever it's called on Android)? In that case, it will be a simple matter of just opening the files or using DBI to interface to it.

    The next thing you will need to look at is how the data is stored. That can vary from mobile to mobile. Often times it is either a CSV file or a directory of files(one for each contact/message).

    Unfortunately, the Perl gods do not permit us to see into each other's minds, so you will need to be more specific ;)
    Good luck!

    ~Thomas~
      That always bothered me, personally. The PERL acronym makes so much more sense than the name having been borrowed and arbitrarily renamed from PEARL by Larry Wall. Heck, the first common usage was perl and the documentation referred to it as PERL, so why is Perl considered the "accepted" form now? I want a revote.

      I want the connection to be done using USB bus.

        In that case, you should do what I suggested in my previous reply: search CPAN for a good module. Read the documentation on those modules, then choose the one that best suits you. We may be able to provide an example if you tell us the information I specified in my previous node.

        ~Thomas~
        A reply falls below the community's threshold of quality. You may see it by logging in.

        Many phones register a serial-over-USB devices when you connect them. Try a serial "modem" connection - you might be able to read out the phonebook and stuff via AT commands.

        BREW /very/strong/coffee HTTP/1.1
        Host: goodmorning.example.com
        
        418 I'm a teapot
Re: Accessing Mobile Phone data
by Tux (Canon) on Dec 26, 2011 at 10:23 UTC

    USB can be used for lots of phones. You should be much more specific. Is it an old-school Nokia or a state-of-the-art iPhone or other newish device?

    On Linux, there are several OpenSource projects available to communicate with USB or bluetooth phones. For old-school phones, there is e.g. libgnokii which works on more than just Nokia phones. The GSM::Gnokii features a perl interface to that library. It enables you to fetch all the required information.


    Enjoy, Have FUN! H.Merijn
Re: Accessing Mobile Phone data
by ricDeez (Scribe) on Dec 26, 2011 at 16:29 UTC

    Have you got an Android phone?

    If so, you may be in luck as the SL4A (the Android scripting environment) supports Perl... Check out http://code.google.com/p/android-scripting

    Here's some very simple sample code:

    use strict; use warnings; use Android; my $a = Android->new(); $a->makeToast("Hello World!");

    Using this toolkit you should be able to automate many of your phone's operations and access mobile data. However, you need to be a lot more specific when posting questions as it is impossible to understand what you want to do, what platform you are using, etc.