Related
Since there's now an Xposed Framework Module available to do this same thing, that is the much better way to go than modifying your framework-res.apk directly.
Check that out here http://repo.xposed.info/module/de.makuser.nexussms
-Original post follows-
I got tired of seeing several threads about this topic so I figured I would post a "How to", which should work on all ROMs and versions around.
This procedure is actually fairly simple, and if you have basic Android and computer knowledge you can do this.
What Does This Do?
On mobile-enabled tablets like the N7 3G and the N7 LTE, the device itself is capable of sending & receiving MMS and SMS messages. Maybe you've read about how Google Hangouts got the ability to do this not too long ago. However, if you excitedly downloaded and installed the new version, you may be like "What the hell is this?!?" because by default you cannot see any SMS-related options. In Jellybean and KitKat, a device has to be "a phone" before the system thinks the device is able to send SMS and MMS messages. However, its fairly easy to change this particular property on your device so that it self-identifies as a "phone" and you get access to SMS.
Important: You actually have to have SMS service to use SMS service. Even though it boggles my mind, people have actually sometimes been confused by this particular mod, and have asked me if it somehow gives you SMS service. It does not, it only gives you access to the software functionality to send and receive SMS messages.
Even More Bolded Text!: there is one exception to this. If you are using CyanogenMod 10.2 (or 11 if they have ported Voice+ to it, not sure at this time), you can use this mod in conjunction with Google Voice and the Voice Plus app. Voice+ allows you to send & receive messgaes via the Google Voice service behind the scenes, but on the front end you can use the stock MMS.apk, or the Google Hangouts app to do this. This does not involve modifying Google Hangouts, its just sort of "bridging" Google Voice and the native SMS handling so that your Google Voice texts act like regular SMS messages. Voice+ is part of the CyanogenMod project and you can read more about it here. It's honestly pretty nice if you're a Google Voice user, since the regular Google Voice app kindof sucks.
This procedure involves modifying a boolean setting in your device's framework-res.apk file. That may sound like gibberish to you, but its still not hard to get this done.
What You'll Need
This guide is written for people who use Windows. All the utilities I'll talk about in this guide are for Windows. I'm sure its possible to do this on Mac & Linux, but the main utility I use to make this easy (FrameWork Flasher) is for Windows.
-An archive manager. I recommend 7-Zip, since it is free, open source, and can handle basically every archive format known to man.
-FrameWork Flasher. I updated this application to work with KitKat, but am not the original creator. You can download the updated version from MediaFire. FrameWork Flasher was created by XDA's own Wes Foster, and you can see his original post here.
-Some kind of text editor. I use NotePad++
-An Android device with a custom recovery installed on it. "Custom Recovery" means like ClockWork Mod, or TWRP. You need this to flash your modded file back onto your device.
Got all your stuff together? OK, on with the How Tos.
How To Do This
The first thing you'll need to do is get a copy of your current ROM's framework-res.apk file. There are a variety of ways to do this. If you're running a custom flashable ROM, like CyanogenMod, the simplest way to go is to just download your ROM's flashable ZIP file onto your computer and then open it up in 7-Zip. The file should be located inside the ZIP in the system\framework folder. Just extract that to your Desktop, or wherever you're going to keep the files you're working on.
If you're running a "stock" firmware, probably the easiest way to get your current framework-res.apk is to copy it from your current tablet. Note: this method should always work regardless what ROM you are running, I just find it easier to pull the files out of the downloaded ZIPs on a computer. You'll need an Android file manager that allows you access to the entire file system, not just the "sdcard" type area. I use SolidExplorer, but Root Explorer would work just as well. Your goal is to get the file /system/framework/framework-res.apk on your Android device onto your computer. There are probably a dozen ways to accomplish this. Super noob method: just copy this file from its original location to your "Downloads" folder, then plug your device into your computer via USB and copy the file out of the Downloads folder and onto your computer using MTP. Another method would be to send it to yourself as an attachment on an email. Hell, Solid Explorer has a SMB/SAMBA client built into it, so if you know how to use that you can just push the file directly from its original location to a shared folder on your computer. If you need a step-by-step on how to accomplish this particular step, IMO you're not tech savvy enough to be doing this stuff.
Anyways, so you should now have the framework-res.apk file from your current ROM on your computer.
Download and unzip my FrameworkFlasher-MOD file. Inside the folder, you'll see several folders and files. You need to put the original framework-res.apk file in the "place-framework-res-here" folder (how inscrutible!). Then you can run RunMe.bat.
You should get a pop-up window with a simple text-based menu. You'll want to run Option 1. The program will process for a while, and then should end up at a "The APK has been decompiled successfully" message. You can press any key to continue. At this point its not a bad idea to just leave FrameWork Flasher running.
FrameWork Flasher should have unpacked all the resources from the APK into the folder "files-to-edit". You'll need to go into files-to-edit\framework-res.apk\res\values. Inside of their, you'll find a bunch of XML files. You need to open bools.xml in the text editor of your choice. You're looking for the line that says
<bool name="config_voice_capable">false</bool>
All you need to do is change false to true, so you should end up with
<bool name="config_voice_capable">true</bool>
Then, save the file and close your text editor and go back to FrameWork Flasher.
You'll now want to run through options 2, 3 and 4. After doing this, you'll have a file called "update.zip" in the "final-zip-file" folder. You'll need to put this onto your device and flash it.
If you've flashed ROMs before, I'd hope you know how to do this. As with the "get your framework file" step, there are many different possible ways to get the update.zip file onto your device. You could transfer via USB, over the network, via email, whatever.
Once you've got the file on your device, you flash it like you do any other flashable ZIP using CWM or TWRP. This ZIP should work with either recovery, and you do NOT need to clear cache or anything like that. Simply flash and then reboot your device.
NOTE FOR T-MOBILE USERS: Some T-Mobile customers, including me, get a "New Voicemail" notification on their device(s) with voice capable turned on. This is specifically a problem with the way your T-Mobile account was initially set up and/or provisioned. The device is correctly reporting the voicemail status it gets from your account. The problem is that T-Mobile sometimes puts the "Welcome to your new voice mailbox!" message into your inbox even if your voicemail is not turned on. As far as I know there's no way to fix this issue short of working with a T-Mobile tech to get them to fix it, which I haven't bothered trying to do given the weird nature of what I'm doing. In CM10.2 you can just swipe this message away. It occurs once and only once each time the device is rebooted. On the current builds of CM11, the voicemail notfication cannot be swiped away. This is a known bug in AOSP and was fixed in 4.4.2, so the fix should come to CM11 soon enough.
Forgot to mention, since this makes your device think its a "phone", if you install Dialer.apk, you can have access to the normal "Phone" app in your Apps drawer, and mess with SIP goodness
Also, for CyanogenMod users, your ROM probably did not come with some APKs that will make this more useful.
You CAN just use Google Hangouts as your SMS/MMS app, but some people may prefer to use the native CM app instead (it has those nice pop-up messages!). For that you need MMS.apk.
If you want to mess with the "Phone" functionality, you'll need Dialer.apk.
And finally, if you want to receive emergency notifications from the government (for like natural disasters and Independence Day-style alien invasions and stuff ) you'll need CellBroadcastReceiver.apk. Please note that none of these are needed for SMS functionality and all these APKs are from CyanogenMod and will not work on stock or other ROMs.
For CM10 Stable, I grabbed these APKs out of the Nexus 4 (mako) ROM, stuck them in a zip and uploaded them here.
On CM11-M1. same deal but I used the Nexus 5 (hammerhead) ROM as my source. Those are here.
These files just need to be placed into the appropriate folder(s) on your device and then you'll need to set the file ownership & permissions the same as the rest of the the stuff in there (owned by root:root, -rw-r--r-).
They all go in /system/app, except for MMS and Dialer on CM11. On KitKat they have introduce the new /system/priv-app folder. My ZIPs contain those directories to remind you where to put the stuff.
I'm not a Windows user and I'd love to modify my own (stock) framework-res.apk to re-enable SMS support. Do you know what tools FrameWork Flasher uses "behind the scenes" to decompile and recompile the apk?
I don't like the idea of tampering with framework-res.apk using apktool unless somebody can confirm that this is the right direction.
sbiriguda said:
I'm not a Windows user and I'd love to modify my own (stock) framework-res.apk to re-enable SMS support. Do you know what tools FrameWork Flasher uses "behind the scenes" to decompile and recompile the apk?
I don't like the idea of tampering with framework-res.apk using apktool unless somebody can confirm that this is the right direction.
Click to expand...
Click to collapse
APK Tool is indeed the right direction to take.
I actually had to update the binary of APK tool that Framework Flasher uses, since the one included in the original isn't new enough to know what JellyBean and KitKat are Since FrameWork Flasher is a Windows Batch Script, I'm certain its just automatically doing stuff in the command line you could be doing by hand.
Looking at the source, I think the deompilation is done with this command:
java -Xmx%heapn%m -jar apktool.jar d "../place-framework-res-here/framework-res.apk" "../files-to-edit/framework-res.apk"
"%heapn%" is a variable, which appears to default to the value of 64.
So the command
"java -Xmx64m -jar apktool.jar d "/path/toframework-res.apk" "/path/to/extract/to"
should work on Linux or Mac, provided you've got Java installed and the jar in the current working directory. Obviously change the paths to match your local stuff. Post how it works if you'd like, I'love to update the guide to include Mac / Linux instructions, and Framework Flasher is the only "Windows" part about it.
DivinityCycle said:
Post how it works if you'd like, I'love to update the guide to include Mac / Linux instructions, and Framework Flasher is the only "Windows" part about it.
Click to expand...
Click to collapse
Obviously I messed up the resulting framework-res.apk because it got stuck in a Zygote startup loop. It's worth noting that I built apktool from the latest git sources, so there might be some bugs lurking in the shadows.
Oh well, I'll just wait for somebody else to do the dirty work
sbiriguda said:
Obviously I messed up the resulting framework-res.apk because it got stuck in a Zygote startup loop. It's worth noting that I built apktool from the latest git sources, so there might be some bugs lurking in the shadows.
Oh well, I'll just wait for somebody else to do the dirty work
Click to expand...
Click to collapse
Well, if you send me your framework-res.apk I can mod it for you. Takes like 2 seconds
The Framework Flasher source code shows the following for the actual "do the work" steps:
To decompile the original APK-
java -Xmx%heapn%m -jar apktool.jar d "../place-framework-res-here/framework-res.apk" "../files-to-edit/framework-res.apk"
To compile the new APK-
java -Xmx%heapn%m -jar apktool.jar b %~dp0files-to-edit\framework-res.apk %~dp0place-framework-res-here\unsignedframework-res.apk
To sign the APK-
java -Xmx%heapn%m -jar signapk.jar -w testkey.x509.pem testkey.pk8 ../place-framework-res-here/unsignedframework-res.apk ../place-framework-res-here/signedframework-res.apk
To build the unsigned ZIP-
7za a -tzip %~dp0place-framework-res-here\unsignedframework-res.apk %~dp0temp-files\* -mx%usrc% -r
And finally, to sign the ZIP-
java -Xmx%heapn%m -jar signapk.jar -w testkey.x509.pem testkey.pk8 ../final-zip-file/update_unsigned.zip ../final-zip-file/update.zip
note: you do not actually need to sign the ZIP. You CAN flash a zip without a signature on it, its just that with signature you get verification that the file is intact, which isn't a bad idea.
In Batch's screwy syntax, %heapn% is the variable that contains the heap size, and it looks like the default heap size the script uses is 64 unless otherwise specified by the end-user.
Also, %~dp0 is just a path expansion expression used to give the full path to the target files where its used.
I'm pretty sure you can make use of the jar and key files inside the FrameWork Flasher zip file I attached to this thread. You can find them in the resources folder. Both apktool.ar and signapk.jar are necessary, and I'm pretty sure the testkey files are needed to do the digital signatures and make this stuff work. Hope that stuff helps
Your mediafire link is just another link to download 7zip, could you update it. Thanks.
deyanimay said:
Your mediafire link is just another link to download 7zip, could you update it. Thanks.
Click to expand...
Click to collapse
Damn you multi-tasking!!! sorry about that. Fixing it nao.
The link should be http://www.mediafire.com/download/jozlg1xy4vxiegb/FrameworkFlasher-MOD.zip
when I tried to use framework flasher option 1 it said
Framework Flasher 1.1.4 - by Wes Foster (wesf90)
Please read the "Help" section before using this script
--------------------------------------------------------------------------------
----
Compression: 9 Heap Size: 64mb
````````````````````````````````````````````````````````````````````````````````
````
Main Options (in order)
-----------------------------------
(1) Decompile APK
(2) Compile APK
(3) Sign APK
(4) Create and Sign update.zip
(5) Great News! (when your finished creating the zip)
Other Options
-----------
(10) Set Compression Level for APK's
(11) Set Max Memory Size (if you get stuck when decompiling/compiling)
(12) Read Logs
(13) About / How-to / Help
(99) Exit
--------------------------------------------------------------------------------
Choose the number corresponding to the option:1
(removing old files...)
(removing old files-to-edit...)
===============++ Decompiling the APK. Please, please be patient ++==========
=====
ECHO is off.
An error has occurred. Check the log for more info.
ECHO is off.
Press any key to continue . . .
Click to expand...
Click to collapse
I attached the log. I'm trying to do this with CM 11 M1 on my deb, windows 8. Any ideas?
edit: framework-res.apk i'm trying to decompile: https://www.dropbox.com/s/iqc3eniv0u51ytg/framework-res.apk
seems like this is a common problem (googled it echo off) but I havent found a solution that works
edit 2: just tried it on my windows 7 laptop with the same result
edit 3: tried doing this with the cm 10.2 framework-res.apk with the same result.
About the voice mail message. Have you tried to install T-mobile Visual Voicemail to see if it could download then delete the message? I don't know how this app works, it's just the first thing I thought of when I read your post.
Thanks for creating this quide. I tried the single steps of the guide two weeks ago (I described it here: http://forum.xda-developers.com/showpost.php?p=47928887&postcount=167), but always got a bootloop. (De-)compiling the framework succeeded without errors and I tried it with and without changing the build.prop. By now I have no clue what went wrong. Mabye you need a special version of apktool fitting the rom you want to patch ?
Paten said:
About the voice mail message. Have you tried to install T-mobile Visual Voicemail to see if it could download then delete the message? I don't know how this app works, it's just the first thing I thought of when I read your post.
Click to expand...
Click to collapse
I've tried this and it doesn't work. I guess the app can't properly add the visual voicemail service to that line. I've also asked T-mobile about it and they said that I don't even have a voicemail box to store messages so there is nothing they can do about it.
nsmart said:
Thanks for creating this quide. I tried the single steps of the guide two weeks ago (I described it here: http://forum.xda-developers.com/showpost.php?p=47928887&postcount=167), but always got a bootloop. (De-)compiling the framework succeeded without errors and I tried it with and without changing the build.prop. By now I have no clue what went wrong. Mabye you need a special version of apktool fitting the rom you want to patch ?
Click to expand...
Click to collapse
Same here, it appears that setting config_voice_capable to true triggers an NPE inside the Keyguard class (i.e. the system PIN entry dialog) which then in turn causes SystemUI to restart over and over.
Perhaps the answer lies somewhere in the changes between 4.4 and 4.4.2 inside the AOSP device tree for deb, but I don't have the time to do an extensive diff of everything that has changed between those two releases.
Has anybody succeded in modding the stock KOT49H build without side effects?
---EDIT---
Apparently @GuyAdams managed to do it. Question is, how
cheers mate, nice post etc, been trying to get this going the last few days (and trying the other posts I've seen you talking on) but so far no luck. I'm getting the same log error as the previous poster too.
cheers
running nexus 7 with cm11 latest nightly.
burpitt said:
cheers mate, nice post etc, been trying to get this going the last few days (and trying the other posts I've seen you talking on) but so far no luck. I'm getting the same log error as the previous poster too.
cheers
running nexus 7 with cm11 latest nightly.
Click to expand...
Click to collapse
Well that sucks! It looks like APKtool doesn't work on anything newer than 4.4. I was able to reproduce the errors by trying to decompile / recompile the framework-res.apk from stock 4.4.2. The current release of APKtool from Slimbean I found here on XDA Devs appears to not be new enough. The main attraction of FrameWork Flasher over other solutions was the extremely easy & rapid download & use (as opposed to the end user having to like go download and install the entire Android dev kit), and Virtuous Ten Studio can definitely do this job, but again it looks to be an order of magnitude more complex for the average user to use. I'm going to be a little busy today doing actual work, but I should be able to find the time to work on this other stuff as well. Frustrating!
Is this working for the rom here: http://forum.xda-developers.com/showthread.php?t=2545628
And what about the carrier dont they see you now making calls and texts on a line that is set to be a tablet?
curtdragon said:
Is this working for the rom here: http://forum.xda-developers.com/showthread.php?t=2545628
And what about the carrier dont they see you now making calls and texts on a line that is set to be a tablet?
Click to expand...
Click to collapse
Did you even read my post? At no point did I say anything about "making calls", and as stated in the OP, this simply turns on the software on the tablet that allows you to send & receive SMS/MMS messages. You have to have to actually have SMS service to send / received SMS messages.
Also as carefully stated in OP, using CM10 or CM11 means you can use Voice+ to make Google Voice messages act like regular SMS.
Last but not least, the most recent builds of Bruce's CM11 ROM (the one you linked to) already have this modification applied (as he explained in the most recent few posts).
DivinityCycle said:
Did you even read my post? At no point did I say anything about "making calls", and as stated in the OP, this simply turns on the software on the tablet that allows you to send & receive SMS/MMS messages. You have to have to actually have SMS service to send / received SMS messages.
Also as carefully stated in OP, using CM10 or CM11 means you can use Voice+ to make Google Voice messages act like regular SMS.
Last but not least, the most recent builds of Bruce's CM11 ROM (the one you linked to) already have this modification applied (as he explained in the most recent few posts).
Click to expand...
Click to collapse
Hey thanks for coming off as a douchbag. Do I even read? No, perhaps you've edited your post several times since i did. Not to mention the fact that your title reads "Enable SMS on any ROM" then you go on to say that it will also enable the voice portion of the phone. Finally I asked a legitimate question it he texts why? because with ATT i have a share plan. While the plan says it's unlimited talk and text then the data is shared each device is different on the account and priced differently as well.
Also if I wanted to use Google Voice to send text messages i would just do that. Voice+ sends
But as you said this is enabled in the ROm i am using so I will exit this thread now.
You really need work on your people skills.
I do not run framework flasher is not possible to have a zip ready to be flash? I have a nexus 7 2013 LTE with cm 11 kot49h.... Thanks
Inviato dal mio Nexus 7 utilizzando Tapatalk
Hi all, I am trying to build android from source (Cyanogenmod) for my phone Sony Xpreia Pro (iyokan). I am following the instructions at wiki{DOT}cyanogenmod{DOT}org/w/Build_for_iyokan (I haven't posted a lot so I can't post URLs ). During my build I need to do one additional step. I need to pull the proprietary files from my device. This is where the problem comes in.
I found that there are 4 files which the extract-files.sh script cannot extract. This causes problem in the build process and the build process stops without completion. The files which the script cannot find are:
/system/bin/calibrator
/system/etc/firmware/wl1271-fw-multirole-roc.bin
/system/lib/libc2d2_z180.so
/system/lib/egl/libGLESv2S3D_adreno200.so
I found wl1271-fw-multirole-roc.bin at "/system/etc/firmware/ti-connectivity/" instead of "/system/etc/firmware/". Is it fine to modify the "proprietary-files.txt" to have this path instead of the "/system/etc/firmware/"? I am not sure if the functionality of both the files is same.
Also I found a file called "wlan_calibrator" instead of "calibrator" in the same location. I also found a file called libGLESv2_adreno200.so instead of libGLESv2S3D_adreno200.so
Would it be fine if I change the name in "proprietary-files.txt"? Again, I am not sure if the functionality of the other files is same. I couldn't find the file called "libc2d2_z180.so"
I really don't know what to do and would really appreciate if anyone could help me on what I should be doing.
Hi all, I copy - pasted the title from an older thread :
https://forum.xda-developers.com/showthread.php?t=1982149
because I have exactly the same problem, but all the solutions I have found so far look outdated and don't work for Android Nougat (Samsung Galaxy S7 SM-G930F rooted with Odin as explained here). I need to access channel 149 (the wifi camera of my quadcopter)
So this is what I have tried :
1. WifiCodes.apk, described here. Gets root permits but when run, freezes and does nothing
2. Edit /data/data/com.android.providers.settings/databases/settings.db to change my country code, as explained here. The directory doesn't exists, and cannot find the settings.db file anyplace
3. Same but on /data/data/com.android.providers.telephony/databases/carriers; not sure where i saw this, but anyway doesn't exist neither
4. RegionChanger app. Gets root permit but does nothing
Of course Nougat has not advanced Wifi configuration to tinker with country codes nor 2.4 vs. 5.0 GHz networks.
Any other suggestion?
Thanks a lot!
i have nougat but on Galaxy note 5
i have tried those methods and i didn't found setting.db but i found that there is another files (like they changed setting db file with another way) the file called settings_global.xml and settings_secure.xml u can check this too u can find them in
data/system/users/0
u will find something like
(setting id="97" name="wifi_country_code" value="us" package="android" />)
<setting id="100" name="wifi_sns_visited_country_iso" value="us" package="android" />
the point is i changed them it change back to the default setting it was b4
donno how to force it to not get change by it self
Can change code but still KO
Hi, thanks a lot. I have changed the country code but still cannot see the camera's network. After googling a bit more, looks like the camera is not compatible with Android!!! (whatever this means). That is, doesn't show up in any Android device, but does on iPhones. Mysteries of Chinese engineering... So I gave up and acquire a different camera.
Btw, I don't have the problem you mention of reverting configuration.
Thanks again!
I'm writing this post to track my efforts to enable VoLTE and WiFi Calling on my X Compact. To begin with, I don't have a solution yet. I think I understand a lot of how it's supposed to work, but there are still some things I don't know. Hopefully others will be able to chime in and provide some answers.
I use my phone on MetroPCS in the USA. They are an MVNO for T-Mobile (and also owned by T-Mobile). I know that they support both features as my wife's Moto X4 is able to use them.
The X Compact does support VoLTE:
https://support.sonymobile.com/us/x...do-i/801930746ffcf563015c0bfaac370057e6/#gref
The problem is, it's only supported on specific carriers. The first requirement is that the carrier supports VoLTE (MetroPCS). The second requirement is that the feature has to be approved by Sony to be used on that carrier. This is where people have problems. I don't know how Sony makes the approval list, but my carrier isn't on it.
Before digging into this, I had planned on upgrading to the XZ1 Compact because it is specifically advertised as having VoLTE working on T-Mobile. I bought one and expected it to work out of the box on MetroPCS, but it didn't. I went back and forth with both MetroPCS and Sony and it still didn't work. This goes back to the list I mentioned above. If your carrier isn't on it, the phone won't work.
So I'm stuck with a phone that would work perfectly well with these features, but due to carrier/manufacturer approval issues, won't. Moving forward, I'll discuss the things that I've tried to get it to work.
Try making the XC work like the XZ1C
As I mentioned above, the XZ1C supports both features natively on T-Mobile. Why it works on T-Mobile came up in the following thread trying to get VoLTE and fingerprint support at the same time on T-Mobile:
https://forum.xda-developers.com/xperia-xz1-compact/help/volte-tmo-fingerprint-sensor-t3666387
So why does the XZ1C work on T-Mobile? @pbarrette did a good job of explaining the process in this post:
https://forum.xda-developers.com/showpost.php?p=74159245&postcount=105
The XZ1 and the XZ Premium both use the same chipset as the XZ1C, but those features don't work on T-Mobile. In trying to figure out why, @pbarrette determined the mechanism Sony uses to enable this feature. That work is covered in the following thread:
https://forum.xda-developers.com/xz-premium/help/volte-t-mobile-enabled-t3627567/
Simply, the XZ1C has additional files which are triggered to be used when a T-Mobile SIM is placed in the phone. To get the features to work on the XZ1 and XZP, you need to copy the appropriate files on to the phone. @pbarrette created a flashable zip file which does this and it works for those phones. The most important file to get the features working is the proper modem binary file (/etc/customization/modem/), tmobile_us_ims on the XZ1C. Unfortunately, there's no corresponding file on the XC.
I thought that I could just copy the binary file from the XZ1C, but the phones use different hardware so it's likely that a file from one phone won't work on another. I did a file comparison of the default (XC: amss_fsg_kugo_tar.mbn, XZ1C: amss_fsg_lilac_tar.mbn) and T-Mobile (XC: amss_fsg_kugo_tmobile_us_tar.mbn, XZ1C: amss_fsg_lilac_tmobile_us_tar.mbn) modem binary files from each phone, and they're quite different. So it seems like that option won't work.
Even if the XZ1C files did work on the XC, the problem still remains that the XZ1C doesn't work on MetroPCS. So I'd get a franken-ROM that doesn't do what I want it to.
Afaik your operator need to enable volte for your specific device. Here, my operator doesn't support xc and even if I force enable volte it still doesn't work. I contacted them and they said that they have to do some tests and then enable it to use volte.
maluus said:
Afaik your operator need to enable volte for your specific device. Here, my operator doesn't support xc and even if I force enable volte it still doesn't work. I contacted them and they said that they have to do some tests and then enable it to use volte.
Click to expand...
Click to collapse
You might be right, but some of the success stories that I've read lead me to believe that it's not device specific. I'll dig into that in a later post. I've contacted my carrier and according to them, everything is set on their end, so that just leaves the device being the issue.
Try making the XC work like the XZ1C, Part 2
Per @pbarrette, the proper files are loaded only when a SIM with the correct ID is inserted into the phone. For the XZ1C, this info is located in /overlay/com.sonymobile.customizationselector-res-305.apk in a file called configuration_selectors.xml. A file of the same name is also present in the same location on the XC. The sim_config_id can be found by entering the following command with USB debugging enabled:
Code:
adb shell getprop persist.sys.sim_config_ids
When I enter this, I get S8957.1. That value isn't in the configuration_selectors.xml list so the proper files aren't loaded and the default modem binary is used. If it were in the configuration_selectors.xml list, a config_id value of 400 would be associated with the sim_config_id (408 for XZ1C). Your config_id value can be found using the following command:
Code:
adb shell getprop ro.semc.version.cust.active
When I enter this command, I end up with a blank. I believe that this is because the default modem binary is being used, but this is just a guess. Ultimately, it means that the SIM isn't recognized and therefore the features won't work.
There's another file that's part of /overlay/com.sonymobile.customizationselector-res-305.apk, and that is service_providers.xml. I believe that this is where the proper sim_config_id is selected, based upon the MCC and MNC for the carrier. In my case, those values are 310 and 260, respectively. There are two entries which match these values:
Code:
<service_provider_sim_config sim_config_id="S8957.1">
<mcc>310</mcc>
<mnc>260</mnc>
<sim directory="7FFF" file="6F3E">6D</sim>
</service_provider_sim_config>
<service_provider_sim_config sim_config_id="S264.8">
<mcc>310</mcc>
<mnc>260</mnc>
</service_provider_sim_config>
There have been times in the past that my phone has been assigned the sim_config_id or S264.8, but most of the time it's S8957.1. I'm not sure what the sim directory tag refers to. If anyone knows what this means, please let me know as it might be helpful.
So my first strategy of trying to mimic the way the XZ1C works doesn't appear to be an option. A question for others: would it be possible to decompile the relevant files, change the xml files to reference the id's that I'm seeing, recompile and replace the APK's, all without sending my phone into a bootloop? Yes, see below.
But even if that were to work, there's no corresponding modem binary file on the XC, so probably no VoLTE. But there are other modem binary files. Could I just rename one of those? Would using the file from the XZ1C crash the modem on the XC? Yes, see below.
Try making the XC work like the XZ1C, Part 3
Alright, I've had partial success. Using some of the overlay files from the flashable zip that @pbarrette created, I was able to get the VoLTE and WiFi Calling menus to show up in settings. Here's a summary:
Flash old firmware. I used this one available on XperiFirm: F5321_34.1.A.1.198_Commercial and Journalists (1305-9054). It's not strictly necessary to flash the old firmware, but you need root, and root requires an unlocked bootloader, and unlocking the BL will delete your TA partition. I wanted to backup the TA partition for my DRM keys. In order to use the backup tool, you have to use an older version of Android so that the exploit used by the backup tool is still available.
Backup TA partition
Flash current firmware (34.4.A.2.118)
Unlock bootloader (use the Sony Mobile website for this)
Root phone (I used the method described here with the DRM fix option. The use-your-own-TA option didn't work for me.
https://forum.xda-developers.com/x-compact/how-to/stock-8-0-root-recovery-t3747479
Install the following files from the @pbarrette flashable zip:
/oem/modem-config/408/modem.conf
/oem/overlay/android-res-305.apk
/oem/overlay-408/android-res-310-408.apk
/oem/overlay-408/com.android.carrierconfig-res-310-408.apk
/oem/overlay-408/com.android.phone-res-310-408.apk
/oem/overlay-408/com.android.settings-res-310-408.apk
/oem/overlay-408/com.android.systemui-res-310-408.apk
/oem/system-properties/408/config.prop
You also need to install /oem/overlay/com.sonymobile.customizationselector-res-305.apk, but I had to modify the file from the XZ1C to get things to work. Within the APK, there's one XML file that needs to be updated to include the sim_config_id I'm seeing on MetroPCS. That is /res/xml/configuration_selectors.xml. I modified it to look like the following (with my addition in red):
Code:
<?xml version="1.0" encoding="utf-8"?>
<configurations>
<configuration config_id="408">
<sim_config_id>S264.1</sim_config_id>
<sim_config_id>S264.2</sim_config_id>
<sim_config_id>S264.3</sim_config_id>
<sim_config_id>S264.4</sim_config_id>
<sim_config_id>S264.5</sim_config_id>
<sim_config_id>S264.6</sim_config_id>
<sim_config_id>S264.7</sim_config_id>
<sim_config_id>S264.8</sim_config_id>
<sim_config_id>S264.9</sim_config_id>
<sim_config_id>S264.10</sim_config_id>
<sim_config_id>S264.11</sim_config_id>
<sim_config_id>S264.12</sim_config_id>
<sim_config_id>S264.13</sim_config_id>
<sim_config_id>S264.14</sim_config_id>
<sim_config_id>S264.15</sim_config_id>
<sim_config_id>S264.16</sim_config_id>
<sim_config_id>S264.17</sim_config_id>
<sim_config_id>S264.18</sim_config_id>
<sim_config_id>S8663.1</sim_config_id>
[COLOR="Red"]<sim_config_id>S8957.1</sim_config_id>[/COLOR]
</configuration>
</configurations>
To do this, I decompiled the Sony APK from the XZ1C, changed the file, recompiled the APK, signed the file, then placed the file in the /oem/overlay directory with Solid Explorer, and made sure the file permissions were correct.
It's worth mentioning that /oem/modem-config/408/modem.conf lists the modem binary file to be loaded when a T-Mobile SIM is detected. On the XZ1C, this is tmobile_us_ims and that's what modem.conf lists by default. You'll need to change this to one of the modem binary files contained on the XC. I tried using the tmobile_us_ims modem binary file from the XZ1C and it sent my phone into a bootloop. So it's confirmed that the XZ1C modem binary files aren't compatible with the XC. Just pick one from the /etc/customization/modem folder, like amss_fsg_kugo_a1_austria_ims_tar.mbn and list this in the file. You'll need to cut out the prefix and suffix, so just a1_austria_ims for this example. The prefix and suffix will get added by the phone when selecting the file.
Trigger a SIM check by CustomizationSelector. To do this, I deleted the file /data/data/com.sonymobile.customizationselector/shared_prefs/com.sonymobile.customizationselector_preferences.xml and rebooted (as suggested by @pbarrette here: https://forum.xda-developers.com/showpost.php?p=74560870&postcount=76 and here https://forum.xda-developers.com/showpost.php?p=74560870&postcount=77). After a couple of minutes, my phone stated that it needed to reboot to optimize for my network. Once it loaded back up, the proper overlays had been loaded and I could see the settings for VoLTE and WiFi Calling.
This is where my success stops. Without the proper modem binary file, it's a bit of a crapshoot to see if an existing file will work. To do this, just repeat steps 8 and 9 with a different modem binary file. I've tried a handful of these files, but no luck yet. There are 127 files, but I'm sticking with the ones that mention IMS or VoLTE. This reduces the total to 88, but it's still a lot of rebooting and waiting. The files I've tried so far are listed below.
amss_fsg_kugo_a1_austria_ims_tar.mbn
amss_fsg_kugo_a1_austria_volte_vowifi_tar.mbn
amss_fsg_kugo_bouygues_france_ims_tar.mbn
amss_fsg_kugo_bouygues_france_volte_vilte_tar.mbn
amss_fsg_kugo_ee_ims_tar.mbn
amss_fsg_kugo_singtel_ims_tar.mbn
amss_fsg_kugo_telefonica_uk_ims_tar.mbn
amss_fsg_kugo_telekom_germany_ims_tar.mbn
amss_fsg_kugo_tmobile_us_tar.mbn
amss_fsg_kugo_vivo_ims_tar.mbn
amss_fsg_kugo_vodafone_germany_ims_tar.mbn
amss_fsg_kugo_vodafone_spain_ims_tar.mbn
amss_fsg_kugo_vodafone_uk_ims_tar.mbn
amss_fsg_lilac_tmobile_us_ims_tar.mbn
So that's my current status. I'm not planning on doing anything else at this point, because I figured out a way to get my XZ1C working on MetroPCS with VoLTE and WiFi Calling. I'll write a bit about that over in the XZ1C forum. If anyone wants to continue looking into it, please provide an update.
Software Used
In case someone wants to work through this process on their own, here is the software that I used:
Flashtool: Used for flashing firmware to the XC via FTF files. This can also be used to extract the contents of some older SIN files.
http://www.flashtool.net/index.php
newflasher: An alternative to Flashtool. I didn't use this, but I saw it referred to a lot.
https://forum.xda-developers.com/cr...gress-newflasher-xperia-command-line-t3619426
UnSIN: This program can be used to extract the contents of more modern SIN files.
https://forum.xda-developers.com/crossdevice-dev/sony/tool-unsin-sin-v3-unpacker-t3128106
ext2explore: Tool to explore ext4 image files. Once you've used UnSIN, you end up with an ext4 file. This tool can explore the ext4 file and extract files from it.
https://sourceforge.net/projects/ext2read/files/Ext2Read ver 2.0/ext2explore 2.0 beta/
Google platform tools: This includes ADB, fastboot, etc. It comes with the Android SDK, but that file size is massive so Google conveniently packaged just the platform tools in a much smaller zip file.
https://developer.android.com/studio/releases/platform-tools
apktool: This is a tool to decompile/compile APK files. There are other tools out there, but this is the one that I used.
Tool download: https://ibotpeaches.github.io/Apktool/
Guide I used: https://forum.xda-developers.com/showthread.php?t=2213985
Flashable zip guide: I ended up editing the flashable zip from @pbarrette to include only the files I listed above. It was pretty straight forward to edit the script just looking at it, but this was a good resource for explaining things in more detail.
https://forum.xda-developers.com/an...-complete-shell-script-flashable-zip-t2934449
Dirtycow-based TA Dumper for Sony Xperia Devices: This what I used to backup my TA partition.
https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
sgs2toext4: This tool can convert an IMG file (eg. boot.img) to ext4. I used it in some of my tinkering (trying to get use-your-own-TA root option working) but I don't think you'll need it
https://forum.xda-developers.com/ga...n-zipalign-t1132724/post15333542#post15333542
Mate there is a magisk module to enable that menu options. But although enabled, neither volte nor vowifi does work without operator support. Does your operator list supported devices for volte? If so, you can risk to change the signatures of your device with a supported and identical platforms.
maluus said:
Mate there is a magisk module to enable that menu options. But although enabled, neither volte nor vowifi does work without operator support. Does your operator list supported devices for volte? If so, you can risk to change the signatures of your device with a supported and identical platforms.
Click to expand...
Click to collapse
Interesting. I've not heard of that module. MetroPCS doesn't list compatible devices as far as I know, but I know of unlocked devices that do work. Could you please provide a link to that module you mentioned?
I don't have Magisk installed but you can search volte in modules library. I think name was the volte enabler or something similar
maluus said:
I don't have Magisk installed but you can search volte in modules library. I think name was the volte enabler or something similar
Click to expand...
Click to collapse
Was it this one? If so, the module isn't doing anything that I'm not already doing. Is there a module that allows for using the Modem Switcher on Sony phones?
https://forum.xda-developers.com/apps/magisk/module-v4-volte-enabler-t3649613
camdecoster said:
Was it this one? If so, the module isn't doing anything that I'm not already doing. Is there a module that allows for using the Modem Switcher on Sony phones?
https://forum.xda-developers.com/apps/magisk/module-v4-volte-enabler-t3649613
Click to expand...
Click to collapse
Yes it is. Btw I noticed a phrase in OP which points out the problem as I stated earlier.
"My carrier supports VoLTE/VoWiFi but not on my device. I made this module to forcefully enable it to test if it worked (it hasn't so far)."
I don't know your provider but still it seems operator support is based on individual devices as it is in my case. When I first call the support center of my carrier the person told me that if my phone does support volte there shouldn't be a problem. I insisted that my phone supports volte and she said that she ll check with tech department and a few minutes later called me back saying indeed they don't support my device. long story short I can't use volte as of now. they support a device from loire platform so may be if I change identification of device to that one to trick the operator network to believe I use the supported device it may work but I have my doubts about consequences so I did not dare yet
maluus said:
Yes it is. Btw I noticed a phrase in OP which points out the problem as I stated earlier.
"My carrier supports VoLTE/VoWiFi but not on my device. I made this module to forcefully enable it to test if it worked (it hasn't so far)."
I don't know your provider but still it seems operator support is based on individual devices as it is in my case. When I first call the support center of my carrier the person told me that if my phone does support volte there shouldn't be a problem. I insisted that my phone supports volte and she said that she ll check with tech department and a few minutes later called me back saying indeed they don't support my device. long story short I can't use volte as of now. they support a device from loire platform so may be if I change identification of device to that one to trick the operator network to believe I use the supported device it may work but I have my doubts about consequences so I did not dare yet
Click to expand...
Click to collapse
My carrier does offer VoLTE and WiFi Calling and those features do work on unlocked phones, so I'm pretty sure it's a Sony problem. In fact, I recently got those features working on an XZ1C. It could work on an XC too, but I'm moving on to the XZ1C. I hope someone gets it to work. Good luck with your carrier.
Don't know if anyone interested, but I found this on a Chinese forum - http://bbs.gfan.com/forum.php?mod=v...rby=lastpost&typeid=&typeid=&orderby=lastpost Apparently, if you flash the 2 files in the link, (http://bbs.gfan.com/android-9530989-1-1.html), it will work. I was going to test it out, but you need an account with some Chinese file sharing service, and I didn't feel like trying to figure it out...
Thank you for the information.
Unfortunately, I am unable to register as the registration needs SMS code received on a Chinese phone number.
I hate when some service requests my phone number (or other irrelevant data) without any way to avoid it…
mp107 said:
Thank you for the information.
Unfortunately, I am unable to register as the registration needs SMS code received on a Chinese phone number.
I hate when some service requests my phone number (or other irrelevant data) without any way to avoid it…
Click to expand...
Click to collapse
2 files on that post (thanks [email protected] ).
Oreo flash CT_v1_xzs.zip , Pie flash CT_v2_xzp.zip .
BUT, that's for XZs and XZP, not for XC. If failed, you can flash oem.sin only (from .FTF firmware) to restore.
To enable VoLTE and Wifi Callling, we need two parts of modem configs.
1. core: *.mbn modem config of specific local carrier that locate in /system/etc/customization/modem/ .
2. guide: modem configs in /oem.
The 2nd part can be import easily from other sony models, but the KEY is 1st part config. If the specific local carrier config can't be found in /system/etc/customization/modem/ , we have to use QPST to put parameters manualy, or no way to enable VoLTE/VoWifi.
camdecoster said:
My carrier does offer VoLTE and WiFi Calling and those features do work on unlocked phones, so I'm pretty sure it's a Sony problem. In fact, I recently got those features working on an XZ1C. It could work on an XC too, but I'm moving on to the XZ1C. I hope someone gets it to work. Good luck with your carrier.
Click to expand...
Click to collapse
Yes, it's Sony's problem. To Sony, importing VoLET/VoWifi parameters of all support carriers is a piece of cake.
There's a post on a Chinese BBS about enable VoLTE:http://bbs.gfan.com/android-9543428-1-1.html
XG_Zepto said:
There's a post on a Chinese BBS about enable VoLTE:http://bbs.gfan.com/android-9543428-1-1.html
Click to expand...
Click to collapse
Has anyone here tried this for a US carrier? I tried to follow along with the translated version but my lack of fully understanding the process and the rough translations have made it very difficult.
Does anyone have experience with the X Compact on T-Mobile?
I was going to change from the iPhone SE (tired of Apple, but need a small phone), which has VoLTE and Wifi Calling out of the box. I have a Note FE which was made for Singapore and I was able to change the CSC to get VoLTE, but not Wifi Calling.
W/O VoLTE it's totally not worth it. Besides not being to use LTE while on a call, I read in the thread the OP referenced regarding the XZ1C, that getting Band 12 w/o VoLTE is also a problem.
And then there's the fingerprint sensor. If I install a European ROM to get it...
Will Rooting help any of the above?
Am I stuck with Apple? That's really depressing...
I understand that this may be considered duplicate. However due to the title of the previous thread clearly stating that the effort there is closed, I though I open this up. I would really love to get more 4g bands working as I have no LTE service in my area. Here is a post from the aforementioned thread.
-------
Maybe Possible Solution
Just found this thread after I unlock carrier locked my Hisense B16C2G phone that can't be unlocked for almost 3 years. This is just hypothesis, I suggest to try this with concern.
There are several file that determine bands capability in the devices. Most of it is in NV partition, but from the discussion I know that you guys have tried some popular ways to unlock it, but it failed. Like my phone at first i believe its hardware locked too, but i just discovered some Chinese article about unlocking oneplus device. Maybe you can try it too.
Here it is:
1. Connect to QPST and open EFS explorer
2. In policyman folder there are 3 file that most likely can be the cause of this network restiction
carrier_policy.xml
post.xml (in my phone there is none)
rat_mask (in my case this file that restrict my network even after I change NV values to support all bands)
3. Compare all three file with other phone's that most likely have same architechture (maybe MI8 or Pixel). For rat_mask, make sure it have same bits number(compare with Hex Editor)
4. replace that carrrier_policy.xml(and any file that contain this name) and rat_mask with modified files or use you can use other unrestricted phone's instead
These file originally in modem.img. Some phone replace them back with the original file when boot, you can modified init.radio.sh to prevent that.
We can modify carrier_policy.xml in modem.img and flash it to the phone but i cant find where rat_mask located
5. Reboot and hope if it solve your problem
I can't find any reference about how to generate unrestricted rat_mask and device_config so make sure you backup your original file before you make modification. Sorry I can confirm whether it will work or not because i don't own poco
NB: I solve my problem just with replacing carrier_config.xml and rat_mask. There is a file called device_config, be careful with this file because it control how the phone modem interact with qpst too, wrong modification can cause you cant connect to PC even in diag mode.
https://forum.xda-developers.com/poco-f1/help/poco-f1-lte-bands-unlock-t3835467/page22
-------
Does the above information help at all with this effort? I'm not quite savvy enough to pursue this on my own. I also found the below thread which describes a process which is apparently still working for many Qualcomm devices including Xiaomi. Has this method been attempted with the Poco F1?
http://in.c.mi.com/thread-527028-10-1.html
I sold my Poco and took over my GF's which was on 10.2.3. I had LTE at my place, confirmed with speed test and LTE app. After upgrading to 10.3.4 today I no longer have LTE. I've tried switching back and forth between APNs to no avail. Any ideas?
Any updates, did you got it working? I need to unlock B5 and 28.