mms.apk for hero on Softbank
Hi mils,
I had the same problem and finally solved it last week.
I am using a HTC Hero with Modaco 3.0 on a
Softbank prepaid card.
STEP 1 :
You need to make sure your APN settings are correct:
Name:
Softbank
APN: mailwebservice.softbank.ne.jp
Proxy: <Not set>
Port: <Not set>
Username:
softbank
Password: *******
Server: <Not set>
MMSC:
http://mms
MMS proxy: sbmmsproxy.softbank.ne.jp
MMS Port: 8080
MMS protocol: WAP 2.0
MCC: 440
APN type: mms
STEP 2:
Then extract the mms.apk from Modaco's latest build.
At this point you will need
baksmali to disassemble the class.dex file in mms.apk package.
When baksmali is done, find the file HttpUtils.smali (located in \com\android\mms\transport).
You will need to modify the following code:
Code:
.method private static createHttpClient(Landroid/content/Context;)Landroid/net/http/AndroidHttpClient;
.registers 5
.parameter "context"
.prologue
.line 285
invoke-static {p0}, Lcom/android/mms/transport/HttpUtils;->getOemUAString(Landroid/content/Context;)Ljava/lang/String;
move-result-object v2
.line 286
.local v2, uaString:Ljava/lang/String;
if-nez v2, cond_8:
.line 287
const-string v2, "The default UA"
.line 289
cond_8:
invoke-static {v2}, Landroid/net/http/AndroidHttpClient;->newInstance(Ljava/lang/String;)Landroid/net/http/AndroidHttpClient;
To:
Code:
.method private static createHttpClient(Landroid/content/Context;)Landroid/net/http/AndroidHttpClient;
.registers 5
.parameter "context"
.prologue
.line 285
invoke-static {p0}, Lcom/android/mms/transport/HttpUtils;->getOemUAString(Landroid/content/Context;)Ljava/lang/String;
move-result-object v2
.line 286
.local v2, uaString:Ljava/lang/String;
if-nez v2, cond_8:
.line 287
cond_8:
const-string v2, "Vodafone/1.0/V802SE/SEJ002 Browser/VF-Netfront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1"
.line 289
invoke-static {v2}, Landroid/net/http/AndroidHttpClient;->newInstance(Ljava/lang/String;)Landroid/net/http/AndroidHttpClient;
I think you can find a user-agent that match your contract cell-phone and it will work fine. Notice that I moved the cond_8 label.
The reason is because the phone finds a default UA in getOemUAString and jumps over the static string. I'm not very confortable with dalvik bytecode so I prefered to keep the call and just move the label, so it will always use your custom ua whatever getOemUAString returns.
Just use smali to recompile and apkbuilder to repack everything. Pushing the mms.apk is enough to replace the previous version.
I will try to post my own mms.apk later so you don't have to bother doing STEP2.
Hope it helps!