Jump to content

O2 MMS problems


Guest Shuflie

Recommended Posts

Bingo:

# grep -ri mobile ./

  ...

  ./system/etc/apns-conf.xml:  <apn carrier="T-Mobile UK" mcc="234" mnc="30" apn="general.t-mobile.uk" user="t-mobile" password="tm" server="*" mmsproxy="149.254.201.135" mmsport="8080" mmsc="http://mmsc.t-mobile.co.uk:8002"/>

  ...

There are a shedload of APNs in that file, that's where it's coming from. Unsure as to how the default is selected, any clues?

What happens if you delete all of the <apn carrier=xxx> values, and replace them with a string matching the o2 MMS settings in the same format as shown above ?

Edited by jlgmax
Link to comment
Share on other sites

Guest zuccster
zuccster you're a star! I was thinking of snooping the MMS packet but I didn't know where to start. Did you use ADB or run it directly on phone?

I think the ROM has a collection of APN's because I didn't have to enter my O2 APN settings when I installed the new ROM

I ran it directly on the phone.

Yeah, I had the same experience with the APNs

Link to comment
Share on other sites

Guest zuccster
Right, might be talking out of my hat here, but is there a file called: 

data/data/com.android.providers.telephony/databases/telephony.db

on the phone?

Taken from here: 

http://forum.androidcentral.com/29942-post51.html

Useful?

http://209.85.229.132/search?q=cache:hIq00...mp;client=opera

Yeah, but it's a SQLLite database file, so I can't hack it by hand.

I need to get adb set up and learn a bit more about how Android works, then I'll have a go at sorting this. Might take a few days depending on Real Life.

Link to comment
Share on other sites

Guest le_lutin
I ran it directly on the phone.

Yeah, I had the same experience with the APNs

So, can we grab the system/etc/apns-conf.xml and modify it? 

Does the existing file have settings for all networks, and if so, are the ones for 02 missing in it (and thus it falls back on T-Mobile).

Great work so far zuccster, we can't be far away from getting this working.

Link to comment
Share on other sites

Guest le_lutin
Yeah, but it's a SQLLite database file, so I can't hack it by hand.

I need to get adb set up and learn a bit more about how Android works, then I'll have a go at sorting this. Might take a few days depending on Real Life.

What are you using as your file explorer on the phone and are you able to get those files off the phone? 

Link to comment
Share on other sites

Guest Shuflie
Bingo:

# grep -ri mobile ./

...

./system/etc/apns-conf.xml:  <apn carrier="T-Mobile UK" mcc="234" mnc="30" apn="general.t-mobile.uk" user="t-mobile" password="tm" server="*" mmsproxy="149.254.201.135" mmsport="8080" mmsc="http://mmsc.t-mobile.co.uk:8002"/>

...

There are a shedload of APNs in that file, that's where it's coming from. Unsure as to how the default is selected, any clues?

Surely that is just a general apn look up file which selects the apn to use when boot-up sequence scans your SIM to see which carrier you are with? If you start up the phone with a T-Mobile SIM and look in your APN list everything is set for T-Mobile, the same happens if you start up with an O2 SIM or any other carrier SIM which has their MCC and MNC values listed in that file, the apn get set automatically. The problem is going to be buried somewhere deeper than that I think.

Link to comment
Share on other sites

Guest le_lutin
Surely that is just a general apn look up file which selects the apn to use when boot-up sequence scans your SIM to see which carrier you are with? If you start up the phone with a T-Mobile SIM and look in your APN list everything is set for T-Mobile, the same happens if you start up with an O2 SIM or any other carrier SIM which has their MCC and MNC values listed in that file, the apn get set automatically. The problem is going to be buried somewhere deeper than that I think.

But perhaps the mms settings for o2 aren't correctly listed in that file? Or not listed at all and that is why our mms is failing?

Here's an example of what is in the apns-conf.xml

http://forum.xda-developers.com/showthread.php?t=481145

Link to comment
Share on other sites

Guest zuccster

Right, I've tried changed the default carrier in /data/data/com.android.providers.telephony/databases/telephony.db from what it was:

