PORT ROMS FOR x1Grand - - Android General

1. Search and download the ROMs which u wanna port (Phone from which u port the rom must be running on chipset mt6582 and android 4.4.2)
2. No need of any stock rom, download the autoport ,link is given below (in autoport.zip u'll get all the the files/folders that u'll have to replace)
3. And a little patience.
It is only for stock based roms , not for roms like miui, emui, lewa os, etc..
STEPS FOR PORTING-
1. Extract the port rom and Autoport
2. Copy boot.img from autoport to port rom
3. Open system then go to bin folder, copy both pq and vold from autoport to port rom
4. Open lib folder and copy all files from lib of autoport to port rom (only files not folders)
5. Now delete hw folder that is in lib from port rom and copy it from autoport
6. Go back and delete vender folder from port rom and copy it from autoport
7. Go to etc folder and delete firmware and wifi folder from port rom then copy them from autoport , u're done
8. Now zip the port rom and flash via recovery.
9. (most important) dont forget to give credits to the developer of that rom
]
SOLUTIONS FOR MOST FOUND BUGS-
Stuck on bootlogo or black screen comes after boot logo = replacelibMali.so from any working rom for ur device.
Location - system/lib
Screen upside down = open build.prop of ur port rom with notepad++ find this line ro.sf.hwrotation=180 and change 180 to 0 , if it is already 0 then change it to 180.
If u will find more bugs then i m here to help u..
DON'T FORGET TO INFORM WHETHER IT WORKED FOR U OR NOT..
FIND ME ON FACEBOOK
OFFICIAL x1Grand FB GROUP
Solution of bugs..
--Bugs Solution --
This post is for those porters who have facing
bug after successful boot into custom rom
BUG FIXING
Here is few most encountered bugs after porting
and their solutions.
(If you get any more bugs and solutions please
let me know. I will add them here. It will be
helpful for all.)
These r
the
solutions:-
1. FOR NETWORK RELATED ISSUES (3G)
Replace from /etc folder, mddb then replace
agps_profiles_conf, apns-conf,epo_conf, spn-
conf, virtual-spn-conf-by-efpnn, virtual-spn-conf-
by-efspn, virtual-spn-conf-by-imsi
2. FOR WIFI TOGGLE PROBLEM
Replace wide-dhcpv6, wifi in /etc folder
3. FOR INTERNAL / EXTERNAL MEMORY NOT
MOUNT PROBLEM
Replace vold.fstab from /etc folder
4. FOR HIGH AUDIO VOLUME ISSUE
Replace libcustom_nvram.sofrom /lib
5. FOR CAMERA NOT CONNECTED ISSUE /
CAMERA GREEN / CAMERA FORCE CLOSE
"unfortunately camera has stopped"
Replace first libcamdrv.so (needed for 6582
devices) and check if not success then replace
libcameraservice.so from/lib. If still not success
then keep on replacing one file at a time and
check.
Camera problem is the one major bug in this type
of porting. You have to have patience. This will
take half of your energy.
6. FOR AUDIO NOT COMING IN LOUDSPEAKER
MODE
Replace libaudio.primary.default.sofrom /lib
If still sound related problem:
Replace all libaud*.so
Sometimes replacing all audio files give you a
boot loop in that case replace only
libaudio.a2dp.default.so
libaudio.primary.default.so
libaudiocompensationfilter.so
libaudiocustparam.so
libaudiosetting.so
libaudioutils.so
7. FOR FLASH LIGHT NOT COMING FROM
CAMERA
Replace libfeatureio.so from /lib
8. FOR FM PROBLEM
Replace from /lib/module folder mtk_fm_drv.ko
9. TO FIX GPS
Replace from/lib/module folder mtk_stp_gps.ko
10. TO FIX COMPASS
Replace libsensorservice.so from /lib
11. TO FIX VIDEO SHOWING PIXELS AND
GLITCHES
Replace libvcodecdrv.so from /lib
12. SHOWING WRONG RAM INFO IN TASK
MANAGER
Don't change ro.product.device value in the
build.prop.
13. FOR GREEN CAMERA/ LAG / NO WALLPAPER /
NO STATUS BAR (IMPORTANT FILE FOR MT6582)
Replace libdpframework.so from lib folder
14. PROBLEM WITH 2G/3G SWITCH
Open Dialer and type *#*#4636#*#*
If a Pop Up appears go to Phone Information and
choose your preferred network type.
15. PROBLEM DOWNLOADING EPO
Replace in framework folder
mediatek-common.jar
mediatek-framework.jar
mediatek-op.jar
mediatek-telephony-common.jar
16. ANY RESOLUTION PROBLEM
Add this line to build.prop
ro.sf.lcd_density=your phone screen dpi
ex- ro.s
17. SOME KEYS NOT WORKING
Replace keylayout folder under /usr. If still not
work then replace the whole /usr folder.
18. TOUCH SCREEN PROBLEM
(Sometimes screen behaves weird ..means for
example if you touch bottom left effect on top
right ...almost opposite response)
Replace libinput.so from /system/lib folder.
19. BOOTLOOP ON HDC CLONES
Replace libsync.so from /system/lib folder.
20. WIFI TETHERING PROBLEM
Replace dnsmasq from /bin folder.
21. SCREEN IS UPSIDE DOWN
In build.prop find this line
ro.sf.hwrotation=0
change the value 0 to 180.
ro.sf.hwrotation=180
22. Problem with Proximity Sensor
Replace nvram.so, nvram_platform.so,
nvram_daemon_callback.so
23. For inverted touch
Replace libinput.so from system/lib
24. hese are list of libs for responcible for
aoutofocus
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.fron t.xml
system\etc\permission
\android.hardware.camera.xml
25. Sim1/2 (RIL):
\system\etc\firmware\modem.img
\system\etc\permission (RIL)
/system/bin/stmd
/system/bin/rild*
/system/etc/rril
26.For Stuck in boot logo
Replace Libmali.s

Related

Pantech Burst Rom development Discussion Thread

