FORUMS

[GUIDE] Enable China Telecom LTE by modifying modem partitions

51 posts
Thanks Meter: 13
 
By TEEEEEEEEED, Member on 26th April 2018, 05:54 AM
Post Reply Email Thread
15th January 2019, 11:56 AM |#11  
Junior Member
Thanks Meter: 20
 
More
Quote:
Originally Posted by Xdevillived666

And would this be the right one or would I have to do it inside the modem image for ver_info.txt?

On Pixel 1, the modem.img is mounted read-only on /firmware/radio
On Pixel 3, the modem.img is mounted read-only on /vendor/firmware_mnt, and /firmware is a symlink which links to /vendor/firmware_mnt

If you want to change the ver_info.txt, you can remount /vendor/firmware_mnt for read-write if you have root permission.
you also can change it in modem.img and flash it.

since the location was changed, I don't know when and who will copy config files from "Vendor/rfs/msm/mpss/read only/vendor/mbn/mcfg_sw",
so I'm not sure if this method still works. but you can try it. good luck.

---------- Post added at 06:56 PM ---------- Previous post was at 06:47 PM ----------

Quote:
Originally Posted by Xdevillived666

And would this be the right one or would I have to do it inside the modem image for ver_info.txt?

for Pixel 3, the old ver_info.txt is located at:
/data/vendor/radio/ver_info.txt

you may check its content first.


This is part of the content of init.radio.sh for Pixel 3:
Code:
#
# Make modem config folder and copy firmware config to that folder for RIL
#
if [ -f /data/vendor/radio/ver_info.txt ]; then
    prev_version_info=`cat /data/vendor/radio/ver_info.txt`
else
    prev_version_info=""
fi