95|T-Mobile UK|23430|234|30|general.t-mobile.uk|t-mobile|*|tm|||149.254.201.135|8080|http://mmsc.t-mobile.co.uk:8002||1
to the O2 uk postpay:
48|o2 UK Postpay|23410|234|10|wap.o2.co.uk|O2wap||||8080|193.113.200.195||http://mmsc.mms.o2.co.uk||
This changed the APN being used according to tcpdump, but no HTTP traffic. So, I tried changed the carrier entry to the O2 APN I'd set up manually:
131|o2 Pay Monthly MMS|23410|234|10|wap.o2.co.uk|o2wap||password|193.113.200.195|8080|193.113.200.1

5|8080|http://mmsc.mms.o2.co.uk:8002|mms|
Now I'm seeing http traffic to what I hope is the right place, but I'm getting a 403 forbidden.
16:42:51.122343 IP 10.116.84.1.58168 > 193.113.200.195.8080: Flags [P.], ack 1, win 2920, options [nop,nop,TS val 120271 ecr 687225552], length 371

		0x0000:  4500 01a7 896c 4000 4006 c73a 0a74 5401  E....l@.@..:.tT.

		0x0010:  c171 c8c3 e338 1f90 8ad1 5c20 b928 a2da  .q...8....\..(..

		0x0020:  8018 0b68 9587 0000 0101 080a 0001 d5cf  ...h............

		0x0030:  28f6 3ad0 504f 5354 2068 7474 703a 2f2f  (.:.POST.http://

		0x0040:  6d6d 7363 2e6d 6d73 2e6f 322e 636f 2e75  mmsc.mms.o2.co.u

		0x0050:  6b3a 3830 3032 2048 5454 502f 312e 310d  k:8002.HTTP/1.1.

		0x0060:  0a41 6363 6570 743a 202a 2f2a 2c20 6170  .Accept:.*/*,.ap

		0x0070:  706c 6963 6174 696f 6e2f 766e 642e 7761  plication/vnd.wa

		0x0080:  702e 6d6d 732d 6d65 7373 6167 652c 2061  p.mms-message,.a

		0x0090:  7070 6c69 6361 7469 6f6e 2f76 6e64 2e77  pplication/vnd.w

		0x00a0:  6170 2e73 6963 0d0a 782d 7761 702d 7072  ap.sic..x-wap-pr

		0x00b0:  6f66 696c 653a 2068 7474 703a 2f2f 7761  ofile:.http://wa

		0x00c0:  7031 2e68 7561 7765 692e 636f 6d2f 7561  p1.huawei.com/ua

		0x00d0:  7072 6f66 2f48 7561 7765 6955 3832 3330  prof/HuaweiU8230

		0x00e0:  7631 3030 4750 5253 2e78 6d6c 0d0a 4163  v100GPRS.xml..Ac

		0x00f0:  6365 7074 2d4c 616e 6775 6167 653a 2065  cept-Language:.e

		0x0100:  6e2d 4652 2c20 656e 2d55 530d 0a43 6f6e  n-FR,.en-US..Con

		0x0110:  7465 6e74 2d4c 656e 6774 683a 2034 3536  tent-Length:.456

		0x0120:  350d 0a43 6f6e 7465 6e74 2d54 7970 653a  5..Content-Type:

		0x0130:  2061 7070 6c69 6361 7469 6f6e 2f76 6e64  .application/vnd

		0x0140:  2e77 6170 2e6d 6d73 2d6d 6573 7361 6765  .wap.mms-message

		0x0150:  0d0a 486f 7374 3a20 6d6d 7363 2e6d 6d73  ..Host:.mmsc.mms

		0x0160:  2e6f 322e 636f 2e75 6b3a 3830 3032 0d0a  .o2.co.uk:8002..

		0x0170:  436f 6e6e 6563 7469 6f6e 3a20 4b65 6570  Connection:.Keep

		0x0180:  2d41 6c69 7665 0d0a 5573 6572 2d41 6765  -Alive..User-Age

		0x0190:  6e74 3a20 416e 6472 6f69 642d 4d6d 732f  nt:.Android-Mms/

		0x01a0:  302e 310d 0a0d 0a						0.1....


<Snip big chunks of JPEG>


16:42:54.572410 IP 193.113.200.195.8080 > 10.116.84.1.58168: Flags [P.], ack 4937, win 49876, options [nop,nop,TS val 687225921 ecr 120428], length 796

		0x0000:  4500 0350 4c27 4000 3606 0cd7 c171 c8c3  E..PL'@.6....q..

		0x0010:  0a74 5401 1f90 e338 b928 a2da 8ad1 6f68  .tT....8.(....oh

		0x0020:  8018 c2d4 82ab 0000 0101 080a 28f6 3c41  ............(.<A

		0x0030:  0001 d66c 4854 5450 2f31 2e31 2032 3030  ...lHTTP/1.1.200

		0x0040:  204f 4b0d 0a43 6163 6865 2d43 6f6e 7472  .OK..Cache-Contr

		0x0050:  6f6c 3a20 6e6f 2d63 6163 6865 0d0a 436f  ol:.no-cache..Co

		0x0060:  6e74 656e 742d 4c65 6e67 7468 3a20 3635  ntent-Length:.65

		0x0070:  380d 0a43 6f6e 7465 6e74 2d54 7970 653a  8..Content-Type:

		0x0080:  2061 7070 6c69 6361 7469 6f6e 2f76 6e64  .application/vnd

		0x0090:  2e77 6170 2e78 6874 6d6c 2b78 6d6c 0d0a  .wap.xhtml+xml..

		0x00a0:  782d 7761 702d 7072 6f66 696c 652d 7761  x-wap-profile-wa

		0x00b0:  726e 696e 673a 2032 3030 0d0a 0d0a 3c3f  rning:.200....<?

		0x00c0:  786d 6c20 7665 7273 696f 6e3d 2231 2e30  xml.version="1.0

		0x00d0:  223f 3e0a 3c21 444f 4354 5950 4520 6874  "?>.<!DOCTYPE.ht

		0x00e0:  6d6c 2050 5542 4c49 4320 222d 2f2f 5741  ml.PUBLIC."-//WA

		0x00f0:  5046 4f52 554d 2f2f 4454 4420 5848 544d  PFORUM//DTD.XHTM

		0x0100:  4c20 4d6f 6269 6c65 2031 2e30 2f2f 454e  L.Mobile.1.0//EN

		0x0110:  2220 0a20 2022 6874 7470 3a2f 2f77 7777  "...."http://www

		0x0120:  2e77 6170 666f 7275 6d2e 6f72 672f 4454  .wapforum.org/DT

		0x0130:  442f 7868 746d 6c2d 6d6f 6269 6c65 3130  D/xhtml-mobile10

		0x0140:  2e64 7464 2220 3e0a 0a3c 6874 6d6c 2078  .dtd".>..<html.x

		0x0150:  6d6c 6e73 3d22 6874 7470 3a2f 2f77 7777  mlns="http://www

		0x0160:  2e77 332e 6f72 672f 3139 3939 2f78 6874  .w3.org/1999/xht

		0x0170:  6d6c 223e 0a20 2020 203c 6865 6164 3e0a  ml">.....<head>.

		0x0180:  2020 2020 2020 2020 3c74 6974 6c65 3e2a  ........<title>*

		0x0190:  2045 7272 6f72 202a 3c2f 7469 746c 653e  .Error.*</title>

		0x01a0:  0a20 2020 2020 2020 203c 212d 2d20 0a20  .........<!--...

		0x01b0:  2020 2020 2020 2020 2020 2043 6861 6e67  ...........Chang

		0x01c0:  6520 6872 6566 3d22 7374 796c 652e 6373  e.href="style.cs

		0x01d0:  7322 2062 656c 6f77 2074 6f20 7468 6520  s".below.to.the.

		0x01e0:  6669 6c65 206e 616d 6520 616e 640a 2020  file.name.and...

		0x01f0:  2020 2020 2020 2020 2020 7265 6c61 7469  ..........relati

		0x0200:  7665 2070 6174 6820 6f72 2055 524c 206f  ve.path.or.URL.o

		0x0210:  6620 796f 7572 2065 7874 6572 6e61 6c20  f.your.external.

		0x0220:  7374 796c 6520 7368 6565 742e 0a20 2020  style.sheet.....

		0x0230:  2020 2020 2020 202d 2d3e 200a 2020 2020  .......-->......

		0x0240:  2020 2020 3c21 2d2d 200a 2020 2020 2020  ....<!--........

		0x0250:  2020 3c6c 696e 6b20 7265 6c3d 2273 7479  ..<link.rel="sty

		0x0260:  6c65 7368 6565 7422 2068 7265 663d 2273  lesheet".href="s

		0x0270:  7479 6c65 2e63 7373 2220 7479 7065 3d22  tyle.css".type="

		0x0280:  7465 7874 2f63 7373 222f 3e0a 2020 2020  text/css"/>.....

		0x0290:  2020 2020 3c73 7479 6c65 3e20 646f 6375  ....<style>.docu

		0x02a0:  6d65 6e74 2d77 6964 6520 7374 796c 6573  ment-wide.styles

		0x02b0:  2077 6f75 6c64 2067 6f20 6865 7265 203c  .would.go.here.<

		0x02c0:  2f73 7479 6c65 3e0a 2020 2020 2020 2020  /style>.........

		0x02d0:  2d2d 3e0a 2020 2020 3c2f 6865 6164 3e0a  -->.....</head>.

		0x02e0:  2020 2020 3c62 6f64 793e 0a20 2020 2020  ....<body>......

		0x02f0:  2020 203c 6831 3e53 6f72 7279 3c2f 6831  ...<h1>Sorry</h1

		0x0300:  3e0a 0909 3c75 6c3e 0a09 0920 2020 204e  >...<ul>.......N

		0x0310:  6f74 2061 6c6c 6f77 6564 3c62 722f 3e28  ot.allowed<br/>(

		0x0320:  5374 6174 7573 2043 6f64 653a 2034 3033  Status.Code:.403

		0x0330:  290a 0909 3c2f 756c 3e09 2020 2020 0a09  )...</ul>.......

		0x0340:  3c2f 626f 6479 3e0a 3c2f 6874 6d6c 3e0a  </body>.</html>.

I'll keep hacking away as time allows

Edit: Actually the HTTP status is 200 OK, but the page suggests a 403 - odd.

Edited by zuccster
Link to comment
Share on other sites

Guest le_lutin
Right, I've tried changed the default carrier in /data/data/com.android.providers.telephony/databases/telephony.db from what it was:

95|T-Mobile UK|23430|234|30|general.t-mobile.uk|t-mobile|*|tm|||149.254.201.135|8080|http://mmsc.t-mobile.co.uk:8002||1
to the O2 uk postpay:
48|o2 UK Postpay|23410|234|10|wap.o2.co.uk|O2wap||||8080|193.113.200.195||http://mmsc.mms.o2.co.uk||
This changed the APN being used according to tcpdump, but no HTTP traffic. So, I tried changed the carrier entry to the O2 APN I'd set up manually:
131|o2 Pay Monthly MMS|23410|234|10|wap.o2.co.uk|o2wap||password|193.113.200.195|8080|193.113.200.1

5|8080|http://mmsc.mms.o2.co.uk:8002|mms|
Now I'm seeing http traffic to what I hope is the right place, but I'm getting a 403 forbidden.
16:42:51.122343 IP 10.116.84.1.58168 > 193.113.200.195.8080: Flags [P.], ack 1, win 2920, options [nop,nop,TS val 120271 ecr 687225552], length 371

        0x0000:  4500 01a7 896c 4000 4006 c73a 0a74 5401  E....l@.@..:.tT.

        0x0010:  c171 c8c3 e338 1f90 8ad1 5c20 b928 a2da  .q...8....\..(..

        0x0020:  8018 0b68 9587 0000 0101 080a 0001 d5cf  ...h............

        0x0030:  28f6 3ad0 504f 5354 2068 7474 703a 2f2f  (.:.POST.http://

        0x0040:  6d6d 7363 2e6d 6d73 2e6f 322e 636f 2e75  mmsc.mms.o2.co.u

        0x0050:  6b3a 3830 3032 2048 5454 502f 312e 310d  k:8002.HTTP/1.1.

        0x0060:  0a41 6363 6570 743a 202a 2f2a 2c20 6170  .Accept:.*/*,.ap

        0x0070:  706c 6963 6174 696f 6e2f 766e 642e 7761  plication/vnd.wa

        0x0080:  702e 6d6d 732d 6d65 7373 6167 652c 2061  p.mms-message,.a

        0x0090:  7070 6c69 6361 7469 6f6e 2f76 6e64 2e77  pplication/vnd.w

        0x00a0:  6170 2e73 6963 0d0a 782d 7761 702d 7072  ap.sic..x-wap-pr

        0x00b0:  6f66 696c 653a 2068 7474 703a 2f2f 7761  ofile:.http://wa

        0x00c0:  7031 2e68 7561 7765 692e 636f 6d2f 7561  p1.huawei.com/ua

        0x00d0:  7072 6f66 2f48 7561 7765 6955 3832 3330  prof/HuaweiU8230

        0x00e0:  7631 3030 4750 5253 2e78 6d6c 0d0a 4163  v100GPRS.xml..Ac

        0x00f0:  6365 7074 2d4c 616e 6775 6167 653a 2065  cept-Language:.e

        0x0100:  6e2d 4652 2c20 656e 2d55 530d 0a43 6f6e  n-FR,.en-US..Con

        0x0110:  7465 6e74 2d4c 656e 6774 683a 2034 3536  tent-Length:.456

        0x0120:  350d 0a43 6f6e 7465 6e74 2d54 7970 653a  5..Content-Type:

        0x0130:  2061 7070 6c69 6361 7469 6f6e 2f76 6e64  .application/vnd

        0x0140:  2e77 6170 2e6d 6d73 2d6d 6573 7361 6765  .wap.mms-message

        0x0150:  0d0a 486f 7374 3a20 6d6d 7363 2e6d 6d73  ..Host:.mmsc.mms

        0x0160:  2e6f 322e 636f 2e75 6b3a 3830 3032 0d0a  .o2.co.uk:8002..

        0x0170:  436f 6e6e 6563 7469 6f6e 3a20 4b65 6570  Connection:.Keep

        0x0180:  2d41 6c69 7665 0d0a 5573 6572 2d41 6765  -Alive..User-Age

        0x0190:  6e74 3a20 416e 6472 6f69 642d 4d6d 732f  nt:.Android-Mms/

        0x01a0:  302e 310d 0a0d 0a                        0.1....


<Snip big chunks of JPEG>


16:42:54.572410 IP 193.113.200.195.8080 > 10.116.84.1.58168: Flags [P.], ack 4937, win 49876, options [nop,nop,TS val 687225921 ecr 120428], length 796

        0x0000:  4500 0350 4c27 4000 3606 0cd7 c171 c8c3  E..PL'@.6....q..

        0x0010:  0a74 5401 1f90 e338 b928 a2da 8ad1 6f68  .tT....8.(....oh

        0x0020:  8018 c2d4 82ab 0000 0101 080a 28f6 3c41  ............(.<A

        0x0030:  0001 d66c 4854 5450 2f31 2e31 2032 3030  ...lHTTP/1.1.200

        0x0040:  204f 4b0d 0a43 6163 6865 2d43 6f6e 7472  .OK..Cache-Contr

        0x0050:  6f6c 3a20 6e6f 2d63 6163 6865 0d0a 436f  ol:.no-cache..Co

        0x0060:  6e74 656e 742d 4c65 6e67 7468 3a20 3635  ntent-Length:.65

        0x0070:  380d 0a43 6f6e 7465 6e74 2d54 7970 653a  8..Content-Type:

        0x0080:  2061 7070 6c69 6361 7469 6f6e 2f76 6e64  .application/vnd

        0x0090:  2e77 6170 2e78 6874 6d6c 2b78 6d6c 0d0a  .wap.xhtml+xml..

        0x00a0:  782d 7761 702d 7072 6f66 696c 652d 7761  x-wap-profile-wa

        0x00b0:  726e 696e 673a 2032 3030 0d0a 0d0a 3c3f  rning:.200....<?

        0x00c0:  786d 6c20 7665 7273 696f 6e3d 2231 2e30  xml.version="1.0

        0x00d0:  223f 3e0a 3c21 444f 4354 5950 4520 6874  "?>.<!DOCTYPE.ht

        0x00e0:  6d6c 2050 5542 4c49 4320 222d 2f2f 5741  ml.PUBLIC."-//WA

        0x00f0:  5046 4f52 554d 2f2f 4454 4420 5848 544d  PFORUM//DTD.XHTM

        0x0100:  4c20 4d6f 6269 6c65 2031 2e30 2f2f 454e  L.Mobile.1.0//EN

        0x0110:  2220 0a20 2022 6874 7470 3a2f 2f77 7777  "...."http://www

        0x0120:  2e77 6170 666f 7275 6d2e 6f72 672f 4454  .wapforum.org/DT

        0x0130:  442f 7868 746d 6c2d 6d6f 6269 6c65 3130  D/xhtml-mobile10

        0x0140:  2e64 7464 2220 3e0a 0a3c 6874 6d6c 2078  .dtd".>..<html.x

        0x0150:  6d6c 6e73 3d22 6874 7470 3a2f 2f77 7777  mlns="http://www

        0x0160:  2e77 332e 6f72 672f 3139 3939 2f78 6874  .w3.org/1999/xht

        0x0170:  6d6c 223e 0a20 2020 203c 6865 6164 3e0a  ml">.....<head>.

        0x0180:  2020 2020 2020 2020 3c74 6974 6c65 3e2a  ........<title>*

        0x0190:  2045 7272 6f72 202a 3c2f 7469 746c 653e  .Error.*</title>

        0x01a0:  0a20 2020 2020 2020 203c 212d 2d20 0a20  .........<!--...

        0x01b0:  2020 2020 2020 2020 2020 2043 6861 6e67  ...........Chang

        0x01c0:  6520 6872 6566 3d22 7374 796c 652e 6373  e.href="style.cs

        0x01d0:  7322 2062 656c 6f77 2074 6f20 7468 6520  s".below.to.the.

        0x01e0:  6669 6c65 206e 616d 6520 616e 640a 2020  file.name.and...

        0x01f0:  2020 2020 2020 2020 2020 7265 6c61 7469  ..........relati

        0x0200:  7665 2070 6174 6820 6f72 2055 524c 206f  ve.path.or.URL.o

        0x0210:  6620 796f 7572 2065 7874 6572 6e61 6c20  f.your.external.

        0x0220:  7374 796c 6520 7368 6565 742e 0a20 2020  style.sheet.....

        0x0230:  2020 2020 2020 202d 2d3e 200a 2020 2020  .......-->......

        0x0240:  2020 2020 3c21 2d2d 200a 2020 2020 2020  ....<!--........

        0x0250:  2020 3c6c 696e 6b20 7265 6c3d 2273 7479  ..<link.rel="sty

        0x0260:  6c65 7368 6565 7422 2068 7265 663d 2273  lesheet".href="s

        0x0270:  7479 6c65 2e63 7373 2220 7479 7065 3d22  tyle.css".type="

        0x0280:  7465 7874 2f63 7373 222f 3e0a 2020 2020  text/css"/>.....

        0x0290:  2020 2020 3c73 7479 6c65 3e20 646f 6375  ....<style>.docu

        0x02a0:  6d65 6e74 2d77 6964 6520 7374 796c 6573  ment-wide.styles

        0x02b0:  2077 6f75 6c64 2067 6f20 6865 7265 203c  .would.go.here.<

        0x02c0:  2f73 7479 6c65 3e0a 2020 2020 2020 2020  /style>.........

        0x02d0:  2d2d 3e0a 2020 2020 3c2f 6865 6164 3e0a  -->.....</head>.

        0x02e0:  2020 2020 3c62 6f64 793e 0a20 2020 2020  ....<body>......

        0x02f0:  2020 203c 6831 3e53 6f72 7279 3c2f 6831  ...<h1>Sorry</h1

        0x0300:  3e0a 0909 3c75 6c3e 0a09 0920 2020 204e  >...<ul>.......N

        0x0310:  6f74 2061 6c6c 6f77 6564 3c62 722f 3e28  ot.allowed<br/>(

        0x0320:  5374 6174 7573 2043 6f64 653a 2034 3033  Status.Code:.403

        0x0330:  290a 0909 3c2f 756c 3e09 2020 2020 0a09  )...</ul>.......

        0x0340:  3c2f 626f 6479 3e0a 3c2f 6874 6d6c 3e0a  </body>.</html>.

I'll keep hacking away as time allows

Edit: Actually the HTTP status is 200 OK, but the page suggests a 403 - odd.

Are you trying to send an mms or receive one? 

I have a feeling that debugging might be more straightforward if you are trying to recieve an MMS (it's just a download link, so it should be very straightforward).

Link to comment
Share on other sites

Guest zuccster
Are you trying to send an mms or receive one? 

I have a feeling that debugging might be more straightforward if you are trying to recieve an MMS (it's just a download link, so it should be very straightforward).

That's sending. I've not tried receiving yet. I suspect that'll be a whole new can of worms....

Link to comment
Share on other sites

Guest le_lutin
That's sending. I've not tried receiving yet. I suspect that'll be a whole new can of worms....

What are you using to browse to and copy these files off/on to your phone?

Link to comment
Share on other sites

Guest zuccster

Right. Success of sorts. This only works if you have rooted ROM with sshd access.

I've managed to send / receive MMS in the following contrived setup:

- In Settings ... -> APNs, setup a O2 postpay MMS APN as described here. BUT, ignore point 18. Leave the APN type empty. Once complete, go back into APNs and select the dot next to this APN

Now comes the science bit,

- SSH into phone via wifi interface:

ssh -p2222 [email protected]
- Edit the telelphony database, changing the default carrier from the entry for T-Mobile UK, to the new one we just added.
# sqlite3 /data/data/com.android.providers.telephony/databases/telephony.db

SQLite version 3.5.9

Enter ".help" for instructions

sqlite> update carriers set current=1 where _id=131;

sqlite> update carriers set current=null where _id=95;

.quit

Ensure that 3G is enabled (didn't work for me when I had "Use only 2G networks" selected in Settings).

This doesn't survive a reboot.

Link to comment
Share on other sites

Guest le_lutin
Right. Success of sorts. This only works if you have rooted ROM with sshd access.

I've managed to send / receive MMS in the following contrived setup:

- In Settings ... -> APNs, setup a O2 postpay MMS APN as described here. BUT, ignore point 18. Leave the APN type empty. Once complete, go back into APNs and select the dot next to this APN

Now comes the science bit,

- SSH into phone via wifi interface:

ssh -p2222 [email protected]
- Edit the telelphony database, changing the default carrier from the entry for T-Mobile UK, to the new one we just added.
# sqlite3 /data/data/com.android.providers.telephony/databases/telephony.db

SQLite version 3.5.9

Enter ".help" for instructions

sqlite> update carriers set current=1 where _id=131;

sqlite> update carriers set current=null where _id=95;

.quit

Ensure that 3G is enabled (didn't work for me when I had "Use only 2G networks" selected in Settings).

This doesn't survive a reboot.

Chief, it doesn't matter how contrived it is, the fact is that you're the first person who's got it working - hats off to you!

Why do you think it gets overwritten with a reboot? The database table must get rewritten after every reboot, but where from?

Link to comment
Share on other sites

Guest meinnit

# cat /data/data/com.android.providers.telephony/shared_prefs/preferred-apn.xml

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>

<map>

<long name="apn_id" value="48" />

</map>

Link to comment
Share on other sites

Guest zuccster
# cat /data/data/com.android.providers.telephony/shared_prefs/preferred-apn.xml

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>

<map>

<long name="apn_id" value="48" />

</map>

After updating the db, Mine now says value="131", so it looks like this file is populated from the db rather than dictating the default APN.

Link to comment
Share on other sites

Guest meinnit
After updating the db, Mine now says value="131", so it looks like this file is populated from the db rather than dictating the default APN.

Just for info: I am using MCR 1.7 on O2 and I haven't made any changes described in this post yet.

Link to comment
Share on other sites

Guest le_lutin

I'm currently using estrongs file manager which (if you have root access) allows you to copy files from the internal memory to the sd card.

So i've been able to modify the telephony db (on windows, using sqllite browser) and i've been able to change the default APN in the telephony db from the default (t-mobile) to which ever one I choose (in this case, the one using the settings described by zuccster). However, when I copy the modified file back to the internal memory, MMS still doesn't work. I haven't done any tcp log debugging (is there a simple app for this?).

Also, the changes that I make to the telephony.db file do seem to stay after a reboot (though, as stated above, they don't fix the MMS). 

Zuccster, do you think that if you gave me your telephony.db file and I put it on the internal memory (in the correct location of course), that it would work straight away? I would like to see you telephony.db and compare it to mine if that's possible.

Also, zuccster, if you add an apn through the standard android interface, does it immediately appear in the telephony.db file at the bottom?

[EDIT] Just did a quick test. I added a dummy apn to the list of apns (I called it dummyAPN), saved this and then copied over the telephony.db file from /data/data/com.android.providers.telephony/databases/telephony.db to my sd card. When I opened the telephony.db file in sqlite browser the dummy apn was not listed in the database. This suggests to me that android did not successfully write the new apn to the database file. I wonder if this is because I modified the telephony.db file in sqlite browser earlier this morning. It mightn't be in the correct format now (can't see how though).

Edited by le_lutin
Link to comment
Share on other sites

Guest zuccster
I'm currently using estrongs file manager which (if you have root access) allows you to copy files from the internal memory to the sd card.

So i've been able to modify the telephony db (on windows, using sqllite browser) and i've been able to change the default APN in the telephony db from the default (t-mobile) to which ever one I choose (in this case, the one using the settings described by zuccster). However, when I copy the modified file back to the internal memory, MMS still doesn't work. I haven't done any tcp log debugging (is there a simple app for this?).

Also, the changes that I make to the telephony.db file do seem to stay after a reboot (though, as stated above, they don't fix the MMS). 

Zuccster, do you think that if you gave me your telephony.db file and I put it on the internal memory (in the correct location of course), that it would work straight away? I would like to see you telephony.db and compare it to mine if that's possible.

Also, zuccster, if you add an apn through the standard android interface, does it immediately appear in the telephony.db file at the bottom?

[EDIT] Just did a quick test. I added a dummy apn to the list of apns (I called it dummyAPN), saved this and then copied over the telephony.db file from /data/data/com.android.providers.telephony/databases/telephony.db to my sd card. When I opened the telephony.db file in sqlite browser the dummy apn was not listed in the database. This suggests to me that android did not successfully write the new apn to the database file. I wonder if this is because I modified the telephony.db file in sqlite browser earlier this morning. It mightn't be in the correct format now (can't see how though).

My telephony.db is here

To inspect packets (iIf you're running a Modaco ROM with an SSHd), you can use an SSH client such as puTTY to log into the phone, then grab tcpdump-arm

# wget http://www.eecs.umich.edu/%7Etimuralp/tcpdump-arm
Edit: You'll need to make it executable
# chmod +x tcpdump-arm
and run:
# ./tcpdump-arm -i rmnet0 -A -s 1500

Although I've not rebooted my phone, I've just noticed that the telephony.db has been reverted. Unsure what's going on. As I said, although I'm a Linux / Java guy, I'm new to Android so I need to read up a bit more on wtf is happening.

Edited by zuccster
Link to comment
Share on other sites

Guest le_lutin
My telephony.db is here

To inspect packets (iIf you're running a Modaco ROM with an SSHd), you can use an SSH client such as puTTY to log into the phone, then grab tcpdump-arm

# wget http://www.eecs.umich.edu/%7Etimuralp/tcpdump-arm
and run:
# ./tcpdump-arm -i rmnet0 -A -s 1500

Although I've not rebooted my phone, I've just noticed that the telephony.db has been reverted. Unsure what's going on. As I said, although I'm a Linux / Java guy, I'm new to Android so I need to read up a bit more on wtf is happening.

Thanks for that zuccster, 

Do you have the actual telephony.db file? I think what you link to there is a view of the data in the db as opposed to the actual db file. I think you might be able to attach files on this forum.

If you give me the file I should in theory just be able to overwrite the one I have on the internal memory and replace it with yours and it should just work.

Edited by le_lutin
Link to comment
Share on other sites

Guest zuccster
Thanks for that zuccster, 

Do you have the actual telephony.db file? I think what you link to there is a view of the data in the db as opposed to the actual db file. I think you might be able to attach files on this forum.

If you give me the file I should in theory just be able to overwrite the one I have on the internal memory and replace it with yours and it should just work.

Zipped up and attached.

telephony.db.zip

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.