Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,106 Members 40,033 Now Online
XDA Developers Android and Mobile Development Forum

[Project] Incoming MMS Picture Size Fix

Tip us?
 
totalundone
Old
(Last edited by totalundone; 9th February 2011 at 09:02 PM.)
#1  
Senior Member - OP
Thanks Meter 40
Posts: 290
Join Date: Jan 2009
Default [Project] Incoming MMS Picture Size Fix

Hey all, this would probably be only interesting to those who are receiving 2kb, 160x120 MMS messages. Using TMO-USA as an example, the X10 received large MMS images with 1.6, but I'm guessing it doesn't recognize the uaprofile of 2.1 and now are getting tiny mms images. This could also help others on other networks that have the same problem.

Cyanogenmod has an option to switch the profile. Someone else on XDA has posted some of the changes, and those can be found here.

I'm thinking that since I don't think we can compile a new mms.apk, maybe it's possible to edit the current mms.apk with the uaprofile from a different phone (probably the t717/equinox for the tmo users)? Hopefully it's not encrypted or anything either...

So off I go into root explorer and I can't find any mms.apk in my x10. hmm, so i adb shell into it and still no mms.apk. I can't get too far if I can't find the mms application, lol.

so does anyone know what SE uses for mms? or if I'm just simply not seeing it?

obviously, i'm new to working with android, i'll pick up more as time goes on thanks for any help!
 
totalundone
Old
#2  
Senior Member - OP
Thanks Meter 40
Posts: 290
Join Date: Jan 2009
Bah! Just in case anyone else looks, I think I found it... sigh.
I searched through the /data/data/ folder and found a reference to 'ericssson' (part of what would be the normal uaprofile text) in com.sonyericsson.converstations_preferences.xml... converstations, eh? makes sense... and yes, there's a converstations.apk

so far i've unzipped it and found 'mms_config.xml' that has max file size and dimensions... but i think this might be only for outgoing mms...
 
CuBz90
Old
(Last edited by CuBz90; 19th January 2011 at 05:59 PM.)
#3  
CuBz90's Avatar
Senior Member
Thanks Meter 286
Posts: 1,038
Join Date: Sep 2010
Location: Manchester
I could be wrong, but isn't it conversations.apk

EDIT: nevermind, looks like you already found it lol
 
motibbs96
Old
#4  
Junior Member
Thanks Meter 0
Posts: 17
Join Date: Jun 2010
Default Curious

Thanks for trying to work on it. I would love to have a fix to these small picture messages on T-mo US. But is it possible that the small picture sizes have something to do with T-mo's services somehow???
 
totalundone
Old
#5  
Senior Member - OP
Thanks Meter 40
Posts: 290
Join Date: Jan 2009
Quote:
Originally Posted by motibbs96 View Post
Thanks for trying to work on it. I would love to have a fix to these small picture messages on T-mo US. But is it possible that the small picture sizes have something to do with T-mo's services somehow???
It was working fine with 1.6 but when the X10 jumped up to 2.1, mms images were small. So to me, that means that the tmobile no longer recognizes the phone and it goes automatically downsizing all incoming images.

What I'm not sure is if TMO checks the url of the phone's uaprof or if it just looks at the url and just checks it against their own database. I'm thinking the latter.

Another thought might be if TMO just looks at the specs that the phone gives. The reason for this last question is because X10 1.6 had a max size of 640x480 (not sure if this was receiving or sending) at 1 meg (tmo only handles 300k max). with X10 2.1, it states a max size of 1600x1200 and a max size of 1 meg. Maybe it thinks 1600x1200 is too big and it hits some trigger on TMO's side to only send the fallback size (160x120)

I would recommend emailing customer service (and for anyone else having the same issue with their respective provider) and seeing if they can add the uaprof of the x10i (url) to their database. I know this UAprof is from the v24 update. I'm not sure if it's any different for the DT update or the first 2.1 update. It's not a permanent solution but it's all we have for now.
 
totalundone
Old
#6  
Senior Member - OP
Thanks Meter 40
Posts: 290
Join Date: Jan 2009
I thought I'd also post an update, in case if anyone has any thoughts on what I might be doing wrong or helpful tips.

I searched the entire system directory for any text within the files that might relate to uaprof or udp or anything like that. Nothing. I think in 'normal' Android builds have a mm_property.conf file where we can change the uaprof info. So for now, I'm concentrating on converstations.apk and that specific file isn't located there (or anywhere). SE has to store this info somewhere so I think it's in a different conf file. But for the hell of it, I did a hex search for anything that might be related to uaprof (just in case a text search missed something). Again, nothing.

