[Guide] Cyanogenmod 13 Porting for Mediatek MT6592 Devices

bravonova

Senior Member
Mar 6, 2015
2,253
1,685
193
Pune
Guide to port Fire855's Cyanogenmod 13 to Mediatek Devices

Here I am posting guide how to port Fire855's Cyanogenmod 13 to Mediatek devices based on MT6592 SoC.


@fire855 Cyanogenmod 13 thread --> http://forum.xda-developers.com/android/development/rom-cyanogenmod-13-kingzone-k1-turbo-t3360336

Required Tools

Java Development Kit
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Dat File Extractor
https://goo.gl/NxNe97

Cygwin
https://goo.gl/uMvH7C

Android Kitchen
https://goo.gl/rMH3kX

Meta-Inf Folder
https://goo.gl/y2WZZI

Notepad++
https://notepad-plus-plus.org/download/


Extracting system.new.dat file from Fire855 build
- Use extractor
- First Extract fire855 build zip using Winrar or 7z software.
- Put following files in "place_for_supported_files_here" folder
- file_contexts
- system.new.dat
- system.patch.dat
- system.transfer.list
- Run Extraktor_En.cmd
- Type 1 and press enter
- Your files will be extracted in "extract_file_here" folder
- Now copy these files from "system.dat" in "system" folder of Fire855 build
- Delete ".jounal" file from "/system" folder


Before Porting
- Delete Meta-Inf folder from Fire855 build
- Delete "system.new.dat", "system.patch.dat", "system.transfer.list
- Replace it with the Meta-inf folder given above
- You will have these folder and files now
- Install
- Meta-inf
- System
- boot.img
- file_contexts
- Now compress these above files and folder in one standard zip format.


Setting up Android Kitchen and Extracting Boot.img
1. Extract the Cygwin. In this folder you will find another folder named cygwin_packages and a file named setup. Copy these to C :\cygwin (create a folder named cygwin if it doesn't exist)

2. Open the cygwin folder in C:

3. Now in cygwin folder right click on the setup.exe and Run as Administrator

4. Click Next and then select Install from Local Directory

5. Select the path to the cygwin folder in C: then click Next

6. Select the path to the cygwin_packages folder (C:\cygwin\cygwin_packages) then click Next

7. Click Next. A message will appear click OK

8. Single click in the area between the Red box

9. Click Next. A message will appear, click Next. After this, installation will take place. After the installation process is complete check / tick the Create icon on Desktop and click on Finish. After this Right click on the Cygwin desktop icon and Run as Administrator. Some processes will take place after the completion of the process, close it

10. Now open C Drive. In the drive you will find a folder named Cygwin, Open it

11. Now open the home folder. In this folder you will find another folder having your Username, open it

12. Don't delete any file. Make a new folder named Kitchen

13. Open the folder named Kitchen. Now extract the file named dsixda Android Kitchen that you copied on your computer's desktop, then open the extracted folder of dsixda Android Kitchen

14. Copy all the files that are in the extracted folder of dsixda Android Kitchen and paste them in the Kitchen folder that you made

15. Now do Right click on the Cygwin desktop icon and Run as Administrator

16. Cygwin window will open. Now type "cd kitchen" (without "") then press Enter

17. Now type "./menu" then press Enter

18. After this Android Kitchen will open

You're good to go!

(You can use pictorial guide given on (https://forum.hovatek.com/thread-647.html)


Files needs to be ported

In Boot.img
- zimage (simply your device kernel)
- uevented.rc (if only device get bootloops)

Lib files need to replace from your Stock ROM

From "/system/lib/hw" folder

- hwcomposer.mt6592.so
- sensors.default.so (first rename this file to sensors.mt6592.so and then copy it same location in Fire855 build)

From "system/lib" folder
- libMali.so
- libaudio.primary.defaults.so
- libcameracustom.so
- libfeatureio.so
- libcamdrv.so
- libcamalgo.so
- libdpframework.so
- libcamparamsmgr.so

From "system/bin" folder
- gsm0710muxd
- gsm0710muxdmd2
- rild

From "/system/etc" folder
- Bluetooth folder
- Wifi Folder
- Firmware Folder

Making changes in boot.img only for devices having Emulated storage
Note: (No need of change for Non-emulated storage devices)

Edit fstab file in ramdisk folder after extracting boot.img in Android Kitchen

Refer this post by @Typhus_ --> http://forum.xda-developers.com/showpost.php?p=66440098&postcount=228

Note : Edit system and data mount points according to your device in updater-script using Notepad++.
 
Last edited:

bravonova

Senior Member
Mar 6, 2015
2,253
1,685
193
Pune
Unpack/Repack Boot.img using Android Kitchen

1) First you need to set up working folder.
2) Place the zip you have created from above instructions in Original_Update folder.
3) Type 1 and press enter.
4) Select zip.
5) No need to rename working folder.
6) Also when it asks to do changes in updater script, Type 2 and press Enter for "Do nothing" and keep updater script as it is.
7) Now working folder is set up.
8) Go to advanced settings. Type 0 and press Enter.
9) Then type 12 and press enter.
10) Then type "w" (without "") and press enter.
11) A folder will be creatred name Boot-Extracted.
12) Now type "a" (without "") and press enter.
13) A messege will appear and a new folder will create by name Boot-img(Date)(time)
14) Place your stock boot.img in it and then come back to cmd window and press enter.
15) Now replace necessary files from stock boot to boot-extracted (zimage, uevented.rc etc)
16) Make changes in fstab file and other related files (for devices having emulated storage)
17) After making all changes in android kitchen cmd window type "b" and press enter. This will compile boot.img and repack it and get saved in working folder.
 
