yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] marsapa:
Twrp1: stop logo and after reboot;

twrp2: stop logo and after reboot;

ctr1: stop logo and after reboot;

ctr2: stop logo and after reboot;

recovery_stock_mrjavum_offs: stop logo and after reboot

recovery_stock_bgcngm_no_offs: black screen and after reboot
[Upgrading, Modifying and Unlocking] :
Can you try them with this ROM: http://xdaforums.com/showpost.php?p=57692350&postcount=68 ?

I used its images as base.

It's odd that even stock repacked didn't worked, when ghost45 told me it worked without offsets, a day or two ago.
[Upgrading, Modifying and Unlocking] marsapa:
I tried the recovery no mod of codelover and also works on my rom

edit:

this is a recovery no mod? recovery: http://xdaforums.com/atta...1&d=1419322358

because this works, however, also my rom is based on fw 18 December
[Upgrading, Modifying and Unlocking] :
Just for more info. I found now that lenovo has published their source code for mt6595, and it can be seen clearly how those offsets are defined in BoardConfig. There are actually two versions:

# mkbootimg header, which is used in LK
BOARD_KERNEL_BASE = 0x40000000
BOARD_KERNEL_OFFSET = 0x00008000
BOARD_RAMDISK_OFFSET = 0x04000000
BOARD_TAGS_OFFSET = [COLOR="Red"]0x0E000000[/COLOR]

and second:

# mkbootimg header, which is used in LK
BOARD_KERNEL_BASE = 0x40000000
BOARD_KERNEL_OFFSET = 0x00008000
BOARD_RAMDISK_OFFSET = 0x04000000
BOARD_TAGS_OFFSET = [COLOR="Red"]0x00000100[/COLOR]

They differ on tags offset. For this zopo, I checked and it has first variant.

From that comment we can see they have to match the uboot. I took a look in recovery code too: lots of changes!

And here a complete info about the stock recovery image:

Printing information for "recovery.img"

Header:
magic : ANDROID!
kernel_size : 6342528 (0060c780)
kernel_addr : 0x40008000

ramdisk_size : 1243673 (0012fa19)
ramdisk_addr : 0x44000000
second_size : 0 (00000000)
second_addr : 0x40f00000

tags_addr : 0x4e000000
page_size : 2048 (00000800)
dt_size : 0 (00000000)
unused : 0 (00000000)

name : 1418885616
cmdline :

id : 0a04c4f20e635c69763ca32775fcc10384f3068c

extra_cmdline :

Other:
magic offset : 0x00000000
base address : 0x40000000

kernel offset : 0x00008000
ramdisk offset : 0x04000000
second offset : 0x00f00000
tags offset : 0x0e000000
[Upgrading, Modifying and Unlocking] codelover:
Final Tests

Hmh, not even one zp999 owner provide me

complete

feedback for these tests.... so, marsapa is the only tester we have now?

Is he the only one who care & dare to try? I guess he will be very 'happy' to create a new rom for each new update for you guys, right [MENTION=4729462]marsapa[/MENTION]? ;)

Some earlier tests were inaccurate as some say yes some say no, we got confused which one is correct, results are inconclusive, is that the best you can do?

Alright, some final tests before i too give up for this mission impossible...

EDIT: Files & instructions updated, please also check whether adb is working in recovery or not.

Please follow

EXACTLY

the following steps:

1)

Flash Carliv's CTR Recovery

(recovery-ctr-30-ZP999.img) Failed

2)

TEST #1

2.1) Flash boot_n1b.img with SP FlashTool.

2.2) Start the phone

normally

to boot android system. (NOT recovery!)

2.3) Open shell prompt with adb access, type 'adb shell cat /dev/patchlog' and save the output as test1.log.

2.4) Now power off the phone and try boot into recovery, tell me exactly what happened when you boot.

* DO NOT restore stock recovery if it failed, just continue the next test.

3)

TEST #2

3.1) Flash boot_n2b.img with SP FlashTool.

3.2) Start the phone

normally

to boot android system. (NOT recovery!)

3.3) Open shell prompt with adb access, type 'adb shell cat /dev/patchlog' and save the output as test2.log.

3.4) Now restart the phone and try boot into recovery, tell me exactly what happened when you boot.