Since the Burst comunity is growing , It was needed . Here devs/chefs can come and discuss about the there queries and all . I'm sharing some of my resources I discovered while developing a rom for burst . I would like to see more rom in near future also
Best Base rom to make a custom rom upon : Davempers ICS
Boot animation Issue : Always put boot animation in /system/media !! Don't go for data/local .
In updater script :
1. Replace this
Code:
ui_print(" Formating system ");
unmount("/system");
with
Code:
ui_print(" Formating system ");
[COLOR="Green"]run_program("/sbin/busybox","mkfs.ext4 -L system -m 0 mmcblk0p13");[/COLOR]
unmount("/system");
Thought I feel make2fs and tune2fs does the same work but still .
To edit the default wallpaper gallery , Decompile wallpaperchooser.apk and in the res/drawable-hdpi/ And replace the wallpaper with yours . Remember keep the same name and make 2 variants of same wallpaper one in 960 x 800 and one 160 x 134 .
To replace fonts simply replace them in /system/fonts .
I can't give a perfect theming guide but always do some jiggling and all . Decompile the apk's and look into drawable-hdpi folder . keep the same name and res and replace the png with yours one . Generally all icons are found in minimap-hdpi folder .
Sounds are as usual in the folder /media/audio/ . Keep the name same and replace them .
To change the default ringtone / alarm / notification tone change the following in build.prop
Code:
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
To replace a recovery just simply put in inside the working folder and change the red line with the new recovery name .
Code:
package_extract_file("[COLOR="Red"]recovery.img[/COLOR]", "/dev/block/mmcblk0p18");
For atleast see AOSP contacts and phone working do this ->
Delete these files first :
-/system/app/syncmlclient.apk
-/system/app/syncmlprovider.apk
-/system/app/syncmlservice.apk
-/system/app/contacts.apk
-/system/app/contsprovider.apk
-/system/framework/com.android.syncml.shared.jar
-/system/etc/permissions/com.android.syncml.shared.xml
And paste these things :
contacts and contactsprovider.apk from some AOSP rom . I attached those for reference also .
What doesn't work here ?
sometimes we get android.phone.xxx stopped working . And call log doesn't work ( well I feel there's some storage app not here for that )
Click to expand...
Click to collapse
Key nos -
Option touch key - key:139
home touch key - key:102
Back touch key - key:158
Search Touch key- key:217
Volume down key - key:114
Volume up key - key:115
Power key - Key:116
Click to expand...
Click to collapse
A note : Attn1's Hack kit is good but the kernel in it is faulty . It makes the device lag and wifi certainly less in range .
Things we need to achieve
-A full JB notification panel .
-AOSP contacts/phone with no error working .
I would like to see many burst roms for now Clear your every of doubt and start developing the roms for burst :good:
NOTE : Only rom developers come here no spaming is allowed . This is a place for rom devs to talk and get there issues solved only . For chit-chat on burst go here .
Help required !
I copied the data/data/(a bunch of folders) from phone and pasted in the rom . This was done to retain some default settings from the rom flash itself . But after actual flash they didn't appeared why ? Also I pasted the lmt app in /data/app folder And that didn't appeared also
possible reasons i figured out why :
1. No proper permissions was set in updater script .
2. Android might be sets everything to default in first boot ?
Anyone can comment with good answer ?

[GUIDE]How To Port a Custom Rom (Noob Friendly)

