[Miscellaneous Android Development] :
My last guide was actually inside the beginner's guide and was good for that time, but now because of the new recovery versions (including kitkat), I need more space. So I decided to write a new guide for porting my recoveries to other phones.

The porting rutine won't work anymore for new mtk platforms with my actual porting builds. If you have such a phone you have to learn how to compile it from source or to find a recovery built for same platform to port it.

Also, for some phones, which require a specific PIXEL FORMAT, it won't work, and you again have to build it from source: the ported images are built for regular RGB 565 PIXEL FORMAT. If you have done right the port but the phone doesn't boot in recovery, just blackscreen and start, then it must be that case.

What you need:

- Geany or Notepad++ software

- CarlivImageKitchen for unpack/repack jobs.

- the dumchar_info content from your phone

- a stock boot.img for your phone

- a stock recovery.img for your phone - these two have to be with the kernel you want to use (for kitkat or for jellybean)

- a built carliv touch or cwm recovery for port. Get the right one for your phone. If it is cwm modded, check the screen width and search for that, and if it's Carliv Touch Recovery check your phone resolution in names.

or

or

Credits:

- Clockworkmod team, and Cyanogenmod for the base recovery

- bgcngm for his mtk tools for linux

- michfood for his unpack/repack tools for windows

Let's start it.

Even if I wrote everything here as simple as I could and added some images too, some of you still can't understand how to do it, so for them, here is a detailed guide in images with every step. If you can't see it online, download the archive with all images from here.

How to get the dumchar_info file content from you phone.

First make sure that you have adb access to your phone from your computer. If you don't, then solve this problem. Most of the times is because of bad drivers or some security issues (UAC, antivirus, firewall, defender, etc.) in windows. In linux it's easier if you have the 51-android.rules file in place. Other possible issue might be with the path (for sdk tools - adb, fastboot). There are many guides here on xda about how to solve these.

Connect the phone to PC, open a command prompt or terminal window an type:

adb devices

The adb will start and you will see the phone serial number and the word "device". That means you've got connected to the phone with adb server. Again, type:

adb shell cat /proc/dumchar_info

and then you will see the content of that file from your phone. Select it and copy/paste in a text document, then save it as dumchar_info.txt, and you can deconnect the phone from PC.

The dumchar file will look like this:

Part_Name	Size	StartAddr	Type	MapTo
preloader 0x0000000000600000 0x0000000000000000 2 /dev/misc-sd
mbr 0x0000000000080000 0x0000000000000000 2 /dev/block/mmcblk0
ebr1 0x0000000000080000 0x0000000000080000 2 /dev/block/mmcblk0p1
pmt 0x0000000000400000 0x0000000000100000 2 /dev/block/mmcblk0
pro_info 0x0000000000300000 0x0000000000500000 2 /dev/block/mmcblk0
nvram 0x0000000000500000 0x0000000000800000 2 /dev/block/mmcblk0
protect_f 0x0000000000a00000 0x0000000000d00000 2 /dev/block/mmcblk0p2
protect_s 0x0000000000a00000 0x0000000001700000 2 /dev/block/mmcblk0p3
seccfg 0x0000000000020000 0x0000000002100000 2 /dev/block/mmcblk0
uboot 0x0000000000060000 0x0000000002120000 2 /dev/block/mmcblk0
bootimg 0x0000000000600000 0x0000000002180000 2 /dev/block/mmcblk0
recovery 0x0000000000600000 0x0000000002780000 2 /dev/block/mmcblk0
sec_ro 0x0000000000600000 0x0000000002d80000 2 /dev/block/mmcblk0p4
misc 0x0000000000080000 0x0000000003380000 2 /dev/block/mmcblk0
logo 0x0000000000300000 0x0000000003400000 2 /dev/block/mmcblk0
ebr2 0x0000000000080000 0x0000000003700000 2 /dev/block/mmcblk0
expdb 0x0000000000a00000 0x0000000003780000 2 /dev/block/mmcblk0
android 0x0000000038000000 0x0000000004180000 2 /dev/block/mmcblk0p5
cache 0x0000000007e00000 0x000000003c180000 2 /dev/block/mmcblk0p6
usrdata 0x0000000060000000 0x0000000043f80000 2 /dev/block/mmcblk0p7
fat 0x0000000041b80000 0x00000000a3f80000 2 /dev/block/mmcblk0p8
bmtpool 0x0000000001500000 0x00000000ff9f00a8 2 /dev/block/mmcblk0
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate

Next place all three images (boot, recovery - stock and carliv touch or cwm) in the folder of bgcngm's, carliv image kitchen or michfood's tools.

In linux I keep those in "mtktools" folder and in windows in "Boot_Recovery" folder. You can use what names you want, but be sure to not use spaces on that name. Also, in windows place it on primary partition, usualy C.