FORUMS
Remove All Ads from XDA

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

383 posts
Thanks Meter: 32
 
Post Reply Email Thread
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:

Quote:

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:
Quote:

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/android...1582b9caaf1217

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:
Quote:

adb shell find /system -name Mms.apk

Attached Files
File Type: zip Mms_softbank.zip - [Click for QR Code] (752.5 KB, 1112 views)
File Type: zip hero_mms.zip - [Click for QR Code] (1.47 MB, 987 views)
File Type: zip mms_useragent_changer_v2.zip - [Click for QR Code] (391.6 KB, 1340 views)
 
 
30th July 2009, 05:02 PM |#2  
Senior Member
Thanks Meter: 5
 
More
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?
30th July 2009, 05:15 PM |#3  
johnnylicious's Avatar
Senior Member
Thanks Meter: 4
 
More
is this the Mms.apk from the Hero ROM or just the regular cupcake messaging app?

thanks! hope this works!
30th July 2009, 05:52 PM |#4  
senab's Avatar
OP Senior Member
Flag London, UK
Thanks Meter: 32
 
Donate to Me
More
Tested and working!
30th July 2009, 05:57 PM |#5  
johnnylicious's Avatar
Senior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by senab

Tested and working!

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.
30th July 2009, 06:05 PM |#6  
Junior Member
Flag Cincinnati, OH
Thanks Meter: 0
 
More
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?
30th July 2009, 06:05 PM |#7  
Senior Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by johnnylicious

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.
30th July 2009, 06:18 PM |#8  
senab's Avatar
OP Senior Member
Flag London, UK
Thanks Meter: 32
 
Donate to Me
More
Quote:
Originally Posted by Zane McFate

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.
30th July 2009, 06:20 PM |#9  
senab's Avatar
OP Senior Member
Flag London, UK
Thanks Meter: 32
 
Donate to Me
More
Quote:
Originally Posted by johnnylicious

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!!

This totally depends on whether the source is available for the APK. I don't particularly fancy decompiling the dex files but I may have a look soon.
30th July 2009, 06:40 PM |#10  
johnnylicious's Avatar
Senior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by senab

This totally depends on whether the source is available for the APK. I don't particularly fancy decompiling the dex files but I may have a look soon.

hmm im not sure if that available but you can try and take a look at it

http://www.mediafire.com/download.php?1j2myyjmion
30th July 2009, 07:40 PM |#11  
Member
Thanks Meter: 1
 
More
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
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes