Open Skyrimus opened 6 years ago
If you need official MTK ALPS 8.1.0 sources, i can give you it.
I found an easy way to make incoming calls work. Just open /vendor/lib/mtk-ril.so in a hex editor and replace the string "AT+EAIC=2" with "AT+EAIC=3". This disables incoming call approval which requires special proprietary support in the telephony frameworks.
This fixes both incoming calls and USSD codes.
Tested on a MT6580 with kernel 3.18.79 on GSM 3G using Phh-Treble GSI 9.0
@mmoreyrav Doesn't change anything on mt6735, still no output of ussd and no info about incoming call
Works on mediatek x20 SoC, I'll test later on more SoCs.
Thanks a lot for that @mmoreyrav ! FWIW, I had https://github.com/phhusson/platform_frameworks_opt_telephony/commit/65a043e3c1ce7fe44dc42966c60329a806da5b85 as work in progress to handle that, but I'm more than happy to scrap this and use your fix instead.
@phhusson Yeah, I was lucky to find that workaround. I was ready to try more desperate things like what you mention. I hope there's no more proprietary stuff needed to properly support MTK phones.
@Dinolek Maybe it has another problem. You should check the radio logs. This workaround only handles:
RILC-RP : incomingCallIndicationInd: radioService[0]->mRadioIndicationMtk == NULL
It seems that USSD codes were not fixed. When a final (USSD_MODE_NW_RELEASE) USSD message arrives, its contents are discarded by the telephony framework. I wonder why AOSP does that.
@mmoreyrav In mtk frameworks it handles it using onUssdStkHandling, which is pointless, because it is same as notify. We can just output it as USSD_MODE_NOTIFY instead.
@Dinolek Yeah a simple fix in GsmCdmaPhone::onIncomingUSSD should be enough:
if (isUssdRelease && !TextUtils.isEmpty(ussdMessage)) {
// Some mobile networks send a release message with text instead of a notify message
found.onUssdFinished(ussdMessage, isUssdRequest);
} else if (isUssdRelease) { ...
But why it's not fixed, it should affect all phones on certain mobile networks.
Sorry, what does it mean that "incoming call approval" is disabled? Does that mean that when you receive a call it automatically answers it or that you can not have a blacklist?
When you call someone, the phone can either answer "all is good I'm ringing" or "I'm busy". On the first case the caller gets a normal ringtone, on the second they get the busy tone.
In AOSP, it is assumed to be always the first case. MTK did an extension to that but AOSP doesn't know it is supposed to answer when the radio asks in which of the two cases it is.
Le dim. 2 sept. 2018 à 20:18, Luca Costa notifications@github.com a écrit :
Sorry, what does it mean that "incoming call approval" is disabled? Does that mean that when you receive a call it automatically answer it or that you can not have a blacklist?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/57#issuecomment-417949167, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAOOk2twBEElWsVv7lgPzMJg6nw737Cks5uXCD7gaJpZM4UPGKc .
have not yet solved the problem of ussd ???
@Taras2000 Well, somebody has to compile and test the fix I proposed and if it really fixes the USSD problem then @phhusson may want to include it. Though it's not really a phone hardware-related problem.
@mmoreyrav And where is this file and how is it called? I would try to edit
@Taras2000 I linked to it in one of my previous comments in this issue in exactly the point that needs fixing and with the source code that must be added. If should be simple enough to edit assuming that you know how to edit Java code and compile/build Android from source code.
Umidigi A1 pro has this issue too. MediaTek MT6757. Its the only thing stopping me using treble GSI for my phone at the moment. If anyone can tell me what needs changing am willing to test.
@stevea76 I assume you refer to the incoming calls not working issue and I suppose you have tried the latest phh-treble images that should fix that problem. I also assume that making calls, sending & receiving SMS and using mobile data work. If so then maybe your phone uses a different RIL implementation. So you could try searching all the files in /vendor/lib and also in /vendor/bin for the string "AT+EAIC=2". If you find a different file that has that string and you patch it as described above then it may fix the problem.
@mmoreyrav Yes to all of your reply. I used the latest images, used hex editor to replace the "AT+EAIC=2" with "AT+EAIC=3" still no luck with incoming calls. I used my landline to call, went to voicemail after 40 or so seconds, when disconnecting call I get a missed call alert message on the mobile.
@stevea76 Well, then you'll have to inspect the radio log (adb logcat -b radio) during an incoming call and look for some clue within it. For example I found the following line:
RILC-RP : incomingCallIndicationInd: radioService[0]->mRadioIndicationMtk == NULL
which allowed me to understand the problem in my case.
Umidigi Z2 (MTK6763) No 4G cell signal and the only receiving weird 3G bands. Phone calls, incoming or outgoing, and cell data not working. Anything I can try editing to enable cellular data or is MTK ril update required?
I have the same problem with patched version ("AT+EAIC=3" is already in the libs). It works much better than before but after some time the phone just lose radio signal. I don't know what triggers it (sometimes it will break after answered call, sometimes it will work after call). Any ideas how to try to provoke it?
Did someone try to use mtk-ril.so from stock ROM (although Android 8.0 at the moment, IIRC)?
USSD never worked for me, though.
At the risk of wasting time trying something which won't work, in which directory is mtk-ril.so found and would a different version be need for Android 8.x vs. 9? Factory ROM for my device is on 8.1 and I doubt Umidigi will be updating to 9 anytime soon if ever.
in my umidigi z2, at+eaic fixed the incoming call bug, but now remains the sms bug.. i cannot receive sms, only can send sms
@apogen Which phh build do you have working cellular service and are you receiving 4G LTE signal? May I also ask which version of TWRP you used to load phh ROM for your Z2 as one on Umidigi website not working here.
There is a long list of possibilities for SMS issues however if you are using a Pixel based ROM, it may be an issue with Hangouts. For whatever reason, Pixel phones still include Hangouts app even if its not used for messaging. You might try installing it however make sure Messages is the default SMS app. Launch Hangouts app, tap 3 bars, settings, account, Calls and SMS - make sure Messages slider tab is off. I have had exact issue you described resolved because Hangouts Message tab was on.
in fact i flashed havocos through fastboot.. then directly boot to twrp (the one skeleton1911 post for umidigi z2) and flash opengapps nano.. then boot system, root using magisk and did mods to mtklib-ril files..
p.s. i also change those lines to build.prop in /vendor persist.mtk_epdg_support to 0 persist.mtk_ims_support to 0
@8472 did you managed to achieve 4g?? also did any gsi image have sms receiving fixed?
No, I have not been able to get working 4G with any Treble GSI build. I think it will require help from phh.
@nithothidr did you check if incoming sms working also?? i cant received sms
@Apogen I have Umi z2 also, please what tool dit you use in editing vendor/lib/libmtk-ril.so
@MACROsoftOfficial using mixplorer copy temporary limtk-ril.so of both lib and lib64 folders to your internal storage.. Then using hex editor (play store) edit both files.. Then using mixplorer again overwrite the files you modified back to lib and lib64 folder
@Apogen please can you help me get the /lib/libmtk-ril.so and /lib64/libmtk-ril.so files of your Umi Z2 original? Because I am really finding it difficult editing these stuffs.All I see are series of 0's
@MACROsoftOfficial https://mega.nz/#F!a4M0lCwZ!h5N_PWmUy3Rvz61dWHLCxA
@Apogen thanks for swift response, but I am facing 2 issues (I) my device can't discover my sim cards anymore (2) after editing /vendor build.prop persist.mtk_epdg_support to 0 persist.mtk_ims_support to 0
My WiFi now goes on and of. Pleas can you get me the default permission you are using for /vendor build.prop and all default permission you are using for /lib and /lib64 maybe that will be of help if it doesn't work I hope you or anyone else can suggest me a solution
Patching AT+EAIC=2 to AT+EAIC=3 fixes incoming calls on MT6739 chipset, library located at
/vendor/lib/libmtk-ril.so
adb root adb remount adb shell cp -a /vendor/lib/libmtk-ril.so /mnt/phh/libmtk-ril.so adb shell sed -i -e 's/AT+EAIC=2/AT+EAIC=3/g' /mnt/phh/libmtk-ril.so adb shell chcon "u:object_r:vendor_file:s0" /mnt/phh/libmtk-ril.so adb shell mount -o bind /mnt/phh/libmtk-ril.so /vendor/lib/libmtk-ril.so adb shell setprop ctl.restart ril-daemon-mtk adb shell stop adb shell start
how to be?
@MACROsoftOfficial no need to edit biild.prop just copy and replace the libmtk-ril.so files using mixplorer, cause mixplorer set the appropriate permissions automatically
@Apogen I still could nor get the incoming call working even after following your instructions.
N:B I am coming from Eragon V. 2 Rom, isn't this the same Rom you switched from?
@MACROsoftOfficial no i am coming from latest stock rom and i have install havoc-os image
@Apogen I will try flash the stock Rom later to see if that will fix it
@Apogen I flashed the stock Rom before havoc OS but I still couldn't get the fix to work. And also are you able to use mobile data?
And also are you able to use mobile data?
no(
No I couldn't use it either
MT6735, ril not works after mtk-ril patch
phhusson, this is temporary fix for specified SoCs, but it need real fix for all mtk telephony, because this is fix not work on more mtk chipsets.
Why you don t use source code of official ALPS 8.1 to fix it? I gave you it in past year...
i have redmi 6a, i tried phhs AOSP pie, i was not able to receive or send sms and volte calls. however incoming and outgoing calls are working on 2g and 3g network. 4g data also works. please tell me a solution for sms.
Chiming in -- no mobile data on either 3G or 4G on MT6739. Any help?
Chiming in -- no mobile data on either 3G or 4G on MT6739. Any help?
welcome aboard the MTK train
@medved9112 type adb shell first
I haven't had much time to troubleshoot this issue but did recently load a few GSI ROM on MTK6763 phone with mixed results regarding phone functionality. The one ROM that does seem to work is Benzo ROM. Can a few others try it and confirm LTE works for you as well?
I did test it once long ago, only issues were sound, losing signal randomly and sometimes not being able to receive calls. I've come to know that the sound issue was device-specific which is fixed now. I might test it again some time
On Fri 30 Nov, 2018, 11:16 AM 8472 <notifications@github.com wrote:
I haven't had much time to troubleshoot this issue but did recently load a few GSI ROM on MTK6763 phone with mixed results regarding phone functionality. The one ROM that does seem to work is Benzo ROM https://forum.xda-developers.com/project-treble/trebleenabled-device-development/gsi-benzo-rom-9-0-t3837127. Can a few others try it and confirm LTE works for you as well?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/57#issuecomment-443098396, or mute the thread https://github.com/notifications/unsubscribe-auth/AizZZ-LL_kzx0iWzIRWK71MnwW0PeLwTks5u0MY9gaJpZM4UPGKc .
Also my phone is mt6737. You might want to ask @LinuxPanda , he is more involved in this
Wound up SMS and calls to МТК6739(arm) setting the values to 7 AT + EAIC = 7 But mobile Internet does not work how to be?
Not working USSD, i call *100#, USSD window shows on 1 seconds and close, dont show info of account, on any MTK SoC logcat_ussd.txt
Not working incoming calls on any MTK SoC logcat_incoming_calls.txt