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!
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...
I could be wrong, but isn't it conversations.apk
EDIT: nevermind, looks like you already found it lol
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???
motibbs96 said:
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???
Click to expand...
Click to collapse
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.
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.
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#*#*
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
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?
totalundone said:
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?
Click to expand...
Click to collapse
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.
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
Click to expand...
Click to collapse
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.
wow, i never would've thought the picture sizes had to do with my phone. hope you find a fix for this!
Thanks Grospolina! That info should help me a lot.
I actually tried to use root explorer at first... LOL. Stuck at the SE screen and I thought I bricked the phone but found out that my USB port on the monitor has quit working... Wasted a couple hours there. Sigh, lol.
I was using apktool since it's supposed to be framework-res.apk friendly but it kept on compressing the apk. I tried to adb push the file but it kept on saying I didn't have permissions. So I ended up using xrecovery to 'restore' the file in update.zip. I did a test mms but it was still small so I went ahead an cleared the davlik cache. I checked the file size of the modified framework-res.apk but either clearing the cache brought the original apk back or xrecovery update didn't work because the file size was the same as the original (apktools shrunk it down to nearly half).
anyways, I'll try it with that adb line.
There is one issue though. If I open up the original framework-res.apk file in 7zip, the file I need to edit doesn't appear. I'll try this but am not sure what to do if the xml file I need to replace doesn't appear.
bah, i can't ever get adb to replace a file. it always says that it's not writeable and then when i get su permission set, some other error happens. I'll figure it out... still reading... typical adb newbie issue, haha.
I don't have enough time right now (or in the next day) to keep on working on this but if anyone on tmobile usa with an xperia x10 wants to give it a shot, I've linked the apk below. The only change I've done so far is change a couple lines in style.xml. I'm not sure this is it for sure, but I can't rule it out yet.
sorry not trying to be rude or nething but i think you should say that this post is about the picture size...cuz a lot of times iv noticed that when you flash it erases your apn settings which is what you need to receive mms messeges in in the first place... just a thought
No offense taken!
I edited the title to reflect that it's to fix incoming picture mms size.
I hope you don't take offense, but this ISN'T an APN settings issue. I explained it several times earlier and it's been brought up before. It's a problem that been mitigated with custom roms because they have the ability to change their uaprof to something the network recognizes.
Several networks, one of which includes TMobile USA, default to a MMS picture size of 160x120 if it doesn't recognize the phone. This project's intention is to change the default uaprof in order for Tmobile USA (and eventually any other providers) to a uaprof of a supported handset.
mms - framework-res.apk - custom
I was totally on the wrong track with APN settings. Admit I saw MMS and jumped the gun without searching on anything. Had just been through all the baseband compatibility issues and APN setting seemed related
http://forum.xda-developers.com/showthread.php?t=830102 - theeedy - good job working with the settings on the Semc Camera Application, related in the compression of images taken by the default camera.
http://forum.xda-developers.com/attachment.php?attachmentid=355818&d=1278461264
This is MMS.apk - it's an interesting modification, couldn't find it easily within my phone.. decompiling it broke with Unknown Resources, which of course is referencing - /system/framework/framework-res.apk
I think it's related to someone's custom Framework-res.apk and used the default Android MMS app for ease of modifications. I'd say that could be the way to go about this and using the Android SDK in Eclipse or Netbeans is probably the right track.. not APN settings... sheesh! - Grospolina is on the money
package="com.android.mms"
Here are permission sections - might make sense..
Code:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_DRM" />
<uses-permission android:name="com.sonyericsson.android.permission.SEMC_BACKUP_SERVICE" />
<uses-permission android:name="com.sonyericsson.android.permission.SEMC_CUSTOM_SETTINGS" />
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
<uses-permission android:name="com.android.mms.wap.permission.READ_PUSH" />
<uses-permission android:name="com.android.mms.wap.permission.WRITE_PUSH" />
<permission android:name="com.android.mms.wap.permission.READ_PUSH" android:protectionLevel="signatureOrSystem" />
<permission android:name="com.android.mms.wap.permission.WRITE_PUSH" android:protectionLevel="signatureOrSystem" />
Now your creating your own Framework-res, you need to know the parts that your looking for and what to do with them.. roughly..
Code:
<service android:name="MmsService" android:permission="com.sonyericsson.android.permission.SEMC_CUSTOM_SETTINGS">
<intent-filter>
<action android:name="com.android.mms.MMS_CUSTOM" />
<action android:name="com.android.mms.MMS_SERVICE" />
</intent-filter>
</service>
From here you can define the properties that you need in the RES layout.. you need something along the lines of this in a file called - image_attachment_view.xml - which would define the image properties you are discussing.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<com.android.mms.ui.ImageAttachmentView android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/image_attachment_view" android:background="@drawable/attachment_editor_bg" android:paddingRight="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@id/image_content" android:layout_width="fill_parent" android:layout_height="150.0dip" android:layout_weight="1.0" />
<LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content">
<Button android:id="@id/view_image_button" android:layout_width="100.0dip" android:layout_height="50.0dip" android:text="@string/view" style="\?android:attr/buttonStyleSmall" />
<Button android:id="@id/replace_image_button" android:layout_width="100.0dip" android:layout_height="50.0dip" android:text="@string/replace" style="\?android:attr/buttonStyleSmall" />
<Button android:id="@id/remove_image_button" android:layout_width="100.0dip" android:layout_height="50.0dip" android:text="@string/remove" style="\?android:attr/buttonStyleSmall" />
</LinearLayout>
</com.android.mms.ui.ImageAttachmentView>
EDIT: There are also some better MMS applications out there.. before reinventing the wheel perhaps a bit of window shopping?
No problem! Thanks for the info MrHassell. I enjoy reading your posts (chop full of interesting info, haha)
I'll definitely look into your tips there! SE mucked around with the messaging and they don't use mms.apk but conversations.apk. After decompiling conversations.apk, it references outside of converstions.apk (I'm 95% sure of that) for the uaprof. This (I think) makes sense in that the system needs to tell the network its uaprof.
Other MMS applications depend on this system uaprof to receive images and they too, receive small images. Custom roms get around this because they allow changing the uaprof. However, since SE changed the location of some of the interesting strings, I haven't been able to use AOSP or anything like that as a template to find the strings specifically.
I could use a custom rom, but I'm waiting until a stable, feature filled one is available without having to download X, Y, and Z to get features to work. I like messing with my phone but don't want to mess around with an entire rom (yet, I already did that with a Samsung i7500, lol).
So far, the interesting lines (2) is in framework-res.apk. /res/values/strings.xml
>> <string name="config_useragentprofile_url">http://wap.sonyericsson.com/UAprof/%R202.xml</string> (something like this) and h ttp://wap.sonyericsson.com/UAprof/%R101.xml
Which I changed to
>> <string name="config_useragentprofile_url">http://www.htcmms.com.tw/Android/TMO/Hero/ua-profile.xml</string>
Which is the uaprof for the Tmobile G2.
And just for background...
How I think this all works (if anyone works for tmobile usa and knows, please correct me!)
Phone connects to the network OR when the phone receives an MMS
Advertises it's uaprof capabilities to the network
Network looks at the url and either:
goes to the url and assigns those capbilities to that registered phone
or
looks at the url and looks for that url in a local database. Network finds info and assigns MMS values OR doesn't find it and assigns default 160x120 values. Doesn't go to the internet to find those values.
The X10 worked under 1.6. Why? It was rumored to come to the USA and 1.6 would have had the uaprof on their database for testing reasons. 2.1 comes and TMobile USA has already decided not to carry it so they don't add the new url to their database.
totalundone said:
bah, i can't ever get adb to replace a file. it always says that it's not writeable and then when i get su permission set, some other error happens. I'll figure it out... still reading... typical adb newbie issue, haha.
Click to expand...
Click to collapse
The /system directory is read-only by default. You need to mount it as read/write:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
Click to expand...
Click to collapse
If that doesn't work, you could try this:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
exit
exit
Click to expand...
Click to collapse
Also, don't forget to check your phone for a "SuperUser" popup and allow it. In the SuperUser app, this shows up as "Unknown".
Thanks again Grospolina!
Evidently I didn't have it approved by superuser. I thought I did... but forgot that I lost it when I had to reflash a few days ago.
I tried the new framework-res.apk. It didn't crash my phone and it was the new size! unfortunately incoming mms photo sizes are still 160x120 max.
Well... I guess I need to get back to searching ...
just want to say thank you for looking into this. i really want to have the mms picture issues worked out.
thanks again
Hi
Since the last google services update an option to disable the confirmation box every time you used google high accuracy location was introduced. I would like to know how to reset that option so the box will appear each time? The only reason I checked this box was to see if there was an issue causing google services to crash.
smelllllllllll said:
Hi
Since the last google services update an option to disable the confirmation box every time you used google high accuracy location was introduced. I would like to know how to reset that option so the box will appear each time? The only reason I checked this box was to see if there was an issue causing google services to crash.
Click to expand...
Click to collapse
I'd go to Settings > Applications > All >
Then uninstall Google Services update, reboot, then update it again.
es0tericcha0s said:
I'd go to Settings > Applications > All >
Then uninstall Google Services update, reboot, then update it again.
Click to expand...
Click to collapse
Cheers dude never thought of doing it that way. After playing about for a while I found a way to enable it again.
So for anyone else who's interested I edited the nlp-prefs.xml file contained in Data > Data > com.google.android.gms > shared_prefs
Changing From:
<boolean name="confirmNlp" value="false" />
Changing To:
<boolean name="confirmNlp" value="true" />
smelllllllllll said:
Cheers dude never thought of doing it that way. After playing about for a while I found a way to enable it again.
So for anyone else who's interested I edited the nlp-prefs.xml file contained in Data > Data > com.google.android.gms > shared_prefs
Changing From:
<boolean name="confirmNlp" value="false" />
Changing To:
<boolean name="confirmNlp" value="true" />
Click to expand...
Click to collapse
was searching for a solution and tried this, but no go. so i just wiped data for google play services from TiBu and that worked.
posting a response in case someone else wanted another solution.
enjoy.
smelllllllllll said:
Cheers dude never thought of doing it that way. After playing about for a while I found a way to enable it again.
So for anyone else who's interested I edited the nlp-prefs.xml file contained in Data > Data > com.google.android.gms > shared_prefs
Changing From:
<boolean name="confirmNlp" value="false" />
Changing To:
<boolean name="confirmNlp" value="true" />
Click to expand...
Click to collapse
Thank you very much.
I had to reboot the device to make the changes take effect.
Does In the last update the check box is gone?
Anyone also see this?
How you edit that file - com.google.android.gms ?
It says access denied!
I have a Nexus 5 with Android 6.01 rooted.
I found the file but it did not contain:
<boolean name="confirmNlp" value="false" />
I added it. Unfortunately, before I tested it I re-booted the phone and the line disappeared.
I notice it has another entry:
<boolean name="nlpAllowedByUser" value="true" />
Does this have anything to do popup?
Okay so I choose "yes" when the location settings asked for access to network info. I would like to revoke that choice so it does not access my network and I can ignore the prompt. I prefer to just use the GPS (Device Only) setting but instead it goes to High Accuracy (GPS and Network) and I can't change force the location button to change back to default when it prompted me. Is it possible to get it back so that when I enable location it's not High Accuracy? Android OS: 5.1.1
Grabbing the anwser from the following topic : http://forum.xda-developers.com/android/help/reset-google-network-location-consent-t2890971 . You will need root:
smelllllllllll said:
So for anyone else who's interested I edited the nlp-prefs.xml file contained in Data > Data > com.google.android.gms > shared_prefs
Changing From:
<boolean name="confirmNlp" value="false" />
Changing To:
<boolean name="confirmNlp" value="true" />
Click to expand...
Click to collapse
I tried it myself and it really works... After doing this change , reboot your device
In the meantime the (mis)behaviour of Play Services changed a bit. I.e. in v12.x there's, instead of changing the value of
<boolean name="confirmNlp" value="false" /> to "true",
the complete line to be deleted.
Reboot. Then the confirmation dialog appears again.
Tested on MM 6.01.