(GUIDE)(PORT CM 12.1 ) MTK6592 CM 12.1 PORTING GUIDE (Only For Porters) :)

Search This thread

dip1991

Senior Member
Jan 30, 2013
308
112
my port booted but stuck at starting apps,

here is logcat....

anyone please help on that....
 

Attachments

  • test8.txt
    461.4 KB · Views: 92

Ciprum

Senior Member
Mar 8, 2014
425
118
well there is no error etc.....it's due to ur recovery....try to find good recovery any which support context file nd proper sym link;)

Hi Manish,

I tried porting a rom from the K1 to my Coolpad F1. I used a very clean KK rom as a base. Anyways... I don't really get the part when you say
change Kernel and Do necessary changes acc. to your stock's ramdisk
I unpacked the boot.img from both roms.

What to change in the kernel?
And what means "Do necessary changes to stock ramdisk? What are the "necessary changes" I have to do?
 

lunik1980

Member
Jun 28, 2015
22
0
SELinux issues, since we're using kk 3.4.67 kernel on LP.

Either re-compile your kernel with SELinux as permissive, or you could try the initramfs SELinux hack ...

cheers
Guys who know how to port the firmware with different modems??
hardware is identical except for the modem!!
Want portanote from wcdma to td-scdma
Firmware runs but does not catch the network of all libraries and the folder where the modem is replaced completely no sense.. who knows???
 
Last edited:

Typhus_