SE encrypted converstations.apk. So if it's in there somewhere, we have to decrypt it first. I'm looking into and reading on decrypting and repackaging the apk. Seems easy enough - I just need to learn a little more.
 
MrHassell
Old
#7  
Senior Member
Thanks Meter 245
Posts: 391
Join Date: Dec 2010
Location: Melbourne

 
DONATE TO ME
Default APN Settings

Name: T-Mobile US
APN: epc.tmobile.com
Proxy: 216.155.165.050
Port: 8080
Username: (leave this blank)
Password: (leave this blank)
Server: (leave this blank)
MMSC: http://mms.msg.eng.t-mobile.com/mms/wapenc
MMS Proxy: 216.155.165.050
MMS Port: 8080
MMS Protocol: WAP 2.0 (don't know if this is important)
MCC: 310
MNC: 260
APN Type: (leave this blank)

To create APN settings for your Xperia.

1. Go to 'Settings'
2. Select 'Wireless & networks'
3. Browse down to 'Mobile networks'
4. Browse down to 'Access Point Names'
5. Click the Menu (Left) button
6. Select 'New APN'
7. Key in the detail relating to your provider or carrier
8. Then press the radio button to select it
9. Save settings, reboot phone.

To test your network dial the following on your phone dial keypad to get into test mode: *#*#4636#*#*
 
totalundone
Old
#8  
Senior Member - OP
Thanks Meter 40
Posts: 290
Join Date: Jan 2009
Thanks for the help, but the issue isn't an APN setting. Just for giggles, I went ahead and changed the default APN settings to this and can confirm that it still receives small images.

So far I've decompiled the apk but haven't found the settings I need to change
 
totalundone
Old
#9  
Senior Member - OP
Thanks Meter 40
Posts: 290
Join Date: Jan 2009
Alright. So I've *properly* decompiled the apk (I'm working on the newest X10i build, v435). It references the UXprof url from framework-res.apk. I found where the url is in that file and changed it to the url for the Tmobile G2 (just to see if that change will work). Unfortunately, I need to recompile framework-res.apk and from everything I've read, it's recommended not to do that.

I'll keep on reading to see if I can do it, but has anyone recompiled framework-res.apk for the x10?
 
Grospolina
Old
#10  
Grospolina's Avatar
Senior Member
Thanks Meter 17
Posts: 168
Join Date: Jun 2010
Location: Winnipeg
Quote:
Originally Posted by totalundone View Post
Alright. So I've *properly* decompiled the apk (I'm working on the newest X10i build, v435). It references the UXprof url from framework-res.apk. I found where the url is in that file and changed it to the url for the Tmobile G2 (just to see if that change will work). Unfortunately, I need to recompile framework-res.apk and from everything I've read, it's recommended not to do that.

I'll keep on reading to see if I can do it, but has anyone recompiled framework-res.apk for the x10?
I've dealt with framework-res.apk before. It was just to add the Super Circle Battery, but I can tell you what works.

Compiling the APK seems to encrypt the XML files one by one. If you change any of the resources (like adding images), then you also need to compile a new resources.asrc. Fortunately, since it's a system file, you don't need to sign the APK.

Check this thread for lots of good info on modifying framework-res.apk (thanks to _calum_ and MrRusch):
http://forum.xda-developers.com/showthread.php?t=834806

Important points:
- The XML files and resources.asrc need to be compiled.
- The APK doesn't need to be signed.
- You can compile the XML and resources.asrc with APK Manager, then extract them from the "unsigned" APK it creates, and then reinsert them into a copy of the original APK using WinRAR (or your favorite zip tool).
- Compression should be set to "store" (a.k.a. no compression).

Be sure to have a backup copy of your original framework-res.apk. It's best to leave a copy on your SD card somewhere.

Be careful when replacing framework-res.apk. Copying it with Root Explorer isn't a good idea. I think the permissions get screwed up or something, and you don't have time to change it because it reboots right away. It's better to copy it onto your SD card and use the dd command through ADB.

Quote:
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
If you mess up, then you may not be able to boot the phone. Don't panic. ADB is still available even when it hasn't booted yet, so just use dd to replace it with your old one.

The Following User Says Thank You to Grospolina For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Add the Xperia Z2 Lock Screen to Your Favorite KitKat ROM

Almost every OEM adds its own unique flair to their stock firmwares. While some of … more

Android App Review: Control Your Phone with Quick Control Panel – XDA Developer TV

Your Android smart device has many features that you … more

Play Music on Android Wear with Stellio Music Player

Android Wear smartwatchesare growing inpopularity every day. Some devices have already … more

Schedule is up for xda:devcon ’14

With xda:devcon ’14 just around the corner, and the venue close to selling out, there is a lot … more