This guide is to fix all the problems that you may face in your device after porting a new ROM. Using this guide you will able to fix bluetooth, camera, sdcard, radio, No Signal and many more issues in any Custom ROM for MT65xx device. This is universal guide and will work on all MT65xx devices.
Replace From Stock To Port :
To fix Radio and No Signal :
- \system\etc\firmware\mt6620_patch_e3_hdr.bin
- \system\etc\firmware\mt6620_patch_e6_hdr.bin
- \system\etc\firmware\WMT.CFG
- \system\lib\modules\mtk_fm_drv.ko
- \system\lib\libfmcust.so
To fix Bluetooth :
- \system\lib\libbluetooth_mtk.so
- \system\lib\libbluetoothem_mtk.so
To fix Wifi :
- \system\lib\modules\mtk_stp_wmt.ko
- \system\lib\modules\mtk_wmt_wifi.ko
To fix Storage :
For 4.2.2
- \system\etc\vold.fstab
- \system\etc\vold.fstab.nand
For 4.4.x and 5.1.1
- /system/bin/vold
- /system/bin/pq
- decompile framework-res.apk of both stock and port and replace storage_list.xml and recompile
To Fix Camera :
- \system\lib\hw\camera.default.so
- \system\lib\libcamera_client.so
- \system\lib\libcameracustom.so
- \system\lib\libcameraprofile.so
- \system\lib\libcameraservice.so
- \system\lib\libmhal.so
- \system\lib\libmhalcontent.so
- \system\lib\libmhaldrv.so
- \system\lib\libmhalmdp.so
- \system\lib\libmhalpipe.so
- \system\lib\libmhalscenario.so
- \system\lib\libmhalutility.so
- \system\etc\permission\android.hardware.camera.front.xml
- \system\etc\permission\android.hardware.camera.xml
To Fix Bootloop :
- libandroid_runtime.so
- libandroid_servers.so
- libmedia_jni.so
- Repack boot.image
Fix Sensors :
- /system/bin/akmd*
- /system/lib/libsensors- so
- /system/lib/libms3c_yamaha- so
- /system/etc/firmware (folder)
- /system/bin/servicemanager
To Fix GPS :
- /system/xbin/ibmnlp
- /system/etc/gps.conf
Fix Touchscreen :
- /system/usr
- /system/usr\keylayout\Generic.kl ->fix HomeKey
Fix Sound/Audio :
First Replace :
- \system\lib\libaudio.primary.default.so
If it doesn't work then replace all :
- \system\lib\libaudio* .so
So, this is it. I hope you were able to fix issues and bugs in your Custom ROM for MTK. If you have any more bug fixes then please comment them below.
Credits :
- Ajit Guraya
- jawaad_s
- Scrack
Replace From Stock To Port :
To fix Radio and No Signal :
- \system\etc\firmware\mt6620_patch_e3_hdr.bin
- \system\etc\firmware\mt6620_patch_e6_hdr.bin
- \system\etc\firmware\WMT.CFG
- \system\lib\modules\mtk_fm_drv.ko
- \system\lib\libfmcust.so
To fix Bluetooth :
- \system\lib\libbluetooth_mtk.so
- \system\lib\libbluetoothem_mtk.so
To fix Wifi :
- \system\lib\modules\mtk_stp_wmt.ko
- \system\lib\modules\mtk_wmt_wifi.ko
To fix Storage :
For 4.2.2
- \system\etc\vold.fstab
- \system\etc\vold.fstab.nand
For 4.4.x and 5.1.1
- /system/bin/vold
- /system/bin/pq
- decompile framework-res.apk of both stock and port and replace storage_list.xml and recompile
To Fix Camera :
- \system\lib\hw\camera.default.so
- \system\lib\libcamera_client.so
- \system\lib\libcameracustom.so
- \system\lib\libcameraprofile.so
- \system\lib\libcameraservice.so
- \system\lib\libmhal.so
- \system\lib\libmhalcontent.so
- \system\lib\libmhaldrv.so
- \system\lib\libmhalmdp.so
- \system\lib\libmhalpipe.so
- \system\lib\libmhalscenario.so
- \system\lib\libmhalutility.so
- \system\etc\permission\android.hardware.camera.front.xml
- \system\etc\permission\android.hardware.camera.xml
To Fix Bootloop :
- libandroid_runtime.so
- libandroid_servers.so
- libmedia_jni.so
- Repack boot.image
Fix Sensors :
- /system/bin/akmd*
- /system/lib/libsensors- so
- /system/lib/libms3c_yamaha- so
- /system/etc/firmware (folder)
- /system/bin/servicemanager
To Fix GPS :
- /system/xbin/ibmnlp
- /system/etc/gps.conf
Fix Touchscreen :
- /system/usr
- /system/usr\keylayout\Generic.kl ->fix HomeKey
Fix Sound/Audio :
First Replace :
- \system\lib\libaudio.primary.default.so
If it doesn't work then replace all :
- \system\lib\libaudio* .so
So, this is it. I hope you were able to fix issues and bugs in your Custom ROM for MTK. If you have any more bug fixes then please comment them below.
Credits :
- Ajit Guraya
- jawaad_s
- Scrack
[Guide] Fix All Bugs When Porting Custom ROM
Reviewed by MTK Hacker Pro
on
9:59 AM
Rating:
How about Unfortunately com.android.systemui stopped?
ReplyDeleteAlso when locked and I try to unlock it, no display. Just black. Only capacitive keys light up.
I am trying to port the miui 7 rom that's here in your blog in my MP Agua RIO, clone of wiko rainbow.
Try to format /cache
DeleteTry switching on skip lockscreen option
Deletein Developers option
Thanks,i tried to port cm 12.1 for my phonepad duo x510u but stuck on boot logo;i'll try to fix bootloop asap
ReplyDeletehow to fix no vibration ?
ReplyDeleteTry to replace libhardware_legacy.so but i'm not dure only i found it on a miui forum
ReplyDeleteAdd
ReplyDeleteqemu.hw.mainkeys=1
at the bottom of build.prop to remove an unwanted navigation bar.
(just thought I'd add something)
thank you
Deletealso correction : first search if that line is present or not, if it is present don't add it or you will be stuck at animation or will have bugs
Good point. I never found a ROM that already had it, so I didn't consider it.
DeleteAnother thing that comes to mind is replacing libcustom_nvram.so in order to solve audio issues. As far as I know, you have to do a factory reset afterwards, for it to produce effects.
nowadays all ROMs have it, libaudio.primary.default.so 90% of the time solves it
Deletehow to fix sound recorder, google search, record in messenger problem whit microphone?
ReplyDeleteAnother one I just figured out when trying to port MIUI 7 for MT6592:
ReplyDeleteIn case there's no sound output from the speaker, replace these:
system/lib/soundfx/libaudiopreprocessing.so
system/lib/libaudio.primary.default.so
system/lib/libaudiocompensationfilter.so
system/lib/libaudiocustparam.so
system/lib/libaudiosetting.so
system/lib/libaudioutils.so
Any other files replaced may result on a bootloop (MIUI is very picky). As a matter of curiosity, I took those files from a CM12 ROM, instead of the stock.
ok, I will update this post soon with your patch :D thnaks
DeleteWhat CM12 rom did u use ?
DeleteAny idea how to fix malfunctioning hardware (capacitive) keys in ported ROM's?
ReplyDeletePretty much 80% of all ROM's I port to my device, a Kingzone K1 Turbo (MT6592), 4.4.x and 5.x.x, have strange behaviour on the hardware keys.
Home button is mostly the problem as it doesn't go back to the homescreen but just ''selects'' a file or entry in a menu or something..
Which files control the hw keys and which should I replace? If I can get the hw keys working I can get pretty much every ROM here fully functional for my phone type from simple CM11 4.4.4 to Bliss / Carbon 5.x.x...
I have a stock 4.4.2 ROM with 3.4.67 kernel available and also a decently well working CM12.1 ROM specifically for my phone model which has working keys.
I have another question as well. The CM12.1 ROM available for my phone has a wierd problem with the camera which means photo's work but only shows 5MP or lower for the camera which is a 14MP (Sony sensor) model. Also vdeo recording doesn't work as it ''can't connect to the camera''. Happens with all camera apps.
Any ideas?
replace genric.kl
DeleteCM 12.1 was not made for your device. The developer just ported it from device having 5MP camera
Thanks. I'll see if i can get hw keys working in CM11 and Bliss. If i can they should be more or less fully functional ROM's.
DeleteCan u make a Guide for usb debugging? Pls. My device is not recognize on my computer. Even though i installed it. I saw guides but not for mtk devices.
ReplyDeleteplease do some research before you comment stupid things, no offense
DeleteGot another one for you for my Kingzone K1 Turbo.
ReplyDeleteI managed to get both the hardware keys and audio fully working in BlissPOP using the libs from a working CM12.1 ROM for my phone.
The only actual important thing not working now is the 2nd SIM slot. It has a full size SIM (SIM1) and a microSIM (SIM2) and the SIM2 microSIM slot has no data connection. Only EDGE. It does work in CM12.1.
Which files can I replace to have a chance at getting both SIM slots to work? I currently don't have a full size SIM card so.. Would like to keep using slot 2.
Oh btw, lots of thanks for all your help so far. You've been amazing!
Deleteamazing thanks for the share. Are you using the new beta 6
DeleteActually i'm using a build from needrom.com from fire855 and skysauger and some others who made it for the Kingzone. It works pretty well but is far from complete. It's based on the Beta 6 as far as I know.
DeleteI discovered the camera and GPS aren't working either but i'm zipping a test ROM with the camera and gps libs from that ROM now..
ok
DeleteCamera works, GPS doesn't. Autorotation and compass (sensors) don't work either. This is going to be a lot of work.. :)
Deletedon't expect the GPS to work, for now that is
DeleteHi, after have ported a Lollipop rom for MT6582 devices I can't access to my recovery, if I install it (with mobileuncle or spflashtool) I have a bootloop issue into recovery. There is a solution ? Please
ReplyDeletethe recovery you are using conflicts with the ROM, no option either chose recovery or the ROM or try any other Lollipop ROM which ROM did you actually try
DeleteOk thank
DeleteI have tried Carbon rom, Blisspop rom, and now cyanogenmod 12.1 beta 6 rom
ReplyDeleteCan i port micromax aq-4501 lollipop manufacturer rom to my alcatel onetouch pop7 running 4.4.2 stock kitkat?
ReplyDeleteBoth devices carries the chipest wich is mt6582
But the cores of cpu are different but the ghz is the same and also both 32bit
Please need reply as fast as u can im about to do it
Im not afraid of soft brick i can fix it but wanna know if its possible....thanks a lot
no
DeleteI bumped into a couple of issues while porting a MIUI 7 to my device, maybe someone knows how to solve them.
ReplyDeleteFirst, I must admit it was a "dirty" port: I didn't replace the whole lib/hw folder, I didn't port /mddb folder, and some others. Instead, I just ported the essential files for the ROM to boot on my device (mainly libMali, hwcomposer, libfeatureio, libcameracustom, libdpframework, vold, sdcard, and little more), and it's been working rather nicely for such a weak port xD
My problems at the moment are:
1 - Wrong RAM being displayed on the recent apps screen. This has happened to me on a few ROMs already, and I couldn't figure out what causes it yet. My device has 2Gb RAM, the device from which I ported has 2Gb RAM, and the ROM now presents me 2.2Gb RAM :/ Not changing the device in build.prop didn't help, by the way.
2 - MTKDroidTools doesn't detect the phone when connected to the PC, and adb devices doesn't find any. So far, this only happened on this specific MIUI 7, and I see no reason why ADB would run off like that. The device is shown on windows as a media device, and I can transfer files to and from it in MTP mode (storage and sdcard), but no ADB. I also tried uninstalling and reinstalling all drivers (VCOM, preloader), and it made no difference. Being this such a weird issue, I was wondering if it is possible that some kind of update is needed to PDANet, or if I should try porting some adb related files from the stock ROM.
Any help is appreciated. Thanks beforehand.
RAM can be changed from build.prop (i believe, mostly in build.prop)
Deletedid you turn ON Usb Debugging
The ADB issue is solved: I'm an idiot xD
DeleteLooks like, on this particular ROM, ADB is only available through PTP mode, instead of MTP, and it never ocurred to me to change it -.-' It's working perfectly now.
Regarding the RAM, I have no idea what to change on build.prop, and comparing to the build.prop of ROMs without that problem, I see no difference that might cause it. I'm more inclined to think it's a side effect of a bad port, like libs needing to be replaced. Still doesn't make much sense, but everything's possible when we don't do things properly xD
Thanks for the help, though ;) I'll try to do a decent port next time and see if it gets fixed (in which case I'll really have to pinpoint the issue, which will be a pain, lol)
no, even if you do a complete port the ROM whill show RAM of the device from which you ported. MIUI used to have it in build.prop maybe they changed it
DeleteHey bro, ¿you know how to fix "can't connect to microphone" issue? I had have that problem with Google app, whatsapp and facebook messenger
ReplyDeletein CM based ROMs ? if yes there is already a Q/A post for lollipop which has a fix for it
DeleteIt is CM bases, but is KitKat not Lollipop, anyway, i'll give it a try. Thanks
Deletehey bro just a little help
ReplyDeleteussd code is not running. I'm not able to know my balance. every time I dial the number ussd code runs and in few second it disappear and normal screen appears. what should I do.
simple suggestion pls
USSD is bug in all CM and CM based ROMs, already stated that
Deletethe simple suggestion is go back to your stock rom nad read posts before you comment
Deleteyes thanks but i already flashed my stock rom now it has this prb :(
DeleteI have a problem, my camera doesn't work very well and my phone storage (16Go ROm I mean) can't be mounted. I already tried to fix it using this topic, but it doesn't work for both. So if someone have this problem, and that he has solve it, I'm listening ! thanks in advance for help
ReplyDeletewhich ROM ?
DeleteInspired 6, I forgot to mentioned it :/
Deletebug fixes are above, there is already storage fix for 4.4.x and 5.1.1
DeleteHello, i've got the known problem of touchscreen "reversed" but when i try to overwrite libinput.so with the stock one, the touch doesn't react at all apart of the virtual keys (home, back, menu).
ReplyDeleteCan you help me please?
Thanks
then get back the original libinput.so and follow the post "Fix upside down screen" it can be found in the tutorials section of this website
DeleteI've already done the trick on build.prop (ro.sw.hwrotation = 0 ==> 180) and the lcd is ok, but the touch sensor is always y-inverted relative to the lcd. Excuse me if i put my question in the wrong section.
Deletereplace libMali.so
Deleteunfortunately i've not libMali.so
Deletelibmali is an important file bro, look for it
DeleteI haven't any libMali.so file either in stock and port rom.
DeleteIf it can help... i'm trying to port a rom from star 9500 to jiayu g3s both mtk6589 and android 4.2.1.
thank you
there is something really wrong, libmali.so is a really really important file and it is no possible for it to just "not be there"
DeleteHello to all !
ReplyDeleteWhat if I can't connect to playstore? It says "Check your connectin and try again" but I have a strong signal in wifi. Is there something I need to copy from my stock rom?
stock ROM ? custom ROM ?
Deleteemail me at : ajit4guraya@gmail.com
Bro,
ReplyDeletewhen switch off and switch on phone not power ups.but,reboot from recovery works.
also data connection not working with two sims inserted
those are CM ROM bugs no fix
DeleteNavigation Bar problem. Please Help
ReplyDeletewhat is the problem ?
DeleteSorry for being a Noob. But how do you copy these files from the stock Rom to your Rom ?
ReplyDeletecopy it and paste it simple
DeleteI looked in the comments above and a guy solved his no sound problem using files from CM12 Rom , So i downloaded a CM12 nightly rom and it doesnt have the .so files.
DeleteI have flashed the MIUI 7 rom on my Idol x+. And there is no sound. I ll try from the stock rom. Hope it works
Hey I copied the lib files from a stock rom and now my phone wont start. Helppp Mee
Deleteyour android phone is hard bricked if it doesn't boot anymore.
Deletestudy this tutorial to unbrick
http://www.mtkroms.com/2015/02/how-to-backup-and-restore-your-mtk.html
How to fix Navigation bar problem When porting ROMS? Please help
ReplyDeleteif you don't intend to tell what the exact problem is then how do you intend me to provide a solution
Deletehow to solve "can't connect to camera" bug on lollipop 5.1 rom
ReplyDeletehaving chipset MTk 6753?
Can't download on google play store it's downloading but stock on 98% or 95%" I tried different apps but its the same, and I all tried install my apk file its installed and work fine.
ReplyDeleteThe custom rom I tried is [4.2.2] LolliFox ROM For MTK6572*Only 126MB*
thanks for any help to fix this bug.
not faced any issue like that
DeleteThanks for your response' I will find way to fix this"
DeleteHi, I dont like the keyboard' I like to replace it ios8 keyboard, what files I will replace? I think system/usr/keylayout?
ReplyDeletedownload IOS keyboard from playstore
DeleteIn porting/replace way? is it possible?
Deletegps,all sensor, and compass arent working but its detected. what should i do sir?
ReplyDeletei port cm12.1 stable v3 mt6582
i haven't posted about that ROM so ask the dev not me
DeleteSound is not working on MT 6592 (htc desire 820 G Plus), if i replace libaudio.primary.default.so file then mic dont work and i have replaced the audio_policy.conf file but still mic got disappeared. if i connect headphone then i can talk through headphone mic , please anyone solve my issue
ReplyDeleteROM ?
DeleteSamsung s5 Lollipop themed rom http://www.mtkroms.com/2015/04/galaxy-s5-for-mt6592.html
Deletesorry for late reply , please can you solved it for me , i loved this rom and everything is working except the mic
I ported 2 different rom and i have 1 bug and i cant find solition. after flashing rom it install itself nicely boot is done , after boot 1 or 2 minutes later it stuck and reboot, again, again, again. do you have any idea for this? thanks
ReplyDeletenot ported correctly
DeleteHI, I ported cm12.1 beta 4 for mtk to a wiko sunset 2. The rom is booting and, thanks to this guide, I got Wifi and Bluetoeth working. Anyway, I still cannot get radio (RIL) and audio working following this guide. Can someone help me?
ReplyDeletei have not made cm 12.1 beta 4 so contact the dev
Deletehi boss one help pls if i locked my phone i can't open it until i remove my baterry from phone
ReplyDeleteHi I want to fix the camera"
ReplyDeletebecause when I'm going to open camera something appear like unfortunately gallery has stopped"
but when I'm going to fix this, replacing files from stock rom to port rom
some files is missing from the stock and custom rom
the following are missing
libmhal.so
libmhalcontent.so
libmhaldrv.so
libmhalmdp.so
libmhalpipe.so
libmhalscenario.so
libmhalutility.so
Thanks for the help to fix it.
same for me, also i replaced all camera* .so and still fron camera dont work so maybe some file is missing or other file is needed to replace
DeleteHopefully someone can help us to fix it,
Deletethis is the common bug of custom ROMS I tried'
I'm still searching to find out to fix it'
try and try :)
Everything is good....but camera is green & when I connect Headphone, System UI stops
ReplyDeleteHi Hacker Pro, thanks for the great ROM and porting instructions.
ReplyDeleteI installed the Bugless CM12.1(http://www.mtkroms.com/2015/12/bugless-cyanogenmod-12.1-for-mt6592.html) ROM on my Tecno phantom z mini. It works well except the camera. Tried all the above fixed, but still getting 'Unfortunately, Camera has Stopped' each time I try opening my camera app.
Please any help will be much appriciated.
it says com.android.systemui and com.android.phone has stopped how can I fix it
ReplyDeletenot ported correctly
Deletehi sir how i can fix my issue to xolo hive rom to my cloudfone excite 501o. it successfully booted and use the rom but in a couple of minutes it turn white screen and reboot.. and also the volume,power, and capacitive button not working how can i fix this issue.. tnx
ReplyDeletei have ported ur rom succesfully but with some bugs .
ReplyDelete1)rom internal storage shows incorrectly tried replacing vold and sdcard and res.apkbut no use.
2)cant add google account it says doesnt have reliable connection but browser works fine .
please help me clear this bug
Hi, I don't know how to port cuz I don't have a computer and my phone is low budget. I tried replacing "system/lib/libaudio.primary.default.so" but it doesn't work. I took out the file from a stock rom thou.
ReplyDeletehey bro, can you help with this problem, after i ported CM 12.1 and flash it to my Pulse X140, it's stuck on boot logo,
ReplyDeleteHey sir.
ReplyDeleteI have ported dark fab mtk 6582 jellybean i flash it with philiz recovery i show ne bootloop i have remove battery and add it agian and i opened recovery abd aroma file explorer and i go to dalvic cache folder i found the system have optimized 15 file all of them from the framework so ithink the system run framework folder and doesn't go to the app folder.
Thank you for listing to me.
Bro Can You Help me... I Cant Fix The Audio of Exodus 5.1 Lollipop CM12.1 Base.. Please.. I Already Replace the libaudio.. but nothing happens... But when im using headsets.. Its Ok but if its Speaker.. nothing.. Help me bro
ReplyDeletewhen i ported the cm 12.1 rom the keys and buttons
ReplyDeletedoesnot worked how to fix this help me pls
delete usr folder and use usr folder from working CM ROM (if no, then use from stock)
Delete
ReplyDeletePlease help me. I flashed Samsung S5 custom rom on my Infinix Note, the rom is very cool and I am heads over Hills but when making a call, I can hear the other person but he/ she can not hear me. Please assist me with any solution. Thanks
cyanogen 12.1 how to fix a audio bug
ReplyDelete(i have tried your tutorial not work)
please help