Senior Member
  • Jan 9, 2013
    1,201
    1,355
    41
    Lisbon
    www.facebook.com
    Xiaomi Mi A1
    Xiaomi Mi A3
    Hello!

    I'm trying to port this ROM to my device (Aquaris E5 FHD).

    I've only replaced the files mentioned on this guide and unpacked CM12.1 boot.img in order to replace the existing kernel.img for the one present on my device stock boot.img. I left the boot.img ramdisk untouched.

    Bugs I have:

    - Baseband unknown (Lost IMEI's, Wi-Fi and BT MAC's)
    - The HOME and MENU soft buttons don't work
    - I have no access to internal storage (only external while using CM's File Manager)

    I thought I could fix these bugs, since they're mentioned on the OP but, unfortunately, I couldn't.

    - Baseband unknown -> Tried to restore IMEI's using IMEI & SN Writer Tool -> It doesn't work because every time I connect the phone (turned off) to my PC, the phone boots up. Therefore, the tool doesn't recognize it. Anyone knows how to restore this differently? Or, better yet, does anyone knows how to prevent this bug from happening? Or, even, anyone knows how to disable this feature (the booting up procedure as soon as it gets connected to a charger and/or USB port)?

    - The HOME and MENU soft buttons don't work -> Already edited both kl files mentioned on the OP. The problem persists. Don't really know what I'm doing wrong. This was supposed to be a simple fix...

    - I have no access to internal storage (only external while using CM's File Manager) -> Tried to edit boot.img ramdisk relevant files...ROM doesn't boot. Anyone knows which specific files must be edited?

    HERE you will find both Kngzone's CM12, and my device, key files and Ramdisk's. If anyone could help me, I would be very much appreciated.

    Thank you for the guide.
     
    Last edited:

    M7ammad.eb

    Senior Member
    Jul 30, 2012
    200
    96
    Cairo
    - Baseband unknown (Lost IMEI's, Wi-Fi and BT MAC's)
    - The HOME and MENU soft buttons don't work
    - I have no access to internal storage (only external while using CM's File Manager)

    for this issue you have to edit "mk-kpd.kl" and delete the # in line 29:
    Code:
    #key 102   HOME              WAKE
    and you have to delete the file "mtk-tpd.kl" in the same directory!

    about the internal storage I think if you opened the storage in the settings you'll see your internal storage but it all detected as "unreachable" and if I'm not wrong you only have EBR1 without EBR2!! and if so you have nothing to do bot editing your EBRs...

    about the IMEI I'm still working on it!
     

    Typhus_

    Senior Member
  • Jan 9, 2013
    1,201
    1,355
    41
    Lisbon
    www.facebook.com
    Xiaomi Mi A1
    Xiaomi Mi A3
    M7ammad.eb said:
    for this issue you have to edit "mk-kpd.kl" and delete the # in line 29:
    Code:
    #key 102   HOME              WAKE
    and you have to delete the file "mtk-tpd.kl" in the same directory!

    Well, I'll try that ASAP. Thanks.

    M7ammad.eb said:
    about the internal storage I think if you opened the storage in the settings you'll see your internal storage but it all detected as "unreachable" and if I'm not wrong you only have EBR1 without EBR2!! and if so you have nothing to do bot editing your EBRs...

    Well, you're correct, I only have EBR1 on my stock firmware. I should have EBR1 and EBR2? If so, how do I do that? I've never touched on EBR files before...

    Besides, if I'm not wrong, in order to change the partitions size (that's what EBR files are for, right?) I would have to flash the new edited EBR files using MTK Flash Tool...and if I do that after flashing CM12, the tool won't be able to flash them because the phone will boot as soon I as I connect the USB cable. So, I would have to perform those changes before flashing the ROM, right?

    Can anyone guide me on this step by step?

    M7ammad.eb said:
    about the IMEI I'm still working on it!

    I could try to backup my NVRAM partition...if that helps on anything...

    By the way, this is my stock scatter file:

    Code:
    ############################################################################################################
    #
    #  General Setting 
    #    
    ############################################################################################################
    - general: MTK_PLATFORM_CFG
      info: 
        - config_version: V1.1.2
          platform: MT6592
          project: vegetafhd
          storage: EMMC
          boot_channel: MSDC_0
          block_size: 0x20000
    ############################################################################################################
    #
    #  Layout Setting
    #
    ############################################################################################################
    - partition_index: SYS0
      partition_name: PRELOADER
      file_name: preloader_vegetafhd.bin
      is_download: true
      type: SV5_BL_BIN
      linear_start_addr: 0x0
      physical_start_addr: 0x0
      partition_size: 0x40000
      region: EMMC_BOOT_1
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: BOOTLOADERS
      reserve: 0x00
    
    - partition_index: SYS1
      partition_name: MBR
      file_name: MBR
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x0
      physical_start_addr: 0x0
      partition_size: 0x80000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS2
      partition_name: EBR1
      file_name: EBR1
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x80000
      physical_start_addr: 0x80000
      partition_size: 0x80000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS3
      partition_name: PRO_INFO
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x100000
      physical_start_addr: 0x100000
      partition_size: 0x300000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: PROTECTED
      reserve: 0x00
    
    - partition_index: SYS4
      partition_name: NVRAM
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x400000
      physical_start_addr: 0x400000
      partition_size: 0x500000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: BINREGION
      reserve: 0x00
    
    - partition_index: SYS5
      partition_name: PROTECT_F
      file_name: NONE
      is_download: false
      type: EXT4_IMG
      linear_start_addr: 0x900000
      physical_start_addr: 0x900000
      partition_size: 0xa00000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: PROTECTED
      reserve: 0x00
    
    - partition_index: SYS6
      partition_name: PROTECT_S
      file_name: NONE
      is_download: false
      type: EXT4_IMG
      linear_start_addr: 0x1300000
      physical_start_addr: 0x1300000
      partition_size: 0xa00000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: PROTECTED
      reserve: 0x00
    
    - partition_index: SYS7
      partition_name: SECCFG
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x1d00000
      physical_start_addr: 0x1d00000
      partition_size: 0x40000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: INVISIBLE
      reserve: 0x00
    
    - partition_index: SYS8
      partition_name: UBOOT
      file_name: lk.bin
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x1d40000
      physical_start_addr: 0x1d40000
      partition_size: 0x60000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS9
      partition_name: BOOTIMG
      file_name: boot.img
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x1da0000
      physical_start_addr: 0x1da0000
      partition_size: 0x1400000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS10
      partition_name: RECOVERY
      file_name: recovery.img
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x31a0000
      physical_start_addr: 0x31a0000
      partition_size: 0x1400000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS11
      partition_name: SEC_RO
      file_name: secro.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x45a0000
      physical_start_addr: 0x45a0000
      partition_size: 0x600000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS12
      partition_name: MISC
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x4ba0000
      physical_start_addr: 0x4ba0000
      partition_size: 0x80000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: INVISIBLE
      reserve: 0x00
    
    - partition_index: SYS13
      partition_name: LOGO
      file_name: logo.bin
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x4c20000
      physical_start_addr: 0x4c20000
      partition_size: 0x800000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS14
      partition_name: EXPDB
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x5420000
      physical_start_addr: 0x5420000
      partition_size: 0xbe0000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: INVISIBLE
      reserve: 0x00
    
    - partition_index: SYS15
      partition_name: ANDROID
      file_name: system.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x6000000
      physical_start_addr: 0x6000000
      partition_size: 0x40000000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS16
      partition_name: CACHE
      file_name: cache.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x46000000
      physical_start_addr: 0x46000000
      partition_size: 0x2c000000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS17
      partition_name: USRDATA
      file_name: userdata.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x72000000
      physical_start_addr: 0x72000000
      partition_size: 0x49c00000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS18
      partition_name: BMTPOOL
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0xFFFF00a8
      physical_start_addr: 0xFFFF00a8
      partition_size: 0x1500000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: false
      is_reserved: true
      operation_type: RESERVED
      reserve: 0x00

    I really appreciate all help you could give me.
     

    [email protected]

    Senior Member
    Aug 17, 2013
    595
    2,190
    Mumbai
    Well, I'll try that ASAP. Thanks.



    Well, you're correct, I only have EBR1 on my stock firmware. I should have EBR1 and EBR2? If so, how do I do that? I've never touched on EBR files before...

    Besides, if I'm not wrong, in order to change the partitions size (that's what EBR files are for, right?) I would have to flash the new edited EBR files using MTK Flash Tool...and if I do that after flashing CM12, the tool won't be able to flash them because the phone will boot as soon I as I connect the USB cable. So, I would have to perform those changes before flashing the ROM, right?

    Can anyone guide me on this step by step?



    I could try to backup my NVRAM partition...if that helps on anything...

    By the way, this is my stock scatter file:

    Code:
    ############################################################################################################
    #
    #  General Setting 
    #    
    ############################################################################################################
    - general: MTK_PLATFORM_CFG
      info: 
        - config_version: V1.1.2
          platform: MT6592
          project: vegetafhd
          storage: EMMC
          boot_channel: MSDC_0
          block_size: 0x20000
    ############################################################################################################
    #
    #  Layout Setting
    #
    ############################################################################################################
    - partition_index: SYS0
      partition_name: PRELOADER
      file_name: preloader_vegetafhd.bin
      is_download: true
      type: SV5_BL_BIN
      linear_start_addr: 0x0
      physical_start_addr: 0x0
      partition_size: 0x40000
      region: EMMC_BOOT_1
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: BOOTLOADERS
      reserve: 0x00
    
    - partition_index: SYS1
      partition_name: MBR
      file_name: MBR
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x0
      physical_start_addr: 0x0
      partition_size: 0x80000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS2
      partition_name: EBR1
      file_name: EBR1
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x80000
      physical_start_addr: 0x80000
      partition_size: 0x80000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS3
      partition_name: PRO_INFO
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x100000
      physical_start_addr: 0x100000
      partition_size: 0x300000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: PROTECTED
      reserve: 0x00
    
    - partition_index: SYS4
      partition_name: NVRAM
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x400000
      physical_start_addr: 0x400000
      partition_size: 0x500000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: BINREGION
      reserve: 0x00
    
    - partition_index: SYS5
      partition_name: PROTECT_F
      file_name: NONE
      is_download: false
      type: EXT4_IMG
      linear_start_addr: 0x900000
      physical_start_addr: 0x900000
      partition_size: 0xa00000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: PROTECTED
      reserve: 0x00
    
    - partition_index: SYS6
      partition_name: PROTECT_S
      file_name: NONE
      is_download: false
      type: EXT4_IMG
      linear_start_addr: 0x1300000
      physical_start_addr: 0x1300000
      partition_size: 0xa00000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: PROTECTED
      reserve: 0x00
    
    - partition_index: SYS7
      partition_name: SECCFG
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x1d00000
      physical_start_addr: 0x1d00000
      partition_size: 0x40000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: INVISIBLE
      reserve: 0x00
    
    - partition_index: SYS8
      partition_name: UBOOT
      file_name: lk.bin
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x1d40000
      physical_start_addr: 0x1d40000
      partition_size: 0x60000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS9
      partition_name: BOOTIMG
      file_name: boot.img
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x1da0000
      physical_start_addr: 0x1da0000
      partition_size: 0x1400000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS10
      partition_name: RECOVERY
      file_name: recovery.img
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x31a0000
      physical_start_addr: 0x31a0000
      partition_size: 0x1400000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS11
      partition_name: SEC_RO
      file_name: secro.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x45a0000
      physical_start_addr: 0x45a0000
      partition_size: 0x600000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS12
      partition_name: MISC
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x4ba0000
      physical_start_addr: 0x4ba0000
      partition_size: 0x80000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: INVISIBLE
      reserve: 0x00
    
    - partition_index: SYS13
      partition_name: LOGO
      file_name: logo.bin
      is_download: true
      type: NORMAL_ROM
      linear_start_addr: 0x4c20000
      physical_start_addr: 0x4c20000
      partition_size: 0x800000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS14
      partition_name: EXPDB
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0x5420000
      physical_start_addr: 0x5420000
      partition_size: 0xbe0000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: INVISIBLE
      reserve: 0x00
    
    - partition_index: SYS15
      partition_name: ANDROID
      file_name: system.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x6000000
      physical_start_addr: 0x6000000
      partition_size: 0x40000000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS16
      partition_name: CACHE
      file_name: cache.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x46000000
      physical_start_addr: 0x46000000
      partition_size: 0x2c000000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS17
      partition_name: USRDATA
      file_name: userdata.img
      is_download: true
      type: EXT4_IMG
      linear_start_addr: 0x72000000
      physical_start_addr: 0x72000000
      partition_size: 0x49c00000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: true
      is_reserved: false
      operation_type: UPDATE
      reserve: 0x00
    
    - partition_index: SYS18
      partition_name: BMTPOOL
      file_name: NONE
      is_download: false
      type: NORMAL_ROM
      linear_start_addr: 0xFFFF00a8
      physical_start_addr: 0xFFFF00a8
      partition_size: 0x1500000
      region: EMMC_USER
      storage: HW_STORAGE_EMMC
      boundary_check: false
      is_reserved: true
      operation_type: RESERVED
      reserve: 0x00

    I really appreciate all help you could give me.
    ahh i don't think... u need ebr editing... it's only for increase partition of blocks like system etc....for mount problem...u need to edit framework-res.apk,do changes in fstab ,mt65xx.rc file in your boot.img's ramdisk. if still unsolved try to change bins like sdcard ,vold from kk rom and even patch of services.jar needed
     
    • Like
    Reactions: Typhus_

    Ondipuli

    Senior Member
    Feb 23, 2014
    269
    61
    TN
    Please help, I tried to port ressuraction remix for mt6582 using this guide, it booted well & app upgrading screen coming after that it stays on in STARTING APPS for hours.

    Sent from my GIONEE M2 using XDA Premium 4 mobile app
     

    M7ammad.eb

    Senior Member
    Jul 30, 2012
    200
    96
    Cairo
    Well, you're correct, I only have EBR1 on my stock firmware. I should have EBR1 and EBR2? If so, how do I do that? I've never touched on EBR files before...

    Besides, if I'm not wrong, in order to change the partitions size (that's what EBR files are for, right?) I would have to flash the new edited EBR files using MTK Flash Tool...and if I do that after flashing CM12, the tool won't be able to flash them because the phone will boot as soon I as I connect the USB cable. So, I would have to perform those changes before flashing the ROM, right?

    Can anyone guide me on this step by step?

    yes.. having one EBR means merging the applications and internal storage together.. which not supported in cm12 as I noticed.. there is several tutorials talking about editing the EBRs.. but must of them talking about EBR1 and EBR2 together.. try googling
    and about flashing using MTK Flash Tool I don't know.. I'm using SP Flash Tool (it might be the same but I don't think so)


    I could try to backup my NVRAM partition...if that helps on anything...

    I've already tried this with no luck! the problem is that the new software not showing the IMEI (nut even "null") wich means it can't see it.. and I think it needs some lib checks and maybe ramdisk edits.. I'm little busy right now and will work on it within 5-7 days.. and will keep you updated for any new...
     
    • Like
    Reactions: Typhus_

    Typhus_

    Senior Member
  • Jan 9, 2013
    1,201
    1,355
    41
    Lisbon
    www.facebook.com
    Xiaomi Mi A1
    Xiaomi Mi A3
    Hello!

    Just wanted to share with you my progress. ;)

    Bugs I had:

    - Baseband unknown (Lost IMEI's, Wi-Fi and BT MAC's)
    - HOME and MENU soft buttons didn't work
    - I had no access to internal storage (only external while using CM's File Manager)

    Bugs I have now:

    - Baseband unknown (Lost IMEI's)
    - MENU soft button doesn't work

    Solving steps:


    - WiFi and BT are able to work after changing SELinux to permissive (using SELinuxModeChanger apk)
    - HOME key works after deleting the file "mtk-tpd.kl" and editing the file "mk-kpd.kl" (removed the # in line 29)
    - I now have internal and external storage available. Many thanks to @carliv (I've checked THIS post and there I've found THIS official documentation about storage configuration)

    Storage solving steps explained in detail:

    init.mt6592.rc (kingzone's CM12 original kernel's ramdisk)

    Code:
    on init
        export LD_PRELOAD /system/lib/libxlog.so
        [COLOR="Red"]export EXTERNAL_STORAGE /storage/sdcard0
        export SECONDARY_STORAGE /storage/sdcard1
    
        mkdir /storage/sdcard0 0700 root root
        mkdir /storage/sdcard1 0700 root root
    
        symlink /storage/sdcard0 /sdcard
        symlink /storage/sdcard0 /mnt/sdcard
    
       mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
       mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw[/COLOR]
    
    .....
    
    on fs
    
    .....
    
       [COLOR="Red"]#setprop ro.crypto.fuse_sdcard true[/COLOR]
    
    .....
    
    # virtual sdcard daemon running as media_rw (1023)
    [COLOR="red"]service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard0 /storage/sdcard0
        class late_start
        disabled
    service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard1 /storage/sdcard1
        class late_start
        disabled[/COLOR]
    service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbotg /storage/usbotg
        class late_start
        disabled

    After analyzing the official documentation, and also, after noticing that my stock kernel ramdisk had a file "init.ssd.rc", I've modified init.mt6592.rc to:

    Code:
    on init
    	
        [COLOR="Blue"]mkdir /mnt/shell/emulated 0700 shell shell
        mkdir /storage/emulated 0555 root root
    
        mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
        mkdir /storage/sdcard1 0700 root root
    
        export EXTERNAL_STORAGE /storage/emulated/legacy
        export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
        export EMULATED_STORAGE_TARGET /storage/emulated
        export SECONDARY_STORAGE /storage/sdcard1[/COLOR]
    	
        export LD_PRELOAD /system/lib/libxlog.so
    	
        [COLOR="blue"]mount tmpfs tmpfs /storage/emulated mode=0755,uid=1023,gid=1023
        
        # Support legacy paths
        symlink /storage/emulated/legacy /sdcard
        symlink /storage/emulated/legacy /mnt/sdcard
        symlink /storage/emulated/legacy /storage/sdcard0
        symlink /storage/sdcard1 /mnt/sdcard2[/COLOR]
    
    
    .....
    
    on fs
    
    .....
    
       [COLOR="blue"]setprop ro.crypto.fuse_sdcard true[/COLOR]
    
    .....
    
    # virtual sdcard daemon running as media_rw (1023)
    [COLOR="Blue"]service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
        class late_start
    service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
        class late_start
        disabled[/COLOR]
    service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbotg /storage/usbotg
        class late_start
        disabled

    fstab.mt6592 (kingzone's CM12 original kernel's ramdisk)

    Code:
    # Android fstab file.
    #<src>           <mnt_point>         <type>    <mnt_flags and options>                 <fs_mgr_flags>
    # 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
    /[email protected]       /system         ext4    ro,commit=1,noauto_da_alloc				wait
    /[email protected]       /data           ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /[email protected]         /cache          ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /[email protected]_f     /protect_f      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /[email protected]_s     /protect_s      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /devices/platform/mtk-msdc.0/mmc_host/mmc0/mmc0	auto	[COLOR="Red"]auto	[/COLOR]defaults	voldmanaged=sdcard0:[COLOR="red"]8,nonremovable,noemulatedsd[/COLOR]
    /devices/platform/mtk-msdc.1/mmc_host/mmc1/mmc1	auto	[COLOR="red"]auto	[/COLOR]defaults        voldmanaged=sdcard1:auto
    /devices/platform/mt_usb		auto 	auto	defaults	voldmanaged=usbotg:auto

    Changed to:

    Code:
    # Android fstab file.
    #<src>           <mnt_point>         <type>    <mnt_flags and options>                 <fs_mgr_flags>
    # 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
    /[email protected]       /system         ext4    ro,commit=1,noauto_da_alloc				wait
    /[email protected]       /data           ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /[email protected]         /cache          ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /[email protected]_f     /protect_f      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /[email protected]_s     /protect_s      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
    /devices/platform/mtk-msdc.0/mmc_host/mmc0/mmc0	auto	[COLOR="Blue"]vfat[/COLOR]	defaults	voldmanaged=sdcard0:[COLOR="Blue"]auto[/COLOR]
    /devices/platform/mtk-msdc.1/mmc_host/mmc1/mmc1	auto	[COLOR="blue"]vfat[/COLOR]	defaults        voldmanaged=sdcard1:auto
    /devices/platform/mt_usb		auto 	auto	defaults	voldmanaged=usbotg:auto

    This was a mere guess. Don't know if this is the most accurate configuration but...well, it works.

    framework-res.apk (framework-res.apk\res\xml\storage_list.xml kingzone's CM12 original)

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <StorageList
      xmlns:android="http://schemas.android.com/apk/res/android">
        <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" [COLOR="Red"]android:removable="false"[/COLOR] android:allowMassStorage="true" />
        <storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="true" android:allowMassStorage="true" />
        <storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" />
    </StorageList>

    Changed to:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <StorageList
      xmlns:android="http://schemas.android.com/apk/res/android">
        <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" [COLOR="blue"]android:emulated="true"[/COLOR] android:allowMassStorage="true" />
        <storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="true" android:allowMassStorage="true" />
        <storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" />
    </StorageList>

    DONE! :victory:


    Currently I can't still understand why the HOME MENU key doesn't work...weird (I've tried the same solution used for HOME key and it didn't work).

    Now I'll try to find if I know how to fix Baseband unknown bug (the most awful one...).

    I hope that, with this, I may help anyone else trying to port this to their device.

    Cheers!
     
    Last edited:

    M7ammad.eb

    Senior Member
    Jul 30, 2012
    200
    96
    Cairo
    Currently I can't still understand why the MENU key doesn't work...weird (I've tried the same solution used for HOME key and it didn't work).

    Now I'll try to find if I know how to fix Baseband unknown bug (the most awful one...).

    I hope that, with this, I may help anyone else trying to port this to their device.

    Cheers!

    you mean menu as I underlined.. well have you tried lines 17,18,19 inside mtk-kpd.kl?!

    and about Baseband unknown bug this what I'm trying to fixed today on!!
    any progress keep us up-to-date :D
     

    Typhus_

    Senior Member
  • Jan 9, 2013
    1,201
    1,355
    41
    Lisbon
    www.facebook.com
    Xiaomi Mi A1
    Xiaomi Mi A3
    you mean menu as I underlined.. well have you tried lines 17,18,19 inside mtk-kpd.kl?!

    Yes, of course, I meant MENU. And, yes, I've tried those lines. It doesn't make sense. This has got to be edited somewhere else...

    and about Baseband unknown bug this what I'm trying to fixed today on!!
    any progress keep us up-to-date :D

    No progress so far...

    I've replaced init.modem.rc, and added meta_init.modem.rc, on the kernel's ramdisk (I've taken both from my stock kernel ramdisk). It didn't work.

    Afterwards, I've tried to (besides the ramdisk changes on the kernel, as stated above) replace /system/bin/rild; /system/lib/mtk-ril.so; /system/lib/libril.so; /system/lib/librilmtk.so; /system/lib/librilmtkmd2.so; /system/lib/librilutils.so; and /system/lib/mtk-rilmd2.so as stated HERE. Still, no luck.

    Anyway, I'll keep on trying to find a solution.
     

    [email protected]

    Senior Member
    Aug 17, 2013
    595
    2,190
    Mumbai
    Guys if u unable to fix baseband.......try this method
    1. change selinux to permissive using app ...link is in first post
    2. change modem.img in system/etc/firmware
    3. after above steps...still facing then restore ur imei
    4. if still facing ....change modem.rc file from cm 11 rom or any other rom
    :)
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 24
      MT6592 CM 12.1 PORTING GUIDE:)

      Lots of people asked me how i ported cm 12.1 from @fire855's compiled rom for kingzone k1 Turbo :)
      First of all huge thanks to @fire855 and other Dev who helped him for bringing cm 12.1 on mt6592 :)

      Give support to him via pressing thanks or Donate , here is it's Link : http://forum.xda-developers.com/and...od-12-kingzone-k1-turbo-t3119908#post61000671

      Requirements :
      1. Stock Rom KK
      2. Working Good Custom Recovery
      3. Good Porter and Mind :p

      Lets Start This Short Guide :

      1. Download Latest Cm 12.1 from above link
      2. Extract in a new folder
      3. Use this tool LInk : http://forum.xda-developers.com/android/development/tool-convert-folder-to-ext4-format-t3099237
      unpack .dat file and copy extracted system folder in new folder as stated in step 2.
      4. Using @michfood's tool (link : http://forum.xda-developers.com/showthread.php?t=2036528)
      change Kernel and Do necessary changes acc. to your stock's ramdisk
      5. Copy new boot.img that created in step 4 and replace in new folder as stated in step 2.
      6. From stock kk rom ...........extract libaudio.primary.default.so (system/lib) and modem.img (system/etc/firmware) nd replace in cm 12.1 's rom ................ in the same location
      7. Delete meta-inf folder of cm 12.1's rom and extract this (link : https://www.sendspace.com/file/vnf0gi)
      8. Open meta-inf's updater-script in notepad++ and change mountpoint of system acc. to your's phone
      9. Pack the folder as in zip format and flash via recovery :)
      ( meta-inf, install ,system, boot.img, file context these files must there in zip )
      10. Voila Rom booted .............if not comment :)

      If Rom Booted ..............Follow this steps :

      1. Download this apk (link : http://forum.xda-developers.com/showthread.php?t=2524485)
      2. Go to Settings>developer>enable root and install apk from step 1
      3. Open app and Set as permissive ,reboot Your device
      4. Voila your wifi,bluetooth etc will start working, even Dual Sim
      5. If you faced basedband unknown that mean restore your imei
      6. For Home Key Bug , Edit generic.kl and mtk-kpd.kl (system/user/keylayout)
      7. For Storage Bug, Edit Framework-res.apk and set sdcard1 as primary and edit boot's ramdisk MT6592.rc, fstab
      8. For Other Bugs, Let Me Know :cowboy:

      Notice : Always give thanks and link of @fire855's Rom Link

      Credits : everyone (who's name i added in this guide and there's tools )
      3
      Baseband issues
      If changing SELInux to Permissive didn't worked.

      Most likely, you'll need proper Kernel/ compile the rom.
      Only devices with similar kernel/ hw specs won't have major issues.
      There's no magic wan that can fix it.

      Porting CM's is not the best thing, im surprised that some phones got an "decent" port, from the original roms (6592 / 6582)

      reply #61, is the perfect example of NVRAM and sys** kernel (at user level )issues

      cheers
      3
      Hello!

      Just wanted to share with you my progress. ;)

      Bugs I had:

      - Baseband unknown (Lost IMEI's, Wi-Fi and BT MAC's)
      - HOME and MENU soft buttons didn't work
      - I had no access to internal storage (only external while using CM's File Manager)

      Bugs I have now:

      - Baseband unknown (Lost IMEI's)
      - MENU soft button doesn't work

      Solving steps:


      - WiFi and BT are able to work after changing SELinux to permissive (using SELinuxModeChanger apk)
      - HOME key works after deleting the file "mtk-tpd.kl" and editing the file "mk-kpd.kl" (removed the # in line 29)
      - I now have internal and external storage available. Many thanks to @carliv (I've checked THIS post and there I've found THIS official documentation about storage configuration)

      Storage solving steps explained in detail:

      init.mt6592.rc (kingzone's CM12 original kernel's ramdisk)

      Code:
      on init
          export LD_PRELOAD /system/lib/libxlog.so
          [COLOR="Red"]export EXTERNAL_STORAGE /storage/sdcard0
          export SECONDARY_STORAGE /storage/sdcard1
      
          mkdir /storage/sdcard0 0700 root root
          mkdir /storage/sdcard1 0700 root root
      
          symlink /storage/sdcard0 /sdcard
          symlink /storage/sdcard0 /mnt/sdcard
      
         mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
         mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw[/COLOR]
      
      .....
      
      on fs
      
      .....
      
         [COLOR="Red"]#setprop ro.crypto.fuse_sdcard true[/COLOR]
      
      .....
      
      # virtual sdcard daemon running as media_rw (1023)
      [COLOR="red"]service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard0 /storage/sdcard0
          class late_start
          disabled
      service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard1 /storage/sdcard1
          class late_start
          disabled[/COLOR]
      service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbotg /storage/usbotg
          class late_start
          disabled

      After analyzing the official documentation, and also, after noticing that my stock kernel ramdisk had a file "init.ssd.rc", I've modified init.mt6592.rc to:

      Code:
      on init
      	
          [COLOR="Blue"]mkdir /mnt/shell/emulated 0700 shell shell
          mkdir /storage/emulated 0555 root root
      
          mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
          mkdir /storage/sdcard1 0700 root root
      
          export EXTERNAL_STORAGE /storage/emulated/legacy
          export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
          export EMULATED_STORAGE_TARGET /storage/emulated
          export SECONDARY_STORAGE /storage/sdcard1[/COLOR]
      	
          export LD_PRELOAD /system/lib/libxlog.so
      	
          [COLOR="blue"]mount tmpfs tmpfs /storage/emulated mode=0755,uid=1023,gid=1023
          
          # Support legacy paths
          symlink /storage/emulated/legacy /sdcard
          symlink /storage/emulated/legacy /mnt/sdcard
          symlink /storage/emulated/legacy /storage/sdcard0
          symlink /storage/sdcard1 /mnt/sdcard2[/COLOR]
      
      
      .....
      
      on fs
      
      .....
      
         [COLOR="blue"]setprop ro.crypto.fuse_sdcard true[/COLOR]
      
      .....
      
      # virtual sdcard daemon running as media_rw (1023)
      [COLOR="Blue"]service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
          class late_start
      service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
          class late_start
          disabled[/COLOR]
      service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbotg /storage/usbotg
          class late_start
          disabled

      fstab.mt6592 (kingzone's CM12 original kernel's ramdisk)

      Code:
      # Android fstab file.
      #<src>           <mnt_point>         <type>    <mnt_flags and options>                 <fs_mgr_flags>
      # 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
      /[email protected]       /system         ext4    ro,commit=1,noauto_da_alloc				wait
      /[email protected]       /data           ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /[email protected]         /cache          ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /[email protected]_f     /protect_f      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /[email protected]_s     /protect_s      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /devices/platform/mtk-msdc.0/mmc_host/mmc0/mmc0	auto	[COLOR="Red"]auto	[/COLOR]defaults	voldmanaged=sdcard0:[COLOR="red"]8,nonremovable,noemulatedsd[/COLOR]
      /devices/platform/mtk-msdc.1/mmc_host/mmc1/mmc1	auto	[COLOR="red"]auto	[/COLOR]defaults        voldmanaged=sdcard1:auto
      /devices/platform/mt_usb		auto 	auto	defaults	voldmanaged=usbotg:auto

      Changed to:

      Code:
      # Android fstab file.
      #<src>           <mnt_point>         <type>    <mnt_flags and options>                 <fs_mgr_flags>
      # 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
      /[email protected]       /system         ext4    ro,commit=1,noauto_da_alloc				wait
      /[email protected]       /data           ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /[email protected]         /cache          ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /[email protected]_f     /protect_f      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /[email protected]_s     /protect_s      ext4    noatime,nosuid,nodev,noauto_da_alloc,discard	wait,check
      /devices/platform/mtk-msdc.0/mmc_host/mmc0/mmc0	auto	[COLOR="Blue"]vfat[/COLOR]	defaults	voldmanaged=sdcard0:[COLOR="Blue"]auto[/COLOR]
      /devices/platform/mtk-msdc.1/mmc_host/mmc1/mmc1	auto	[COLOR="blue"]vfat[/COLOR]	defaults        voldmanaged=sdcard1:auto
      /devices/platform/mt_usb		auto 	auto	defaults	voldmanaged=usbotg:auto

      This was a mere guess. Don't know if this is the most accurate configuration but...well, it works.

      framework-res.apk (framework-res.apk\res\xml\storage_list.xml kingzone's CM12 original)

      Code:
      <?xml version="1.0" encoding="utf-8"?>
      <StorageList
        xmlns:android="http://schemas.android.com/apk/res/android">
          <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" [COLOR="Red"]android:removable="false"[/COLOR] android:allowMassStorage="true" />
          <storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="true" android:allowMassStorage="true" />
          <storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" />
      </StorageList>

      Changed to:

      Code:
      <?xml version="1.0" encoding="utf-8"?>
      <StorageList
        xmlns:android="http://schemas.android.com/apk/res/android">
          <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" [COLOR="blue"]android:emulated="true"[/COLOR] android:allowMassStorage="true" />
          <storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="true" android:allowMassStorage="true" />
          <storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" />
      </StorageList>

      DONE! :victory:


      Currently I can't still understand why the HOME MENU key doesn't work...weird (I've tried the same solution used for HOME key and it didn't work).

      Now I'll try to find if I know how to fix Baseband unknown bug (the most awful one...).

      I hope that, with this, I may help anyone else trying to port this to their device.

      Cheers!
      2
      - Baseband unknown (Lost IMEI's, Wi-Fi and BT MAC's)
      - The HOME and MENU soft buttons don't work
      - I have no access to internal storage (only external while using CM's File Manager)

      for this issue you have to edit "mk-kpd.kl" and delete the # in line 29:
      Code:
      #key 102   HOME              WAKE
      and you have to delete the file "mtk-tpd.kl" in the same directory!

      about the internal storage I think if you opened the storage in the settings you'll see your internal storage but it all detected as "unreachable" and if I'm not wrong you only have EBR1 without EBR2!! and if so you have nothing to do bot editing your EBRs...

      about the IMEI I'm still working on it!
      2
      What necessary changes i must do in ramdisk?help

      like some some extra lines der in urs .
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone