[Android Q&A, Help & Troubleshooting] Eclectica:
I've tried another three ports but none of them have loaded.

I'll post the entire process here from the backups I'm using a 'Stock ROM' to the final OUTPUT_ZIP Porting ROM.

I have backups of the stock ROM from CWM, shown here:

[IMG="cwm backup"]http://xdaforums.com/attachment.php?attachmentid=3100191&stc=1&d=1420501443[/IMG]

and also from MTK Droid Tools:

[IMG="MTK DT backup"]http://xdaforums.com/attachment.php?attachmentid=3100192&stc=1&d=1420501519[/IMG]

I think that MTK DT does not produce a reliable recovery.fstb (as attached 2 posts above) but maybe I'm missing something.

Registering with Kitchen

I extracted recovery.img from the CWM backup in kitchen. recovery.fstab was in boot.img-ramdisk/etc.

# mount point	fstype	device	[device2]
/misc	emmc	/dev/misc
/data	ext4	/dev/block/mmcblk0p7
/system	ext4	/dev/block/mmcblk0p5
/cache	ext4	/dev/block/mmcblk0p6
/boot	emmc	/dev/bootimg
/recovery	emmc	/dev/recovery
/emmc	vfat	/dev/block/mmcblk0p8
/sdcard	vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1
/sd-ext	auto	/dev/block/mmcblk1p2

#################################################
###############################################################
###############################################################
###############################################################

I replaced the mount locations in your Micromas A110Q template file “A110Q” to produce this:

# MTK

change_mnt=yes

param1=ext4
param2=EMMC

param1_sdcard=vfat
param2_sdcard=MTD

sys_mnt=\/dev\/block\/mmcblk0p5
cache_mnt=\/dev\/block\/mmcblk0p6
boot_mnt=\/dev\/bootimg
data_mnt=\/dev\/block\/mmcblk0p7
sdcard_mnt=\/dev\/block\/mmcblk1p1 \/dev\/block\/mmcblk1

I renamed this file MTK and copied it to: C:\cygwin\home\username\kitchen\tools\edify_defs

Getting “system” folder.

I can get the system folder from the CWM backup or the MTK Droid Tool backup but in different ways:

Extracting the system folder from CWM is easy: I found that I could just extract the system folder from the system.ext4.tar :

[IMG="system folder in cwm backup"]http://xdaforums.com/attachment.php?attachmentid=3100203&stc=1&d=1420501918[/IMG]

This system folder is 671 MB

Extracting the system folder from MTK Droid Tools backup was more tricky. I found I could rename the file “system.ext4.img” to system.img and kitchen would extract it and then open Ext2Explore. (It gives the warnings “Qt: Untested Windows version 6.2 detected!” and the pop up "Unable to read disk. Please make sure you are running application as an Administrator." as you predict in your guide.) When Ext2Explore loads I could open the “WORKING_XXXXXX_XXXXXX” folder, open the “system” folder and find a file called “system.img” 921.600KB (not system.ex4.img) and successfully extract that the the same folder. Kitchen then advises “A valid boot.img is not found. You have the option to add a 'fake' boot.img so that the features of the kitchen can still function normally.” and I selected the default “Add boot.img” y. Resulting in the following:

Copying null boot.img ...

Looking for symbolic links under /system/bin ...
None detected
Adding a default set of toolbox symlinks to update-script ......................................................................................................................................................................
Adding dumpcrash symlink ...

Looking for symbolic links under system/xbin of working folder ...
None detected

Found ./system/xbin/su

Updating update-script with su entry and symbolic link

Remove install-recovery.sh from update-script (y/n)? (default: n): n
Not removing
Remove system/etc/install-recovery.sh (y/n)? (default: n):
Not removing

Listing of WORKING_010515_120816:

total 12
-rwxrwxr-x 1 Rob None 6144 Jan 5 12:09 boot.img
drwxrwxr-x+ 1 Rob None 0 Jan 5 12:08 META-INF
drwxrwxr-x+ 1 Rob None 0 Jan 5 12:09 system