cur_version_info=`cat /firmware/verinfo/ver_info.txt`
if [ ! -f /firmware/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
    rm -rf /data/vendor/radio/modem_config
    mkdir /data/vendor/radio/modem_config
    chmod 770 /data/vendor/radio/modem_config
    cp -r /firmware/image/modem_pr/mcfg/configs/* /data/vendor/radio/modem_config
    chown -hR radio.radio /data/vendor/radio/modem_config
    cp /firmware/verinfo/ver_info.txt /data/vendor/radio/ver_info.txt
    chown radio.radio /data/vendor/radio/ver_info.txt
fi
cp /firmware/image/modem_pr/mbn_ota.txt /data/vendor/radio/modem_config
chown radio.radio /data/vendor/radio/modem_config/mbn_ota.txt
echo 1 > /data/vendor/radio/copy_complete
The Following User Says Thank You to sbjbs For This Useful Post: [ View ] Gift sbjbs Ad-Free
15th January 2019, 04:43 PM |#12  
Quote:
Originally Posted by sbjbs

On Pixel 1, the modem.img is mounted read-only on /firmware/radio
On Pixel 3, the modem.img is mounted read-only on /vendor/firmware_mnt, and /firmware is a symlink which links to /vendor/firmware_mnt

If you want to change the ver_info.txt, you can remount /vendor/firmware_mnt for read-write if you have root permission.
you also can change it in modem.img and flash it.

since the location was changed, I don't know when and who will copy config files from "Vendor/rfs/msm/mpss/read only/vendor/mbn/mcfg_sw",
so I'm not sure if this method still works. but you can try it. good luck.

---------- Post added at 06:56 PM ---------- Previous post was at 06:47 PM ----------



for Pixel 3, the old ver_info.txt is located at:
/data/vendor/radio/ver_info.txt

you may check its content first.


This is part of the content of init.radio.sh for Pixel 3:

Yeah, I'd have to do it at modem level. Can't seem to get it working with a file explorer though I see it , it doesn't say anything. That would require Linux, right ?



I've also tried using a custom built magisk(for pixel2) with a model that allows access to diagnostic mode and opens ports. Using qpst and built in pdc tool, you can flash individual mbn files to enable volte and vowifi. I have native volte support through Bouygues, but vowifi is only allowed on certain phones through my carrier. I get the port open, but pdc keeps giving me a qmi error saying the USB driver isn't correct . Pissing me off.


I also tried the old trick of just using a root explorer , replacing mbn at file level , inserting a different sim card, inserting back own sim card, and rebooting . This did activate volte and wifi sms on first gen pixel but doesn't work after that .


Not sure I can do anything to activate vowifi though I am provisioned for it via sim card/my carrier .
16th January 2019, 03:30 AM |#13  
Junior Member
Thanks Meter: 20
 
More
Quote:
Originally Posted by Xdevillived666

Yeah, I'd have to do it at modem level. Can't seem to get it working with a file explorer though I see it , it doesn't say anything. That would require Linux, right ?



I've also tried using a custom built magisk(for pixel2) with a model that allows access to diagnostic mode and opens ports. Using qpst and built in pdc tool, you can flash individual mbn files to enable volte and vowifi. I have native volte support through Bouygues, but vowifi is only allowed on certain phones through my carrier. I get the port open, but pdc keeps giving me a qmi error saying the USB driver isn't correct . Pissing me off.


I also tried the old trick of just using a root explorer , replacing mbn at file level , inserting a different sim card, inserting back own sim card, and rebooting . This did activate volte and wifi sms on first gen pixel but doesn't work after that .


Not sure I can do anything to activate vowifi though I am provisioned for it via sim card/my carrier .

I'm sorry I have no experience with what you are doing.

If you want to change the modem.img, you'd better in Linux.
Your phone is a Linux too, if you have root access, you can push the modem.img to a temp directory on you device, and change it.
the mount command is a bit different:
Code:
losetup /dev/block/loop0 modem.img
mkdir modem
mount /dev/block/loop0 modem
From the init.radio.sh, the modem.img/image/modem_pr/mbn_ota.txt seems to be important, there is no such file for Pixel1.

Have you tried changing the mbn_sw.txt in vendor/rfs/msm/mpss/readonly/vendor/mbn/mcfg_sw, and adding your configs to the list?
16th January 2019, 01:59 PM |#14  
Quote:
Originally Posted by sbjbs

I'm sorry I have no experience with what you are doing.

If you want to change the modem.img, you'd better in Linux.
Your phone is a Linux too, if you have root access, you can push the modem.img to a temp directory on you device, and change it.
the mount command is a bit different:


From the init.radio.sh, the modem.img/image/modem_pr/mbn_ota.txt seems to be important, there is no such file for Pixel1.

Have you tried changing the mbn_sw.txt in vendor/rfs/msm/mpss/readonly/vendor/mbn/mcfg_sw, and adding your configs to the list?

Thanks for the reply. I figured I needed Linux for this.



As for the second part, I have some Sony mbn files from xz3. My carrier supports voWifi on this phone, so I nabbed the firmware specific to my phone, extracted the mbns , placed them into the area where mine are, added the necessary text to mcfg_sw.txt but it doesn't activate voWifi as far as I can tell. I've attached said Sony files if ya wanna check them out

https://drive.google.com/file/d/1Rbh...w?usp=drivesdk


I'll take a look at the mbn_ota.txt . What, if anything , could be done with it?



Edit: I losetup and i cant find that file ???




Side note: for some reason, I can't erase modem st1/2 in pixel 3. It's gives me a "remote error " in fastboot.
16th January 2019, 05:03 PM |#15  
Junior Member
Thanks Meter: 20
 
More
Quote:
Originally Posted by Xdevillived666

Thanks for the reply. I figured I needed Linux for this.



As for the second part, I have some Sony mbn files from xz3. My carrier supports voWifi on this phone, so I nabbed the firmware specific to my phone, extracted the mbns , placed them into the area where mine are, added the necessary text to mcfg_sw.txt but it doesn't activate voWifi as far as I can tell. I've attached said Sony files if ya wanna check them out

https://drive.google.com/file/d/1Rbh...w?usp=drivesdk


I'll take a look at the mbn_ota.txt . What, if anything , could be done with it?




Side note: for some reason, I can't erase modem st1/2 in pixel 3. It's gives me a "remote error " in fastboot.

For adding ChinaTelecom lte and volte on Pixel 3, people just change the mbn_sw.txt and it works.
I'm not sure what the mbn_ota.txt is used for, I'm guessing it has a similar effect as mbn_sw.txt, but it is useless for your current situation.

Thanks for your trust, but I don't think I can help.
The Following User Says Thank You to sbjbs For This Useful Post: [ View ] Gift sbjbs Ad-Free
16th January 2019, 06:55 PM |#16  
Quote:
Originally Posted by sbjbs

For adding ChinaTelecom lte and volte on Pixel 3, people just change the mbn_sw.txt and it works.
I'm not sure what the mbn_ota.txt is used for, I'm guessing it has a similar effect as mbn_sw.txt, but it is useless for your current situation.

Thanks for your trust, but I don't think I can help.


Thank you for responding as often as you did and trying to help
A few last questions:

Carrierconfig.apk res xml cant be modified, can it?


I saw that it contains bools for vowifi being enabled or not


How do they change the txt, exactly?They just put the location of said mbn that they placed in the txt file?

My carrier config is already in the default mcfg_sw.txt and only allows volte. Maybe I could add the text from the mcfg_sw.txt and mbn files from the xz3 that supports vowifi and volte and delete all others under there? Or does that mbn_ota.txt override that?
I really just wnna force vowifi , lol. voLTE is okay but I miss sms over wifi like I got with my first gen pixel.



In anycse, thanks again for the help! I sincerely appreciate it



Would this thread help me out any? Modifying carrier policy is something I've been looking into ,but doing so at app lever is damned near impossible

http://bbs.gfan.com/android-9204634-1-1.html
17th January 2019, 03:46 AM |#17  
Junior Member
Thanks Meter: 20
 
More
Quote:
Originally Posted by Xdevillived666

Thank you for responding as often as you did and trying to help
A few last questions:

Carrierconfig.apk res xml cant be modified, can it?


I saw that it contains bools for vowifi being enabled or not


How do they change the txt, exactly?They just put the location of said mbn that they placed in the txt file?

My carrier config is already in the default mcfg_sw.txt and only allows volte. Maybe I could add the text from the mcfg_sw.txt and mbn files from the xz3 that supports vowifi and volte and delete all others under there? Or does that mbn_ota.txt override that?
I really just wnna force vowifi , lol. voLTE is okay but I miss sms over wifi like I got with my first gen pixel.



In anycse, thanks again for the help! I sincerely appreciate it



Would this thread help me out any? Modifying carrier policy is something I've been looking into ,but doing so at app lever is damned near impossible

http://bbs.gfan.com/android-9204634-1-1.html

Yes, you can decompile a apk and change the xml and recompile it by tools like apktool.

For ChinaTelecom lte on Pixel 3, you can refer to this post: http://bbs.gfan.com/android-9535442-1-1.html
they append a line to mbn_sw.txt:
Code:
mcfg_sw/generic/China/CT/Commercial/OpenMkt/mcfg_sw.mbn
if want to enable volte, append another line:
Code:
mcfg_sw/generic/China/CT/Commercial/VoLTE_OpenMkt/mcfg_sw.mbn
and add some properties in build.prop:
Code:
ro.mtk_ims_support=1 
ro.mtk_volte_support=1 
persist.mtk.volte.enable=1 
persist.dbg.volte_avail_ovr=1
persist.dbg.ims_volte_enable=1 
persist.dbg.volte_avail_ovr=1 
persist.dbg.vt_avail_ovr=1 
persist.dbg.wfc_avail_ovr=1 
persist.radio.rat_on=combine 
persist.radio.data_ltd_sys_ind=1 
persist.radio.data_con_rprt=1 
persist.radio.calls.on.ims=1

Before the OP‘s method of changing modem.img, people used to change carrier_policy.xml if they want to use ChinaTelecom on Pixel 1.
you can refer to this: http://www.usbmi.com/2281.html
But I only got the Pixel recently, I have never tried that.
IMPORTANT: please don't forget to backup your EFS and related partitions before doing that.
The Following User Says Thank You to sbjbs For This Useful Post: [ View ] Gift sbjbs Ad-Free
18th January 2019, 10:53 PM |#18  
Quote:
Originally Posted by sbjbs

Yes, you can decompile a apk and change the xml and recompile it by tools like apktool.

For ChinaTelecom lte on Pixel 3, you can refer to this post: http://bbs.gfan.com/android-9535442-1-1.html
they append a line to mbn_sw.txt:

Code:
mcfg_sw/generic/China/CT/Commercial/OpenMkt/mcfg_sw.mbn
if want to enable volte, append another line:
Code:
mcfg_sw/generic/China/CT/Commercial/VoLTE_OpenMkt/mcfg_sw.mbn
and add some properties in build.prop:
Code:
ro.mtk_ims_support=1 
ro.mtk_volte_support=1 
persist.mtk.volte.enable=1 
persist.dbg.volte_avail_ovr=1
persist.dbg.ims_volte_enable=1 
persist.dbg.volte_avail_ovr=1 
persist.dbg.vt_avail_ovr=1 
persist.dbg.wfc_avail_ovr=1 
persist.radio.rat_on=combine 
persist.radio.data_ltd_sys_ind=1 
persist.radio.data_con_rprt=1 
persist.radio.calls.on.ims=1

Before the OP‘s method of changing modem.img, people used to change carrier_policy.xml if they want to use ChinaTelecom on Pixel 1.
you can refer to this: http://www.usbmi.com/2281.html
But I only got the Pixel recently, I have never tried that.
IMPORTANT: please don't forget to backup your EFS and related partitions before doing that.

Thanks. I had a look at the threads and it is a great resource, so thanks.


You can also try this in the future:
https://forum.xda-developers.com/pix...-2-xl-t3884967

I get all ports on p3 open but cant get pdc tool to connect.



When I had my pixel 1, I used this to get wifi messaging and volte working perfectly:

"You need to do the following Steps: -Check with your Carrier if your subscription is persistently provisioned for VoLTE and not based on the used device -Root your device with magisk and install the VoLTE enabler module (this is for android sw level VoLTE activation) https://forum.xda-developers.com/app...t3649613/page1 -Download ES File Explorer with root rights and head to /data/misc/radio/modem_config/mcfg_sw/generic/common/wildcard/wildcard and backup mcfg_sw.mbn to any location for example google drive -Copy mcfg_sw.mbn from /data/misc/radio/modem_config/mcfg_sw/generic/common/eu/dt/commerci/volte to /data/misc/radio/modem_config/mcfg_sw/generic/common/wildcard/wildcard and overwrite the existing mcfg_sw.mbn and set file permission to r-- --- --- (this is really important, if the file rights are not correct, it can cause boot loops. -Enter a SIM card into the device witch has a carrier specific mcfg_sw.mbn file, I did it with a TMUS SIM card. If you don't have one, order one through the internet for example at https://www.reisesim.de/de/prepaid-s...sa-sim-karten/ -Insert your personal SIM back into the device and do a reboot

This is not a 100% guarantee that it will work, for my carrier it worked. If it is not working, you can also try with the TMUS, Telstra or EE mcfg_sw.mbn.

It's very likely that WiFi Calling will not work, because there's a additional config file which includes the epdg adress which can only modified through EFS explorer from Qualcomm. If WiFi Calling is not working, disable the function!!
"



Thanks again for your help. Hopefully more carriers support pixel natively in the future, otherwise I dont see myself getting another one with such a lack of support and features:-/
2nd May 2019, 03:31 PM |#19  
bonedriven's Avatar
Senior Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by sbjbs

Thanks for your post, this is the best way I can find to enable China Telecom LTE on Pixel.

Based on your post, I did some further checks, and found a way to do this without erasing data partition, and even no need to root.
Successfully tested on my Pixel running Android P.

Same as your method, we will change modem.img and copy mcfg_sw.mbn from 1+3T's image.
From the aosp source code, we can see that the init.radio.sh will copy configs from modem.img if the versions in ver_info.txt is changed.
So we can just simply change the version to another value, and it will copy the new configs.

The following are the detailed steps, we need a Linux environment to mount modem.img:
1. extract modem.img from Pixel factory image.

2. extract NO-HLOS.bin from 1+ 3T factory image (download from oneplus).

3. In order to add new files into modem.img, first need to expand its size:

Code:
dd if=/dev/zero of=modem.img bs=4096 count=100 conv=notrunc oflag=append
This command appends about 400KB to the end of the modem.img.
The total size of CT configs in 1+ 3T is about 230KB, but you can change to a larger count if you need to add more files.

4. mount modem.img:
Code:
mkdir modem
sudo mount -o loop modem.img modem
5. mount NO-HLOS.bin:
Code:
mkdir oneplus
sudo mount -o loop NO-HLOS.bin oneplus
6. create a "china" folder, since we only copy the CT configs, and skip CMCC and CU configs.
Code:
sudo mkdir modem/modem_pr/mcfg/configs/mcfg_sw/generic/china/
7. copy CT configs from oneplus:
Code:
sudo cp -r oneplus/image/modem_pr/mcfg/configs/mcfg_sw/generic/china/ct modem/modem_pr/mcfg/configs/mcfg_sw/generic/china/
8. change the ver_info.txt:
Code:
sudo vim modem/modem_pr/verinfo/ver_info.txt
It is enough to only change the last digit.

9. umount the images:
Code:
sync
umount modem
umount oneplus
10. flash the modem.img:
Code:
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
fastboot reboot
After reboot, Pixel will be able to use China Telecom LTE.

Hello, can you tell me under which directory I should execute "mkdir modem", "mkdir oneplus" "sudo mkdir modem/modem_pr/mcfg/configs/mcfg_sw/generic/china/"?
I'm doing it under / directory and getting "read-only file system" error.
The Following User Says Thank You to bonedriven For This Useful Post: [ View ] Gift bonedriven Ad-Free
5th September 2019, 03:54 AM |#20  
Junior Member
Thanks Meter: 20
 
More
Quote:
Originally Posted by bonedriven

Hello, can you tell me under which directory I should execute "mkdir modem", "mkdir oneplus" "sudo mkdir modem/modem_pr/mcfg/configs/mcfg_sw/generic/china/"?
I'm doing it under / directory and getting "read-only file system" error.

I'm sorry to reply so late. On your host machine, you can cd to a 'writable' directory (your HOME directory, for example) to mkdir the mountpoint.

I just verified that this still works on Pixel1 Android 10.
5th December 2019, 06:03 PM |#21  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by sbjbs

Thanks for your post, this is the best way I can find to enable China Telecom LTE on Pixel.

Based on your post, I did some further checks, and found a way to do this without erasing data partition, and even no need to root.
Successfully tested on my Pixel running Android P.

Same as your method, we will change modem.img and copy mcfg_sw.mbn from 1+3T's image.
From the aosp source code, we can see that the init.radio.sh will copy configs from modem.img if the versions in ver_info.txt is changed.
So we can just simply change the version to another value, and it will copy the new configs.

The following are the detailed steps, we need a Linux environment to mount modem.img:
1. extract modem.img from Pixel factory image.

2. extract NO-HLOS.bin from 1+ 3T factory image (download from oneplus).

3. In order to add new files into modem.img, first need to expand its size:

Code:
dd if=/dev/zero of=modem.img bs=4096 count=100 conv=notrunc oflag=append
This command appends about 400KB to the end of the modem.img.
The total size of CT configs in 1+ 3T is about 230KB, but you can change to a larger count if you need to add more files.

4. mount modem.img:
Code:
mkdir modem
sudo mount -o loop modem.img modem
5. mount NO-HLOS.bin:
Code:
mkdir oneplus
sudo mount -o loop NO-HLOS.bin oneplus
6. create a "china" folder, since we only copy the CT configs, and skip CMCC and CU configs.
Code:
sudo mkdir modem/modem_pr/mcfg/configs/mcfg_sw/generic/china/
7. copy CT configs from oneplus:
Code:
sudo cp -r oneplus/image/modem_pr/mcfg/configs/mcfg_sw/generic/china/ct modem/modem_pr/mcfg/configs/mcfg_sw/generic/china/
8. change the ver_info.txt:
Code:
sudo vim modem/modem_pr/verinfo/ver_info.txt
It is enough to only change the last digit.

9. umount the images:
Code:
sync
umount modem
umount oneplus
10. flash the modem.img:
Code:
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
fastboot reboot
After reboot, Pixel will be able to use China Telecom LTE.

Hi, I found out that Google removed modem.img in android 10 factory images. How can we change it?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes