How to port diffrent mediatek roms!!!!!!!!!!!! - General Topics

Porting From Different SoCs ( Ex: MT6582 to MT7577 )
Read this carefully & apply the way i say!
* Take the ROM u want to port & name it PORT!
* Take your Stock ROM & Name it Stock
* Now Replace These files from Stock to PORT--
Code:
*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth
* Now Open build.prop in notepad++ & Search for this line
Code:
ro.mediatek.platform=MT65xx
Now Replace this (MT65xx) with your CPU!!
For Example
Code:
ro.mediatek.platform=MT6577
* Now Go To META-INF/google/android and open updater-script in notepad++
* Add this line between the lines of "set_perm"
Code:
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt65xx.so");
[Replace the mt65xx with your cpu]
Example:
Code:
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt6577.so");
* Now Go back to the Rom folder and Take the boot.img and decompile it with any bootimg-unpack tool!
* Now delete the zimage and rename boot.img-ramdisk to PORT-Ramdisk
* Now Do the Same for Stock boot.img and open the folder named PORT-ramdisk and copy all the fil PORT-
ramdisk to boot.img-ramdisk of your Stock boot.img
* Now Go to boot.img-ramdisk and open init.rc
* Now find these lines and replace with your cpu
Code:
#Create Chip Property
on early_property:ro.hardware=mt6582
setprop ro.mtk.hardware mt6589
on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6589
example :
Code:
#Create Chip Property
on early_property:ro.hardware=mt6582
setprop ro.mtk.hardware mt6577
on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6577
* Now Compile your New boot.img and Pack your New ROM and Flash!!
Cheers!!!!
THIS IS FULLY NOT MY WORK I HAVE TOOK RESEARCHES OF OTHERS ALONG WITH MY REASEARCH.......
HIT THANKS IF U LIKE.!
Click to expand...
Click to collapse

Edited

Related

HOW TO... build kernel-unpack-pack-tar .. boot.img

lesson-01: HOW t Build kernel ..​
i'm using ubuntu 12 32bit .. toolchain linaro ..
- Download source tree .. from git or official web site there is now .. for 4.1.2 and 4.2.2 ..
- Download cross compiler **toolchain** ..
- edit makefile in the kernel tree ..
Code:
ARCH = arm
CROSS-COMPILE = /directery to your compiler **toolchain** /arm-eabi- or **see in bin folder**
- open terminal .and cd to kernel tree .. **cd /home/**yourname**/Deskt...... **
-type :
Code:
make clean
make mrproper
make bcm28155_capri_ss_s2vep_rev05_defconfig
** or you can extract config.gz from phone "cat /proc/config.gz > /sdcard/config.gz" extract file from config.gz rename it like this "blablabla_defconfig" put it in /kerneltree...../arch/arm/configs **
make menuconfig **if you want to add driver or feautre like NTFS support**
make -jX
Click to expand...
Click to collapse
multitask make ..X=2.....10 depance as your computer cpu power
and you will get zImage in "/kerneltree..../arch/arm/boot "
now you have t o make boot.img .. and there is big diffrent between them .. boot.img contain ramdisk and kernel .... pagesize .. base .. to the next lesson.
lesson-02: how to unpack boot.img and get ramdisk​
zImage **kernel** is like globel driver and configuration for the device .Ramdisk launch the rom and you can make rooted kernel with it ** you have to unpack ramdisk.gz to add modification and repack it **
you can extract from orginal firmware .. or extract it from phone :
** cat /dev/block/mmcblk0p5 > /sdcard/boot.img **
now how to unpack boot.img
cd to the tools folder ..
Code:
sudo cp mkbootimg /bin/
sudo chmod 755 /bin/mkbootimg
perl split_bootimg.pl boot.img
** boot.img of the rom you will use because off the ramdisk **
will show :
Page size: 4096 (0x00001000) ***we will need this***
Code:
Kernel size: 3132176 (0x002fcb10)
Ramdisk size: 3484496 (0x00352b50)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
** now you can edit your ramdisk --superuser-init..it is like basic files for rom .. becaution **
Lesson-03: packing boot.img .. taring to flash via odin.​
now the packing .. we need : cmdline + pagesize + base without them it wont boot ..
how extract cmdline : ** cat /proc/cmdline > /sdcard/cmdline.txt **
you can find base in the cmdline file : [email protected]0xA2000000
for our device i9105p : base = 0xA2000000 pagesize = 4096
now packing :
Code:
./mkbootimg --pagesize 4096 --base 0xa2000000 --kernel zImage --ramdisk ramdisk.gz -o newboot.img
now we have the new boot.img you can use it with flash.zip CWM
or tar the img to flash it via odin.
Code:
$ tar -H ustar -c boot.img > kernel.tar
$ md5sum -t kernel.tar >> kernel.tar
$ mv kernel.tar kernel.tar.md5
:good:
reserved

