[Android Software/Hacking General [Developers Only]] yuweng:
Terms & Conditions of Use

As Master Shifu codeworkx says, the same applies here . . .

All i'm asking is for you to give proper credits to me & the DEVs that i mentioned on the porting tool, without them sharing, this porting tool wouldn't have exists !

i have seen many that took my work, got a ported working PhilZ Touch on their MTKs & shared it directly even here on XDA ! while some at other forum threads BUT not a single word mentioning this thread, me or the porting tool or the DEVs that has contributed to this project . . .

Many just make a new thread with the ported PhilZ Touch & shared it with their followers, fooling their followers by not mentioning credits so that their followers thinking that the ported PhilZ Touch is built from source & is their own work, collected all the Thanks & that will make them look cool while some even solicit for Donations !

Anyone can just download this porting tool, run the exe & they will get a ported PhilZ Touch on their MTK, what is so cool about that . . .

Do you know how many hours i have put into this, not mentioned is the time studying & building PhilZ Touch from source, PC hardware upgrading, broadband fee, electricity fee, time to study & building this porting tool exe & i'm sharing this all for FOC & i don't solicit for Donations or Thanks in return, i don't even post my Donate button . . .

If you wanna start a new thread to support specific MTK devices with the ported PhilZ Touch, i have absolutely no problem with that, it will be your responsibility to response & provide support to your followers but pls give proper credits . . .

If you think this porting tool is too complicated & you would wanna start a new thread/ guide/ video or whatever either here or else where, again i have absolutely no problem with that BUT pls pls don't mirror the porting tool. i'm sure you have seen this all the time at XDA here by other DEVs, the logic is very simple, when you mirror the files, there is no way of tracking which version has bugs. Most importantly, i need direct feedback from users & when you mirror the files, your followers will download that version from your link & they complain & feedback to you but you won't be able to fix it so pls put a link direct to this thread so that i can improve on this porting tool.

If you wanna post this porting tool on your blog, website or anything at all, again i have absolutely no problem with that BUT again post a link directly to this thread so that users can always post a bug report here & they will always get the new, bug free porting tool as i will fix it when i receive bug report.

Credits mentioning & redirecting link to original threads won't make you low standard, in fact your followers will be thanking you for sharing with them a great new tool that you found. Credits mentioning & redirecting link to original threads also means that you give respect & honor the original DEVs of the tool, this would also enable feedbacks on new ideas, new features & improvement of that particular tool too.

If you are a company then pls get my permission first or the least you can do is Donate to Phil3759 for a job well done & if you are an end user, you are also encourage to do so too, fyi, i did . . .

Features

Auto mode

- You don't need to know a thing & it'll port a working PhilZ Touch for your MTK & that is why it is called Magic . . .

Manual mode

- Let you choose either to use your boot.img or recovery.img for porting.

- Let you manually choose your device res, MTK fixes, Flip screen/ Flip Touch, different font size & uses all files from your stock recovery when using recovery.img. For boot.img porting, this tool will only use its kernel only. Refer to here for more info . . .

- device resolutions

- flipped screen

UnPack/ RePack mode

- Let you mod whatever you want with option to install it right away to your MTK

Requirement

- Requires Root

- Install adb driver

- Enable USB debugging

- Disable UAC

- Disable driver signature

- Works from Gingerbread to Lollipop but NOT on encrypted data partition on Lollipop but why you enable it back ?

- No need ro.secure=0 to run

recovery.fstab

How-to

Preface

As mentioned few times, i don't own all the MTK devices available on the market so a few things might not work on your MTK. So use the UnPack/ RePack mode to edit necessary files typically the init.rc & recovery.fstab.

UnPack other MTK PhilZ Touch by other DEVs & see how they did it.

As mentioned few times, the porting tool now is AIO so go ahead & play with it.

Intro

What is recovery.fstab

The actual require backup partition for MTKs or any android devices are actually ONLY just the boot, cache, data & system partition.

When you encounter any problems such as doesn't boot/ bootloop issues after a new app installation or anything at all, a Wipe Data/ Factory Reset or Restore with ONLY the system & data partition & you'll be able to revert to previous working state in a short while. Thats why its very important to make a backup before modding anything at all !

For bootloop issues with new firmware installation (update.zip) then its best to restore everything. Having said that, if you flash preloader using SP Flash Tool then PhilZ Touch restore would not be able to restore it or for that matter, your device wouldn't even be able to boot at all (brick), thats why it is important to backup your Factory ROM with MTK Droid Root & Tools first.

For latest MTK armv8

Since the latest MTK armv8 is using direct device path, below is possible as i've seen it on msm devices but personally i think it is unnecessary to have those partition backed up as it will take alot of space & typically you only brick the system or data partition but then again, that is entirely up to you on what you wanna backup. Below example is taken from Master Shifu Carliv github, added all various armv8 devices direct device path partition for reference. To find out the actual MTK armv8 partition info on your device, use the command adb shell cat /proc/partinfo & adb shell ls -al /dev/block/platform/mtk-msdc.0/by-name