NOTE:

* Use only the recovery from this post (recovery-ctr-30-ZP999.img), NOT the new one.

* For this test i assumed the recovery is working but something is blocking it from booting.

* The /dev/patchlog will be generated

IF

my tests completed successfully, but if it failed too then there won't be that file.

* If there is /dev/patchlog generated, please save the output and send me the log files for two tests.

Actually both 0x0E000000 & 0x00000100 will work, i realized this long ago when marsapa created his custom with modded boot.img, he used dsixda's Kitchen,

what suprised me was the boot header sha1 calculation method used was different from what we normally use for MTK device today, yet it still works.

I suspect the sha1 sum is not always checked, if i am right, theoretically we can use the original header and just update with new ramdisk size only.

Well, that's for reference only, i not that crazy to recreate the tool. :D

Oh btw, do you think there is a chance this problem is related to framebuffer? Maybe 'ARM Frame Buffer Compression', or some new technology?

If it's true that the problem is somehow related to framebuffer, that could explain why they get black screen while adb works like SevenMaxs mentioned.

The question is, how do we (they) check?

And sorry i re-up your recovery to my host, i could not find the link to your first build with correct 'recovery' header, can you re-up?

As the ones you posted here seems to be packed with 'rootfs' header right? I try the std packing first. Thanks again!

.
[Upgrading, Modifying and Unlocking] bigrammy:
ARM TrustZone

Hi,

Could all these problems relate to ARM TrustZone which I believe the Zopo may have :crying: http://www.arm.com/products/processors/technologies/trustzone/index.php

This guy has compiled a lot of info regarding the mt6595 Here it maybe of help too. :good:

Regards bigrammy. :cool:

PS: Just to be clear I do not have a mt6595 and I thought the zopo/lenovo guys would of been keen to beta test :D
[Upgrading, Modifying and Unlocking] :
I don't know if this is related to framebuffer, but if they have adb access while the screen is black, maybe they can take a live logcat. Also this must be added to BoardConfig too (Ididn't at that time):

TARGET_RECOVERY_PIXEL_FORMAT := "RGBA_8888"

I'll build again the recoveries with this too.

Yes, second tests I appended header with rootfs to see if there is any difference... But it's not easy to test something without the device, and I thought you have it to speed up the whole process. Also good ideea with standard packing. I saw that's the case with Android One devices, except the CPU, they behaviour is not like any other MTK.
[Upgrading, Modifying and Unlocking] ghost45:
Thanks Code,

These are my tests:

Test 1:

I have flashed both files ctr recovery 30 and boot 1

Reboot and i entered in android S.O.

Boot run well

i type in shell prompt the adb shell cat /patch.log and i receive bad answer

P:\ANDROID\zp999\MtkDroidTools-253>adb shell cat/patch.log
/system/bin/sh: cat/patch.log: not found

P:\ANDROID\zp999\MtkDroidTools-253>adb shell cat /patch.log
/system/bin/sh: cat: /patch.log: No such file or directory

P:\ANDROID\zp999\MtkDroidTools-253>

So with root browser i have tryed to find this file called patch.log but i don't be able to find it!

i reboot into recovery mode:

i receive after reboot i see the screenshots of zopo and after the system try to enter in recovery but i receive black screen and after auto reboot into Android S.O.

Test 2:

So i just continue the next test.

i flash the 2boot image file

but the results are the same .....same answer after reboot same screenshots and same black screen and after auto reboot into Android S.O..

Boot run well

i type in shell prompt the adb shell cat /patch.log and i receive bad answer

P:\ANDROID\zp999\MtkDroidTools-253>adb shell cat/patch.log
/system/bin/sh: cat/patch.log: not found

P:\ANDROID\zp999\MtkDroidTools-253>adb shell cat /patch.log
/system/bin/sh: cat: /patch.log: No such file or directory

P:\ANDROID\zp999\MtkDroidTools-253>

So with root browser i have tryed to find this file called patch.log but i don't be able to find it!

To make you known My actual Android S.O. is the last firmware (stock) no mod no root (total stock no modding in all meaning) Zp999_20141218_143716.

So the mistakes remain too......thanks for all thanks to everybody for your big Work !
[Upgrading, Modifying and Unlocking] SevenMaxs:
My friend savyol found out that if:

[ramdisk]
Type=MTK,GZIP,CPIO
MtkName=[COLOR="Red"]ROOTFS[/COLOR]
GZIP_TYPE=0
GZIP_OS=3

recovery is not loaded

if

[ramdisk]
Type=MTK,GZIP,CPIO
MtkName=[COLOR="Red"]RECOVERY[/COLOR]
GZIP_TYPE=0
GZIP_OS=3

recovery is loaded
[Upgrading, Modifying and Unlocking] ghost45:
Hi MAX,

possible only this stupid instruction make all that disaster?
[Upgrading, Modifying and Unlocking] yuweng:
Some confusion here, i think & i thought we've already solved the repack issues as per shared by mrjavum . . . :cowboy: Me got some crazy ideas . . . :o

TARGET_CPU_VARIANT := [COLOR="Blue"]cortex-A17[/COLOR]
TARGET_2ND_CPU_VARIANT := cortex-A7

Did anyone tried Zopo999 recovery ramdisk on their cortex-a7, theoretically it should boot if it is compiled with TARGET_CPU_VARIANT := cortex-a7

Some interesting info i found on stock 3e may be there is some lead inside it, idk, as bigrammy said, i also don't have a MT6595 to play around with it, only crazy ideas . . . :laugh:

Nay, this has been the MTK format since the beginning . . . :cool:
[Upgrading, Modifying and Unlocking] marsapa:
I confirm tests ghost
[Upgrading, Modifying and Unlocking] SevenMaxs:
I tried different ways:

for mt6595

TARGET_CPU_VARIANT := [COLOR="Blue"]cortex-A17[/COLOR]
TARGET_2ND_CPU_VARIANT := cortex-A7

TARGET_CPU_VARIANT := [COLOR="Blue"]cortex-A17[/COLOR]
TARGET_2ND_CPU_VARIANT := cortex-A9

TARGET_CPU_VARIANT := [COLOR="Blue"]cortex-A17[/COLOR]
TARGET_2ND_CPU_VARIANT := cortex-A15

Recovery is not loaded.

for msm8916

TARGET_CPU_VARIANT := [COLOR="Blue"]cortex-A53[/COLOR]
TARGET_2ND_CPU_VARIANT := cortex-A7

TARGET_CPU_VARIANT := [COLOR="Blue"]cortex-A53[/COLOR]
TARGET_2ND_CPU_VARIANT := cortex-A9

TARGET_CPU_VARIANT := [COLOR="Blue"]cortex-A53[/COLOR]
TARGET_2ND_CPU_VARIANT := cortex-A15

Recovery is not loaded.
[Upgrading, Modifying and Unlocking] ghost45:
Hi Max,

Possible that phone have one instruction different from the several socs?

This Zopo zp999 or zp3X have the mtk6595M and the % of the clock of the cpu is different for example to the Meitzu that have the mtk6595.
[Upgrading, Modifying and Unlocking] SevenMaxs:
Hi!

I do not think so.

I tend to think it's all the Linux kernel 3.10.хх.
[Upgrading, Modifying and Unlocking] marsapa:
it adjusts the clock in the kernel
[Upgrading, Modifying and Unlocking] :
Ok I compiled again both recoveries with target pixel. Lets' see if there is any difference...

TWRP 2.8.3.0

CTR 3.0

I re-checked the source for Lenovo and I couldn't find any other security trigger. The stock recovery is a reduced variant of miui recovery.
[Upgrading, Modifying and Unlocking] marsapa:
Now test

edit:

always black screen after the logo and then reboot
[Upgrading, Modifying and Unlocking] ghost45:
I confirm the Marsapa's tests!:(
[Upgrading, Modifying and Unlocking] SevenMaxs:
CWM Recovery started on mt6752

[IMG="CWM"]http://lenovo-forums.ru/uploads/inline/2014-12/549fd95d82bc8_IMG_20141228_130028.jpg[/IMG]

My friend savyol also ported Stock recovery zp999 for Lenovo P70-A.
[Upgrading, Modifying and Unlocking] marsapa:
To 6595 no, but if you want compile cwm for zp999 and i test
[Upgrading, Modifying and Unlocking] SevenMaxs:
I'll try, but here in Russia now begin the New Year holidays.