[GUIDE] [PORT] [ROM] All About Mediatek ROM Porting With only Mobile ;) :D

*** ##TUTORIAL ...
HOW to Port ROMs...
For Begineers & Advanced Users
Almost Any Device to Any Device!
ONLY FOR MEDIATEK SoCs
In This Guide You'll Learn..
How to Port ROMs From the Same CPU
HOW TO PORT ROM FROM
DIFFERENT SoC!!!!!
Works for-
MT6589 to MT6577
MT6582 to MT6572
MT6577 to MT6575
Only ICS to ICS & JB to JB
May also work with 4.1 to 4.2
No Need of Source Code
No Need of Kernel Source
No Need of **ANDROID KITCHEN
No Need of LINUX...
Requirements:
* A Brain
* Patience
*Es File Explorer or
*Bluetooth File Transfer
*Rom toolbox
* Stock ROM
* And a Little Respect!!
So now Lets Begin...
PORTING For Same SoCs ( Ex: MT6572 to
MT6572)
:good:
Porting procedures rom (MT6589, MT6582, MT6572) (or
vice versa)
Read and follow the steps well both individually correctly:
* Extrack rom port into a folder that is named PORT
* Extrack stock rom into a folder that is named STOCK
* Note both good
* Copy and replace files Stock to PORT as follows:
* System / vendor
* System / usr
* System / lib / modules
* System / lib / hw
* System / lib / libncurses.so
* System / etc / firmware
* System / etc / vold.fstab
* System / etc / vold.fstab.nand
* System / etc / bluetooth
* Open build.prop and find a line of text as follows:
ro.mediatek.platform = MT65xx
(Converted to the type of your device)
example:
ro.mediatek.platform = MT6572
* META-INF/google/android open, then open the updater-
script file using a text editor
* Add this line between the lines of "set_perm"
set_perm (0, 0, 0644, "/ system/vendor/lib/hw/
gralloc.mt65xx.so");
[Replace with your mt65xx cpu]
example
set_perm (0, 0, 0644, "/ system/vendor/lib/hw/
gralloc.mt6572.so");
* Now Go back to the Rom folder and Take the boot.img
and decompile it with any bootimg-unpack tool! (This
step can be skipped)
* Now delete and rename the zImage boot.img-ramdisk
to PORT-Ramdisk
* Now Do the Same for Stock boot.img and open the
folder named PORT-ramdisk and copy all the files from PORT-
boot.img-ramdisk to ramdisk of boot.img Stock Cell
* Now Go to boot.img-ramdisk and open init.rc
* Now find these lines and replace with your cpu
Chip # Create Property
on early_property: ro.hardware = mt6589
setprop ro.mtk.hardware mt6589
on early_property: ro.hardware = mt6589
setprop ro.mtk.hardware mt6589
example
# Create Chip Property
on early_property: ro.hardware = mt6582
setprop ro.mtk.hardware mt6589
on early_property: ro.hardware = mt6572
setprop ro.mtk.hardware mt6589
For Fixing Problems...
*system/etc/permissions
*system/etc/security
*system/etc/audio
*system/etc/wifi
*system/lib/drm
*system/lib/egl
*system/lib/soundfx
END STAGE
# Before zipping Cusrom make sure the contents of the
folder Port has an arrangement like this
- Meta-Inf
- system
- boot.img
# If it is like a living doing just above the zipping process
by using Es file Explorer or Bluetooth file transfer similar applications,
* A few - Good luck *
------Niks--------
wow, is it possible to do it with the newer SOC's ? for example the MTK6752?

ROM PORTING GUIDES FOR MTK DEVICES FROM SAME CHIPSET

TUT]How to Port MT6592 to MT6592, MT5695 to MT6595 & MT6589 to MT6589
Hey as my promised I will teach you the basic procedure on how to port mt6592 chipset. I've noticed some of you want to learn this porting or cross porting method. But before you proceed make sure you have back up and have knowledges in flashing via SPFT because this is not an easy task it can cause bootloop, lost IMEI and sometimes hard brick of your device.
Note: I'm not liable for any damages of your device. Do it at your own risk!
Requirements :
*Windows XP/7/8
* 7-Zip
* Notepad++
* Java Jdk
* Cygwin
* Boot.img Unpack/Repack Tools or Android kitchen
* Stock ROM
* Port Rom
Note : There are two type of roms
1. Stock rom [ original rom from your mobile ]
2. Port rom [ Any Rom you want to Port]
Procedure:
1. Replace it from your Stock rom to the Port rom
[ FOLDER & FILE TO REPLACE ]
*system/etc/firmware
*system/etc/permission/platform.xml
*system/etc/permission/handheld_core_hardware.xml
*system/lib/hw
*system/lib/modules
*system/lib/ libaudio.primary.default.so
*system/lib/ libcamdrv.so
*system/lib/libcamalgo.so
*system/lib/libcameracustom.so
*system/lib/libdpframework.so
*system/lib/ libsensorservice.so
*system/lib/libvcodecdrv.so
*system/lib/libsync.so
*system/usr/keylayout
[ FIXING PROBLEM ]
Sim card problem :
*system/bin
SD Card Problem :
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
Camera Focus Problem :
*system/lib/libcameraservice.so
Boot loop problem :
*system/lib/libandroid_runtime.so
*system/lib/libandroid_servers.so
*system/lib/libmedia_jni.so
Other Problem :
*system/etc/dhcpcd
*system/etc/permissions
*system/etc/security
*system/etc/audio
*system/etc/bluetooth
*system/etc/wifi
*system/lib/drm
*system/lib/egl
*system/lib/soundfx
2. Replace the Stock boot.img to Port rom
IF THIS DIDNT WORK USE MTK BOOT IMG TOOLS AND REPLACE THE KERNAL OF PORT ROM WITH YOUR DEVICE KERNAL
3. Now open the Port rom folder go to META-INF/google/Android / and open updater-script in Notepad++
And change these line.......
[mmcblkOp3 ----- mmcblkOp9]
Find the mountpoints of your SYSTEM and DATA via MTKDROIDTOOLS or terminal emulator.
Using this command: adb shell cat/proc/dumchar_info
4. Now go to back the folder of port rom and you will see two folder and one file name
+ META-INF
+ system
+ boot.img
5. Now select these 2 folder 1 file and click right mouse button and click on 7zip ->> add to archive
* Now a dialouge box should
appear!
* Configure the Format like This:
Archive format: ZIP
Compression Level : Normal
Compression Method: Deflate
Dictoioany Size: 32k
Word Size 32
* Now Start Zipping and Push the
ZIP to your Memory Card
6. Go to Custom Recovery >> Install ZIP
Finished!!
[# Camera Drive problem fixing]
* Extract the boot.img for android kitchen [ Both stock & port boot.img]
* and open init.rc/# camera
* Find these missing line port to stock boot.img and whole missing line paste it (#Camera)
Example :
#Camera
chmod 0660 /dev/camera-sysram
chmod 0660 /dev/camera-isp
chmod 0660 /dev/camera-pipemgr
chmod 0660 /dev/kd_camera_hw
chmod 0660 /dev/kd_camera_flashlight
chmod 0660 /dev/kd_camera_hw_bus2
chmod 0660 /dev/FM50AF
chmod 0660 /dev/OV8825AF
chmod 0660 /dev/OV88252AF
chmod 0660 /dev/OV8850AF
chmod 0660 /dev/CAM_CAL_DRV
chown system camera /dev/camera-sysram
chown system camera /dev/camera-isp
chown system camera /dev/camera-pipemgr
chown system camera /dev/kd_camera_hw
chown system camera /dev/kd_camera_flashlight
chown system camera /dev/kd_camera_hw_bus2
chown system camera /dev/FM50AF
chown system camera /dev/OV8825AF
chown system camera /dev/OV88252AF
chown system camera /dev/OV8850AF
chown system camera /dev/CAM_CAL_DRV
ANY OTHER PROLEMS AND REQUEST ASK HERE
XDA:DevDB Information
ROM PORTING GUIDES FOR MTK DEVICES, ROM for all devices (see above for details)
Contributors
manhar2108
ROM OS Version: 4.4.x KitKat
Version Information
Status: Testing
Created 2015-08-10
Last Updated 2015-08-10
yippe ported 2 roms using this guide thank u sir
and how to port cm based roms?
You are using other peoples Work
Black_Eyes said:
You are using other peoples Work
Click to expand...
Click to collapse
I just wrote what steps and procedure I used for porting roms
Sent from my irisX8 using XDA Free mobile app
MTK6582
may this work for MTK6582 to MTK6582?
jrodadoy said:
may this work for MTK6582 to MTK6582?
Click to expand...
Click to collapse
Yup this can work but u need to work some what more
Sent from my iris_x8 using XDA Free mobile app

Port mt6589 to mt6572!

Tutorial port rom different MTK chipset
MT6589 to MT6572
1. Material Stock
2. Materials Port
From Stock grab:
file-folder:
* / System / lib -> / modules
* / System / lib -> / egl
* / System / lib -> / hw
* / System / lib -> / SoundFX
regular file:
* / System / lib -> from libaudio-resampler.so to / lib -> libaudioutils.so
* / System / lib -> from libcam.camadapter.so to / lib -> libcameraservice.so
* / System / lib -> libMali.so and all related to the GPU. especially libMali.so
================================================
From stock take:
file-folder:
* / System / etc -> / bluetooth
* / System / etc -> / firmware
* / System / etc -> / wifi
regular file:
* / System / etc -> vold.fstab
* / System / etc -> vold.fstab.nand
================================================
From stock take:
* System / usr / keylayout / Generic.kl
or all files in / usr this will fix the bug.
================================================
From stock take:
* / System / vendor
This merge into port.
================================================
From stock take:
* / System / xbin
This merge into port.
================================================
all of the above files kcuali vendor and xbin
replace it to the port.
or first delete the files and replace port exactly above.
if the file is not a MALI GPU port then in / lib there is a file libMali.so
so add libMali.so of stock and all related to the GPU. libEGL.so example.
================================================
Which fairly complicated stage which must edit boot.img.
Take boot.img from the port.
boot.img unloading port and boot.img stock
(Tutor kmrin I dah share)
tutor via apktool android
if use PC / lepi ane kaga ngarti: p
edit boot.img port
click / ramdisk find "init.rc" edit "init.rc"
search! code "mt6589" without quotes
change to "mt6572" without quotes
all code "mt6589" change it to "mt6572"
if it finds one of the codes "mt6582" This let it remain "mt6582" should not be changed.
then save.
take stock of boot.img file named "kernel" without the quotes, its size 3.85Mb
and override all port boot.img.
then unpack be named new.img size 4.46Mb
rename to boot.img
================================================
At Port edit his build.prop
* /system/build.prop
find code: ro.mediatek.platform = MT65xx
example: ro.mediatek.platform = MT6589
MT6589 change so MT6572
example: ro.mediatek.platform = MT6572
search code:
mediatek.wlan.chip = MT6628
mediatek.wlan.module.postfix = _mt6628
change it to:
mediatek.wlan.chip = mediatek.wlan.module.postfix = _
================================================
In the port edit "updater-script" at META-INF
search code:
eg "its format"
format ("ext4", "EMMC", "/ dev / block / mmcblk0p3", "0", "/ system");
change "mmcblk0p3" so "mmcblk0p4"
"Mmcblk0p4" This is a mount point system A7T +
And change also "mount her"
mount ("ext4", "EMMC", "/ dev / block / mmcblk0p3", "/ system");
change "mmcblk0p3" so "mmcblk0p4"
Or change it to as below, this code is universal and suitable for all android MTK
format ("ext4", "EMMC", "EMMC @ android", "0", "/ system");
mount ("ext4", "EMMC", "EMMC @ android", "/ system");
add the code:
symlink ("wlan_mt6582.ko", "/system/lib/modules/wlan.ko");
symlink ("/ system / xbin / libmnlp_mt6572", "/ system / xbin / libmnlp");
before the code "set_perm" or at the beginning of the code "sysmlink"
then save.
================================================
FOR ADVANCED USER !!
Fixing BUG APP THAT WILL MOST FC
Decompile "framework.jar" stock and port
in stock Copas smua contents of:
/ Smali / com / MediaTek
framework.jar to put in place the same port
And this also
smali / com / android / server
Copas also to put in place the same port
recompile framework.jar port
done ...
================================================
Wrap into a flashable zip and install via
CWM or TWRP
LINK SOURCE / ORIGINAL
http://forum.xda-developers.com/showthread.php?t=2701283

[PORT][GUIDE] How to Port same MTK6572 in JellyBean 4.2.2 Kernel 3.4.5

How to Port same MTK6572 in JellyBean
Porting Guide for Jellybean MTK6572
Note: it must be same MTK6572 and same Jellybean
What do you need:
Stock rom
Port rom (must be MTK6572 android 4.2.2)
7zip
notepad++
apktool
knowledge about porting
Brain
Step 1: Stock and Port rom
Create a 2 folder name it as stock and port
Extract your stock rom place in stock folder same as port rom place in port folder
Step 2: bin Folder copy and replace the following files
dnsmasq
vold
sdcard
if you got a bug in sdcard mounting delete and replace whole bin folder
or if you got a bootloop try to copy and replace all files in bin folder
Step 3: etc folder delete and copy the following folder and files
firmware
dhcpcd
fmr
permissions
security
wide-dhcpv6
wifi
apns-conf.xml
vold.fstab
vold.fstab.nand
vold.fstab.fat.nand
Step 4: lib folder delete and copy the following folder
hw
modules
soundfx
Step 5: copy and replace the following files in lib folder
libaudio.a2dp.default.so
libaudio.primary.default.so
libaudiocompensationfilter.so
libaudiocustparam.so
libaudioeffect_jni.so
libaudioflinger.so
libaudio-resampler.so
libaudiosetting.so
libaudioutils.so
liba3m.so
libacdk.so
libaudioflinger.so
libc.so
libcam.camadapter.so
libcam.campipe.so
libcam.camshot.so
libcam.client.so
libcam.paramsmgr.so
libcam.utils.so
libcam_camera_exif.so
libcamalgo.so
libcamdrv.so
libcamera_client.so
libcamera_metadata.so
libcameracustom.so
libcameraservice.so
libexif.so
libfeatureio.so
libfrsdk.so
libft.so
libgoggles_clientvision.so
libgui.so
libimageio.so
libja3m.so
libcustom_nvram.so
libsensorservice.so
libvcodecdrv.so
libdpframework.so
libinput.so
libsync.so
Step 6: usr folder
usr - delete and replace
Step 7: Open build.prop search line or add
For fix density:
ro.sf.lcd_density=160 (for 3.5 inch)
ro.sf.lcd_density=240 (for 4.0 inch)
For fix rotation:
ro.sf.hwrotation=0 or
ro.sf.hwrotation=180
Step 7: META-INF folder
You can use the META-INF of Port rom
Open META-INF / com/google / android / updater-script and edit this line
Your mount point must be mmcblk0p4 for system like this:
format("ext4", "EMMC", "/dev/block/mmcblk0p4");
mount("ext4", "EMMC", "/dev/block/mmcblk0p4", "/system");
Your mount point must be mmcblk0p6 for data like this:
mount("ext4", "EMMC", "/dev/block/mmcblk0p6", "/data");
Step 8: boot and logo
Replace your stock Boot.img and logo.bin to port rom
Common bug: sdcard not mounting or reverse mount
How to fix:
1. decompile framework-res.apk
2. on res/xml folder find storage_list.xml and edit in notepad++
3. there is sdcard0 at sdcard1 just interchange the 0 change it as 1 and the 1 change it as 0
4. Recompile
if you got a bootloop prepare your original framework-res.apk from Port rom
it is easy if you have a computer
Give proper credit to Marc Kevin Flores

Categories

Resources