[Miscellaneous Android Development] yuweng:
Thats how all android devices started off when they have the non-standard boot.img or recovery.img, Thanks to bgcngm AKA Bruno Martins he has open up a whole new world for MTK devices when he make his unpack/ repack script public to the world . . . :good:

As i've mentioned here, we would be using stock ROM until today but its sad to see many so called ROM Porter/ ROM Cooker never even mentioned his name when they published their work, they all have forgotten that all of this would not be possible without BM's script . . . :rolleyes:

Back to business . . .

You can also try this or this your good friend awaaas told me bigbiff has help him with that, and this all is using BM's script to automate the whole build process . . . :good:

Alternate commands for your technique

cd ~/cm11
source build/envsetup.sh
lunch cm_N986-eng
cd $OUT

copy repack-MT65xx.pl to $OUT
Do all your necessary editing to $OUT/recovery/root

perl repack-MT65xx.pl -recovery kernel recovery/root new-recovery.img

[MENTION=2227671]agismaniax[/MENTION] : Reply to your question above. . . ;)

You should have refer to here thats where it all started for MTK, take a look at Added on Apr 23, 2014 . . . :cool:

fstab.goldfish & ueventd.goldfish.rc is auto-generated by build & its not used for MTK, you can either leave it or just delete it . . .

INIT mount points are direct device block while voldmanaged is using vold which uses virtual nodes to mount both sdcard. -> Source

i don't own a /data/media MTK so i cannot/ donno how to solve the mount USB storage, i did a search previously on this problem & a quick search found this . . .

Why fstab.${ro.hardware} As explained at OP, adb shell getprop ro.hardware then copy your recovery.fstab to root & rename it to fstab.mt6589 & mount USB storage should work for most MTK but not /data/media . . . :cowboy: Why, no one found out or share the working mount points for /data/media on MTK for PhilZ Touch . . . Fyi, shooxy did try but fail . . . :laugh:

For your MT6589 you can use either as below, tested & confirmed working by shooxy . . . :good:

/devices/platform/mtk-sd.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:[COLOR="blue"][SIZE="4"]6[/SIZE][/COLOR] [COLOR="Red"]<- your internal sdcard fat partition no.[/COLOR]
/devices/platform/mtk-sd.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto

OR

/devices/platform/mtk-msdc.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:[COLOR="Blue"][SIZE="4"]6[/SIZE][/COLOR] [COLOR="Red"]<- your internal sdcard fat partition no.[/COLOR]
/devices/platform/mtk-msdc.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto

As said, for /data/media device i donno, you'll have to find that out yourself . . . :cowboy:

Try & see if it mounts both sdcard . . . :fingers-crossed:

/devices/platform/mtk-msdc.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:[COLOR="Blue"]emmc@fat[/COLOR]
/devices/platform/mtk-msdc.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto

/devices/platform/mt_usb/usb1 auto auto defaults voldmanaged=usb:auto
/devices/platform/mtk-msdc.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto

Use below command, try the path with usb in it, refer to here for some clues . . .:cool:

adb shell su -c ls -R > usb.txt