[RECOVERY] Working recovery with UI glitches

rictec

Member
Jan 30, 2011
127
24
where is that recovery source? we can compare it i have a feeling that the problem is on screen rotation
 

SikYou

Member
Dec 25, 2010
180
17
There are multiple references to framebuffer thruoght the kernel. I have spent a lot of time trying to figure out where huwaei went wrong in their implementation. I will look through the msm folder again but there are a lot of changes so its hard to know where the problem is.

Sent from my GSBv1.5-ERIS
 

SikYou

Member
Dec 25, 2010
180
17
where is that recovery source? we can compare it i have a feeling that the problem is on screen rotation

I don't think that orientation is the problem, there are other tablets running clockwork in landscape.

Sent from my S7
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
Implementing this: http://nv-tegra.nvidia.com/gitweb/?...=blob_plain;f=minui/graphics.c;hb=froyo-tegra

Reduces recovery down to one screen, non-duplicated. It still looks squished.

The page flip issue is still present.
VORmk.png
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
In /bootable/recovery/minui/graphics.c
Commenting the line
Code:
gr_active_fb = (gr_active_fb + 1) & 1;
under 'gr_flip' seems to work as a workaround. Not sure if this will screw anything up though.

That fixes the graphical error. Size is squished in half, so it is still pretty beta...

Another weird thing is that my device now automatically boots to recovery even though the boot partition has a working boot.img. I can over-ride this behavior by overwriting boot.img into recovery, but this is weird.

Proof of concept working recovery that doesn't wipe on boot, for version with internal memory and external SD:
http://www.multiupload.com/0JBBOE4NAL

This is pretty broken, but nandroid seems to work. Not sure what else works.

IF YOU WANT TO WRITE THIS IMAGE PERMANENTLY, I STRONGLY RECOMMEND YOU TO FIRST MAKE A BACKUP OF YOUR MISC PARTITION.
 

goodoane

Senior Member
Nov 25, 2010
269
90
Glad to see some light here.
I will gladly help on this but... I do not have a clue what to do. I already set an external hard drive with ubuntu and the source(kernel) but I stoped here. I did search allot on internet about this isue with the framebuffer(no answer).Other problem is the frame per second reported 0.06 frame per second(i think this is wrong too). Nexus one use the same procesor maybe comparing the source code with ours it might help.
Keep the good work.
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
I don't know if we want to touch the kernel's framebuffer anymore, since recovery renders fine right now. Try the image and you'll see what I mean.
 

goodoane

Senior Member
Nov 25, 2010
269
90
I have boot your recovery and it seams to work well even if is work only half the screen.I did a backup of the system and is verry good.
I think the init.rc is not as should be can you check this.It's look like is made for emulator.When I did the backup the pictures with the android box did not look right insted to be white with green were pink like the colors are not been write(coded) correctly.
Some Q:
1:what are the kernel modification(improvements) please.
2:what type of recovery mode did you use?..
3:more detail about the modification if is possible please.
4:why the init.rc look so strange than other relese of recovery mod?
5:did you compiled everything just for this tablet(kernel,recovery,vold,adbd,busybox,etc) or is possible for us to use this from other devices(allready compiled).
Thank you.
on boot
setprop ARGH ARGH
setprop ro.radio.use-ppp no
setprop ro.build.product generic
setprop ro.product.device generic
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
setprop ro.setupwizard.mode EMULATOR
insmod /lib/modules/msm_sdcc.ko
2ng96oj.jpg


The native pixel format on our tablet is RGBA 8888 and the refresh rate is 0.056 frames per second.(this information are provided using a free software from market elixir using the original ROM taiwaneze version known as nonmarket) I belive that they used wrong settings for refresh when they build the kernel.
 
Last edited:

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
There's a bunch of useless stuff in the partition. It is a mashup. Someone who knows what they are doing can take a better look at this.


I didn't really change anything in this kernel. I happened to pack CFQ and my undervolting tweaks for my own device because it happened to be the zImage I had on-hand, but the main changes are in Clockwork recovery itself. At this point, I do not think kernel changes to make recovery work are in line with what we need to do.

Beyond the USB mass storage probably not working, I wonder what else is broken with this mashup.

/bootable/recovery
http://www.multiupload.com/0NKOKYXMN3

/device/huawei/s7
http://www.multiupload.com/E5JQT038SJ
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
With the above recovery image, you can retain a fully working device and perform nandroids. But the caveat is that you either need to stick to a 'fastboot boot' of the recovery image, or you need to have a ready backup of your misc partition to restore.

I think our priority now is first to construct a working update.zip to flash the misc partition back so we can exit out of recovery safely, and to figure out if we can share our misc partitions, or if we have to figure something else out
We also need to devise a method to have users flash the recovery in a easy and repeatable manner
Capable devs should try to work on the actual recovery image so we can remove or add features suitable for the S7