Finished setting up working folder!

The Working folder ROM info:

Working folder information (v0.224)

Android OS version : 4.4.2
Device : LENOVO
Model : LENOVO
ROM Name : ALPS.KK1.MP1.V2.11
Rooted (Superuser app + su) : YES
Rooted (unsecured boot.img) : UNKNOWN
BusyBox installed : YES
BusyBox run-parts support : NO
Apps2SD (Apps to EXT) enabled : NO
/data/app enabled : NO
Custom boot animation allowed : NO
Nano text editor installed : NO
Bash shell support : NO
/system/framework is deodexed : NO
/system/app is deodexed : NO
radio.img found : NO
ROM will wipe all data : NO

Here is a screen shot of the system folder via the MTK DT backup:

[IMG="system folder extracted from MTK DT backup"]http://xdaforums.com/attachment.php?attachmentid=3100209&stc=1&d=1420502157[/IMG]

This system folder is altogether 662MB.

The system folders from MTK DT and from DWM are different. Here is a comparison:

bin: 12,323,955 (from the MTK DT backup extraction) vs 12,324,456 (from the CWM system folder. )

fonts: 19,000,960 (MTK DT) vs 19,000,993 (CWM)

lib: 139,120,006 (MTK DT) vs 139,120,039 (CWM)

media: 59,754,472 (MTK DT) vs 59,898,584 (CWM)

Everything else is the same size. The MTK DT backup and the CWM backup were made on the same day but not immediately consecutively. I’m not sure if the MTK DT backup was made prior to CWM being installed or not.

Stock boot.img

I followed your instructions ‘to a t’. Again, the MTK DT backup boot.img and the CWM backup boot.img files produce slightly difference results.

CWM: boot.img-ramdisk 1.49MB vs MTK DT: boot.img 1.55MB

The only file that differs is adbd which is 203 KB in MTK DT backup and 144 KB in the CWM backup.

Both “zImage” files are the same size: 4750 KB

PORTING

This time I used what seems to be the most plain, official LENOVO S850 ROM that I can find on needrom. It was listed by SoCr@Te and is intended to be SP Flashed. For some reason it’s a bit of a monster ROM. It has three folders:

[IMG="Port ROM file structure"]http://xdaforums.com/attachment.php?attachmentid=3100212&stc=1&d=1420502473[/IMG]

The folder “apdb” (178 KB) has the files: “APDB_MT6582_S01_KK1.MP1_” and “APDB_MT6582_S01_KK1.MP1__ENUM”

“modemdb" (21.8 MB)has the following:

[IMG="Port ROM folder modemdb"]http://xdaforums.com/attachment.php?attachmentid=3100216&stc=1&d=1420502554[/IMG]

and target_bin (1.74 GB!) has the following files:

[IMG="Port ROM target_bin folder"]http://xdaforums.com/attachment.php?attachmentid=3100221&stc=1&d=1420502626[/IMG]

So because the system folder is a .img I followed your guide step “IF YOUR ROM IS SP_TOOLS FLASHABLE THEN DO THESE TO EXTRACT SYSTEM FOLDER FROM IT:” again. This is the kitchen terminal output:

Android Kitchen 0.224 - by dsixda (xda-developers.com)
============================================================

> MAIN MENU

1 - Set up working folder from ROM
2 - Add root permissions
3 - Add BusyBox
4 - Disable boot screen sounds
5 - Zipalign all *.apk files to optimize RAM usage
6 - Change wipe status of ROM
7 - Change name of ROM
8 - Show working folder information

0 - ADVANCED OPTIONS
00 - LEGACY OPTIONS (old and rarely used)
99 - Build ROM from working folder

u - Kitchen Info/Update/Donate
x - Exit

Enter option: 1

CREATE WORKING FOLDER FOR ROM
==============================

Ensure there is at least one ROM under the 'original_update' folder!

Select an option:

s - Show supported formats
x - Abort, don't create working folder

