[Android Software Development] HostZero:
[GUIDE][PORT] TWRP 3.0.X for Mediatek Devices.

Requirements:

1. Windows/Linux/Mac PCs.

2. OFFICIAL CyanogenMod 13 Support

3. DSIXDA Kitchen.

4. Patience.

5. A bit of Computer Knowledge

6. Getting Recovery Partition Size of MTK Chipset (Google It)!

This Method is Universal Cross-Chipset Method means you can port Snapdragon Recoveries even to your MTK. dosen't matter 32bit or 64bit MTK Processor.

Thanks to [MENTION=912474]Dees_Troy[/MENTION] for his Nexus Recoveries.

Step 1: Setting Up!

(i) Download your CyanogenMod Recovery from download.cyanogenmod.com.

(ii) Download DsiXDA Kitchen

(iii) If your on WINDOWS download CYGWIN to launch DSIXDA Kitchen.

(iv) Setup Done!

Step 2: Executing!

EXAMPLES YOU CAN USE OTHER RECOVERIES ALSO BUT AS SAME RESOLUTION AS YOUR DEVICE:

IF YOUR ON 480x850, 480x854 download: https://twrp.me/devices/lgnexus4.html latest TWRP 3.x Available!

IF YOUR ON 720x1280, 800x1280 download: https://twrp.me/devices/asusnexus720123g.html latest TWRP 3.x Available!

IF YOUR ON 1080x1920 download: https://twrp.me/devices/motorolanexus6.html latest TWRP 3.x Available!

Once Downloaded!

Download your CM RECOVERY from download.cyanogenmod.org/ Find your device codename and download.

Step 3: Setting Up Kitchen!

Note: In most cases of Commands Windows/Linux/Mac are same in different i will mention.

If Windows:

(i) Open Cygwin
(ii) cd <user_name>
(iii) cd kitchen
(iv) ./menu

If Linux/Mac

(i) Open Terminal
(ii) cd <kitchen_source_dir>
(iii) ./menu

Minimize The Kitchen Never Close.

Step 4: Setting up WORKING Directory

(i) Open Kitchen Installed Directory.

(ii) Make a new folder named WORKING_twrp

(iii) Copy your downloaded nexus_twrp.img to WORKING_twrp

(iv) Rename twrp.img to boot.img

Step 5: Unpacking STOCK and PORT

(i) Open DsiXDA kitchen back.

(ii) Type Options in Line:

0
12
w
press enter

(iii) Type Options in Line: If your following me as above just follow next command.

a

(iv) Now a new folder will be created in kitcher_dir named boot.img-xxxxxx (instead of xxxx some numbers) paste your downloaded cm recovery.img to boot.img-xxxxxx folder.

(v) Rename cmrecovery.img to boot.img

(vi) Open Kitchen Press Enter to continue.

NOW: BOOT-EXTRACTED = PORT

boot.img-xxxxxxxx = BASE

Copy Replace Files from BASE TO PORT and delete file in PORT:

COPY AND REPLACE FROM BASE TO PORT:
/zImage
/boot.img-ramdisk/default.prop
/boot.img-ramdisk/fstab.<codename>
/boot.img-ramdisk/uventd.rc
/boot.img-ramdisk/etc/recovery.fstab
/boot.img-ramdisk/etc/twrp.fstab (if exist no prob if it dosen't exist in PORT)

DELETE FILES FROM PORT:
/boot.img-ramdisk/fstab.<portcodename>

Step 6: Lets Repack!

Open DSIXDA Kitchen Back On!

Type Option in Line:

If you didn't close kitchen it will be minimized continue this:
[B]Option:[/B]
b

OUTPUT= /kitchen_dir/WORKING_twrp/boot.img This is your TWRP Recovery the OLD one has been replaced with REPACKED ONE

Make Sure You Provide Me PORT GUIDE Credits

I HOPE YOUR ENJOYING MY WORK :good: :laugh:

Q/A:

1. Will this Work on Above Resolution than 1080p?

A. Yes!

2. Is it mandatory to have official CM Support?

A. Yes! Because, CM and OMNI ROMS are only one which can build TWRP and CM is only one which even makes CM13 Recovery.

3. Must CM13 be based on 6.0.1 itself?

A. No, the CM Recovery Can be also on 6.0 but not 5.1 or bellow.

4. Why CM Recovery?

A. As per my knowledge CM Recovery is based on CWM as well as TWRP. so it will be easy to port TWRP for your device.

4. Bootloop?

A. Make sure you followed Step 5 Properly! and clear command line using kitchen (Options in line: 0, 12, p, press enter, press enter) if still bootloop is being faced try a different recovery!

5. Are you sure this will work? It's Not working for Me!.

A. Yes it will I am making UNOFFICIAL TWRP 3.x for my Sprout Devices: http://xdaforums.com/crossdevice-de.../unofffical-twrp-3-0-2-0-android-one-t3358636