# Android fstab file.

# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

#<src> <mnt_point> <type><mnt_flags and options><fs_mgr_flags>
/dev/block/platform/mtk-msdc.0/by-name/boot /boot emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/nvram /nvram emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/flashinfo /flashinfo emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/expdb /expdb emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/secro /secro ext4 relatime wait,check
/dev/block/platform/mtk-msdc.0/by-name/seccfg /seccfg emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/proinfo /proinfo emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/para /para emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/logo /logo emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/tee1 /tee1 emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/tee2 /tee2 emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/otp /otp emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/lk /lk emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/system /system ext4 ro,noatime wait
/dev/block/platform/mtk-msdc.0/by-name/preload /preload ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,resize,encryptable=/dev/block/platform/mtk-msdc.0/by-name/metadata
/dev/block/platform/mtk-msdc.0/by-name/protect1 /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,autoformat
/dev/block/platform/mtk-msdc.0/by-name/protect2 /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,autoformat
/dev/block/platform/mtk-msdc.0/by-name/persist /persist ext4 relatime wait,check
/dev/block/platform/mtk-msdc.0/by-name/custom /custom ext4 relatime wait,check

/devices/mtk-msdc.0/11240000.MSDC1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto

To manually make a SP Flash Tool backup of your MTK armv8 Factory ROM then refer to here & you can also use the following empty cache secro userdata since a Factory Reset/ Wipe Data will wipe data partition anyway.

Updates

Refer to here & here for custom partition backup/ restore on armv8 Thanks to Katinatez . . . :good:

Refer to this the only lead shared by BachMinuetInG . . . :good:

Aroma File Manager

It is a known problem that aromafm will not to work properly on flip-screen, this is not a PhilZ Touch problem as it has never been updated for almost a year.

Flip Screen/ Flip Touch/ Font size

It is a known problem that MTK manufacturer uses non-standard design & uses different Flip Screen/ Non-Flip LCD with different combinations of Flip/ Non-Flip Touch Screen on various Portrait & especially Landscape Android devices.

There is absolutely no way that the porting tool could detect whether your MTK's Touch is FlipX or FlipY or SwapXY so i build all possible combinations into the porting tool -> Manual-mode -> Try all combinations one at a time until one that works for your device.

Typical Flip Screen device then choose either Flip Screen Only or Flip Screen FlipX-FlipY. For Landscape devices (tabs), typically is SwapXY FlipY.

As said, i don't own all MTK devices so i donno which font size is suitable for your device so again, you'll need to play around with the different selection. Below are available fonts as demonstrated on my 480x854 res . . .

View attachment 3215484 View attachment 3215485 View attachment 3215486 View attachment 3215502 View attachment 3215487 View attachment 3215488 View attachment 3215490

Bug report

<- No support if you don't attach it to your post.

Please always attach recovery.log & log.txt from the porting tool or i'll be giving the wrong advice based on assumption & that might brick your device !

How to obtain recovery log

adb pull /tmp/recovery.log -> Attach to your post

At PhilZ Touch -> Advanced Functions -> Report Error -> Copy log from /sdcard/clockworkmod/philz_recovery.log -> Attach to your post

If you don't see me replying means either the answer is already at this thread so start reading every page, its not like there are 100 over pages, as of 18 March 2015, there are only 14 pages . . .

The 2nd reason you don't see me replying is i donno the answer then head up to PhilZ Touch development thread & get help from Phil3759 directly . . .

Questions & Answers

Q : Your tool doesn't work.

A : Its already explained at the OP, pls read EVERYTHING at Page 1 !

Q : I can't get adb to work on my PC.

A : Then get one of your device forum DEV to look at this porting tool.

Q : I have a MTK model xxx SoC YYY, does your porting tool support it.

A : The title already said it, for all MediaTek Devices ONLY

Q : I have a MTK but i'm afraid the porting tool would brick my device.

A : Then don't use it ! Its for Developers ONLY !

Q : OP said DO NOT USE IT ON LOCKED BOOTLOADER but the link doesn't say much for MTK devices.

A : There isn't any guide to identify locked bootloader on MTKs, generally you'll have to flash the recovery.img to find out whether it bricks ! However, farenheith has confirmed by flashing back the original stock 3e recovery.img & his locked bootloader MTK Motorola boots back !

To check your bootloader

adb reboot-bootloader [COLOR="Blue"]or[/COLOR] adb reboot bootloader [COLOR="blue"]or[/COLOR] adb reboot fastboot
fastboot getvar all

(bootloader) unlocked: NO

To unlock it, use below command.

fastboot oem unlock

Source

As explained BRANDED at the OP, UNBRANDED MTKs are generally MTKs directly from China, have unlock bootloaders.

Updates

MTK armv7/ armv8 LP refer to this workaround, make sure to unlock your bootloader first !

List of supported MTK devices . . .