FORUMS

On Qualcomm’s Damage Control: Marketing and Rumors?

The Heated Snapdragon chronicles seemingly see no end, and 5 months into 2015 … more

Xiaomi Mi Note Pro With SD-810 Goes On Sale In China

The Xiaomi Mi Note Pro, announced on 15th Jan 2015, is Xiaomi’s attempt at … more

Project Fi Invites Are Rolling Out

Google is now sending out the first wave of invites to its new wireless service, Project Fi. … more

Vinsic 20,000mAh Ultra Slim Power Bank Giveaway

We have covered a lot of Android Accessories here on XDA TV. Mostly because we realize … more
Post Reply Subscribe to Thread Email Thread

[MOD] Remove SMS/MMS from Log via MMS.apk

17th March 2012, 12:19 AM |#1  
jeboo's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 3,990
 
Donate to Me
More
This is a simple mod for a very popular "feature." I think this approach is unique and may be beneficial as mms.apk is modified much more often than logsprovider. This is based on XWLA4 btw, Enjoy!

1. Decompile mms.apk with apk_manager or whatever.
2. Go to /smali/com/android/mms/transaction
3. Open MessagingNotification.smali and the two methods we are interested in are: updateHistoryForMms & updateHistoryForSms
These two functions basically build an sql query to insert the messaging entries into the log database.
4. Within both functions, we will simply comment out (place a # in front) the final insert. Here are the exact changes based on XWLA4:

(line 3669)
Code:
    const-string v6, "content://logs/mms"

    invoke-static {v6}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v6

#    invoke-virtual {v5, v6, v7}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    .line 1348
    add-int/lit8 p2, p2, 0x1
(line 4002)
Code:
   const-string p1, "content://logs/sms"

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

#    invoke-virtual {v1, p1, v9}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
5. And that's it, recompile, send to phone and reboot. Note that with this patch the log entries are never saved. So if someone gets a hold of your phone and tries to dig them up, you're fine!

Lastly, I haven't looked at the ICS code yet..I'm guessing it's pretty similar. I posted in themes because I don't have privileges to post in dev yet
The Following 14 Users Say Thank You to jeboo For This Useful Post: [ View ]
 
 
18th March 2012, 10:22 PM |#2  
manny05's Avatar
Senior Member
Thanks Meter: 159
 
More
Good work. I'll be waiting for the ICS version
18th March 2012, 10:58 PM |#3  
fone_fanatic's Avatar
Senior Member
Flag Central Texas
Thanks Meter: 240
 
Donate to Me
More
This is awesome! Thank you. Ever since upgrading this has annoyed me. Will definitely try this when I get home!
18th March 2012, 11:07 PM |#4  
mccune's Avatar
Senior Member
Thanks Meter: 51
 
Donate to Me
More
This also works for the normal I9100.

Applied this to my Mms.apk from the Villain 3.0 ROM (Gingerbread).

The lines you're looking for are #3782 and #4142.
19th March 2012, 02:45 AM |#5  
DriftorX's Avatar
Senior Member
Thanks Meter: 133
 
More
Anyone know if this holds true for the T-Mobile T989 Galaxy S2 as well?
19th March 2012, 04:25 AM |#6  
fone_fanatic's Avatar
Senior Member
Flag Central Texas
Thanks Meter: 240
 
Donate to Me
More
I'm on ICScewD v2.1 and mine is different. So I searched for "Content://logs/mms" and this is what it looks like:

Code:
    const-string v16, "content://logs/mms"

    invoke-static/range {v16 .. v16}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v16

    move-object v0, v5

    move-object/from16 v1, v16

    move-object v2, v7

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    .line 1319
    const-string v7, "Mms/MessagingNotification"
Should I comment out
Code:
    invoke-virtual {v0, v1, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
?

And this is what it looks like for the sms:
Code:
    const-string v0, "content://logs/sms"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v1, v0, v9}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    .line 1242

So it worked out well. I commented out the
Code:
    invoke-virtual {v0, v1, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
for mms and
Code:
invoke-virtual {v1, v0, v9}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
for sms. Thank you!
Last edited by fone_fanatic; 19th March 2012 at 05:19 AM.
19th March 2012, 05:47 AM |#7  
jeboo's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 3,990
 
Donate to Me
More
Nice work fanatic!

I went ahead and checked mms.apk from ICS 4.0.3 LPQ, and it's pretty much identical. You can just search for 'insert' and it will land you on the 2 lines to comment out. I haven't tried ICS yet, so someone let me know how it goes.
21st March 2012, 09:42 AM |#8  
crz6662's Avatar
Senior Member
Flag pgh, pa
Thanks Meter: 21
 
More
Quote:
Originally Posted by DriftorX

Anyone know if this holds true for the T-Mobile T989 Galaxy S2 as well?

Curious bout this also...
21st March 2012, 12:18 PM |#9  
Simba501's Avatar
Recognized Contributor
Thanks Meter: 1,153
 
More
Quote:
Originally Posted by DriftorX

Anyone know if this holds true for the T-Mobile T989 Galaxy S2 as well?

Quote:
Originally Posted by crz6662

Curious bout this also...

Likely. Definitely likely enough to try it. Or you can download Samsung Log Converter; I've heard it works if you're not into smali .
12th April 2012, 09:11 PM |#10  
G3-SCORPIO's Avatar
Member
Flag Краснодар
Thanks Meter: 3
 
More
Quote:

1. Decompile mms.apk with apk_manager or whatever.
2. Go to /smali/com/android/mms/transaction
3. Open MessagingNotification.smali and the two methods we are interested in are: updateHistoryForMms & updateHistoryForSms
These two functions basically build an sql query to insert the messaging entries into the log database.
4. Within both functions, we will simply comment out (place a # in front) the final insert. Here are the exact changes based on XWLA4:

Good day all ! Do I understand correctly that this will remove the logs sms and mms from logging calls? for firmware 2.2.1
Someone already tried? This method helps?
Last edited by G3-SCORPIO; 12th April 2012 at 09:41 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes