Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xiaomi Mi 8 SE] No VoLTE on latest stable 9.0 firmware; bluetooth calling issue etc #398

Open
dkmgfk opened this issue Feb 12, 2019 · 25 comments

Comments

@dkmgfk
Copy link

dkmgfk commented Feb 12, 2019

Performed installation

Clean installation of latest pie based stable firmware http://bigota.d.miui.com/V10.2.2.0.PEBCNXM/sirius_images_V10.2.2.0.PEBCNXM_20190115.0000.00_9.0_cn_9c3f0dee1c.tgz
Flashed recovery "recovery-TWRP-3.2.3-1217-XIAOMI8SE-CN-wzsx150.img" (the latest 1227 build can't boot)
Flashed boot.img (extracted from https://sourceforge.net/projects/xiaomi-eu-multilang-miui-roms/files/xiaomi.eu/MIUI-STABLE-RELEASES/MIUIv10/xiaomi.eu_multi_MI8SE_V10.2.2.0.PEBCNXM_v10-9.zip/download latest stable release)
Flashed AOSP 9.0 v110 arm64 a-only vanilla
Didn't mod anything or flash any other zip
Used for 24 hrs with dual VoLTE enabled TD-LTE SIM.

Issues found so far

  • VoLTE isn't working on either SIM card (this is supported in stock firmware; using GSM for now. Current setting: SIM1 LTE/UMTS(PRL); SIM2 GSM(can't be changed))

  • Can't obtain IPv6 address on LTE. IPv6 on LTE can be obtained on stock firmware. Maybe related to the above issue.

  • ##4636## can only show the information of the SIM card in the first slot

  • After tapping "Preferred network type" in Settings -> Network & Internet -> Mobile Network, the phone app crashed, the signal in status bar disappeared for a second or so. This is default to WCDMA preferred, can only be changed for the first SIM in ##4636##

  • Calling audio can't be played on bluetooth headset (played on the phone regardless of settings), media sound works fine

Logcat from adb

https://pastebin.pl/view/ae7d5869

Stock system.img and vendor.img can be extracted from the link for latest stock firmware.

Finally got rid of MIUI after waiting 360 hours, excited to find generic GSI image worked out of box (mostly).

(Maybe other issue will emerge in a couple of days?)
A huge "thank you" for your great work! (from a noob)

@dkmgfk
Copy link
Author

dkmgfk commented Feb 12, 2019

Also if I flash the vanilla system.img directly from fastboot command line, the device will refuse to boot everything, booting directly into fastboot mode. But flash it from twrp will not cause the problem.

@phhusson
Copy link
Owner

phhusson commented Feb 12, 2019 via email

@dkmgfk
Copy link
Author

dkmgfk commented Feb 13, 2019

@phhusson

Thanks alot for your info, build it by myself from the stock stable pie firmware. However the ims.apk is located in /system/priv-app. After changing that, the build script worked.

Here's the result.
ims.zip
build log
xubuntu 18.04 openjdk 8

However, imediately after installing the said apk, the signal lost, both SIM slots are showing as empty.
After a reboot, com.android.phone keeps stopping, signal lost again after a minute.
Signal restored after uninstalling ims.apk.
adb logcat
So this ims.apk is incompatible with treble aosp image?

@dkmgfk
Copy link
Author

dkmgfk commented Feb 13, 2019

Steps I've taken to build ims.apk:

  1. Fresh installation of latest xubuntu LTS. 2. Install openjdk-8-jdk, simg2img and their dependencies.
  2. Convert system.IMG, vendor.IMG to ext4 format.
  3. Mount them.
  4. Change /system/app/ims to /system/priv-app/ims in build.sh
  5. Make the script executable.
  6. Run the script.

@dkmgfk
Copy link
Author

dkmgfk commented Feb 13, 2019

"Preferred network type" works on stock Oreo vendor. On Oreo vendor, 3 options are available: LTE, 3G, 2G. Not so detailed as it is on pie. WCDMA preferred, GSM/TD-SCDMA/LTE and so on.

@dkmgfk
Copy link
Author

dkmgfk commented Feb 13, 2019

