Modified Mms.apk - Change MMS User Agent [UPDATED 28th Feb][Eclair Included]

Search This thread

senab

Senior Member
Apr 29, 2008
383
31
London, UK
www.senab.co.uk
Hi everyone,

Eclair update, see changelog

I've just wrote a patch that allows you to change the MMS User-Agent within the messaging application. It's handy to for the follow reason:

If your carrier does not recognise the User-Agent as one it has seen before, and they are not using a well behaved MMSC, the MMSC will simply degrade the message to the lowest quality. The fix is to "spoof" the User-Agent from a phone that your carrier does recognise.

I'm on O2 in the UK and at present, all my picture messages would previously come through as 160x120px. I have successfully tested this with a Nokia N95 User-Agent string (examples below) and my MMS's now come through perfectly.

The APK below is built against cyanogen's CyanogenMod 3.9.7 (which also means you get rgv151's Send On Enter patch and other goodies aswell). The patch is also in the ZIP. Once installed, the setting is found under Messaging -> Settings -> MMS User-Agent.

To install, download the zip below, extract the APK and:
adb remount
adb push Mms.apk /system/app

List of User Agent strings
  • SonyEricssonW800i/R1L
  • iPhoneOS/3.0 (7A341)
  • BlackBerry8800/4.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/100
  • NokiaN95/11.0.026; Series60/3.1 Profile/MIDP-2.0 Configuration/CLDC-1.1

Changelog
v1
Initial release

v2
Cosmetic Changes - Now has a new "Advanced Settings for MMS" screen in the settings. You can also now choose from a predefined list of User Agents, or enter your own by selecting 'Custom' and then entering your user agent in the option below.
Rebuilt against CM3.9.7

Hero
For the Hero Mms.apk, I've had to do it a bit different. There's no menu's, I've just decompiled the classes.dex (using JF's superb smali) from the Mms.apk in JACHeroski's 2.7.4 and changed the hardcoded values for the User Agent. I've recompiled three versions, one using the N95 string, another using the BlackBerry 8800 (both in hero_mms.zip) and the final one using a Softbank UA (in Mms_softbank.zip). I'm not running a Hero rom so can't test these, let me know if you try them. You only need one of the APKs from the ZIP! Rename the one you want to Mms.apk, then push it where you need to on your ROM.

Eclair
After quite a few people PM'ing me, I've updated the original patch for Eclair. I'm still on Donut which is why I haven't updated it before. Anyway it's been commited to OpenEclair and should be in the next release: http://github.com/openeclair/androi...mmit/3e82f91112764a998944415b031582b9caaf1217

I haven't compiled it myself therefore I can't produce an APK for download as yet. If you fancy doing it yourself, here's the patch: http://paste2.org/p/692468.

---

If you don't know, this command will tell you where:
adb shell find /system -name Mms.apk
 

Attachments

  • Mms_softbank.zip
    752.5 KB · Views: 1,115
  • hero_mms.zip
    1.5 MB · Views: 991
  • mms_useragent_changer_v2.zip
    391.6 KB · Views: 1,351
Last edited:

seanhassars

Senior Member
Feb 2, 2009
300
5
so you're saying that we could push this patch onto a hero build, and then we would get our MMS at the quality we should, instead of it being compressed and looking horrible?
 

johnnylicious

Senior Member
Nov 9, 2008
1,464
6
is this the Mms.apk from the Hero ROM or just the regular cupcake messaging app?

thanks! hope this works!
 

seanhassars

Senior Member
Feb 2, 2009
300
5
Great job on this!

do you think if you had time you coudl crack open the mms.apk for the Hero ROM?

i can send you the correct Mms.apk to see if you can edit the user agent on it also!!

thanks just PM me.

this would be so awesome considering it's the only thing at this point keeping me from switching to hero builds exclusively.
 

senab

Senior Member
Apr 29, 2008
383
31
London, UK
www.senab.co.uk
I am assuming that the User Agent is listed (by default) as the phone itself, and generally performs the same regardless of the installed ROM. Is that correct?

The default is "Android-Mms/0.1" and I haven't changed that. I'm currently working on a new version that will let you select from some predefined choices (as well as being able to input a custom one). Not sure on whether it will work for other ROMs but I can't see why not.
 

AF9210

Member
Mar 17, 2009
43
1
hmmm

will this spoofing of the user agent allow people that do not have the data plan to trick tmobile into saying hey this person doesnt have a g1 so lets go ahead and send? since most phones do not require data plan to send/receive a mms
 

senab

Senior Member
Apr 29, 2008
383
31
London, UK
www.senab.co.uk
V2 out!

Cosmetic Changes - Now has a new "Advanced Settings for MMS" screen in the settings. You can also now choose from a predefined list of User Agents, or enter your own by selecting 'Custom' and then entering your user agent in the option below.

If anyone has any other User Agents to add, let me know. ;)
 

bigslanki

Senior Member
Jul 18, 2009
411
76
Hey I'm using the cyan 3.9.2 for sum reason I always loose the ability to rm -r and I always get read only file. I'm used to jac roms n never had this problem with deleting apk's is there an alternative to using adb..??? Thanks n sorry for asking
 

Zane McFate

Member
Jul 29, 2009
10
0
Cincinnati, OH
Hey I'm using the cyan 3.9.2 for sum reason I always loose the ability to rm -r and I always get read only file. I'm used to jac roms n never had this problem with deleting apk's is there an alternative to using adb..??? Thanks n sorry for asking

I'm going to guess it's an issue with the drive not being set to read/write. Perhaps your other rom set that automatically.
 

monotremata

Member
Apr 11, 2008
26
0
mms

Feature request ;)

Am mms.apk with a homescreen icon that tells you number of unread messages, just like the mail app from Hero does. I know ,wishful thinking...