Last edited:

bravonova

Senior Member
Mar 6, 2015
2,253
1,685
193
Pune
I think carliv image tool is much better to exctract boot and recovery.img. much better than kitchen :)
not really. but that's just a subjective opinion, isnt it? its a lil bit harder but it worth :)
You can use to MTKbootimg Tool to Unpack and Repack boot.img

Link --> https://goo.gl/cHhCsZ
It depends on which tool we get easier to use. It can be vary person by person. I am using Android Kitchen for very long time and get used to it now. :)
 

stefano91av

Senior Member
Jul 13, 2014
273
75
48
I have only a bug after porting procedure: in video Facebook app there is a green vertical bar...
How can I solve?

Inviato dal mio Elephone P8000 utilizzando Tapatalk
 

ivanmaria

New member
May 3, 2016
3
1
0
Google Maps Compass & video playback!

How do I fix compass on Google maps? Its arrowhead is stuck on one position and never rotates. Compass/magnetic sensor works on all other apps except for Google maps.
Also
I have issue with video playback. I cannot stream videos from certain apps such as SonyLiv. However hotstar works fine. Also I have green YouTube videos problem on only certain few videos(with certian quality say 360p and/or live videos).
 

bravonova

Senior Member
Mar 6, 2015
2,253
1,685
193
Pune
How do I fix compass on Google maps? Its arrowhead is stuck on one position and never rotates. Compass/magnetic sensor works on all other apps except for Google maps.
Also
I have issue with video playback. I cannot stream videos from certain apps such as SonyLiv. However hotstar works fine. Also I have green YouTube videos problem on only certain few videos(with certian quality say 360p and/or live videos).
Copy sensors.defaults.so from stock rom. Rename it to sensors.mt6592.so and place it in /system/lib/hw folder.

Also add compass/magnetometer permission xml file from /system/etc/permissions to ported rom.

There is streaming issue in some apps.

Use youtube app given in second post of @fire855 CM 13 thread.
 

bravonova

Senior Member
Mar 6, 2015
2,253
1,685
193
Pune

Attachments

bravonova

Senior Member
Mar 6, 2015
2,253
1,685
193
Pune
Thanks so much. :) fantastic! :laugh::good::D
Finally facebook operating at 100 % .
I noticed another problem ( see picture) : during charging the animation is wrong ... how can I solve? :cool:

You need to change these files from stock rom.

From /system/lib folder
1) libipod.so
2) libshowlogo.so

From /system/bin folder
1) boot_logo_updater
2) ipod
3) logwrapper
 

ivanmaria

New member
May 3, 2016
3
1
0
Copy sensors.defaults.so from stock rom. Rename it to sensors.mt6592.so and place it in /system/lib/hw folder.

Also add compass/magnetometer permission xml file from /system/etc/permissions to ported rom.

There is streaming issue in some apps.

Use youtube app given in second post of @fire855 CM 13 thread.
Google Maps Compass doesn't work yet!?
 

jpower73

Senior Member
May 30, 2012
410
175
0
Thessaloniki
Thanks guys,
There is, also, another patch fixing potentially BT connection issues with mi wrist smart bands and another one fixing wifi direct issues (both of them tested on cm12.1 from the Greek forum)

Also, in case you face low sound issues, you may try my gionee elife sound patch.
http://www.myphone.gr/forum/showthread.php?p=6549582#post6549582
Fully compatible with atmos, digital plus, audio fx, etc
 
Last edited:
  • Like
Reactions: devmtk