How to Build new recovery modded for Zopo zp999 or 3X mtk 6595M

Search This thread

ghost45

Senior Member
Nov 10, 2012
1,481
1,148
[email protected]
How to Build new recovery modded for Zopo zp999 or 3X Mtk 6595M

In this thread we will discuss how to create or build new recovery modded for Zopo zp999 Mtk 6595M.



Everybody are Welcome!


MANY THANKS TO OUR MODERATOR TO OPEN AGAIN THIS THREAD !
More attention to the Xda-developers Rules:
http://forum.xda-developers.com/announcement.php?f=256
Many thanks to "SUPER ADMIN" MR. MIKE
 
Last edited:

marsapa

Senior Member
Jul 9, 2012
94
37
verona
Hello everyone, alllora 999 has one partition , I tried to compile several times TWRP but with the classic method for mtk does not work. Even the cwm works , you accept advice
 

bigrammy

Senior Member
Apr 8, 2011
2,943
2,569
huddersfield
Yes this is true.
Mtkdroid tools maybe not compatible with the mtk 6595

Sent from my GT-I9505 using XDA Free mobile app

Hi @ghost45,

I know very little about this phone and I do not have one. :( so I can only offer some observations.
Questions.
1. Has anyone got their hands on an update.zip yet?
2. Does spflashtool still work with this phone?

Thought: :confused:
If there is only 1 partition then maybe the ROM is in fact more like a .ISO or live DVD :confused:
Has anyone tried to Mount the partition in such a way?

Just thinking out loud guys.
 

ghost45

Senior Member
Nov 10, 2012
1,481
1,148
[email protected]
Hi @ghost45,

I know very little about this phone and I do not have one. :( so I can only offer some observations.
Questions.
1. Has anyone got their hands on an update.zip yet?
2. Does spflashtool still work with this phone?

Thought: :confused:
If there is only 1 partition then maybe the ROM is in fact more like a .ISO or live DVD :confused:
Has anyone tried to Mount the partition in such a way?

Just thinking out loud guys.

Hi Big,
Yes flashtool have problems... Run only the last version n. 5.xxxx
There is only one partition.. So i think, probably, this big primary partition is not good for the recovery mod that try to find the sd memory and sd internal memory..
I must study too much.
Thanks for your help... You know are always welcome.... Elsewhere!
Understood?

Sent from my GT-I9505 using XDA Free mobile app
 
Last edited:

hopeayaska

Member
Nov 15, 2014
41
4
Can someone please explaie how to root this model? I don't want to flash a custom ROM, just to root it.
 

hopeayaska

Member
Nov 15, 2014
41
4
I don't think there are any custom ROMs yet, but since the space in the device has only one partition and without root you can't transfer the apps in the SD card. DO you think Vroot will work with it?
 

ghost45

Senior Member
Nov 10, 2012
1,481
1,148
[email protected]
I don't think there are any custom ROMs yet, but since the space in the device has only one partition and without root you can't transfer the apps in the SD card. DO you think Vroot will work with it?

According me there isn't reason to transfer the app in the sd card... The space is too big and there isn't internal memory like internal sd like before.
In this phone there is only one partition system =data.
Vroot and all the type of root aren't able to receive right root.
We wait for the great Russian Seven Max that could create new recovery mod for this mtk 6595.
After this step we will try to start to all the root procedure under recovery to mod this phone.

Sent from my GT-I9505 using XDA Free mobile app
 
Last edited:

bigrammy

Senior Member
Apr 8, 2011
2,943
2,569
huddersfield
According me there isn't reason to transfer the app in the sd card... The space is too big and there isn't internal memory like internal sd like before.
In this phone there is only one partition system =data.
Vroot and all the type of root aren't able to receive right root.
We wait for the great Russian Seven Max that could create new recovery mod for this mtk 6595.
After this step we will try to start to all the root procedure under recovery to mod this phone.

Sent from my GT-I9505 using XDA Free mobile app

According to the fstab in the official recovery you definitely have partitions
Code:
boot       				  /boot       emmc      defaults        defaults
/dev/block/mmcblk0p2      /cache      ext4      defaults        defaults
/dev/block/mmcblk0p3      /data       ext4      defaults        defaults
misc      				  /misc       emmc      defaults        defaults
recovery  				  /recovery   emmc      defaults        defaults
/dev/block/mmcblk0p4      /sdcard     vfat      defaults        defaults
/dev/block/mmcblk0p6      /system     ext4      defaults        defaults
# Vanzo:songlixin on: Wed, 22 Feb 2012 18:31:03 +0800
# To support external sdcard
/dev/block/mmcblk1p1      /sdcard2     vfat      defaults        defaults
# End of Vanzo:songlixin

Of course I suppose these could be fake but I do not know why they would put in a fake recovery. :eek:

Please try these ;)
You flash At your own risk of course as I do not have a phone to test it on. :crying:
Mods are made to the needrom .img's that you posted in the first post so do not flash if in any doubt that this rom is incorrect.
CWM Recovery modded by me so now should hopefully support sdcard internal (emmc) external sdcard (vfat) sd-ext (auto) and maybe even usb-otg (auto) :fingers-crossed:
(init.rc edited and recovery.fstab)
Code:
/boot       			  dev/bootimg    emmc      defaults        defaults
/misc      				  dev/misc       emmc      defaults        defaults
/recovery  				  dev/recovery   emmc      defaults        defaults
/logo                     dev/logo       emmc      defaults        defaults
/misc                     dev/misc       emmc      defaults        defaults
/nvram                    dev/nvram      emmc      defaults        defaults
/uboot                    dev/uboot      emmc      defaults        defaults 
/dev/block/mmcblk0p2      /cache      ext4      defaults        defaults
/dev/block/mmcblk0p3      /data       ext4      defaults        defaults
/dev/block/mmcblk0p6      /system     ext4      defaults        defaults
/dev/block/mmcblk0p4      /sdcard     vfat      defaults        defaults
/dev/block/mmcblk1p1      /sdcard2    vfat      defaults        defaults
/dev/block/mmcblk1p2      /sd-ext     auto      defaults        defaults
/dev/block/sda1           /usb-otg    auto      defaults        defaults

It will be almost impossible to make TWRP fit in the recovery partition of this phone as it is just too small. :( Maybe later you can workout how to resize the partitions.

I modded the shoe image too so now unsecured with adb
Code:
boot=shoe
for rename hope you understand.
Warning!! Only flash this if the recovery works fine and you have made a successful backups.
 

Attachments

  • ZP999_Shoe_image.img
    7 MB · Views: 87
  • ZP999_recovery_image.img
    7.2 MB · Views: 111
Last edited:

ghost45

Senior Member
Nov 10, 2012
1,481
1,148
[email protected]
Hi big,
your recovery mod not boot remaining in black boot like the recovery of Seven.
I see the block in the files but i do not understand if them are fake or i can't able to see these new sectors.
i see only one partition system=data

I try also:
rename the file shoe in:
boot.img

and the recovery that you have made

but not run at all the phone remaining in boot!

see you and thanks for your great help.
 
Last edited:

bigrammy

Senior Member
Apr 8, 2011
2,943
2,569
huddersfield
Hi big,
your recovery mod not boot remaining in black boot like the recovery of Seven.
I see the block in the files but i do not understand if them are fake or i can't able to see these new sectors.
i see only one partition system=data

I try also:
rename the file shoe in:
boot.img

and the recovery that you have made

but not run at all the phone remaining in boot!

see you and thanks for your great help.

Ok bro Sorry it did not work :( it's difficult to help without actually having the phone in my hands. :eek:

If what you say is true then I would ask someone with linux to try mount the single partition as you would mount an .iso
I read some place that Total Commander for pc maybe able to mount the entire drive without the need of root. :fingers-crossed:

Regards bigrammy.
 

ghost45

Senior Member
Nov 10, 2012
1,481
1,148
[email protected]
Ok bro Sorry it did not work :( it's difficult to help without actually having the phone in my hands. :eek:

If what you say is true then I would ask someone with linux to try mount the single partition as you would mount an .iso
I read some place that Total Commander for pc maybe able to mount the entire drive without the need of root. :fingers-crossed:

Regards bigrammy.

Thanks big... Yesterday i work to hard together other friends that we known.. But nothings..

Sent from my GT-I9505 using XDA Free mobile app
 

bigrammy

Senior Member
Apr 8, 2011
2,943
2,569
huddersfield
Thanks big... Yesterday i work to hard together other friends that we known.. But nothings..

Sent from my GT-I9505 using XDA Free mobile app

Ok I have done some more research and changed the recovery fastab's to this.
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

/dev/block/platform/mtk-msdc.0/by-name/system    /system             ext4      ro                                                    wait
/dev/block/platform/mtk-msdc.0/by-name/vendor    /vendor             ext4      ro                                                    wait
/dev/block/platform/mtk-msdc.0/by-name/cache     /cache              ext4      noatime,nosuid,nodev,noauto_da_alloc                  wait,check
/dev/block/platform/mtk-msdc.0/by-name/userdata  /data               ext4      noatime,nosuid,nodev,noauto_da_alloc    wait,check,encryptable=footer
/dev/block/platform/mtk-msdc.0/by-name/protect1  /protect_f          ext4      noatime,nosuid,nodev,noauto_da_alloc    wait,check
/dev/block/platform/mtk-msdc.0/by-name/protect2  /protect_s          ext4      noatime,nosuid,nodev,noauto_da_alloc    wait,check
/dev/block/platform/mtk-msdc.0/by-name/boot      /boot               emmc      defaults                                              defaults
/dev/block/platform/mtk-msdc.0/by-name/recovery  /recovery           emmc      defaults                                              defaults
/dev/block/platform/mtk-msdc.0/by-name/misc      /misc               emmc      defaults                                              defaults
/devices/platform/mtk-msdc.0/mmc_host             auto               vfat      defaults        voldmanaged=sdcard0:[email protected],noemulatedsd
/devices/platform/mtk-msdc.1/mmc_host             auto               vfat      defaults        voldmanaged=sdcard1:auto
/devices/platform/xhci-hcd                        auto               vfat      defaults        voldmanaged=usbotg:auto

You can now retry and see if this will now work it may require a little more editing but lets see what works and what does not first. :fingers-crossed:
 

Attachments

  • new_recovery.img
    7.2 MB · Views: 54

ghost45

Senior Member
Nov 10, 2012
1,481
1,148
[email protected]
Ok I have done some more research and changed the recovery fastab's to this.
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

/dev/block/platform/mtk-msdc.0/by-name/system    /system             ext4      ro                                                    wait
/dev/block/platform/mtk-msdc.0/by-name/vendor    /vendor             ext4      ro                                                    wait
/dev/block/platform/mtk-msdc.0/by-name/cache     /cache              ext4      noatime,nosuid,nodev,noauto_da_alloc                  wait,check
/dev/block/platform/mtk-msdc.0/by-name/userdata  /data               ext4      noatime,nosuid,nodev,noauto_da_alloc    wait,check,encryptable=footer
/dev/block/platform/mtk-msdc.0/by-name/protect1  /protect_f          ext4      noatime,nosuid,nodev,noauto_da_alloc    wait,check
/dev/block/platform/mtk-msdc.0/by-name/protect2  /protect_s          ext4      noatime,nosuid,nodev,noauto_da_alloc    wait,check
/dev/block/platform/mtk-msdc.0/by-name/boot      /boot               emmc      defaults                                              defaults
/dev/block/platform/mtk-msdc.0/by-name/recovery  /recovery           emmc      defaults                                              defaults
/dev/block/platform/mtk-msdc.0/by-name/misc      /misc               emmc      defaults                                              defaults
/devices/platform/mtk-msdc.0/mmc_host             auto               vfat      defaults        voldmanaged=sdcard0:[email protected],noemulatedsd
/devices/platform/mtk-msdc.1/mmc_host             auto               vfat      defaults        voldmanaged=sdcard1:auto
/devices/platform/xhci-hcd                        auto               vfat      defaults        voldmanaged=usbotg:auto

You can now retry and see if this will now work it may require a little more editing but lets see what works and what does not first. :fingers-crossed:

Thanks... I will try it.
But according me the problem is connected with the repack operation... Or as someone sayed pack operation.

Sent from my GT-I9505 using XDA Free mobile app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Ok, then cwm test 3 it is!

    Here are the final recoveries:
    The links are here now.

    Thanks for support, enjoy using them!


    Now for people who want to use the device folder tree from my github (I will update that in short time).
    Take a look on BoardConfig to see what flags must be used, and add a local-manifest in your building repo with this content:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
    <remote fetch="git://github.com/carliv/" name="carliv"/>
      <project path="bionic/libc/arch-arm/cortex-a17" name="bionic_libc_arch-arm_cortex-a17" remote="carliv" revision="master" />
      <project path="device/zopo/zp999" name="device_zopo_zp999" remote="carliv" revision="master" />
    </manifest>
    then do a repo sync. If you have already a local-manifest just add the project path line in it.
    Next open cortex-a7.mk file from /bionic/libc/arch-arm/cortex-a7 folder and replace the content with this:
    Code:
    ifneq ($(TARGET_2ND_CPU_VARIANT := cortex-a17),)
    include bionic/libc/arch-arm/cortex-a17/cortex-a17.mk
    else
    include bionic/libc/arch-arm/cortex-a15/cortex-a15.mk
    endif
    include bionic/libc/arch-arm/generic/generic.mk
    That's it, then you can build. The most important part on BoardConfig is this:
    Code:
    TARGET_RECOVERY_PIXEL_FORMAT := "RGBA_8888"
    BOARD_USE_FRAMEBUFFER_ALPHA_CHANNEL := true
    TARGET_DISABLE_TRIPLE_BUFFERING := false
    BOARD_CUSTOM_GRAPHICS := ../../../device/zopo/zp999/recovery/graphics.cwm.c
    TW_BOARD_CUSTOM_GRAPHICS := ../../../device/zopo/zp999/recovery/graphics.twrp.c  (for twrp only)

    Without any of these flags, the recovery won't boot. Cheers!
    8
    I found today the right way for packing/unpacking boot.img and recovery.img for Lenovo X2 (MT6595M).
    I found the same thing that X2 images differ from older MTK images by another offsets, addresses and board name.
    My own scrpts, michfood scripts and bruno scripts can't pack images correctly for my phone.
    So there is the correct data for X2:
    Code:
    BOARD_KERNEL_CMDLINE
    BOARD_KERNEL_BASE 40000000
    BOARD_NAME X2-EU_ROW_S121_
    BOARD_PAGE_SIZE 2048
    BOARD_KERNEL_OFFSET 00008000
    BOARD_RAMDISK_OFFSET 04000000
    BOARD_TAGS_OFFSET 0e000000
    BOARD_NAME does nothing - phone boots well without it. The main things are BOARD_KERNEL_BASE, BOARD_KERNEL_OFFSET, BOARD_RAMDISK_OFFSET and BOARD_TAGS_OFFSET.
    Using this command I have packed boot.img and recovery.img which boots well:
    Code:
    ./mkbootimg --kernel ./kernel --ramdisk ./ramdisk_new --board X2-EU_ROW_S121_ --base 0x40000000 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x04000000 --tags_offset 0x0e000000 -o ./new_recovery.img
    7
    Here I'll post all test builds for today, so keep an eye on this post (I won't write other until the tests are done), and when I will post a new build for test please test it and give me feedback. The builds will be with my modded cwm (non-touch). I hope there is anyone here able to do the tests, because I can't see any activity... :confused:

    I started earlier with a control test to confim my findings. So I have a phone (Lenovo P780) which works with regular RGB_565 pixel format. For this it no needs to use any define in BoardConfig (it's redundant), because the recovery will fallback to this format if it isn't any other defined. But now I set a
    Code:
     TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
    , I built the recovery, flash it, and guess what: logo >> black screen >> reboot. Isn't this what you guys see in your phone? So my conclusion was correct, and more over, as I thought, it seems to affect in both ways: if the kernel works with 32bits framebuffer will not work for 16 bits, and as in my phone test, if it works with 16 bits, won't work for 32 bits.
    To explain quickly what those RGBA and 8888 means: R=red, G=green, B=blue, A=alpha (transparency or opacity) -> regular video display chanel colors, and 8888 is pixel lenght for each.

    Zopo ZP999 tests:
    1. CWM test 1 Ooops, sorry, my fault. I was making changes on cwm, but builds on carliv, so of course it didn't worked. I just started again :eek:
    2. CWM test 1 <- again and the real one
    3. CWM test 2
    4. CWM test 3
    5. CWM test 4 > for the next tests I need to change more things, and so I wait for these feedbacks first First round complete.
      Second round:
    6. CWM test 5 <- first second round
    7. CWM test 6
    8. CWM test 7
    9. CWM test 8
    10. CWM test 9
    11. TWRP test 1 -> done
    That will be all for now guys... I'm really tired (I barelly slept latest days) and I won't do anything good if I continue like this. But I want to say what I'm trying to do: a custom graphics.c file for recovery to work with 32 bits framebuffer, and because cwm is designed for 16 it is really hard. I looked into the code from cm recovery, and I understand why they write it from scratch (and don't used cwm code with some changes). I hope I'll get a better result when I'll be fresh again, if none of the above works.
    Happy New Year to all of you!
    7
    @carliv, maybe set TEMPORARY_LOG_FILE to somewhere else where you can still get it even if the phone was forced to power-off?
    Maybe mounting /cache in init.rc or main(), or write directly to /dev/block/mmcblk at specific offset if needed.

    Nope, that won't help my friend, the log is not written until the ui is initialized, so won't be any log there. I was thinking on a last solution to move ui initialisation instance lower, after loading volumes and checking logs, but I don't think that will show something either. Also I'm 100% the problem is with framebuffer, so I have to find a way to get it work.

    New round of tests for today:
    1. CWM test 10
    2. CWM test 11 <<= REPORTED TO WORK
    3. CWM test 12 <<= REPORTED TO WORK
    4. CWM test 13
    5. CWM test 14
    6. CWM test 15
    7. CWM test 16 <<= REPORTED TO WORK
      ************
    8. TWRP test 2
    9. TWRP test 3
    10. TWRP test 4 <<= REPORTED TO WORK
    11. TWRP test 5 <<= REPORTED TO WORK
    12. TWRP test 6 <<= REPORTED TO WORK
    13. TWRP test 7 <<= REPORTED TO WORK
    14. TWRP test 8 <<= REPORTED TO WORK
    6
    carliv're a genius the cwm test 16 boot and it works both installation and backup. the only problem is the non-mounting of the internal SD.
    serves some other particular test?
    Happy new year

    Oh, finally! And for twrp? None of them works?

    Now let me tell you why this damn thing phone drove me crazy. This could be usefull for the other guys who try to solve this problem: @mrjavum, @SevenMaxs, @codelover, and other.
    I was right about 32 bits framebuffer, but I took as good info that flag from Lenovo source BoardConfig:
    Code:
    TARGET_RECOVERY_PIXEL_FORMAT := "RGBA_8888"
    So I focused my efforts to implement that pixel format RGBA_8888 and 32bits framebuffer. Only that was wrong and all work I did yesterday was in vain. Not entirely my fault, but I should check that earlier.
    So what was the problem? Today morning I wake up and I had the ideea to take a look in lenovo x2 kernel gpu driver code, and I found this:
    Code:
    	/* USE_[COLOR="Red"]RGBA_8888[/COLOR]_FB */
    	{
    		int res;
    		struct fb_var_screeninfo info;
    		info = psLINFBInfo->var;
    
    		info.activate       = FB_ACTIVATE_NOW;
    
    		info.bits_per_pixel = 32;
    		[COLOR="LightBlue"]info.transp.offset  = 24;
    		info.transp.length  = 8;[/COLOR]
    		[COLOR="Red"]info.red.offset     = 0;     <- normally this should be 16
    		info.red.length     = 8;[/COLOR]
    		[COLOR="SeaGreen"]info.green.offset   = 8;
    		info.green.length   = 8;[/COLOR]
    		[COLOR="Blue"]info.blue.offset    = 16;     <- normally this should be 0
    		info.blue.length    = 8;[/COLOR]
    
    		res = fb_set_var(psLINFBInfo, &info);
    Can you see what's wrong here? No? Let me show you:
    8JOudLs.png

    The RGBA8888 format is the second, and first is ARGB8888. So they use the name RGBA_8888 but pixel map defines is for ARGB - also the offsets are changed too (like it would be ABGR), but once you get the real map that can be set easily. So no matter how hard I tried there was no way I could get a good result with that, because I used the values for RGBA_8888:
    Code:
             [COLOR="Red"]vi.red.offset     = 24;[/COLOR]
            [COLOR="Red"] vi.red.length     = 8;[/COLOR]
             [COLOR="Green"]vi.green.offset   = 16;
             vi.green.length   = 8;[/COLOR]
             [COLOR="Blue"]vi.blue.offset    = 8;
             vi.blue.length    = 8;[/COLOR]
            [COLOR="LightBlue"] vi.transp.offset  = 0;
             vi.transp.length  = 8;[/COLOR]
    But why they used ARGB format and named it RGBA? Because Android doesn't have support for ARGB only RGBA:
    vZdVLOi.png

    They share same pixel size(4), same pixel format (4x8), only thing different is chanel colors map, so I was doing wrong trying to use a different color map.
    I hope now we will get better results.
    For cwm test 16 I used my custom graphics.c file, and about that issue with non-mounting sdcards that can be solved tunning fstabs and init files. I wasn't pay much attention to that since I wanted to get it start first.
    After all feedbacks came out, I'll clean up the file, make some few more tests and I will update my device folder on github for all of you that need these things.
    Guys I worked for your phone more than for any phone I ever had :victory:
    ....