MMS - User Agent

Discussion in 'Question & Answers' started by oftata, Jan 6, 2011.

  1. oftata

    oftataMembers

    Dec 9, 2010
    4
    0
    11
    Hi Everyone,

    A lot of people are facing mms reception problems.
    A common solution is to change the APN settings, but in my case it didn't work.

    I'm on the Orange (France) network (the APN settings given in MIUI are good).

    But in order to receive mms, I had to modify the "user-agent".
    For that I went back on cyanogen, and in the sms/mms application went on settings / user-agent to change it.

    Is this functionnality planned on miui ? (I want to use miui again ;))

    Cheers,
    Oftata
     
  2. overthinkingme

    Nov 7, 2010
    11
    0
    11
    I posted about this issue last week too, my thread was deleted..

    I would also like to know if a mod is possible, maybe a simple apk edit ? I really want to go back to miui too.

    I tried changing the user agent string in the mms config xml but I got fc's on opening the messaging app.

    Maybe porting cm's messaging app?

    Sent from my Nexus One using the miui-dev.com Forums App
     
  3. oftata

    oftataMembers

    Dec 9, 2010
    4
    0
    11
    Yep, i'll try to edit the apk when i have time.. even if i'm not an expert...
    Help is more than welcome ;)
     
  4. oftata

    oftataMembers

    Dec 9, 2010
    4
    0
    11
    Hi all,

    I also tried to edit mms_config.xml with apktool, but I get errors.
    Even just decoding then encoding (without any changes) doesn't work. :(

    I'll try APK Edit this weekend, but it's based on apktool, so I guess it won't work.
     
  5. overthinkingme

    Nov 7, 2010
    11
    0
    11
    I used a hex editor to edit it, I tried simply replacing the user agent which is "nexusone" for a user agent for the bb 8800 I found on a cm commit, didn't work though, maybe I had to resign the apk..

    Sent from my Nexus One using the miui-dev.com Forums App
     
  6. misj

    misjMembers

    Feb 1, 2011
    2
    0
    11
    You need the source of the APK to make such edit. I made such edit for on my last ROM to make it work in Japan (Softbank) . However, it's impossible to find the source code of MIUI.
    Could the MIUI-devvers add a menu item so that we can enter our own UserAgent? It's a 10 minute coding work but it will make your rom useful in Japan, France and certainly other countries where there's a restriction on which handsets we can use!!!!
    Thanks in advance

    Here's an example of what needs to be done in the case of Softbank:

    Code:
    --- packages/apps/Mms/src/com/android/mms/transaction/HttpUtils.java  2009-06-12 23:56:28.000000000 +0900
    +++ packages/apps/Mms/src/com/android/mms/transaction/HttpUtils.java  2009-06-12 23:47:20.000000000 +0900
    @@ -220,7 +220,7 @@
    
         private static AndroidHttpClient createHttpClient() {
             AndroidHttpClient client
    [B]-                = AndroidHttpClient.newInstance("Android-Mms/0.1");
    +                = AndroidHttpClient.newInstance("SoftBank/1.0/705NK/NKJ002/SN001 Android-Mms/0.1 Profile/MIDP-2.0 Configuration/CLDC-1.1");[/B]
             HttpParams params = client.getParams();
             HttpProtocolParams.setContentCharset(params, "UTF-8");
             return client;
     
  7. misj

    misjMembers

    Feb 1, 2011
    2
    0
    11
    Hail

    I did it! After two days of trial and error, I managed to edit my UserAgent (and UAProf something something) in the mms_config.xml file.

    Please refer to this site if you want to find out your useragent: http://www.uaprof.com/

    It was really hard to alter the xml-file without touching base with the Hex Editor, since it's a binary file (thanks to the lack of any source code, hint hint), and the registers and pointers will not be correct anymore once you change the UserAgent.
    Decompiling it with APKTool looked promising, but once you got it recompiled, signed, signed and installed, strange errors come up.

    However, you can edit it using APK Manager Just follow the instructions on the screen, really self-explanatory. Use it to: (Decompile - Compile - Sign) the APK. After decompiling, just change the correct value in the xml-file.
    During compilation, it will ask for the certain questions which you have to answer with YES, just follow the instructions afterwards.

    Good luck!


    So you like Custom UserAgents? Well, I like beer! (donations welcome)
     
  8. mnlk2

    mnlk2Members

    Nov 7, 2010
    179
    0
    26
    issue solved since 1.1.26 on french pack for N1 / desire :p
     
  9. lutin

    lutinMembers

    Dec 30, 2010
    176
    8
    28
    misj,

    Any chance you could attach your mms_config file? I'm having trouble using the apk manager to add the user agent.

    If we have this config file, we can just add it to our mms.apk file when there is a new release/

    I'm on o2 uk by the way. Not that this makes any difference.
     
  10. kurisuw

    kurisuwMIUI Android Staff

    May 4, 2011
    5
    0
    11

Share Our Site