Home of tyty1234

No Smileys Android

Posted on by Tyler



Got a rooted Android phone and want to “turn off” the smileys when sending/receiving messages? Well by modifying the Mms.apk application, you can do just that by modifying one line within the application’s classes file. As seen above, none of the smileys are parsed as images, and will show the text as is.

To perform this task, you will need the APK Tool, and smali/baksmali to assemble and disassemble the classes file found within the apk file. This however can be done all at one time with the Apk Manager by Daneshm90 over at XDA-Developers. Once you decompiled the apk, and baksmalied the classes.dex file, you should be able to find the “com” folder. Within that folder, you this file structure: /com/android/mms/util/ and within the util folder, is a file called SmileyParser.smali. Find the following code to perform the edit.

# virtual methods
.method public addSmileySpans(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
    .locals 7
    .parameter “text”

    .prologue
    .line 174
    new-instance v0, Landroid/text/SpannableStringBuilder;

Under “.line 174″, add return-object p1 and the following code should now look like this.

# virtual methods
.method public addSmileySpans(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
    .locals 7
    .parameter “text”

    .prologue
    .line 174
    return-object p1
    new-instance v0, Landroid/text/SpannableStringBuilder;

Once done, save the smali file, then smali the classes back together, recompile the apk, push it to /system/app/Mms.apk to replace the old one (you should backup before doing this) and the smileys should no longer show as images. The best way to do this would be with the Apk Tool, as it is the fastest and easiest way to perform this task. I learned how to do this task from this webpage.

Did you like this? Share it:
This entry was posted in Android, Personal. Bookmark the permalink.

One Response to “No Smileys Android”

  1. MW
    March 31, 2013 at 12:27 pm

    THX for TIP :o)
    In my i9100 i modified also addSmileySpansColored method :

    .method public addSmileySpansColored(Ljava/lang/CharSequence;I)Ljava/lang/CharSequence;
    .locals 7
    .parameter “text”
    .parameter “color”

    .prologue
    .line 213
    return-object p1 <– ADDED THIS LINE !!!

Leave a Reply