Or press Enter to continue

?

Please wait ...

Available ROMs:

(1) system.img and boot.img

Enter selection number (default=1, cancel=0, r=refresh): 1

Found original_update/system.img

The new working folder will be named WORKING_010615_121157
Change the name (y/n)? (default: n):

Creating working folder WORKING_010615_121157 ...
Copying system.img ...

Adding an update-script ...

‘system.img’ -> ‘../system.img.ext4’

Warning: No cache.img.ext4 found. You can unpack this file separately
by running the plugin script in the kitchen's Advanced menu options.
If your device doesn't use a CSC, then just ignore this message.

Analyzing system.img.ext4 ...

Compiling simg2img ...
simg2img.exe successfully compiled

Converting system.img.ext4 into a format for unpacking ...

#####################################################################

READ INSTRUCTIONS BELOW TO EXTRACT FILES FROM ext4_system.img:

1) Ignore the 'Cannot Read Disk' warning dialog (press 'OK') if it
appears!

2) When Ext2Explore appears, use 'File->Open Image' to open:
C:\cygwin64\home\Rob\kitchen\WORKING_010615_121157\system\ext4_system.img

3) After it loads, right-click on the new icon displayed in the left
frame, and select Save

4) Select C:\cygwin64\home\Rob\kitchen\WORKING_010615_121157\system

5) Wait for extraction to finish and then close Ext2Explore

#####################################################################

>>>> PERFORM THE STEPS ABOVE BEFORE PRESSING ENTER! <<<<

Press Enter to continue
Qt: Untested Windows version 6.2 detected!

The Ext2Explore warning pops up: “Unable to read disk. Make sure you are running as an Administrator”

The file ext4_system.img has been fully unpacked into:
/home/Rob/kitchen/WORKING_010615_121539/system

Warning: A valid boot.img is not found. You have the option to add a
'fake' boot.img so that the features of the kitchen can still
function normally.

This boot.img will be automatically removed from your ROM's
ZIP file when it is built.

Add boot.img (y/n)? (default: y):

Copying null boot.img ...

Looking for symbolic links under /system/bin ...
None detected
Adding a default set of toolbox symlinks to update-script ................................................................................................................................................................................
Adding dumpcrash symlink ...

Looking for symbolic links under system/xbin of working folder ...
None detected

Listing of WORKING_010615_121539:

total 12
-rwxrwxr-x 1 Rob None 6144 Jan 6 12:17 boot.img
drwxrwxrwx+ 1 Rob None 0 Jan 6 12:15 META-INF
drwxrwxrwx+ 1 Rob None 0 Jan 6 12:17 system

Finished setting up working folder!

Would you like to view this ROM's info (y/n)? (default: y):

PORT ROM info:

Working folder information (v0.224)

Android OS version : 4.4.2
Device : S850
Model : Lenovo S850
ROM Name : S850_ROW_S119_140627
Rooted (Superuser app + su) : NO
Rooted (unsecured boot.img) : UNKNOWN
(the rest are : NO)

The Kitchen Working folder is 1.11 GB. It contains META-INF, system and boot.img.

PATCHING BOOT.IMG:

After extracting the boot image I replaced the zlmage file (1 KB) with the ‘Stock ROM’ zlmage file (4750 KB).

Editing Build Prop:

In build.prop of Port ROM I changed “ro.product.device=S850” to “ro.product.device=MTK” and saved the file.

I copied modem_1_wg_n.img across.

I copied libcameraservice.so across.

The stock ROM does not have a System/lib/modules folder so I didn’t touch that.

The stock ROM’s keyboard was actually buggy so I didn’t touch this either hoping it will improve things.

Then built the ROM.

It flashed fine but just hangs on the boot "welcome" logo, as most of the previous port attempts have also done.

I've done my best to be systematic and clear about this process - like your excellent guide - but please let me know where things are ambiguous.

Does any of this process suggest I'm making a mistake anywhere? What do you suggest I try next. I'll try pinging you on facebook. Thanks for the help!