What Will I Learn?
- Porting for marshmallow [Mediatek chipset only]
- Fixing small bugs
Requirements
To pot a rom you need some tools written below-
- A pc [As it's a pc guide]
- Winrar/7zip [For extracting zip]
- Notpad++
- Both roms
- And a working brain
Difficulty
- Basic
Tutorial Contents
So, if you already have these tools then a big hand for you. If you don't have, download from internet. All these tools are available on internet and these tools are free as well.
If you have downloaded, let's get started-
First of all, extract both of your rom with winrar or 7zip. I mean your stock rom and the rom you want to port.
Now, create two separate folder. Name them stock rom and port rom like below-
Now move your stock rom to stock rom folder and other one to port folder. The main work begin now. Go to bin folder of stock rom-
You will see lots of file like this. Now you have to replace below files from stock to port.
-akmd09911
-applysig
-audiocmdservice_atci
-factory
-gzip_static
-kpoc_charger
-vold
If you can't see some files, ignore it.
Then go to etc folder and replace these folder-
-firmware folder
-mddb folder
Then go to lib folder and replace these files-
Replace From Stock To Port
-lib3a.so
-libacdk.so
-libbluetooth_mtk.so
-libcustom_nvram.so
-libdpframework.so
-libfeatureio.so
-libfeatureiodrv.so
-libhardware_legacy.so
-libimageio.so
-libimageio_plat_drv.so
-libJpgDecPipe.so
-libJpgEncPipe.so
-libm4u.so
-libMiraVision_jni.so
-libmtkjpeg.so
-libmtk_drvb.so
-libnetworklocation.so
-libnvram.so
-libnvramagentclient.so
-libnvram_platform.so
-libnvram_sec.so
-libshowlogo.so
-libvc1dec_sa.ca7.so
-libvcodecdrv.so
-libvcodec_oal.so
-libvcodec_utility.so
-mtk-ril.so
-mtk-rilmd2.so
Ignore if you can't find some of them.
Then Go to vendor folder and replace these folders-
-lib-folder
-media-folder
Now you need to do some chage on build property-
Open system/build.prop from both rom in notepad. Then Update the Base build.prop to match the values for “ro.build.description=” and “ro.build.fingerprint=” from your Port rom. Save the Base build.prop, exit Notepad, copy the Base build.prop into the Port ROM, overwriting the Port build.prop.
And the last step, replace your ported boot.img to port rom, do not put it to any folder. It's location is direct port folder.
Now the work is done, just re-zip your port rom and flash it through twrp or any custom recovery.
If you have any ask do comment. I will try to answer all about custom rom.
Curriculum
This is my first post on utopin-io
Posted on Utopian.io - Rewarding Open Source Contributors