yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ Premium Questions & Answers] VBBoston:
Does this work only on Oreo or will work on Nougat 7.1.2 also?

---------- Post added at 05:24 PM ---------- Previous post was at 05:09 PM ----------

Does this work only on Oreo or will work on Nougat 7.1.2 also?
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
Ok..

So here's a TWRP flashable zip file that should provide VoLTE and WiFi calling on T-Mobile US.

Be aware that I could only test the install script in a roundabout way using my old Moto Droid Mini because my XZ1c is not bootloader unlocked.

I also don't know if this will work on Nougat.

It should work just fine for Oreo ROMs.

Please let me know (via PM or otherwise) if it works, or doesn't and which OS and version you are running.

If it doesn't work, please give me a recovery log.
[Sony Xperia XZ Premium Questions & Answers] Pointless816:
Just tried it on an XZ Premium running the latest Oreo (47.1.A.5.51). Seems to be having trouble mounting the /oem partition (relevant section of the recovery.log below and full recovery.log attached). I've been messing with various ways to get this working before I saw your zip and have been shut down by the fact that I cannot seem to create any new directories in /oem when booted into Android and cannot mount the /oem partition at all within TWRP.

T-Mobile US VoLTE Fix --

-- For Sony Xperia XZ Premium --

-- Mount oem Partition --

mount: can't find /oem in /etc/fstab

grep: /oem/system-properties/config.prop: No such file or directory

/tmp/updater: line 232: syntax error: unexpected ";"

Updater process ended with ERROR: 2

I:Legacy property environment disabled.

I:Install took 0 second(s).

Error installing zip file '/sdcard/Download/TMo-VoLTE-Fix.zip'
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
I updated the zip in the original post.

1] Apparently I had a typo in the "then" clause of my "if" statement, but it's the abort mechanism, so it worked anyway.

2] Apparently the fstab doesn't list the oem partition, so I changed the script to mount it by block device name.
[Sony Xperia XZ Premium Questions & Answers] Pointless816:
It now flashes successfully. Unfortunately, there is no option in Settings to enable VoLTE, and making a phone call still drops from LTE to H.

I tried several things to try and make sure it wasn't just my phone, including disabling my Substratum theme, rebooting, doing a Network Settings reset, and even switching to another T-mobile SIM that I know is working with VoLTE on another phone, but none of those got the entry to appear in Settings.

Worse yet, something seems to have reset my /oem partition to stock and flashing the zip again now does nothing, it stays stock and I have no idea why.
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
Without a log, I can't tell what's going on.

As I've said before, I don't have an XZP and I don't have my XZ1c unlocked.

So without a log, I'm essentially flying blind.

If you could attach the results of the following commands as executed from TWRP, I might be able to help:

adb shell /sbin/mount -o rw -t ext4 /dev/block/bootdevice/by-name/oem /oem

adb shell mount

adb shell ls -aslR /oem
[Sony Xperia XZ Premium Questions & Answers] VBBoston:
It would be awesome to change signatures in .sin files from XZ1 firmware (which natively supports VoLTE and Wi-Fi calling) to be able to flash them on top of XZ premium firmware to get these features on UNrooted, locked bootloader XZ premium? Flashtool does not work anymore on 2017 devices so flashing needs to be done using tool newflasher https://xdaforums.com/crossdevice-dev/sony/progress-newflasher-xperia-command-line-t3619426.

Why this would be great? Because as of now unlocking XZ premium bootloader to get root (and be able to flash zip files) erases DRM keys forever as there is no way to back them up and restore later. I extracted .sin files from XZ1 firmware G8342_Customized US_1310-4358_47.1.A.2.374_R5B, I think files we need are modem_X-FLASH-ALL-C93B.sin, oem_X-FLASH-ALL-C93B.sin and vendor_X-FLASH-ALL-C93B.sin but more knowledgeable people will decide. Link here
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
Yes..

If we could find a way to derive the private keys from a 2048bit RSA public key, we'd be able to do whatever we liked on the phone.

And we'd also be rich.
[Sony Xperia XZ Premium Questions & Answers] Pointless816:
Just double-checked and your update-binary was extracting the zip's oem folder to /sdcard/oem but then not moving those files into /oem. I just changed it to output direct to /oem, and the files are now in place in my /oem directory and all seem to be the correct versions.

Changed

package_extract_dir "oem" "/sdcard/oem"

to

package_extract_dir "oem" "/oem"