Tried a prepackaged ims.apk found on the Internet, for Lenovo ZUK Z2. Just to try my luck, since these two phones are vastly different on spec.
Showing a HD capable notification after reboot.
Placed a call, 4G didn't fallback to GSM, but can't answer this call. Video call doesn't work at all. Uninstalled.
Surely we must rely on a ims.apk built specifically for this device (build from the official stock firmware), but the one I built using the script you provided isn't working.

Any idea?

Thanks in advance.
@phhusson

@dkmgfk
Copy link
Author

dkmgfk commented Feb 13, 2019

Tried another ims.apk found on the Internet, with the same result as the previous one.

  1. Showing HD capable notification.
  2. Able to call under LTE-only
  3. Doesn't count the time after answering the call on another phone, the call works after answering it.
  4. "Hanging up" forever after tap the hangup button.
  5. Video calling doesn't work.
  6. No IPv6 address.
  7. Still can't change the network type for second SIM card (not accessible through ##4636##, crash com.android.phone if change in Settings app)

My conclusion: These ims.apk maybe compatible with previous Android versions, but not the current one. Need a working script to build a new apk.
I've noticed that the build script seems outdated, with the wrong ims.apk path.
Also I noticed there's an mysterious "imssettings" app in stock ROM, under /system/app, what is this for?
Have you enabled VoLTE on your phone? Just curious. If yes, how?

@dkmgfk
Copy link
Author

dkmgfk commented Feb 18, 2019

Video recording doesn't work in DND mode, taking photos works fine.

@Black-Seraph
Copy link

This is what screws you over.

You need to find the APK / jar which contains this class and slipstream it's smali code into your repacked ims.apk for your device's IMS implementation to work properly.

02-13 09:29:20.666 2175 2175 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/codeaurora/ims/utils/QtiCarrierConfigHelper; 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at org.codeaurora.ims.ImsService.setup(ImsService.java:55) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at org.codeaurora.ims.ImsService.onCreate(ImsService.java:79) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:3570) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:200) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6718) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.codeaurora.ims.utils.QtiCarrierConfigHelper" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/org.codeaurora.ims-5yrHX6qe9HmNUAZDAK_l8A==/base.apk"],nativeLibraryDirectories=[/data/app/org.codeaurora.ims-5yrHX6qe9HmNUAZDAK_l8A==/lib/arm64, /data/app/org.codeaurora.ims-5yrHX6qe9HmNUAZDAK_l8A==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]] 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: ... 11 more

@sanketmr121
Copy link

Tried another ims.apk found on the Internet, with the same result as the previous one.

  1. Showing HD capable notification.
  2. Able to call under LTE-only
  3. Doesn't count the time after answering the call on another phone, the call works after answering it.
  4. "Hanging up" forever after tap the hangup button.
  5. Video calling doesn't work.
  6. No IPv6 address.
  7. Still can't change the network type for second SIM card (not accessible through ##4636##, crash com.android.phone if change in Settings app)

My conclusion: These ims.apk maybe compatible with previous Android versions, but not the current one. Need a working script to build a new apk.
I've noticed that the build script seems outdated, with the wrong ims.apk path.
Also I noticed there's an mysterious "imssettings" app in stock ROM, under /system/app, what is this for?
Have you enabled VoLTE on your phone? Just curious. If yes, how?

Same results for me on my sm-j600g, phone app crashes after installing ims apk. Unable to make or receive calls, volte not working. Any improvement ?

@phhusson
Copy link
Owner

phhusson commented Mar 8, 2019 via email

@dkmgfk
Copy link
Author

dkmgfk commented Mar 10, 2019

This is what screws you over.

You need to find the APK / jar which contains this class and slipstream it's smali code into your repacked ims.apk for your device's IMS implementation to work properly.

02-13 09:29:20.666 2175 2175 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/codeaurora/ims/utils/QtiCarrierConfigHelper; 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at org.codeaurora.ims.ImsService.setup(ImsService.java:55) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at org.codeaurora.ims.ImsService.onCreate(ImsService.java:79) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:3570) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:200) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6718) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.codeaurora.ims.utils.QtiCarrierConfigHelper" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/org.codeaurora.ims-5yrHX6qe9HmNUAZDAK_l8A==/base.apk"],nativeLibraryDirectories=[/data/app/org.codeaurora.ims-5yrHX6qe9HmNUAZDAK_l8A==/lib/arm64, /data/app/org.codeaurora.ims-5yrHX6qe9HmNUAZDAK_l8A==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]] 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 02-13 09:29:20.666 2175 2175 E AndroidRuntime: ... 11 more