I was able to restore a nandroid.

If you ever enter into 'recovery' from a hot system, your system will fail to bootup to your boot.img upon reading something. I have been able to replicate this, but have not figured out the cause.

My theory is that something is being written into the misc partition.

Edit: Figured it out... It was the misc partition.

The problem
Using any combination to boot into the recovery partition will automatically alter the misc partition to flag a boot into recovery.

Send+menu key combination to start the device does the same thing. Not sure what exactly is done, but the md5sum of the misc partition alters itself after a recovery boot. The device will always default to boot to the recovery partition if the misc partition is not restored to the state before you try to boot into recovery mode via the usual methods. My recovery has renamed commands, so it will never trigger the command to alter the misc partition. This requires further investigation, or we can just choose to ignore it.

Workaround
This is an issue, but we have a workaround as long as you have a backup of your misc partition. Restoring the misc partition removes a flag set that tell the bootloader to boot into recovery with the wipe command. I do not know how to modify this behavior, here is my dirty workaround for it.

You can use a combination of dump_image and flash_image to achieve this.

Here is my backup of my misc partition in case you already screwed yours up like me:
md5sum: a80b802d9ef96c1f318a20c24d6fe3fe
Multiupload.com - upload your files to multiple file hosting sites!

I have a dump of my 'stuck boot into recovery wipe mode' misc partition as well. Someone might want to take a hex editor and examine the differences. I'm happy with the fact that I can do a nandroid and back now :D


If you just fastboot boot my recovery, it will already have the dump_image and flash_image binaries.

Something like this will do the trick...

Backup your current misc partition:
Code:
dump_image misc /sdcard2/misc.orig.img

Restore:
Code:
cat /dev/zero > /dev/mtd/mtd4
flash_image misc /sdcard2/misc.orig.img
(clear up mtd4 because flash_image wont flash the original unless you wipe the partition clean. Error is that the headers are still the same, but we know the contents have been changed)

End Notes

This workaround allows for full nandroid backups. The problem is that you will need a backed up misc partition that is confirmed to work with your device.

It would be beneficial if someone can repack this misc image restore process into a universal update.zip so it can be applied upon user reboots into recovery and wants to exit.

Devs should consider creating an apk that dumps the misc partition as well as flashes a working recovery image to the device together. Then the recovery image should have an option to restore the misc partition.

I just did a full flash to the Singapore ROM and restored a fully working nandroid as proof of concept.



I am thinking that my misc partition is compatible at least with the American Huawei S7s, if not all of them. We need people to experiment with this.

We have gotten to the point that the recovery image is ROM cook ready. Porting over stuff just got a little easier.

This is as far as I'll go for a while. Hopefully, someone can pick up the bits and put this altogether. I do not know how to create that update.zip right now, but I think what we need should be similar to any kernel flashing script, but we flash to misc instead.

(i haven't tested the update.zip flashing functionality of the recovery image yet. this is assuming that it works)
 

joenilan

Senior Member
Feb 4, 2011
208
60
With the above recovery image, you can retain a fully working device and perform nandroids. But the caveat is that you either need to stick to a 'fastboot boot' of the recovery image, or you need to have a ready backup of your misc partition to restore.

...


can you post your nandroid backup and the misc.img that you have to flash along with it to make it boot? i can try and build an update.zip with it where it flashes it all and see what happens?


EDIT: Nevermind, my thought is useless because regardless u have to get into fastboot to use the recovery... which would make no sense to make the recovery flash a zip that has a modified misc.img, thought it would flash the .img, rebooting to recovery you would still lose it, it's not flashing it when you would need to... and maybe i'm just confused and need to over read it ten more times.
 
Last edited:

rictec

Member
Jan 30, 2011
127
24
so my s7 is the model 105 with internal 8GB "sd" card what i need to do to backup whats working and try out this?

why isnt anyone on irc?
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
can you post your nandroid backup and the misc.img that you have to flash along with it to make it boot? i can try and build an update.zip with it where it flashes it all and see what happens?


EDIT: Nevermind, my thought is useless because regardless u have to get into fastboot to use the recovery... which would make no sense to make the recovery flash a zip that has a modified misc.img, thought it would flash the .img, rebooting to recovery you would still lose it, it's not flashing it when you would need to... and maybe i'm just confused and need to over read it ten more times.


You can enter recovery via the key combo menu and send, or use adb reboot recovery.

I am not sure what I should clarify.

You need to kind of try your luck on IRC. I will try to go on...
 

rictec

Member
Jan 30, 2011
127
24
i still can not get it
i put my device on fastboot mode (18d1 google ) with both volumes buttons and power on but i can not adb shell to it (i think this is normal in fastboot mode) and i did not "fastboot boot" your recovery cos you said it flags misc and goes to recovery always so
how can i backup the misc? i cant find a misc with cat /proc/mtd
 
Top