Really making me doubt my own sanity as I swear those files were copying into that folder before, but oh well.

The newly-created directories also didn't have the same permissions as the rest of the, so I ran the below to fix this.

chmod 755 /oem/modem-config

chmod 755 /oem/modem-config/408

chmod 644 /oem/modem-config/408/modem.conf

chmod 755 /oem/overlay-408

chmod 644 /oem/overlay-408/android-res-310-408.apk

chmod 644 /oem/overlay-408/com.android.carrierconfig-res-310-408.apk

chmod 644 /oem/overlay-408/com.android.phone-res-310-408.apk

chmod 644 /oem/overlay-408/com.android.settings-res-310-408.apk

chmod 644 /oem/overlay-408/com.android.systemui-res-310-408.apk

chmod 755 /oem/system-properties/408

chmod 644 /oem/system-properties/408/config.prop

The Settings is still not showing the "enable VoLTE" option and making a phone call still drops off LTE. Guessing that means somehow the Settings overlay is not being picked up. Any ideas how I can debug that?
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
Damn.. I thought I'd cleaned up the testing bits, but then I forgot to extract the files to the actual /oem dir.. Brilliant.

Updated zip. Should handle permissions also.

Check your "ro.semc.version.cust.active" value.

What's supposed to happen is

/oem/overlay/com.sonymobile.customizationselector-res-305.apk

overlays config ID values of the

/system/priv-app/CustomizationSelector/CustomizationSelector.apk

package.

Then, when that package detects a SIM change, it hunts down the config ID for the SIM, writes a couple of TA parameters, changes the modem and reboots the phone.When the phone reboots, it is supposed to pick up the value overlays from the config ID that was selected.

Those apk overlays are what enable the UI settings to provide the VoLTE and VoWiFi toggles, while the .prop overlays are what enable the VoLTE service binaries.

The config ID for T-Mobile SIMs is 408, so your "ro.semc.version.cust.active" value should be 408.

If it's not, then the CustomizationSelector APK isn't getting triggered.
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
Hey [MENTION=1618927]Pointless816[/MENTION],

I just had a peek into the G8141 Customized DE firmware with version 45.0.A.7.137 and didn't see the tmobile_us_ims MBN file there.

Is it possible that you're using single-sim firmware and it doesn't include the T-Mobile VoLTE modem in

/system/etc/customization/modem/

and [MENTION=3555225]pikeylfc[/MENTION] is using the G8142 firmware and it does include the correct modem?

I'm downloading the latest Oreo FW for DE G8141 and US G8142 now to look, but I'll bet that could be the root of the problem.

EDIT:

Latest Oreo for DE on G8141 only has

amss_fsg_maple_tmobile_us_tar.mbn

, but not

amss_fsg_maple_tmobile_us_ims_tar.mbn

Latest Oreo for US on G8142 has only

amss_fsg_maple_dsds_tmobile_us_ims_tar.mbn

, but no non-VoLTE variant for T-Mo US.

I was going to try comparing the non-VoLTE modems to see if the Dual-SIM variant would work on the Single-SIM, but it doesn't exist.

Also, the modem file binaries are significantly different in size (~170kb for G8141 and ~325kb for G8142), so there's likely significant differences.
[Sony Xperia XZ Premium Questions & Answers] Pointless816:
Sorry, where would I look for that "ro.semc.version.cust.active" value? Checked all of the config files in /oem and can't see it in any of them, nor in build.prop or /data/data/ for the CustomizationSelector app.

I have the G8142 and the firmware is definitely dual-sim (made the mistake of flashing some single-sim bits once and it would not boot), but I verified that amss_fsg_maple_dsds_tmobile_us_ims_tar.mbn does in fact exist in /system/etc/customization/modem/ and isn't the non-VoLTE version.
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
Ah..

The value can be found from adb:

adb shell getprop ro.semc.version.cust.active

You might be able to force CustomizationSelector to refresh the modem settings by clearing its data and cache also.
[Sony Xperia XZ Premium Questions & Answers] Pointless816:
No luck with either. Cleared data and cache for CustomizationSelector, rebooted the phone, no change in Settings.

I also tried getprop and while the property exists, it is blank. I am unable to modify it via setprop, even as su. Tried putting it in /oem/system-properties/cust.prop, but it did not stick, unsurprisingly. Any idea if the ro.carrier property is used for keying whether CustomizationSelector should kick off?