Well lots of people asked me here and on facebook to expain how i port custom roms for my device so i decided to make a Noob friendly thread for those who want to learn how to port custom rom for their device i use this method for porting samsung roms for my device but it may also work on any other device as well
I will make myself as clear and as simple as possible so anyone can understand what actually is happening in each part of the guide
The method i use for porting roms is as following :
Things which you need are : Notepad++ , 7Zip a laptop and a brain
First of all you need to understand what really matters when porting a custom rom for you device and that is the compatibility of both the devices one which is yours and one from which you are trying to port the rom from in order to port a custom rom the specifications of both the devices should be similar i.e. they should be sharing the same Chipset ,same Internal memory , same Ram and Camera resolution
Terms used in the guide:
-Base rom(this is the rom which was made for your device which you would use as a base for porting the roms)
-Port rom(this is the rom which your are trying to port for your device)
Step 1
Make a folder at your desktop and name it port now take any custom rom you want to port for your device and put it into that folder now just like this make another folder on the desktop and name it base and put a rom made for your device into it but be careful if youre trying to port a cyanogenmod based rom or a AOSP based rom then your base rom should be a ASOP or a cyanogenmod rom and if youre trying to port a samsung rom then the base rom should be a samsung rom and same as for htc , xperia or any other device
Step 2
Now go to base folder and right click on the base rom and choose extract here using either winrar or 7zip ( i recommend 7zip) now go to port folder and right click on it and choose open archive option from 7zip( there will be two options for open archive one and two just chose the upper one because the lower one will extract the rom and we don't want that for this one )
Step 3
The port rom elements will be shown like meta inf and system and boot img ( absent in some cases) now go to port roms system folder then proceed as following system>etc>firmware and delete the firmware folder now go to base rom and copy the firmware folder from the same path by going from system>etc>firmware and paste it into the etc folder of the port rom
Step 4
Now go to the port rom proceed as following system>lib>modules and delete the module folder and just like how we did before copy the module folder from the base rom into the port roms lib folder
Step 5
Now go to port rom and proceed as following system>usr>keylayout>generic.kl and delete it and copy the generic.kl from the base rom into the port rom
Step 6
now copy and replace the boot.img from the base rom into the port rom
Step 7
No go to port folder and and proceed as following system>meta-imf>com>google>android>updater binary and updater script and delete these two and replace from the ones in the base folder
Step 8
Now put the port rom into your external-sd card and flash via recovery with a full data and cache wipe
Some fixes for bugs and issues:
Note: try replacing the files into the port rom and see if the problem solves or not
NFC
/system/app/Nfc.apk
/system/lib/libnfc*.so
/system/bin/pcscd
Radio
/system/bin/fmradio
Sensors
/system/bin/akmd*
/system/lib/libsensors.so
Bluetooth
/system/bin/bd_prov
/system/bin/uim*
/system/bin/hcid
/system/bin/bluetooth*
/system/bin/hciattach
/system/bin/sdptool
/system/xbin/hciconfig
Wifi
also copy and replace the wlan.ko file from system>libs>modules into the port rom from the base rom if the file name is pronto_wlan.ko then rename it to wlan.ko before replacing
/system/bin/netcfg
/system/bin/dhcpcd
/system/bin/ifconfig
/system/bin/hostap
/system/bin/hostapd
/system/bin/hostapd_bin
/system/bin/pcscd
/system/bin/wlan*
/system/bin/wpa*
RIL
/system/bin/stmd
/system/bin/rild*
/system/etc/rril
Camera
Copy libcamera*.so from base to port rom
If rom does not boot after that, replace file one by one and see which file is the problem.
If you have any questions or queries then feel free ask any things
for future
just in case

[guide][how to] port miui 7 to any mt6582 device

Many porters are not able to port MIUI Rom to MT6582.... I will give a guide to port MIUI 7 ROM to any MT6582 With Kitkat firmware... This guide is for porters only and works for MIUI 6 also...Noobs Try at ur own Risk...
REQUIREMENTS:
- Basic Knowledge about porting and boot.img editing using android kitchen.
- Use onli TWRP/CTR Recovery.
- YOUR STOCK MT6582 ROM(KK FIRMWARE ONLI)
- ANDROID KITCHEN
- PORT MT6582 MIUI 7 ROM ( use my rom for A104 or Gionee M2 Rom by ARGN Devs... We keep our roms updated)
Canvas A104 MIUI 7 ROM: DOWNLOAD
Gionee M2 MIUI 7 ROM: DOWNLOAD
STEPS:
1: PREPARING:
-Extract both roms to different folder... Setup Android Kitchen.
2: SYSTEM EDITING:
-Bin Folder: Replace vold,sdcard from stock to port.
-Libs Folder: Open port libs folder and delete /hw folder.... Now replace /hw folder libcameracustom.so, libcameraservice.so, libfeatureio.so, libMali.so and libshowlogo.so from stock to port.
-etc Folder: Open port etc folder and delete /firmware and /mddb folder... Replace /firmware & /mddb from port to stock... if u dont have mddb folder in stock leave it...
-Vendor Folder: Open port vendor folder and delete /lib and /media folder...replace /lib and /media folder from stock to port.
-Xbin Folder: Replace libmnlp_mt6582 and mnld from stock to port rom.
- Build.prop : Open build.prop and edit device name with urs .... Finding the correct lcd density is a big problem ... Try 210 first ... change it if u have dpi issues (Dont set below 210).
3: UPDATER-SCRIPT:
- Open updater script and change mountspace id (mmcblkpxx) as per ur device.. U can find it using MTK Droid Tool.
4: BOOT.IMG EDITING:
- Unpack boot.img of both stock and port rom using kitchen... We have to recombile port rom boot.img so unpack boot.img of port rom from working folder.
- Copy ZImage from Stock and replace in port.
- Copy sepolicy from stock ramdisk to port.
- Open uevent.rc of both roms in notepad+ and copy any additional lines from port to stock... use any text compare tool to find additional lines.. dont delete any lines onli add lines from port... Now replace uevent.rc from port with stock rom uevent.rc(The one u added lines from stock)
- Repack port rom boot.img and move it to port folder.
- Replace #camera lines of init.rc from stock to port if u get camera error/ green camera.
- If u Get Sdcard /Internal memory not mounting issue.... Rename init.no_ssd.rc of stock boot.img to init.ssd.rc and replace it in init.ssd.rc of port boot.img.j v
5: FINISHING UP:
- Now compress the port rom into .zip and flash on your device. Njoy!!!
BUG FIXING:
- Same as Other KK Roms... If u have any issues comment below...
CREDITS:
-Geo Baby for all his help.
[email protected] for his excellent Crossporting guide.
[email protected]
-Many xda MTK devs for their guides.
Please Hit Thanks if u find this post useful ...
Can this guide work for porting from mt6582 to mt6572 after porting to mt6582? Another crossport if you will
Please tell me how to fix camera error? i replaced #camera line in my stock rom but it can't slove
awesome
bro this gives me error seven even i change the products name......n also it failed to mount / system gives ivvalid argument

[GUIDE][mt6582]Porting guide+Bug Fixing for Micromax Canvas Spark Q380

Warning:Please make a full nandroid backup with TWRP recovery
I am not responsible for bricked devices.!!!!!!!
Now stop waiting for ported ROMs , follow this guide and port ROM yourself .
You can port mt6582 5.0 or 5.0.2 lollipop ROMs with kernel version 3.10.54 for Micromax Canvas Spark Q380 or any other mt6582 device with kernel 3.10.54
Requirements:
1.Brain
2.ES File explorer
So let's start,
Take port rom and base ROM(Any custom rom of mmx spark)
Replace below files stock to port ROM :-
1.boot.img
2.etc files:
system/etc/bluetooth
system/etc/firmware
system/etc/wifi
3.lib files:
system/lib/egl
system/lib/hw
system/lib/libaudio* (All files starting with libaudio)
system/lib/libcamalgo.so
system/lib/libcamdrv.so
system/lib/libcameracustom.so
system/lib/libdpframework.so
system/lib/libsensorservice.so
system/lib/libsync.so
system/lib/libvcodecdrv.so
4.bin files:
system/bin/pq
system/bin/vold
5.vendor:
system/vendor (replace the whole folder)
6.usr files:
system/usr/keylayout/generic.kl
7.Edit this line in build.prop
ro.sf.lcd_density=240
ro.product.model=MMX Q380
ro.product.brand=Micromax
ro.product.name=Micromax
ro.product.board=Micromax Q380
ro.product.locale.language=en
ro.product.locale.region=US
Now open Meta-inf folder
Open Meta-inf/com/google/android/updater script
Now edit these lines
Lines starting with ui_print("Type here what u want to display while flashing the rom")
Now edit mount points:
format("ext4", "EMMC", "/dev/block/mmcblk0p6", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p6"", "/system",
Change the no. from the red no. with your device's mount points (CHECK THE MOUNT POINTS IN ANY CUSTOM ROM FOR YOUR DEVICE)
Now zip the rom and flash the rom!!!
Bug Fixing:
Just replace it from Stock ROM to your Custom ROMs.
Bootloop when porting:
/system/lib/libandroid_runtime.so
/system/lib/libandroid_servers.so
/system/lib/libmedia_jni.so
*Repack boot.image
Showing black screen after logo:
\system/lib/libMali.so
RadioFM :
\system\bin\fmradio
\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
Sensors :
/system/bin/akmd*
/system/lib/libsensors.so
/system/lib/libms3c_yamaha.so
/system/etc/firmware (folder)
/system/bin/servicemanager
Bluetooth\Wifi not turning On\Off :
\system\lib\module\mtk_stp_wmt
Bluetooth :
/system/bin/bd_prov
/system/bin/uim*
/system/bin/hcid
/system/bin/bluetooth*
/system/bin/hciattach
/system/bin/sdptool
/system/xbin/hciconfig
/system/bin/brcm_patchram_plus
/system/lib/libbluetooth_mtk.so
/system/lib/libbluetoothem_mtk.so
Wifi :
/system/bin/netcfg
/system/bin/dhcpcd
/system/bin/ifconfig
/system/bin/hostap
/system/bin/hostapd
/system/bin/hostapd_bin
/system/bin/pcscd
/system/bin/wlan*
/system/bin/wpa*
/system/bin/netd -> Fix wifi hotspot
/system/lib/libhardwarelegacy.so -> Fix wifi /system/lib/modules/mtk_stp_wmt.ko/system/lib/modules/mtk_wmt_wifi.ko
/system/etc/wifi (folder)
/system/etc/firmware (folder)
Camera :
system/lib/libfeatureio.so – camera not working
/system/etc/media_profiles.xml
/system/lib/libcamera.so
/system/lib/liboemcamera.so
\system\lib\hw\camera.default.so
\system\lib\libcamera_client.so
\system\lib\libcameracustom.so
\system\lib\libcamer aprofile.so
\system\lib\libcameraservice.so
\system\lib\libmhal.so
\system\lib\libmhalcontent.s o
\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.fro nt.xml
\system\lib\libOmx*.so -fix camcoder
\system\lib\libfeatureo.so -fix cam focus
# camera not working or force close or any other problem
copy all libs starting with /libcam*.so
#Camera showing wrong model in pic property?
Change model in build.prop
Still not working? Replace following file from STOCK to PORT
system/lib/libexif.so
SD card/Memory:
/system/bin/vold
\system\etc\vold.fstab -> edit file for swap internal and external
\system\etc\vold.fstab.nand
*Note:If not present leave this. from kitkat 4.4.x this file hase been moved into boot.img
Storage not mounting:
Decompile framework-res.apk using apktool or apk multitool and replace following file from STOCK framework-res.apk to PORT framework-res.apk
/res/xml/storage_list.xml
GPS:
\system\xbin\libmnlp
/system/etc/gps.conf
Touch Screen(Haptic):
/system/usr
/system/usr\keylayout\Generic.kl ->fix HomeKey
Sim1/2 (RIL):
\system\etc\firmware\modem.img
\system\etc\permission (RIL)
/system/bin/stmd
/system/bin/rild*
/system/etc/rril
Audio/Sound:
\system\lib\libaudio* .so
Ads:
/system/etc/hosts ->replace with new files or use tweak.
Resolution problem:
open build.prop and add following line
ro.sf.lcd_density=240
[ex: 240 but your dpi maybe deferent]
Pixalation in video:
Replace following file from STOCK to PORT
system/lib/libvcodecdrv.so
Flipped touch screen:
Replace following files from STOCK to PORT
system/lib/libinput.so
LED not working:
Replace following files from STOCK to PORT
system/lib/libfeatureio.so
Fix Network / 3G Network:
/ system / etc / agps_profiles_conf
/ system / etc / APNs-conf
/ system / etc / epo-conf
/ system / etc / spn-conf
/ system / etc / virtual-spn-conf-by-efspn
/ system / etc / virtual-spn-conf-by-IMSI
Please hit a thanks if this guide helps u
Credits:
@Saurabhcr7
Google
Xda
Glad to see guys like you working for 3.10.xx,Awesome work SC,keep it up.
Is there any CM13 based rom available for 3.10.54???
IT gives me bootloop :crying::crying::crying:
my device karbonn machfive 5.0
mtk6582
3.10.54
I want to port color os 5.1
PLEASE HELP WITH THE PORT
3g network not working
My canvas spark can't connect to 3g network...i have try all sim..but 2g working...recently i have flash stock rom V2
Bug Camera on Oppo A11w MT6582 3.4.67
Can't fix camera on rom CrDROID Oppo A11w MT6582,How To fix it :crying::crying::crying:

[Guide] AIO PORTING GUIDE [MTK-QUALCOMM-RECOVERY-BUGFIX-VOLTE]

ALL IN ONE PORTING GUIDE
by @kuberrocks96
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
INDEX:
GUIDE FOR MTK
MTK BUG FIXING
RECOVERY PORTING
QUALCOMM BUG FIXING
Update:-
Code:
*Updated Bug Fix Guide for MTK
*Added SNAPDRAGON Bug fix guide.
*Guide to port TWRP also updated.
*Improved the thread.
*Added more fixes.
*Qualcomm porting guide added.
This is for all those users who want to port roms and use them in their devices.
But , before porting any rom,here are some of the main things you should keep in mind.
1)Base Rom :-
What is a Base Rom?
Code:
Base Rom is reffered to the Stock rom or the Default Rom of your device or sometimes the rom from which you will take base files(libs,apns,modem etc).
2)Port Rom
What is a Port Rom?
Code:
Port Rom is the rom which you will port for your device.
like if you are working a rom of another device having similar specifications and porting it for your device then it is called PORT ROM.
3)Kernel
What is a Kernel?
Code:
The kernel is a computer program that is the core of a computer's operating system, with complete control over everything in the system.
the central or most important part of something
In easy words kernel acts as the middle man between the Software and the Hardware
When porting a rom , you should check the Kernel version of the Port Rom and the Base Rom
They both should be similar,
like you can port from :
3.18.xx to 3.18.xx only
3.10.xx to 3.10.xx only
BUGS IN THE BASE ROM OR IN THE PORT ROM.
Yes , our Base Rom and the Port roms may contain bugs,
Those bugs will exist in our final Ported Rom also so , fixing those is not possible - Its always recommended to use a Stable or near to Stable Roms but hi, Custom Roms are made for pleasure only and these roms can't take place of stock roms.
Many users don't like Stock Rom (i.e Default Rom) so , they look for a Custom Rom.
Now let's talk about the main topic for which YOU ARE HERE!
PORTING A ROM!
In this Guide, i will tell one of the most easy way to BOOT UP THE ROM.
So, lets begin,
This guide will focus on MT6735/MT6753 porting.
Device i used is Coolpad Note 3 Lite
CPU:MT6735
But, it will work mostly on all MT675X SoCs , this can also be useful for MT67XX series but , My main focus is on MT675X
Without any delay let's talk about how you should port a ROM and what should be your focus at
YOU SHOULD FOCUS ON BOOTING THE ROM INSTEAD OF BUG FIXING AND DOING OTHER THINGS.
WHEN YOU PORT A ROM CHANGE FILES WISELY
DONT JUST COPY PASTE
PORTING A ROM CAN GET TOUGH ACCORDING TO THE ROM, LIKE PORTING AN AOSP BUILD CAN BE EASY BUT PORTING A MIUI BUILD IS CONSIDERED ONE OF THE MOST TOUGHED AND IRRITATING THING.
RESPECT THE EFFORTS BY THE PREVIOUS DEV.
CREDITS, WHEN YOU PORT A ROM THAT ROM WAS MADE BY SOMEONE , PORTED BY SOMEONE or BUG FIXED BY SOMEONE - SO BY ANY MEANS IF YOU KNOW THE SOURCE AND THE DEV OR TEAM WHOSE BUILD YOU ARE PORTING PLEASE GIVE CREDIT.
THANKS.
NOW , FINALLY. LET'S TALK ABOUT THE PORTING GUIDE WHICH YOU ALL ARE WAITING FOR.
What you guys need:-
Code:
1)Base Rom
2)Port Rom
3)Any good Notepad
4)Any Boot.img repack or unpack tool
5)Brain
Now , if you have all the above mentioned things , Lets proceed.
BOOT.IMG :-
BOOT.IMG contains all the magic , it has the KERNEL inside which is one of the main thing.
Porting from Same CPU & GPU:-
NOTE:- When you are porting from a Similar device having same chipset like porting from:-
MT6753 TO MT6753
MT6735 TO MT6735
Use this method (95% times working ):-
System/lib & lib64 :-
Code:
libaudiocomponentengine.so
libaudiocustparam.so
libnvram.so
libnvramagentclient.so
libnvram_platform.so
libnvram_sec.so
libcustom_nvram.so
System/etc :-
Code:
/Firmware folder
/apnconfig
/spnconfig
/agps_profile_conf2
/media_codecs.xml
BLACK SCREEN AFTER LOGO???
REPLACE THIS LIB:- libcam.paramsmgr
To Fix Camera ( sometimes bootloop so try one by one ) :-
from System/lib & lib64 replace all libs starting like this:-
Code:
libcamera.mt6735 (mt6735 is according to my CPU )
libcameracustom.lib etc
libcamalgo.lib
Unpack Boot.img of both Base & Port Rom
Code:
replace kernel
and init.mt6735.rc ( not recommended always)
and Fstab.mt6735
System/Lib(/64)/HW*
Done , Now zip em and flash.
90% Rom will boot with BUGS! ( NO ROM IS THERE WITHOUT BUGS, LOL)
==>READ BUG FIX METHOD ALSO{Later in this Guide}<==
For Cross Porting Like:-
MT6752 etc to MT6753/MT6735
DO REMEMBER TO CHANGE :-
Code:
System/xbin/mnld
System/mddb
System/etc/firmware
System/etc/Apnconf
System/etc/spnconf
In lib(/64)/HW :- add files accordingly to your CPU or rename them.
BLACK SCREEN AFTER LOGO :-
Code:
libcam.paramsmgr
BOOT.IMG PORTING:-
UNPACK both Base Rom and Port Rom Boot.img
In PORT ROM BOOT.IMG:-
Code:
replace the boot.img-kernel
and in ramdisk folder add these files from Base Boot.img to Port Boot.img
Code:
fstab.mt6735
init.mt6735.rc
init.mt6735.usb.rc
Note:- Name may differ a little according to your CPU
REPACK THE BOOT IMAGE
NOTE:- If u get WIFI AND BLUETOOTH NOT SWITCHING ON OR BATTERY PERCENTAGE THEN REPLACE
Code:
init.project.rc
Done , You have succesfully ported Boot.img
Now , Lets focus on BUG FIXING
Bug Fixing isnt easy as it seems.
Replacing any wrong file or not supported file can easily give you bootloops.
It depends from ROM to ROM.
BUG FIXING[MTK]
Let's Begin.
If any lib missing in Base leave that - DONT WORRY
NOTE:- CHANGE LIB FILES FROM BOTH lib & lib64 folders
If you face "This rom is for Coolpad Note 3 Lite and your device is "K4Note"
To remove this delete the assertlines in Updater-script
ALWAYS CHANGE DPI IN BUILD.PROP ACCORDING TO YOUR STOCK ROM
Bootloop when porting
Code:
*libandroid_runtime.so
*libandroid_servers.so
*libmedia_jni.so
*Repack boot.image (properly)
RadioFM
Code:
\system\bin\fmradio
\system\etc\firmware\mt6620_patch_e3_hdr.bin
\system\etc\firmware\mt6620_patch_e6_hdr.bin
\system\etc\firmware\WMT.CFG
\system\lib(/64)\libfmcust.so
/system/lib(/64)/libfmjni.so
Sensors
Code:
/system/bin/akmd*
/system/lib/libsensors.so
/system/lib/libms3c_yamaha.so ( acc. To device)
/system/etc/firmware (folder)
/system/bin/servicemanager
/system/bin/sensorservice
System/bin/msensord
system/etc/permissions/:-
android.hardware.sensor.xxxxx.xml
FIX Offline charging:-
Code:
In Boot.img -> sbin/healthd
System/Lib(/64):-
Showlogo
System/bin:-
Kpoc_charger
Bluetooth\Wifi not turning On\Off(old)
Code:
\system\lib\module\mtk_stp_wmt
Wifi
Code:
/system/etc/wifi (folder)
/system/bin/netcfg
/system/bin/dhcpcd
/system/bin/ifconfig
/system/bin/hostap
/system/bin/hostapd
/system/bin/hostapd_bin
/system/bin/pcscd
/system/bin/wlan*
/system/bin/wpa*
/system/lib(/64)/libhardwarelegacy.so
Hotspot:-
Code:
/system/bin/netd
*follow Wifi fix also*
Camera
Code:
firstly try one by one:
\system\lib(/64)\libcameracustom.so
\system\lib(/64)\libcameraservice.so
System/lib(/64)/camalgo
/system/etc/media_profiles.xml
/system/lib(/64)/libcamera.so
/system/lib(/64)/liboemcamera.so
\system\lib(/64)\hw\camera.default.so
\system\lib(/64)\libcamera_client.so
\system\lib(/64)\libcamer aprofile.so
\system\lib(/64)\libmhal.so
\system\lib(/64)\libmhalcontent.s o
\system\lib(/64)\libmhaldrv.so
\system\lib(/64)\libmhalmdp.so
\system\lib(/64)\libmhalpipe.so
\system\lib(/64)\libmhalscenario.so
\system\lib(/64)\libmhalutility.so
\system\etc\permission\android.hardware.camera.front.xml
Other cam files if any
*try one by one*
CamCoder/HwDecoder
Code:
\system\lib\libOmx*.so
system/etc/media_codecs
[SIZE="3"][B]Green/pink Camera / video lagging[/B][/SIZE]
system/lib(/64)/libdpframework.so
SD card/Memory
Code:
mt67**.fstab in boot.img
/system/bin/vold
/System/bin/pq
System/bin/sdcard
WhatsApp Media Fix:-
Code:
from System/bin/ replace these files:-
Media
mediaserver
netd
service
servicemanager
surfaceflinger
GPS
Code:
\system\xbin\libmnlp
/system/etc/gps.conf
Touch Screen(Haptic)
Code:
/system/usr
/system/usr\keylayout\Generic.kl ->fix HomeKey
NFC ( experimental)
Code:
System/etc/: Nfc files
System/etc/permissions/ nfc files
System/lib/libnfc****** ( all starting from nfc )
Sim1/2 (RIL)
((Trustbin.bin flash it accordingly to LP or MM etc of stock rom))
Code:
\system\etc\firmware\modem.img
\system\etc\permission (RIL)
Try these aswell if ( you may suffer Bootloop )
/System/bin/mtkrild
/System/bin/mtkrildm1
/system/bin/stmd
EXPERIMENTAL FIX for ril:-
Code:
System/ Lib(/64)/ :-
Nvram
Nvram_sec
Nvram_platform
Nvrammagentclient
System/bin:-
Gsm***
System/etc/trustzone
Lib(/64):-
Libril
Libc2k***
Librilmtk
Audio/Sound:-
Code:
\system\lib\libaudio* .so
system/lib(/64)/libaudiocustomparam
system/lib(/64)/libaudiopolicymanager
system/lib(/64)/libaudiopolicyservice
system/etc/audio_effects
system/etc/audio_policy
System/lib(/64)/soundfx
Sometimes if Sound isn't working fully :::::
Code:
System/lib(/64)/hw/audioxxxxxxxxx (audio files)
Bluetooth:-
Code:
system/etc/bluetooth
System/etc/permissions/android.hardware.bluetooth.xml
/system/bin/uim*
/system/bin/bluetooth*
/system/lib(/64)/libbluetooth_mtk.so
/system/lib(/64)/libbluetoothem_mtk.so
Ads
Code:
/system/etc/hosts ->replace with new files or use tweak.
=====>>ADVANCE BUG FIXING:-
Volte Fixing
( Will only work if your Base Rom , Port Rom and Kernel supports VOLTE )
Code:
Boot.img:-
Zimage ( kernel - volte supported )
init.volte.rc
==THIS SHOULD NORMALLY FIX but if it doesn't try :- ==
Code:
System Folder:-
bin/volte_stack
bin/volte_imcb
bin/volte_ua
lib(/64)/volte_imsm
build.prop(Not always required):-
ro.mtk_volte_support=1
persist.mtk.volte.enable=1
FingerPrint:-
[Try one by one][If any file missing leave it]
Usual way to fix :-
Code:
System/etc/permissions/android.hardware.fingerprint.xml
System/lib(/64)/libgatekeeper.so
System/lib(/64)/hw/gatekeeper.mt6735.so
System/(/64)/libmcgatekeeper.so
System/lib(/64)/hw/fingerprint.default.so ( can break FP in some devices)
Advanced ( if usual doesn't work ):-
Code:
System/bin/:-
fingerprintd
Gx_fpd
tee_deamon
Lib64/lib:- ( if any missing leave that)
Fpclient
Fpalgorithm
Fphal
FPservice
IF ROM DOESNT BOOT TAKE LOG ( From ADB)
adb shell logcat > log.txt
and check what is causing issue
REFERENCE LINKS :-
Carliv Image Kitchen :-
https://forum.xda-developers.com/android/development/tool-cika-carliv-image-kitchen-android-t3013658
Cross Port and Porting Guides:-
https://forum.xda-developers.com/k3-note/development/guide-porting-64bit-mtk-roms-cross-t3310605
Unpack and Repack without PC guide:-
https://youtu.be/qTe9XofT5VE
Meta-INF Info:-
http://www.mtkroms.com/2015/06/make-stock-rom-mtk-easy.html?m=1
Meta-Inf generator:- ( Not tested try but its worth a look)
https://forum.xda-developers.com/showthread.php?t=1221003
Sample Recovery flashable zip:-
https://forum.xda-developers.com/android/development/sample-custom-recovery-zip-t3552916
Assert Failed ?check this:-
http://forums.androidcentral.com/optimus-v-rooting-roms-hacks/182438-solved-assert-failed.html
BUG FIXING FOR SNAPDRAGON
Compare the PORT FILES FROM BASE FILES:
Code:
uneventd.qcom.rc ( will fix sensor )
uneventd.rc
Copy and replace the following files from Base (ROM-PORTING/BASE) to Port (ROM-PORTING/PORT) to solve the given issues:
No sound bug:
Code:
system/lib/hw/
audio.primary.msm****.so
audio.primary.default.so
system/lib64/hw/
audio.primary.msm****.so
audio.primary.default.so
Sound working in speaker but not working through headphones or vice-versa:
Code:
system/etc/
mixer_paths.xml (you can also try patching it with the base)
[B]Distorted Outgoing Sound during Phone call or [/B]Partial Sound:
system/etc/acdbdata/MTP/
MTP_***.acdb (all files)
Home or any other button not working:
Code:
system/usr/keylayout/
goodix.kl
gpio-keys.kl (important)
Generik.kl
Video hw encoding/decoding not working:
Code:
system/etc/firmware/
venus.*** (all files starting with ‘venus’)
Sensors not working:
Code:
system/lib/hw/sensors.msm****.so (or sensors.lsm6db0.so)
system/lib64/hw/sensors.msm****.so (or sensors.lsm6db0.so)
system/lib/libsensorservice.so
system/lib64/libsensorservice.so
Led notification not working:
Code:
system/lib/hw/lights.msm****.so
system/lib64/hw/lights.msm****.so
Vibration not working:
Code:
system/lib/libhardware_legacy.so
system/lib64/libhardware_legacy.so
FM not working:
Code:
system/lib/qcomfm_jni.so
system/lib64/qcomfm_jni.so
Wifi not working:
Code:
system/lib/modules/wlan.ko
[Note: In MIUI, wlan.ko is renamed as pronto_wlan.ko and is also kept in system/lib/modules/pronto/ folder, so you have to replace in both the places.]
In some phones you may not find wlan.ko file. In that case you may try replacing these files
Code:
system/lib/libwcnss_qmi.so
system/lib64/libwcnss_qmi.so
For slow WiFi network and other WiFi related issues replace these files:
Code:
system/etc/wifi/ -- all files
system/etc/firmware/wlan/ -- all files
Camera and flash not working:
Code:
system/vendor/lib/ :-
libactuator_***.so (all files starting with ‘libactuator’)
libchromatix_***.so (all files starting with ‘libchromatix’)
libmmcamera_***.so (all files starting with ‘libmmcamera’)
system/lib/:-
libmm-qcamera.so
libmmcamera_interface.co
system/lib/hw/
camera.msm****.so
[Note: If such files are also available in your BASE/system/vendor/lib64/ then you have to copy those files also to their respective place in PORT]
GUIDE TO PORT RECOVERY
PORT TWRP RECOVERY
Things You are Required ::-
Code:
1.Android Image Kitchen
2.Notepad++
3.Base Recovery
4.TWRP to Port
5.Brain
First of All , You Guys need to unpack Recovery.img i.e both Stock Recovery or TWRP Recovery.
After this :-
You need to Copy these files from your Stock Recovery to the TWRP Recovery ( which you want to port ) :-
Lets Divide Step by Step ::--
*REPLACE FROM STOCK TO PORT*
STEP1:
Inside Ramdisk Folder ::::::
Code:
1.meta_init.modem.rc
2.meta_init.project.rc
3.meta_init.rc
STEP2:
Now replace your Kernel usually named as zimage-kernel
STEP3
Inside Ramdisk Folder(boot.img):::::::
Code:
1.fstab
2.ueventd.rc
3.ueventd.goldfish.rc.
STEP4
INSIDE RAMDISK/ETC
Code:
recovery.fstab
STEP5
Open Default.prop
and Compare it with stock Default.prop or your Build.prop ( add values from build.prop )
=============>>>>>>>
DONE!!!!! EVERYTHING IS IN PLACE
NOW REPACK IT AND FLASH.
YOU HAVE PORTED A RECOVERY....
WARNING: Do not replace any file unnecessarily, because it may give rise to new bugs in place of solving it. Always be specific!
Now Mostly its the end of the Guide / Tutorial / G.K on porting or whatever you call it.
Once again , i (Kuber Sharma) hope you guys succesfully learn porting and making roms soon.
You guys have my Best Wishes.
Thank You.
I couldn't have done this without the help of :-
Amit Kumar (A.M.T)
Sam Grande (A.M.T)
Special Thanks to @sandeep.sethi
Special Thanks to @Yousef Algadri
Special thanks to @mohancm
You can find me here:-
@kubersharma
Want to buy me a coffee or wanna donate me for my cause!!
https://paypal.me/kubersharma
DO HIT THANKS BUTTON IF YOU LIKE MY GUIDE
THANK YOU
not lib64 files?
http://cloud.tapatalk.com/s/58a1efb476118/IMG_20170213_183928.jpg
Odesláno z mého VFD 700 pomocí Tapatalk
Great work, Really appreciated!
Thank you
---------- Post added at 05:51 PM ---------- Previous post was at 05:49 PM ----------
Adreno306™ said:
not lib64 files?
http://cloud.tapatalk.com/s/58a1efb476118/IMG_20170213_183928.jpg
Odesláno z mého VFD 700 pomocí Tapatalk
Click to expand...
Click to collapse
I think op have missed while typing, both lib and lib64 should be considered.
Reserved...
Thank you
mohancm said:
Great work, Really appreciated!
Thank you
---------- Post added at 05:51 PM ---------- Previous post was at 05:49 PM ----------
I think op have missed while typing, both lib and lib64 should be considered.
Click to expand...
Click to collapse
Couldn't have done without your support.
Thanks
Awesome work
Great job man.. Awesome and best guide for 64 bit devices.. Great thing... Expecting more guides.. ?
Is there a method for fixing the NFC to?o
Adreno306™ said:
Is there a method for fixing the NFC to?o
Click to expand...
Click to collapse
Follow sensor fix and replace libnfcxxxx in lib folder
kuberrocks96 said:
Follow sensor fix and replace libnfcxxxx in lib folder
Click to expand...
Click to collapse
nfc service has stopped working
Odesláno z mého VFD 700 pomocí Tapatalk
Adreno306™ said:
nfc service has stopped working
Odesláno z mého VFD 700 pomocí Tapatalk
Click to expand...
Click to collapse
Take a log
trying to port for teclast t98 4g mt8752
I've trying to port following a lot of guide ever bootloop only one time boot but no touchscreen
what i'm wondering my stock rom is kitkat so with a 32bit kernel ,i think, can i mix it with 64bit rom?
in my stock rom there isn't lib64 directory so what can I do to follow your guide?
thanx
Sorry to post it here as i thought probably you could help me but this method should also work for 32 bit roms .. Right?? I was porting a lollipop nexus look rom to my lenovo tab.It boots to the android is optimising screen and finishing bootbthen goes into a soft reboot. Can you help me with that? And please do confirm whether this method would work for 32 bit rom.
Hello!
I have a problem with the port I made for the Redmi Pro (MTK6797T). The ROM is booting and working quite well but the problem comes when i try to use my headphones.
The ROM recognises the headphones, when i plug them the headphones icon appears and the buttons are working to stop-play a song, however the sound comes out of the headphones and the speaker at the same time.
Any idea to solve this?
thanks A LOT for bugfixing guide portion... i was searching for that for a long time
@kuberrocks96
Camera gets crashed whenever I try to take HDR ......what is needed to fix this?
hi bro, Thanks for the guide, just like crossposting from a mt6753 to a mt6735? Or similar?
Now I would like to leave a solution for the nvram problem that has already happened to me several times
1.- edit the build.prop looking for gemini lines, in my case being a single sim would have to be disabled this function and any other line related to the sim ... if in your case you have 2 sim as you have to activate The gemini function and specify that it is dual sim looking for this line in the build.prop "persist.radio.multisim.config = ss" (for single sim) and change it to "= dsds" for dual sim
2.-In the libraries you have to change this
Libnvram.so
Libnvramagentclient.so
Libnvram_platform.so
Libnvram_sec.so
Libfeatureio.so
Libfeatureiodrv.so
Libhardware_legacy.so
Libcustom_nvram.so
3.- also have to change the firmware and mddb folders
And finally in the boot.img it is necessary to replace in ramdisk these files
Fstab.mt6735.rc
Init.mt6735.rc
Init.mt6735.usb.rc
And added a fourth file
Init.modem.rc
With that you should have running the imei and remove the nvram error in the configurations of the wifi
Greetings from Mexico and apologies for my English, but I'm using google translator
i couldnt fix modem problem even with firmware nor mddb nor modem file in boot image. w/o sim inside baseband imei works but w sim inside its showing no baseband no imei no service.
mt6752 to mt6752. base is c5 e5553 single sim port is k3 note dual sim.
wifi bluetooth sound works, didnt try camera fix
Please can you help solve the BLU R1HD camera MT6735 in Nougat from this ROM: https://forum.xda-developers.com/r1-hd/development/cm14-1-r1hd-t3518202
Yes , it will
YuZaGa said:
Sorry to post it here as i thought probably you could help me but this method should also work for 32 bit roms .. Right?? I was porting a lollipop nexus look rom to my lenovo tab.It boots to the android is optimising screen and finishing bootbthen goes into a soft reboot. Can you help me with that? And please do confirm whether this method would work for 32 bit rom.
Click to expand...
Click to collapse
Check wht files you replaced.
While booting the rom just don't replace all files.
Kernel ( and other boot.img part)
Firmware
Apn & spn
Amd sometimes mddb is enough
Hi , thanks
2909luboy said:
hi bro, Thanks for the guide, just like crossposting from a mt6753 to a mt6735? Or similar?
Now I would like to leave a solution for the nvram problem that has already happened to me several times
1.- edit the build.prop looking for gemini lines, in my case being a single sim would have to be disabled this function and any other line related to the sim ... if in your case you have 2 sim as you have to activate The gemini function and specify that it is dual sim looking for this line in the build.prop "persist.radio.multisim.config = ss" (for single sim) and change it to "= dsds" for dual sim
2.-In the libraries you have to change this
Libnvram.so
Libnvramagentclient.so
Libnvram_platform.so
Libnvram_sec.so
Libfeatureio.so
Libfeatureiodrv.so
Libhardware_legacy.so
Libcustom_nvram.so
3.- also have to change the firmware and mddb folders
And finally in the boot.img it is necessary to replace in ramdisk these files
Fstab.mt6735.rc
Init.mt6735.rc
Init.mt6735.usb.rc
And added a fourth file
Init.modem.rc
With that you should have running the imei and remove the nvram error in the configurations of the wifi
Greetings from Mexico and apologies for my English, but I'm using google translator
Click to expand...
Click to collapse
Yes , no worries we all are humans and language shouldn't be a bearer.
And yeah , thanks for your little guide.
Cheers

Categories

Resources