So I can do it no earlier than 2-3 January 2015.
[Upgrading, Modifying and Unlocking] marsapa:
I have compiled several times without success, exactly what you've changed?
[Upgrading, Modifying and Unlocking] ghost45:
Other tests :

Carliv Recoverys +

1) boot1 Codelovers:

the same answer black screen and auto reboot in Android S.O.

2) boot2 Codelovers:

the same answer black screen and auto reboot in Android S.O.

According me the boot.img not are connected with the boot into the recovery mode!

:(:(
[Upgrading, Modifying and Unlocking] SevenMaxs:
If I'm doing the same thing for mt6595, getting not works recovery.
[Upgrading, Modifying and Unlocking] ghost45:
Testing again new recovery nXX wait..................

Thanks Again Code,

These are my other tests:

Test 1:

I have flashed both files ctr recovery 30 and boot 1nb

Reboot and i entered in android S.O.

Boot run well

i type in shell prompt the adb shell cat /dev/patch.log and i receive

C:\Users\Utente\Desktop\mtk-droid253>adb shell cat /dev/patchlog
[CHK #0=1]
[CHK #1=1]
[CHK #2=0]
[CHK #2=1]
[CHK #4=1]
[CHK #4=2]
[CHK #4=3]
[CHK #9=1]

So with root browser i have tryed to find this file called patchlog this time i found it but i not able to copy without right root ...so i open the file on the mobile phone with read app and inside there are also the same thing like upside

i reboot into recovery mode:

so this thime is little different to the other times .....reboot into recovery i receive screensplash with zopo logo and after the screen remaining two o three second in total black! after reboot in to android S.O.

So after completly entered in andorid s.o. i have to check if there is somthing changed in patchlog...but nothings new the same result with the same numbers!

Test 2:

So i continue with the flash the 2°file image boot 2nb

reboot into android system and type the same command adb and i receive this:

C:\Users\Utente\Desktop\mtk-droid253>adb shell cat /dev/patchlog
[CHK #0=2]
[CHK #1=1]
[CHK #2=0]
[CHK #2=1]
[CHK #3=1]
[CHK #3=2]
[CHK #9=1]

i have checked with root browser also the file that is little small than the before now is 77kb and before was 88kb

now i reboot into revovery mode

so this time is the same as before....reboot ...i see the screenspalsh zopo .....after the phone seems entered in died mode according me total black screen!

after three second reboot into android system.

i have checked again if there is something new in that patchlog file ....but seems the same and the same total size 77kb.

That's all ..... seems that you have told me MISSION IMPOSSIBLE !!!

thanks Code!
[Upgrading, Modifying and Unlocking] :
So, we are back to square 1, or what?! Now even repacked images don't work... :(

Can someone to test these again (in attachment). I only turned off security in prop files.

I need to confirm something. I think there is a sha-1 validation on boot or other kind. Something like this:

validate: SHA-1 hash:
calculated 6342528:1002366:46050a1d6127be15e3b53b9c17b9955481392fac
expected 6342528:1002365:f7534023a5eb89abd18f0e0d524253aa93
SHA-1 hash doesn't match
image failed to run

In my example the instance is: kernel_size:ramdisk_size:generated_sha_id.

I don't know for sure if that is the thing, but I remember I saw that while ago in a rooter.

For my attached images there is a difference of one byte for boot ramdisk size, but for recovery is none.
[Upgrading, Modifying and Unlocking] split52:
phone boot fine, recovery black screen after the logo and then reboot
[Upgrading, Modifying and Unlocking] marsapa:
we try to do a simple cwm? I had already tried in the past without success, maybe now with the information shared comes out something

---------- Post added at 04:50 PM ---------- Previous post was at 04:44 PM ----------

work, I just tested and you get into recovery
[Upgrading, Modifying and Unlocking] ghost45:
Hi Carliv,

These two new mod run well but the recovery is stock!

look:

View attachment 3085866
[Upgrading, Modifying and Unlocking] :
I know these are stock images. I'm trying to understand completely how they works, and after that we can move to custom.

Now another test, and the last one with stock images - at least from me.

I need the feedback asap.

Thank you guys!
[Upgrading, Modifying and Unlocking] marsapa:
It's ok, i go in recovery stock
[Upgrading, Modifying and Unlocking] :
It's ok then. I just updated Bruno's Mtk-Tools to support these new platforms. These last images were repacked with his tool. I will make a pull request on his repo.

Thank you again for your help.

Now we have a tool to do things and to avoid manual repacking. Also this will append correct the MTK header.

Maybe someone will do the same for michfood's tool for windows.
[Upgrading, Modifying and Unlocking] split52:
confirm marsapa test, ok stock recovery
[Upgrading, Modifying and Unlocking] yuweng:
WoW and i thought it will only be available next year only but then again 2015 is just a few days away . . . :laugh:

MT6752 uses Cortex-A53 not ARM's big.LITTLE thats why it boots but not on your MT6595, i guess, hopefully i wrong . . . :cowboy:

But you never say whether Zopo999 stock recovery booted or boot loop on MT6752 but at least now we know source built recovery boots on MT6752. . . :good:

Off-Topic . . .

What did you use to build for MT6752, TARGET_CPU_VARIANT := ??? curious to know but here says its 32bit . . . :cowboy:

And i wonder how you build with those flags mentioned here as i've tested it, it doesn't build on OmniRom android-5.0 repo !

Final crazy idea then i give up as this is the closes/ nearest siblings, Samsung Galaxy S5 AKA klte uses big.LITTLE -> Source 1 -> Source 2 but then again its cortex-a15/ a7 & not cortex-a17/ a7 as on MT6595 . . .

Or gcc & bionic needs some tweaks, idk . . . :laugh: Source 1 Source 2

There is no cortex-a17 . . .

i really hope i'm wrong on this big.LITTLE architecture being the reason for custom recovery not booting up on MT6595 . . . :p
[Upgrading, Modifying and Unlocking] :
Check my github my friend :) You will find there the cortex a-17 folder. I hope this will be usefull. I just started to build all recoveries again with this support. Let's see if there will be any change. :D
[Upgrading, Modifying and Unlocking] ghost45:
:laugh:

Yes Is true! The next year is just round the corner!:good:

But if you know we have made all the steps to understand well this new soc Mtk 6595, but I hope for positive.

;)
[Upgrading, Modifying and Unlocking] ghost45:
[MENTION=371528]Everybody[/MENTION],

I have opened new Section in new enviroment i think ,probably, is better place to attach files , screenshots and so on!

Tell me what do you think about!

http://xdaforums.com/android/software/recovery-mod-mtk6595-soc-t2987307/post57811619#post57811619

See you:silly:
[Upgrading, Modifying and Unlocking] bigrammy:
:eek: Bro you should get a Medal for doing this alone :angel:

I can't believe you can do all this work in such a short time Bruno even made you compile it for OSX too :eek:

Thanks for this. :highfive:
[Upgrading, Modifying and Unlocking] mrjavum:
This Chinese CWM for MX4 works on my X2 after repacking: http://d-h.st/W9o (but everything is in Chinese)

I can't build CWM myself right now (I'm downloading full cm-12.0 tree from scratch), but may be it helps somebody...
[Upgrading, Modifying and Unlocking] marsapa:
Carliv, please repack cwm with kernel for zp999
[Upgrading, Modifying and Unlocking] codelover:
Hmmm! Interesting find you have there! Let's see if this work for zp999 too.

OK guys, HERE you go repacked with zp999 kernel... Get latest HERE

EDIT: Yay! It works! don't forget to thanks [MENTION=4268134]mrjavum[/MENTION] for his great finding.

Now there is a working recovery we can dig deeper & check for the differences...

P/S: The above recovery still requires some fine tune, i will see if it can be hex edited to english.

.
[Upgrading, Modifying and Unlocking] ghost45:
Hi Code YOU have realized the first Recovery for this terrible PHONE!

Look:

View attachment 3087227

Many congratulation to everyone!
[Upgrading, Modifying and Unlocking] mrjavum:
Ok. I have compiled Cyanogen Recovery from cm-12.0. It starts, but there are much errors with cache partition and it can't apply pathes and read logs, etc... I will continue to dig tomorrow.

Img for X2: http://d-h.st/Ss4
[Upgrading, Modifying and Unlocking] ghost45:
Thanks a Lot MrJavum!

But thanks to everyone for your Big Work!

At the end ....the results will come out!!!

:laugh:
[Upgrading, Modifying and Unlocking] :
Wow, looks like I've got here a little bit late :)

So, I was working all morning compiling all recoveries I find for this phone. Now that you have already some working, maybe nobody will want to test them, but if any of you want, and at least one from those, built not repacked, works, then I think I'll just may find the problem.

So here they are:

Built:

AOSP stock

CWM stock

CM(Cyanogenmod) stock

CWM Modded

PHILZ

TWRP

CTR

Repacked with that found by mrjavum:

CN+zp999 kernel

CWM

Special test build:

CTR special
[Upgrading, Modifying and Unlocking] ghost45:
Sorry Carliv,

1) the Ctr special not run.....always black screen and reboot!

Repacked with that found by mrjavum:

2) The cn+Zp999Kernel not run.....always black screen and REMAING in BRICK phone and black screen with the three button lights on

3) the cwm not run.....always black screen and reboot!

4) AOSP stock not run.....always black screen and reboot!

5) CWM stock not run.....always black screen and reboot!

6) CM(Cyanogenmod) stock Run WEll

View attachment 3087367

7) CWM Modded not run.....always black screen and reboot!

8) PHILZ not run.....always black screen and reboot!

9) TWRP run.....always black screen and reboot!

10) CTR un.....always black screen and reboot!

Test finished Carliv ONLY one for moment....

Thank you very much GREAT !
[Upgrading, Modifying and Unlocking] :
:eek: Then let's hope mrjavum will get a good result, because hi has a phone to work with. I saw in lenovo sources that this model has 3 framebuffers not two like almost any other phone, and I made these compilations with this change. Also I saw now in that chinese recovery log posted by mrjavum, the same thing (fb3 - framebuffer 3). Codelover said something about framebuffer the other day, but I didn't think it was about the number. Anyway, let's hope some of the guys who can work with such a phone will find more.
[Upgrading, Modifying and Unlocking] ghost45:
Test Finished now we have only the Cyanogen and the chinese cwm one!
[Upgrading, Modifying and Unlocking] :
Ah, good. Now I have to look in that cyanogenmod recovery to see what's different than the others. This was unexpected :cyclops:

I think is the first time for me to build a working recovery without even to see the device :laugh:
[Upgrading, Modifying and Unlocking] TNTcity:
Congratulation and thanks you very much for all the great work you've done here !!

That's awesome seriouly.

Asa I can get home I'll test what you need !

Keep doing great work.
[Upgrading, Modifying and Unlocking] marsapa:
Then, just for completeness, the Chinese cwm does wipe but it does not install from sd and it from the internal memory, while the stock cm install from sd
[Upgrading, Modifying and Unlocking] mrjavum:
Yes, I have a phone, but I have not so much experience and knowledge in Android programming and programming at all as you. So you and your help and your advices are welcome! :good:
[Upgrading, Modifying and Unlocking] ghost45:
Hi Carliv ,

Just to inform you, i have made several test with the cyanogen Recovery,

the recovery install the zip file correctly but want only the signed files!

Is too quickly to install process and i can't able to see the real path and all the process during the setup.

But for now it is one good recovery to start and end with your marvelous Ctr one.

that's all for moment.

:good:
[ONE Q&A, Help & Troubleshooting] JBH168:
Hi,

I recently pushed a folder (Download) to the sdcard of my OnePlus One via ADB in recovery. Now, I can't delete any of the files inside that folder via any (root) browser.

How can I fix that?

Thanks.
[ONE Q&A, Help & Troubleshooting] JeffDC:
If you are unlocked, install Root Explorer, or the like, and check the directory permissions. Mine is set to 777, and I can delete it if I wish. Or you can change the permission of the files inside, and delete those, as you wish.

There are likely adp commands, as well. Perhaps someone will show with that know-how.
[ONE Q&A, Help & Troubleshooting] JBH168:
I tried that, though it unfortunately doesn't work via root browser.

I'll try it via adb later today.
[ONE Q&A, Help & Troubleshooting] Genericxx:
adb remount (to gain rw-access to root partition)

adb shell rm -f <path to file> (to delete the apk)