Going to try and get more of a blank slate for testing. So next up is to confirm that TWRP can restore /data successfully (I hear there's something faulty with restoring /system), wipe the phone, install a pure US firmware, and flash that zip and see if there are any changes.
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
I'm not sure I'd go with a pure US, since you'd likely lose the fingerprint reader.

You could try triggering the phone to recognize a SIM change.

Pull your SIM out. Put a different carrier's SIM in if you've got one. Boot the phone with no SIM, then put yours in. Something along those lines.

You should also try wiping cache and dalvik-cache. I was looking at posts in crossdevice-dev/sony/ and found a thread where people were discussing an older version of CustomizationSelector which would only run once, then they had to wipe the caches to get it running again.

Since you've got root, you could use Titanium Backup for backups, which has always worked well for me.

EDIT: Also, no, I don't think that "ro.carrier" gets used by CustomizationSelector. The intents in the APK suggest it's being kicked off by SetupWizard and some other, unidentified process.
[Sony Xperia XZ Premium Questions & Answers] VeixES:
If you have root. Then you can create a shortcut for the CustomizationSelector(QuickShortCutMaker) and then you can manually select the modem configuration.

Need to set ro.build.type=userdebug in build.prop first.

Attached screenshot from my XZ. (XZ Premium not rooted yet)
[Sony Xperia XZ Premium Questions & Answers] Pointless816:
Okay, managed to get it working! Had to do a factory data reset to get there though... [MENTION=4782500]pbarrette[/MENTION] I guess you were right about SetupWizard being involved. After going through the entire setup process, the phone told me it needed to reboot to "optimize itself for your carrier." I'm going to try and find another way in without factory resetting this weekend--maybe just launching the SetupWizard again would be enough.

[MENTION=4530014]VeixES[/MENTION] Was unable to get this to work, even after changing build.prop and rebooting. The activity just would not launch for me. I'm wondering if there needs to be a customization already applied to get it to launch or if maybe the XZ Premium is just a bit different.
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
After looking at the Customization Selector a bit more, I think I know why it wasn't getting applied.

It's checking to see if your configuration has changed using some firmware parameters.

In pseudocode:

CustomizationSelectorActivity.onCreate()
{
if (isSIMLoaded && Configurator.isNewConfigurationNeeded()) { doStuffWeNeed(); }
}

Configurator.isNewConfigurationNeeded()
{
currentConfigKey = get("ro.semc.version.cust") +
get("ro.semc.version.cust_revision") +
get("ro.semc.version.sw") +
get("ro.semc.version.sw_revision")

oldConfigKey = PreferenceManager.getDefaultSharedPreferences("config_key")

if (currentConfigKey != oldConfigKey ) { return true; }
}

So the "ro.semc.version.cust" and "ro.semc.version.cust_revision" values are found in the

/oem/system-properties/cust.prop

file, which isn't in my flashable zip because that file also defines model and firmware specific entries like "ro.product.device" and "ro.build.fingerprint" which would end up turning an XZP into a XZ1c, which is probably not a good idea.

So I could try to figure out how to parse "ro.semc.version.cust" from the existing file, then increment the value by 1, then write the changed value back to the file.

The other option is to try figuring out where the getDefaultSharedPreferences("config_key") is coming from and zeroing it out.

Doing either of these should trigger the "optimize itself for your carrier" message and force a reboot.
[Sony Xperia XZ Premium Questions & Answers] pbarrette:
It looks like the "config_key" value should be coming out of an XML file in:

/data/data/com.sonymobile.customizationselector/shared_prefs/

Could someone post a copy of that file? It'd probably be better to modify (or delete) the file that contains the existing "config_key" than it would to change the "ro.semc.version.cust" value.

EDIT:

Also, [MENTION=1618927]Pointless816[/MENTION], one thing I forgot to mention. I deleted a line from the

config.prop

file.

Specifically, the line removed contained "ro.nfc.icon.enable=true".

Can you verify that you don't get the NFC icon stuck in the notification bar when it's enabled?
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
Does anyone know if as of the present time that Sony finally released an update to make the XZP VoLTE-certified with T-Mobile? Just wondering. Some ppl said in 2018 Sony might get it done.
[Sony Xperia XZ Premium Questions & Answers] lonewolfbtown:
I already have volte and t-mobile WiFi calling on my g8142 dual. Works pretty darn good. Someone here combined a few files from the xz1 and then made it flashable. I flashed that and behold I have volte and WiFi calling all working fine
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
That's very cool! I was aware that of that port from the XZ1 (or was it XZ1 C I thought?) actually.

I was hoping though that Sony Mobile FINALLY pulled its head out of its a$$ and got the XZP VoLTE-certified. Guess not. lol

So you had to go through using "Smart Phone Flash Tool", rooting, etc., in order to make it work? Did it take a long time? I hate that Sony Mobile makes us do this. lol That's why I got the LG V30 instead (locked from T-Mobile).

Thanks btw!!!!
[Sony Xperia XZ Premium Questions & Answers] lonewolfbtown:
I just did I though twrp. I'm currently on ce1. Got twrp and the drm fix installed and then root. Was actively hard core searching and someone made the zip I mentioned. I put on my backup drive I think if u need it. But anyways I flashed and rebooted and turned on all the settings for it. Turned on WiFi. Slight delay but it finally connected to t-mobile WiFi calling and I about jumped through the roof with excitement. Cell signal is considerably more stronger and accurate with the zip.
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
Very cool!

I unlocked the bootloader, rooted, and achieved S-OFF on my HTC One M8 four years ago. It was cool at first, but after a while I didn't like having to maintain everything manually. Plus that whole process was interesting but I'd never wanna go through it again. I wish it wasn't so complicated. lol I'm glad at least you got it working! And I appreciate the offer but no I will just stick with my V30. Sony Mobile could be a KING here in the U.S. if they actually had some balls. F Samsung and Apple. lol
[Sony Xperia XZ Premium Questions & Answers] lonewolfbtown:
Ah yes your right. Each year and each new phone it gets harder and harder to crack unfortunately. Sony is on the right path now. The xa2 ultra comes in the US model with finger print ENABLED!!!! So they must be hard gunning for the US business again. Kinda dropped the ball slightly slapping a snap dragon 625 in it though
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
Yeah they're doing a bunch of things right this year with how they made the XA series WAY better than it was last year. But this new questionable design and removing the headphone jack doesn't help their case. I love that they're going 18:9 though, and releasing the U.S. versions with the FS enabled is a BIG bonus too! Just sux they were too cheap to pay for the licensing fees here in the U.S. so it could be left on the Power button, but I guess that's WHY the U.S. models' FS will work. lol

Well it's a mid-ranger and only selling for $350, so I actually think it's well-priced considering all the features it has, including a 1080p screen (not 720p) and 5" not 4.6" size screen too. Among other things.

If they are gunning hard, they have to learn that selling through the carriers is the only way. There's no more time for half-a$$ing things. If I was a billionaire I swear I'd buy Sony Mobile and I would make them so incredible and market them so super aggressively people wouldn't know what hit them. lol Sony Mobile doesn't get it. They should be at the throne here, not Samsung and Apple. But they compete like lil b*tches here in the U.S. and then wonder why they're not succeeding here. SO tired of hearing how great OVERRATED SHAME-SUNG is. lol Laggy a$$ phones even with a ton of RAM, pictures that aren't even color accurate, call quality that sux, and audio quality that sux even more = OVERRATED! lol
[Sony Xperia XZ Premium Questions & Answers] lonewolfbtown:
Yeah never liked Samsung. Like the xa ultra was the first endless screen but because no one knew it existed. Samsung came swooping in and saying, "look at the first fancy infinity screen we have here" Sony makes good phones 75ish% they just need to focus on getting their foot in the door way more then just relying on the ps4 and sales of TV. Pull a Samsung. Make a phone that blows Samsung out of the water and then blast it on every screen possible and sell it hard and pack it with features and a hard punch for specs. The z3 was great. And so far they have been slowly declining and then back up. I had to mod my xz premium just to keep up with the newer phones which is sad
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
Yeah that's what kills me............a lot of ppl know Sony, but they don't know Sony sells phones. It's a shame really. And it DOESN'T have to be that way either.

Well the way to get your foot in the door is to ADVERTISE and sell through the carriers! People already know the Sony name, so it won't be as hard as it is for like HTC, ZTE, OnePlus, etc.

Yes exactly! You have to compete! The fact that Samsung, Apple, LG, HTC, etc ALL use Sony's camera sensors for example tells you right there that Sony has what it takes to rule! lol

I owned the Z3 and yes it was GREAT! Loved that phone! Yes exactly. I got the X Performance almost 2 years ago and it was a disappointment. But now with the XZP and potential 2018 phones, they really UPPED their game. I guess Oreo made the audio volume much louder and the battery life even longer! Also, a guy on Head-Fi who owns the XZP told me that when he enabled AHO (Automatic Headphone Optimization) in the audio settings that the sound quality got even better than his $300 Walkman's! No joke.

Yes man, exactly once again. Why the F should you HAVE to mod it? That really pisses me off too. It just seems inconsiderate. The phone is GSM-based, so it only works on like AT&T and T-Mobile. So you don't think enabling VoLTE on at least those 2 carriers is a good idea??! lol They should know better, or well, DO better. The flagships need it more than the compact phones do! Don't more ppl buy flagships anyway?
[Sony Xperia XZ Premium Questions & Answers] lonewolfbtown:
Hmm I wonder how well viper4android works with that. Don't get me wrong I love mods. You want a flagship you build a flagship. And I'm down with carrier phones but for the love of God stop locking the bootloader. Part of the reason I stopped buying carrier phones. Sony is capable of pushing hard, selling hard, just seems like they're are afraid of Samsung and Apple to so so
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
Yeah they should stop locking them. I agree. I kinda prefer unlocked actually cuz u get the updates quicker. But if it means no VoLTE then no thanks! Even my LG V30, I found out the unlocked one I believe doesn't have T-Mo VoLTE, so it was a GOOD thing I got the locked one! lol

They should be a little afraid cuz it WON'T be easy to compete against those two. But that doesn't mean they can't. They should've NEVER let Samsung get so big. Sony was making gorgeous phones 3-5 years ago while Samsung was still selling ugly ass phones like the plasticky S5, which I owned for 4 days and then returned cuz it SUCKED! lol Got the S7 2 years later and was stuck with it for 4 mos. Worst phone ever. Only cool thing was Samsung Pay and Always On Display, which I didn't even like until recently with my V30, which has it too. lol
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
So does rooting still involve a lot of manual updating, etc. these days? I just wanna know if things have improved since rooting my HTC One M8 4 years ago. lol
[Sony Xperia XZ Premium Questions & Answers] lonewolfbtown:
for the most part. xda is pretty on top of this model
[Sony Xperia XZ Premium Questions & Answers] RockStar2005:
Ok. Too bad then. lol

Thanks wolf!
[Sony Xperia XZ Premium Questions & Answers] scamiran:
Volte but no wifi calling

Hi everyone,

I had success installing this zip for getting volte to work, but wifi calling still doesn't work. Anyone have any suggestions for getting it to work properly?

Thank you
[Sony Xperia XZ Premium Questions & Answers] raven213:
Try using turbo rom edge v1 it has both working volte and wifi calling. :)
[Sony Xperia XZ Premium Questions & Answers] reiriop:
Does anyone have either of these working on AT&T in the US? AT&T is being super slow adding devices to their "approved" devices list or w/e they call it but I saw that some people were able to get VoLTE and maybe Wifi Calling with one of the pixel phones even though it's not on AT&Ts approved devices list. It sounded like they just called their local AT&T rep and got them to provision their IMEI and SIM to enable the features.
[Sony Xperia XZ Premium Questions & Answers] kountry83:
Hey bud

