yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] :
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

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:

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 :o

CWM test 1 <- again and the real one

CWM test 2

CWM test 3

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:

CWM test 5 <- first second round

CWM test 6

CWM test 7

CWM test 8

CWM test 9

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!
[Upgrading, Modifying and Unlocking] split52:
zopo logo and boot, no recovery mode
[Upgrading, Modifying and Unlocking] bigrammy:
Hi Just been googling around and a guy QuietStorm made a code to convert 16 bits to 32 bit for a cwm not sure if it's of any use :confused: Here 3rd post down :fingers-crossed:

Also found this in google groups regarding the format of the RGBA_8888 .png's if there is no info in the A channel the .png will be interpreted as a normal RGB I think :laugh:

.
[Upgrading, Modifying and Unlocking] :
I know about that convert code. It's originally from clockworkmod, and I found it while ago on a msm7x30 device custom graphics file. :)
[Upgrading, Modifying and Unlocking] bigrammy:
Carliv If TWRP boots ok as reported but with blank screen would that not mean it just the image format thats wrong :confused:

Sorry for noobish questions but just trying to get my head around all this stuff :laugh:
[Upgrading, Modifying and Unlocking] split52:
cwm test 1 zopo logo and boot, no recovery mode:(

cwm test 2 zopo logo and boot, no recovery mode:fingers-crossed:

cwm test 3 zopo logo and boot, no recovery mode:eek:

cwm test 4 zopo logo and boot, no recovery mode:crying:
[Upgrading, Modifying and Unlocking] :
No, twrp has native 32 bits support, it will be easier to fix for it. I'm trying to achieve that for cwm now.
[Upgrading, Modifying and Unlocking] split52:
cwm test 5 zopo logo and boot, no recovery mode
[Upgrading, Modifying and Unlocking] ghost45:
Hi Great,

I'm looking that You and all the others friends, with this project, I'm doing breaking into a sweat!

Sorry but i never may think that was too hard and so terrible to build this maleficient recovery! :eek:
[Upgrading, Modifying and Unlocking] marsapa:
I tried to install a rom using cwm cn but it always fails, there is work still to use it
[Upgrading, Modifying and Unlocking] ghost45:
Happy New Year 2015

:victory:

Thanking you all for your hard work

Let me take this opportunity to wish you all a happy New Year 2015.

Also let me thank the whole xda community and everyone that contributed this project in any way.
[Upgrading, Modifying and Unlocking] codelover:
Some suggestion

Hey ghost45, Happy new year! Happy new year & happy holiday to everyone too!

- No longer needed :) -

Guys, please check carliv's post as he has added few more tests, CWM test 6-9 & TWRP.

Also, i don't think a simple yes/no is enough, you can do more to help him debug, try to check if there is any log generated.

Since you can use the CN recovery to flash zip now, please root your phone and do the following before you flash the test recovery.