Thanks! However I don't have enough knowledge on this, hopefully someone else can step in.

@dkmgfk
Copy link
Author

dkmgfk commented Mar 10, 2019

Tried another ims.apk found on the Internet, with the same result as the previous one.

  1. Showing HD capable notification.
  2. Able to call under LTE-only
  3. Doesn't count the time after answering the call on another phone, the call works after answering it.
  4. "Hanging up" forever after tap the hangup button.
  5. Video calling doesn't work.
  6. No IPv6 address.
  7. Still can't change the network type for second SIM card (not accessible through ##4636##, crash com.android.phone if change in Settings app)

My conclusion: These ims.apk maybe compatible with previous Android versions, but not the current one. Need a working script to build a new apk.
I've noticed that the build script seems outdated, with the wrong ims.apk path.
Also I noticed there's an mysterious "imssettings" app in stock ROM, under /system/app, what is this for?
Have you enabled VoLTE on your phone? Just curious. If yes, how?

Same results for me on my sm-j600g, phone app crashes after installing ims apk. Unable to make or receive calls, volte not working. Any improvement ?

Samsung and LG have nonstandard ims implementations, in which some libraries of ims.apk has been incorporated into the phone.apk of the stock rom, rather than resides in the vendor partition.

@dkmgfk
Copy link
Author

dkmgfk commented Mar 10, 2019

Samsung IMS is not supported and is entirely a different issue. Le ven. 8 mars 2019 à 11:34, sanketmr121 notifications@github.com a écrit :

Tried another ims.apk found on the Internet, with the same result as the previous one. 1. Showing HD capable notification. 2. Able to call under LTE-only 3. Doesn't count the time after answering the call on another phone, the call works after answering it. 4. "Hanging up" forever after tap the hangup button. 5. Video calling doesn't work. 6. No IPv6 address. 7. Still can't change the network type for second SIM card (not accessible through ##4636##, crash com.android.phone if change in Settings app) My conclusion: These ims.apk maybe compatible with previous Android versions, but not the current one. Need a working script to build a new apk. I've noticed that the build script seems outdated, with the wrong ims.apk path. Also I noticed there's an mysterious "imssettings" app in stock ROM, under /system/app, what is this for? Have you enabled VoLTE on your phone? Just curious. If yes, how? Same results for me on my sm-j600g, phone app crashes after installing ims apk. Unable to make or receive calls, volte not working. Any improvement ? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#398 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAOOl-XCOh74Am6L7LSc9db8gL8p4V-ks5vUjyigaJpZM4a2b0r .

Just dirty flashed v111 over v110, everything works like a charm!
I have successfully obtained IPv6 address by simply changing APN protocol from v4 to v4/v6.
Screenshot_20190310-121426
I noticed a small bug of the battery saver -- the notification light in the notch will start blinking when the battery level reached or below the level set in the “auto turn on battery saver”. For now I've set it to 5% to avoid this issue.

Updated to the latest version!
Screenshot_20190310-122154

@XDomanX
Copy link

XDomanX commented Mar 21, 2019

@dkmgfk - "everything works like a charm"
Do you mean bluetooth call on headset as well? Did you find a solution for that?

@dkmgfk
Copy link
Author

dkmgfk commented Mar 22, 2019

@dkmgfk - "everything works like a charm"
Do you mean bluetooth call on headset as well? Did you find a solution for that?

Sorry, forgot to mention that Bluetooth call still doesn't work in the latest gsi image. However, this issue and VoLTE are the only problems I've found in a month use.

@Slaphappy76
Copy link

Good Morning from Germany ;)
Could that be a solution for the Bluetooth problem?

PixelExperience-Devices/device_oneplus_sdm845-common@977444a

Have a nice day :)

@Asureus
Copy link

Asureus commented May 8, 2019