I'm on CE1 also and trying to get volte and wifi calling. Would happen to still have that flashable fix on you I could use please.

Thank you
[Sony Xperia XZ Premium Questions & Answers] lonewolfbtown:
https://drive.google.com/open?id=143MI5PMCyCkjkuxXnazldaXY8xjlAOJn
[Sony Xperia XZ Premium Questions & Answers] kountry83:
Thanks bud! I really appreciate it.
[Sony Xperia XZ Premium Questions & Answers] sutekidane:
Does the zip file work on 47.1.A.12.270? Thanks.
[Sony Xperia XZ Premium Questions & Answers] raven213:
hi mind doing this for pie? flashed this zip and it didnt do anything im on tmobile
[Sony Xperia XZ Premium Questions & Answers] camdecoster:
[MENTION=4782500]pbarrette[/MENTION] Sorry to drag up an old thread, but I'm trying to figure out if I can get my X Compact to work on MetroPCS with VoLTE and WiFi Calling. I read your other post referenced earlier in this thread (https://xdaforums.com/showpost.php?p=74159245&postcount=105) and I don't think that your zip file will work with this phone due to hardware differences. Also, there's no tmobile_us_ims modem binary file on the X Compact. However, it seems like one could force the phone to use a different modem binary file by changing the sim_config_id associations. Do you have any thoughts on this approach? It looks like there are some default modem binary files (referring to IR.51 and IR.92) that I could start with.