adb shell
su
rm /cache/recovery/*
rm /sdcard/clockworkmod/recovery.log [COLOR="Red"]<- I am not sure about the real path[/COLOR]

After you have done that, flash the test recovery and try to boot recovery, if fail, try to check if there is a recovery log generated in /cache:

[COLOR="DarkSlateBlue"][/COLOR]
/cache/recovery/log
/cache/recovery/last_log
/cache/recovery/last_log.1 (2, 3...)
/<sdcard>/clockworkmod/recovery.log [COLOR="Red"]<- I am not sure about the real path[/COLOR]

Repeat above for each test.

If you find any log there please share it here, log file speak thousand times better than "not working", "black screen",

and if needed carliv can add more custom log to find out which exactly the function the causing the problem.

To fix the install problem on CN CWM, we also need:

/cache/recovery/last_install

Those who know how to build also can try this and this, not sure if these are relevent, but you got to try all possibilities.

Okay, good luck to all.

EDIT #1:

[MENTION=5186178]carliv[/MENTION], 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.

EDIT #2:

Ok, i am trying to find a way to atleast generate the log, can someone help me to test?:

recovery-twrp-test1-ZP999_log1.img

The log file will be saved in /cache/record.log if my attempt success...

[MENTION=4560967]split52[/MENTION], nope, the log you provided was from stock recovery, we need the one from test recovery, '/cache/record.log', if available...
[Upgrading, Modifying and Unlocking] split52:
cwm test 6 zopo logo and boot, no recovery mode and no records in cache/recovery, nothing

cwm test 7 zopo logo and boot, no recovery mode and no records in cache/recovery, nothing

cwm test 8 zopo logo and boot, no recovery mode and no records in cache/recovery, nothing

cwm test 9 zopo logo and boot, no recovery mode and no records in cache/recovery, nothing

TWRP test 1 zopo logo and boot, no recovery mode and no records in cache/recovery, nothing

rm failed for /cache/recovery

edit:

works codelover, generate the log, great work
[Upgrading, Modifying and Unlocking] :
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:

CWM test 10

CWM test 11 <<= REPORTED TO WORK

CWM test 12 <<= REPORTED TO WORK

CWM test 13

CWM test 14

CWM test 15

CWM test 16 <<= REPORTED TO WORK

************

TWRP test 2

TWRP test 3

TWRP test 4 <<= REPORTED TO WORK

TWRP test 5 <<= REPORTED TO WORK

TWRP test 6 <<= REPORTED TO WORK

TWRP test 7 <<= REPORTED TO WORK

TWRP test 8 <<= REPORTED TO WORK
[Upgrading, Modifying and Unlocking] blackidra2:
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
[Upgrading, Modifying and Unlocking] codelover:
Wow! booted?!! Maybe still too early to say but you did it carliv! Well done and congratulations! What a good start for new year huh! ;)

Oh about the TEMPORARY_LOG_FILE, if i understand correctly it supposed to works like this:

The main() starts and it pipe stdout & stderr to the tmp log in in /tmp (tmpfs) at very early state, before device_ui_init() and any critical function,

but only get copied to /cache after finish_recovery() is called, that's after the recovery done with the partition mounting work.

What i did with previous attempt was, i hex edited the test recovery and changed tmp log file to /cache and mount /cache before the recovery starts.

The changes supposed to atleast give us a chance to see the log as you don't have to worry that the /tmp/recovery.log did not get copied if the phone being forced to powered off.

Well, i guess we don't need that now!

Congratulations to all zp999 users!
[Upgrading, Modifying and Unlocking] :
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: [MENTION=4268134]mrjavum[/MENTION], [MENTION=5680718]SevenMaxs[/MENTION], [MENTION=4893922]codelover[/MENTION], and other.

I was right about 32 bits framebuffer, but I took as good info that flag from Lenovo source BoardConfig:

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:

/* 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:

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:

[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:

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:

....
[Upgrading, Modifying and Unlocking] blackidra2:
Hi,I confirm that the TWRP test 8 boot but when you try to flash or backup comes this error "E: \ Storage can't mount" for both memories

Sorry for my bad english
[Upgrading, Modifying and Unlocking] :
Ok, thank you very much for feedback. I'll wait for other users to do the same, and after that I'll post another tests.

So far both builds compiled with my custom graphics files (I made one for twrp too) works. That mounting issue is related to fstab, I'll fix that later.

TO ALL TESTERS: These builds are made to solve an issue at a time. I keep track on changes and know what worked. So, the first goal was to make it boot. Now I'll be happy to receive reports about that: it boots, how are colors, it navigates well through menus, maybe some images with a camera will be good, a recovery log, etc.

Next I'll fix the sdcards and all the other issues. Thanks!

......
[Upgrading, Modifying and Unlocking] marsapa:
Ok, I'm done with my new rom, I can now test the recovery

with TWRP 8 I managed to flash the super and the king of the root, now I try to back up and flash a rom

if you flasha a rom with the complete format in the destination you receive the error after a while: "E: Error executing updater binary in zip /external_sd/name rom.zip

Updating partition details....

E: Unable to mount /sdcard

.....done

E:Unable to mount storage

The Backup if you point to the sd works

pardon error to mont sd at the end of the backup

now test cwm

equal the cwm 16 does not install the zip of the rom but only the tracks of the root but the backup on sd is unsuccessful
[Upgrading, Modifying and Unlocking] bigrammy:
Hi Carliv,

Many Thanks bro for your hard work and determination in solving this SoC's problematic recovery. :highfive:

Thanks also for the detailed explanation :good:

You should now take a little time for yourself as you have earned a good rest :angel:

:cool: A Happy and Prosperous 2015 to everyone :cool:
[Upgrading, Modifying and Unlocking] ghost45:
Hi Carliv,

Thanks for your hard work and continuous also today that is the first of the New Year 2015!

These are my tests:

New round of tests for today:

CWM test 10

Black Screen and reboot into Android O.S.

CWM test 11

Run well but can't mount sdcard0, show v.6 , Can't install normal zip file,

seems run the backup on sdcard1 , say can't mount backup path, say no .android_secure found. skippingbacup o f applications on esternal storage

when i go with root browser i see in the backup folder all the tar file have zero kb and all the other files.tar.a have the relatives dimension

this is the recovery log.

View attachment recovery.rar

CWM test 12

Run well but can't mount sdcard0, show v.6 ,

seems run the backup on sdcard1 , say can't mount backup path, say no .android_secure found. skippingbacup o f applications on esternal storage

when i go with root browser i see in the backup folder all the tar file have zero kb and all the other files.tar.a have the relatives dimension

is the same like the previous one

this is the recovery log.

View attachment 3092837

CWM test 13

Black Screen and Brick the phone.

CWM test 14

Black Screen and Brick the phone.

CWM test 15

Black Screen and Brick the phone.

CWM test 16 <<= REPORTED TO WORK

Backup run and install superSu Binary

************

TWRP test 2

Black Screen and reboot into Android O.S.

TWRP test 3

Black Screen and reboot into Android O.S.

TWRP test 4

Show twrp 2830 run well ... sometimes run internal sd card like 0mb sometimes do not enter in internal sd card

the backup seem run

TWRP test 5

Seems run well but seems not mount the internal sd card like 0mb.

TWRP test 6

Seems run well but seems not mount the internal sd card like 0mb.

TWRP test 7

Seems run well but seems not mount the internal sd card like 0mb.

TWRP test 8 <<= REPORTED TO WORK

Seems run well but seems not mount the internal sd card like 0mb.

TEST FINISHED.
[Upgrading, Modifying and Unlocking] :
Happy new year to you too, and to all of you again!

About the tests, first the sdcards issues I'll fix them easily, no need to report that now (I didn't touch that yet, is the "stock" setup).

The recovery log posted shows that recovery works very well, except these things I didn't touched yet.

Also for non-installing some zip files, It shows in recovery log that you try to install a zip that isn't for this phone and ofcourse won't work. Maybe you guys don't know, but a ROM zip have to be made specifically for the phone you want to install it. The zip you tried to install is (I guess) for a phone with mt6589:

mount: failed to mount /dev/block/[COLOR="Red"]mmcblk0p5[/COLOR] at /[COLOR="Red"]system[/COLOR]

block 5 for system is most common for mt6589 platform. Your phone has system on block 13:

system -> /dev/block/mmcblk0p13

of course that zip will fail since is trying to install system on seccfg partition:

seccfg -> /dev/block/mmcblk0p5

So, please before start flashing anything in any phone first check if that resource is for your phone.

About backup, what you see is normal, and that shows the backup works very well. CWM splits tar archives in parts of 1 Gb and stores them in tar.a files, and tar files act more like a "shortcut" to say it simple. Also you can use tar+gzip format.
[Upgrading, Modifying and Unlocking] ghost45:
Hi Carliv,

so what do you want that we are looking for?

Only if the recovery start or not?

tell me please to avoid misunderstandings !:rolleyes:
[Upgrading, Modifying and Unlocking] split52:
thanks for all, i found a bad problem, after update to 12/30, this is imposible flash new recovery by carliv:confused:
[Upgrading, Modifying and Unlocking] :
You can test menus, even backups if at least one sdcard works... You can test even flashing zips if they are right (like supersu).

Of course for me most important now is if they boots and you can navigate through menus, if there are color alterations, wrong keys actions (buttons).

I wrote that because I saw few reports here that the flashing zip don't work and that could make me to mess up some things in recovery with permissions if wouldn't see that recovery log you posted and I understood that wasn't recovery fault for that fail zip install, but the zip itself.

So, there is no misunderstanding if you pay attention to what you do.

Don't get me wrong guys, I'm doing this only for you, and for last days I slept only few hours a night to get this, and an erronate report will slow things down. Don't be mad just be more carefull, and so all of you who make the tests.
[Upgrading, Modifying and Unlocking] marsapa:
looks at the stock I have not tried it with my v4 based fw 30 I tested all recovery
[Upgrading, Modifying and Unlocking] ghost45:
Ok Ok i understant now!

Sorry if you have lost you time instead sleeping but it was not my intention!
[Upgrading, Modifying and Unlocking] split52:
i found the problem, in system, delete recovery from boot.p and flash again the carliv recovery, thats all;)
[Upgrading, Modifying and Unlocking] :
No problem :)

I did it anyway because I wanted. And don't be upset, it's a good thing you posted that log and I'm thankfull for your tests (I'm out of thanks today but tomorrow I will).

If everything goes well from now on, I can estimate that in two days we will get a good working recovery (three actually: cwm, ctr and twrp).
[Upgrading, Modifying and Unlocking] ghost45:
Thank you very much for your hard work and for your time that give to us !
[Upgrading, Modifying and Unlocking] m3n3chm0:
Very good news mates, thanks all of you for your great work [emoji3]

Enviado desde mi ZP999 mediante Tapatalk
[Upgrading, Modifying and Unlocking] yuweng:
Good job Master Shifu Carliv & congrats, now all custom recoveries booted up on the new MT6595 ! To recap, below are the culprit that causes the problems on the new MT6595, i think . . . :o

Uses different mkbootimg arguments

Uses 2ND_CPU_VARIANT . . . :confused:

Uses 32 bit graphics framebuffer

Or there is more that i donno . . . :laugh: Users of the new MT6595, i think you guys should chip-in your contributions to Master Shifu Carliv for a job well done ! If it wasn't for him, you guys will have to live with stock 3e recovery & no custom ROM so how about hitting that DONATE button now . . . :cowboy:
[Upgrading, Modifying and Unlocking] :
The tests list for today.

Since we have now working builds, we will focus on one recovery at a time.

Let's start with CWM.

....

For these builds you should test internal sdcard functionalities. But, if you use a windows PC don't try to access internal sdcard with USB Mass Storage. This phone has a datamedia emulated internal sdcard, aka a "data/media/" folder on /data partition, and windows can't work with ext4 file system, so if you will try to access internal sdcard it will prompt you to format it: don't do that. In linux it might work, but I can't test it.

CWM test 1 ref

CWM test 2

CWM test 3 <<<TESTS DONE

********************

CWM test 4

CWM test 5

CWM test 6

CWM test 7

CWM test 8 <<<STILL NOT WORKING INTERNAL SD

I need to explain a little bit. I never had a phone with /data/media sdcard so I experimented a litle bit today. I learned some things and I have to revise my porting and building guides after that. For that I thank you all the testers!

.

Thanks yuweng my friend for your recap and kind words!

The BIG THANKS we'll have to say to LENOVO people, which have published the source code for same platform. If it wasn't for them, I don't think I could figure out how to solve this problem. This is the main reason I decided long ago to buy MTK phones only from Lenovo; this a personal opinion not a recommendation.
[Upgrading, Modifying and Unlocking] bigrammy:
Hi yuweng, :highfive:

I am sure the Zopo & Lenovo communities will all buy Carliv a beer or Pizza for his hard work well I really hope so anyway :fingers-crossed:

Not sure if you missed this post by carliv explaining the main problem Here

More info can be found Here regarding RGBA_8888 and the affects of big/LITTLE endian when reading it. :confused:

I wont pretend I fully understand all the fine detail :silly: but at least I have a general understanding all thanks to carliv :highfive:

Lets not forget Carliv also made updates to brunos mtk boot/recovery_ unpack/repack code so this mt6595 SoC now gets unpacked and repacked without breaking them. :cool:

Later and by chance I also managed to find cofface Windows Version tool to unpack/repack the recovery/boot.img of this mt6595 with breaking it. :cowboy:

mt6595 owners are very lucky indeed to have had Carliv and the others work on their device's SoC :eek:

I have a feeling it would have been a very long time to wait had he/they not taken on the challenge ;)

Your conscience will guide you all I am sure mt6595 owners. :D
[Upgrading, Modifying and Unlocking] ghost45:
these are the two file that i have found in cache/recovery

View attachment last_log.txt

View attachment last_log_1.txt

test finished
[Upgrading, Modifying and Unlocking] split52:
CWM test 1 ref

can't mount sdcard0 and can install normal zip file,cant mount sdcard in pc mode

backup in sdcard01 and restore is complete:victory:

CWM test 3

the same and read rom.zip but stooped after a while updating
[Upgrading, Modifying and Unlocking] marsapa:
does not install the rom zip format
[Upgrading, Modifying and Unlocking] split52:
sure, i am not test install a rom zip, another zip yes, like onandroid, superu
[Upgrading, Modifying and Unlocking] marsapa:
Install Only supersu or kingroot

edit:

error by installing the boot tramiyte recovery, but in fact raising the installation of the boot from the zip ends but does not install anything, much less make the full wipe if inserted in the meta