Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

using perl to get sms messages

by Aldebaran (Curate)
on Oct 26, 2016 at 21:54 UTC ( [id://1174816]=perlquestion: print w/replies, xml ) Need Help??

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

Hello Monks,

Is there a perl way to get the sms messages off my phone? If it matters, I have a $69 Blu android that I regret buying as the internal storage was quite simply fraudulently-advertised at 4 gigs. It is 2 gigs, and with OS loaded, 1. (What did I expect for seventy bucks?)

Anyways, I've got someone who's trying to put the squeeze on me and appears not to know why that isn't a good idea. Are there other software tools for this purpose? Thank you for your comment.

Replies are listed 'Best First'.
Re: using perl to get sms messages
by FreeBeerReekingMonk (Deacon) on Oct 26, 2016 at 22:45 UTC
    Well, the old SL4A (scripting layer for Android) had SMS functions in its API:

    SL4A ApiReference

    And so, maybe works with perl...

    perl-android-apk

    If that does not work, look for the not documented "content://sms/inbox"

    edit: You also need to dive into: sl4a itself

Re: using perl to get sms messages
by marto (Cardinal) on Oct 27, 2016 at 07:38 UTC
Re: using perl to get sms messages
by Corion (Patriarch) on Oct 27, 2016 at 07:44 UTC

    I think your phone (storage) might be too small , but you can compile and install Perl on it.

    I have some old version of Perl packaged for KitKat at http://corion.net/perl-android/.

    Two years ago, I gave a talk on running Perl on your Android phone. The Android-specific ecosystem is basically nonexistent, and much of this is because a C application cannot really talk to the Android APIs because these all live in Java-land. But as a common way of storage on Android is to use an SQLite database, DBI and a rooted phone are your friends for accessing data.

Re: using perl to get sms messages
by andal (Hermit) on Oct 28, 2016 at 12:36 UTC

    More or less standard location for SMS under Android is /data/data/com.android.providers.telephony/databases/mmssms.db. This is SQLite database and one can read it using simple sqlite3 command.

    Normally, this path is not accessible by the users. So you can access SMS messages only from inside of Android application, using Android API. Alternatively you may try to root your phone and then you'll get direct access to the file

      Thanks all for comments. They all gave me valuable hints, but I'm disappointed that I didn't get farther with my end of it, as I also "upgraded" to windows 10, and now I don't have a driver that will work for media transfer protocol. I realize that this is not the place to discuss why my free operating system, that was worth every penny of it, and my unadulterated piece of crap phone can't communicate. If I can get the driver working, then this thread might be in business.

      If anyone has a success story using perl on their phone, I'd be interested to know the brand and model of telephone, as well as the OS they use to talk to it. Indeed, the whole reason I left the world of apple was that I might use perl on a phone. I do hope to revisit this topic with something more than a strikeout.

        I've used perl directly on various Android devices (phones and tablets) without issue with cc tools. I always run cyanogenmod, and have done since the first version of hardware that supported Android. Faster, cleaner, smaller footprint, no bloatware.

        Windows 10 is a train wreck, I'm glad I only have to support close family who run it. You don't mention what you've done and what happens (How do I post a question effectively?), so I can only advise removing the drivers you have, head over to XDA developers, install the adb/fastboot tools package, transfer the files you need to work with via adb, do what you have to on your computer. Failing that get a vendor win 10 driver or at least try the generic google drivers out there. The adb route will be the quickest method of getting the job done, so far as I un derstand it.

        Update: fixed typos, added link.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1174816]
Approved by 1nickt
Front-paged by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found