flashed v111 over v110, everything works like a charm!

@dkmgfk Hi, did you mean VoLTE is working like a charm? Did you install any ims.apk afterwards? How exactly did you do it?
I just dirty flashed v113 over v110, but it did no miracle for me. Everything before and after installing ims.apk is exactly like what you described in first few posts. I tried your ims.apk and another one by myself, no luck.
I'm kinda stuck here. eager to learn from your experience. Thanks :)

@penn5
Copy link

penn5 commented May 8, 2019

flashed v111 over v110, everything works like a charm!

@dkmgfk Hi, did you mean VoLTE is working like a charm? Did you install any ims.apk afterwards? How exactly did you do it?
I just dirty flashed v113 over v110, but it did no miracle for me. Everything before and after installing ims.apk is exactly like what you described in first few posts. I tried your ims.apk and another one by myself, no luck.
I'm kinda stuck here. eager to learn from your experience. Thanks :)

@dkmgfk - "everything works like a charm"
Do you mean bluetooth call on headset as well? Did you find a solution for that?

Sorry, forgot to mention that Bluetooth call still doesn't work in the latest gsi image. However, this issue and VoLTE are the only problems I've found in a month use.

@dkmgfk
Copy link
Author

dkmgfk commented May 14, 2019

flashed v111 over v110, everything works like a charm!

@dkmgfk Hi, did you mean VoLTE is working like a charm? Did you install any ims.apk afterwards? How exactly did you do it?
I just dirty flashed v113 over v110, but it did no miracle for me. Everything before and after installing ims.apk is exactly like what you described in first few posts. I tried your ims.apk and another one by myself, no luck.
I'm kinda stuck here. eager to learn from your experience. Thanks :)

Hi!

Unfortunately none of the problems got fixed over the months.

Bluetooth and VoLTE are still not working with latest image. Sorry for making bold statements.

However it seems that these two problems are universally presented on devices with GSI ROM, eg. Mi8, Mi6X, PH-1 and a few others. VoLTE problem is device specific, and dualSIM settings still have some quirks in AOSP ROM.

But they don't bother me too much since my carrier still provides optimal GSM signal here, and I don't use Bluetooth headsets heavily.
Cheers!
An average Android user without any experience in programming

@dkmgfk
Copy link
Author

dkmgfk commented May 14, 2019

New LR.team TWRP is out! Check out the new flashing guide for details.
https://github.com/phhusson/treble_experimentations/wiki/Xiaomi-Mi-8-SE

@dkmgfk
Copy link
Author

dkmgfk commented May 14, 2019

Screenshot_20190515-003416
Screenshot_20190515-003421
Photos for the wiki

@dkmgfk
Copy link
Author

dkmgfk commented May 15, 2019

@phhusson Sorry to bother you again, (with all the notification emails), but could you validate this following statement I wrote on the device wiki page?

"GSI images relies on the stock vendor partition to work properly. So stick to the GSI image with the same Android version as the MIUI."

Thanks alot

@phhusson
Copy link
Owner

phhusson commented May 15, 2019 via email

@dkmgfk
Copy link
Author

dkmgfk commented May 15, 2019

What? No. You can run pie gsi on Oreo vendor. Le mer. 15 mai 2019 à 12:34, dkmgfk notifications@github.com a écrit :

@phhusson https://github.com/phhusson Sorry to bother you again, (with all the notification emails), but could you validate my statement I wrote on the device wiki page? GSI images relies on the stock vendor partition to work properly. So stick to the GSI image with the same Android version as the MIUI. Thanks alot — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#398?email_source=notifications&email_token=AAAA4OQNMJIG5BLI7RPTWDLPVPRK5A5CNFSM4GWZXUV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVOH2RY#issuecomment-492600647>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAA4OSRR6PC5RYJKFLZQVLPVPRK5ANCNFSM4GWZXUVQ .

Surely higher version system img can run with lower version vendor, but I encountered several more issues compared with using pie system with pie vendor
Namely MTP not functioning, more problematic preferred network mode switching
As described here, third post. https://forum.xda-developers.com/mi-8-se/how-to/comprehensive-guide-installing-aosp-gsi-t3930100/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants