Jump to content

Acqua-Medion Life P4012 CWM-Custom Recovery


Guest Yurbuh Tuggly

Recommended Posts

Guest KonstaT

Another build for you to test. Used custom graphics for this one and added few more keys to the list to act as select key.

acqua-cwm5504.img

.

md5:5c9245b09b7e004b7f154c10a694c69f

Link to comment
Share on other sites

Guest Yurbuh Tuggly

Another build for you to test. Used custom graphics for this one and added few more keys to the list to act as select key.

First of all, thank you for the effort and time you are putting into this (for a seemingly limited audience at this point).

Tested:

Graphics = good. No more shifting around when scrolling through the menu.

Selection key = still no go. No way to select anything from the main menu

Interesting sub-note: briefly tapping the Power button on the top of the device, puts it into some kind of pause/suspend mode with just the 'hat' CWM logo in the middle. Quickly tapping Power again brings back the main menu.

PS..I don't know if this will help, but booted into the "touch" recovery/Advanced/Key Test and came up with this:

Menu = Key 139

Home = Key 102

Back = Key 158

Search = Key 217

Edited by Yurbuh Tuggly
Link to comment
Share on other sites

Guest SMHenryT

First of all, thank you for the effort and time you are putting into this (for a seemingly limited audience at this point).

The limited audience is developer KonstaT very thankfull! B)

Link to comment
Share on other sites

Guest KonstaT

First of all, thank you for the effort and time you are putting into this (for a seemingly limited audience at this point).

PS..I don't know if this will help, but booted into the "touch" recovery/Advanced/Key Test and came up with this:

Menu = Key 139

Home = Key 102

Back = Key 158

Search = Key 217

No problem, I see this more as a challenge and a chance to teach myself something new (this device is quite different from what I currently play with). ;) That said, here are the last two builds. I really can't do much more without actually having the device. It's really a pain not being able to test any of this myself...

Info about the keycodes brings a bit of bad news. Those cases should already be handled and I have no idea why select key is not working but rest of the buttons are (volumes, power, back). First build has few tweaks here a there and it shouldn't be too different from previous build. Second one is compiled with BOARD_HAS_NO_SELECT_BUTTON and you should be able to use power key as select button.

acqua-recovery1.img

.

md5:b51f0d721e911965f4ea0fec022e23de

acqua-recovery2.img

http://www.mediafire...t6ddvs9cr4312dn

md5:49348a49ad9a5526304240223c01ec7c

Now that you have a backup of your stock recovery partition and you know how to restore it, you might want to test flashing one of these to the actual recovery partition. After that, try booting into recovery with the key combination (vol down + power?, which is it btw?) or using 'adb reboot recovery' and see if it makes any difference.

Link to comment
Share on other sites

Guest Yurbuh Tuggly

No problem, I see this more as a challenge and a chance to teach myself something new (this device is quite different from what I currently play with)..

Info about the keycodes brings a bit of bad news. Those cases should already be handled and I have no idea why select key is not working but rest of the buttons are (volumes, power, back). First build has few tweaks here a there and it shouldn't be too different from previous build. Second one is compiled with BOARD_HAS_NO_SELECT_BUTTON and you should be able to use power key as select button.

Now that you have a backup of your stock recovery partition and you know how to restore it, you might want to test flashing one of these to the actual recovery partition. After that, try booting into recovery with the key combination (vol down + power?, which is it btw?) or using 'adb reboot recovery' and see if it makes any difference.

Challenge it is, indeed. And I feel your pain. I recently had to recompile/edit an APK for somebody that, at the time, I could not even run on my phone (Galaxy Mini). So it was about a million back and forths to get it right.

Results of testing:

R-1 = same...looks good, but no selections possible

(and a slight misunderstanding...Back button has not worked either..only in the semi-working Touch version from builder)

R-2 = good to go! Power as select works just fine.

Did a nandroid and it looks complete and normal: all files present and accounted for in one backup folder with expected sizes.

The only 'mistake' I made was to go into Advanced/Key test to see if I could pick up any more clues for you, and I was stuck. LOL! Had to do a Hold-Power hard reset to get out.

I will be flashing this one since it all seems to work (minus the 4 dead keys).

Great job!

Oh and PS: it's Power and VOL+ to get to normal recovery.

Update:

Flashed R-2, works just fine, rebooted into phone and used Rom Toolbox to do another nandroid (just to see if RT could 'communicate' with it OK)--no problems at all. It's a keeper. IF you want to fiddle more with it to see if you can get the key bindings, I would be happy to be the Guinea Pig...otherwise Job Done as far as I'm concerned.

Edited by Yurbuh Tuggly
Link to comment
Share on other sites

Guest KonstaT

R-2 = good to go! Power as select works just fine.

Did a nandroid and it looks complete and normal: all files present and accounted for in one backup folder with expected sizes.

The only 'mistake' I made was to go into Advanced/Key test to see if I could pick up any more clues for you, and I was stuck. LOL! Had to do a Hold-Power hard reset to get out.

I will be flashing this one since it all seems to work (minus the 4 dead keys).

Great job!

Oh and PS: it's Power and VOL+ to get to normal recovery.

Update:

Flashed R-2, works just fine, rebooted into phone and used Rom Toolbox to do another nandroid (just to see if RT could 'communicate' with it OK)--no problems at all. It's a keeper. IF you want to fiddle more with it to see if you can get the key bindings, I would be happy to be the Guinea Pig...otherwise Job Done as far as I'm concerned.

Great. :D Now the "Back menu button enabled" thing you figured out comes in handy. ;)

Can you test if adb works while in recovery mode? Also could you test if you can you mount your device as usb storage (mounts & storage -> mount usb storage)? There's some logs in /cache/recovery/ that might have some useful info.

There's been some compiling issue with some devices that breaks input keys, but iirc it killed all keys - not just some (had it with Blade at one point too). I might try again with gingerbread branch and cwm 5.0.2.8, but I'm occupied with other things for rest of this week. Of course I'm not perfectly happy with it yet since it doesn't still quite work like it should...

I'd still suggest you'd tried contacting sebastian404. He's got tons of experience on making recoveries. He's done cwm for pretty much every ZTE and Huawei device on this forum. :)

Link to comment
Share on other sites

Guest Yurbuh Tuggly

Can you test if adb works while in recovery mode? Also could you test if you can you mount your device as usb storage (mounts & storage -> mount usb storage)? There's some logs in /cache/recovery/ that might have some useful info.

1) No ADB in recovery mode...no devices listed.

2) No USB mount either..E: Unable to open ums lunfile (no such file or di <text cutoff>

3) Scrolling to get "Back menu button enabled/disabled" has no real effect except to change the text...no actual hardware (soft buttons) are usable.

No rush to do anything. The minor issues still present are not deal breakers for me. Just happy to have options like nandroid finally available.

I don't need it, but for any others that may have this device, do you have a 'zip install' version that may work from the stock recovery? Just thinking that not everybody will be able to deal with ADB on some computers. Lack of drivers, no SDK,.........

Off topic, but one thing I have noticed with this phone..sometimes (usually but not always) on a reboot, the clock is set back to February (don't remember the day) @ 9:00 am. It's inconsistent, but certainly a bit annoying. Common to ZTE's or just odd with this one?

If sebastion404 sees this and wants to do something, I would be happy to assist/test, but otherwise I am more likely not to bother anybody. Yourself included..you have been an enormous help with this, and I do not expect any more.

Link to comment
Share on other sites

Guest KonstaT

1) No ADB in recovery mode...no devices listed.

2) No USB mount either..E: Unable to open ums lunfile (no such file or di <text cutoff>

3) Scrolling to get "Back menu button enabled/disabled" has no real effect except to change the text...no actual hardware (soft buttons) are usable.

I don't need it, but for any others that may have this device, do you have a 'zip install' version that may work from the stock recovery? Just thinking that not everybody will be able to deal with ADB on some computers. Lack of drivers, no SDK,.........

1) Too bad, adb shell could have been useful.

2) lunfile path is probably incorrect, I might have picked the wrong one from the usual two (/sys/devices/platform/usb_mass_storage/lun vs. /sys/devices/platform/msm_hsusb/gadget/lun). Could check which one exists?

3) When enabled, that actually adds a new option to bottom of every menu to go back one level higher in the menu structure. You can now use your power key to select it to go back in the menus. Otherwise it would be difficult without a working hardware back key. That's what I meant. ;)

I don't think I can make a stock recovery flashable zip. It should be signed with ZTE key or it fails to install (lol, this might be where they failed their own update too). Making it into a clockworkmod flashable zip won't help much. :D

Link to comment
Share on other sites

Guest Yurbuh Tuggly

1) Too bad, adb shell could have been useful.

2) lunfile path is probably incorrect, I might have picked the wrong one from the usual two (/sys/devices/platform/usb_mass_storage/lun vs. /sys/devices/platform/msm_hsusb/gadget/lun). Could check which one exists?

3) When enabled, that actually adds a new option to bottom of every menu to go back one level higher in the menu structure. You can now use your power key to select it to go back in the menus. Otherwise it would be difficult without a working hardware back key. That's what I meant. ;)

I don't think I can make a stock recovery flashable zip. It should be signed with ZTE key or it fails to install (lol, this might be where they failed their own update too). Making it into a clockworkmod flashable zip won't help much. :D

Actually:

/sys/devices/platform/msm_hsusb/gadget/lun0 and ...../lun1

Duh. Of course. I did not even notice that, but I certainly was going <Back> a lot. :D

No zippy = no biggie.

Link to comment
Share on other sites

Guest KonstaT

Ok, one more for you to try. This is cwm 5.0.2.8 compiled from CM7 sources. If the harware select keys don't work in this one, I'm going to give up until/if I can get my hands on the actual device.

acqua-cwm5028.img

.

md5:c60e49696b6290c35ee237329043fe63

Link to comment
Share on other sites

Guest Yurbuh Tuggly

Ok, one more for you to try. This is cwm 5.0.2.8 compiled from CM7 sources. If the harware select keys don't work in this one, I'm going to give up until/if I can get my hands on the actual device.

Well.......guess what?

....wait for it.......KEYS WORK!!!!!!!

Menu key= pause/suspend

Home key = select!!

Back key = back!!

It even vibrates on selection which is a nice (and new) confirmation of a key press.

The ONLY thing that does not work (and I am not bothered by this in the least) is USB Mount:

E: Unable to open ums lunfile (is a directory)

Excellent work. Now get busy on your other things. ;)

Link to comment
Share on other sites

Guest KonstaT

Great, this should fix the usb storage mounting. Does adb work? Please report any other issues you come across. That vibrating thing can be annoying in the long run too.

zte-acqua-cwm5028.img

http://www.mediafire...615lw1m3yp3ab8h

md5:231d6dca718bb922029acd8f889caec6

I'll probably start a new thread with instructions/links to drivers/etc for this when I have time to write. I'll also add instructions on how to root via recovery. I also pushed the sources for the recovery to my github.

Link to comment
Share on other sites

Guest Yurbuh Tuggly

Great, this should fix the usb storage mounting. Does adb work? Please report any other issues you come across. That vibrating thing can be annoying in the long run too.

No errors anywhere.

But no ADB and no actual USB mount--nothing shows up on the PC. But both of these may be more due to Win7-64 and this particular phone. It has always been that (even with the stock recovery) when recovery mode is invoked on this phone, it loses connection to the PC.

With a Galaxy Mini I had, this was not the case..so I blame this phone. :P

Link to comment
Share on other sites

Guest Yurbuh Tuggly

I opened a new thread here. Suggestions on making the instructions better are welcome. :)

Looks good. I don't see anything missing.

(and thanks for the Nod..glad to help)

This, of course, is what I was trying to do before I got into my Recovery Nightmare with bad CWMs and a million other things I tried...now it will be SO much easier for others just starting out.

And if anybody has any questions later on, glad to help with those too.

Link to comment
Share on other sites

Guest Sebastian404

I just spotted this thread, good work so far...

Im not sure if its the fcase, with with a lot of ZTE devices they have a 'special' FTM mode to install updates from the USB Card and or use the updater program.

FTM mode does not bother to do somethings like initialize USB and the keyboard (depending on the device), with the other ZTE devices we are replacing FTM with recovery, as there is no way into recovery using a key combination..

Entering recovery via 'adb reboot recovery' leaves the device in a different state from booting the device with VOL+ (or -) held down.

So the way around this is either to re-build the kernel (if the source is available) with CONFIG_ZTE_FTM_FLAG_SUPPORT unset, or to make a little script to check if USB is enabled, and if not do a 'reboot recovery' to get the device into the right mode.

This could be what going on here...

Link to comment
Share on other sites

Guest KonstaT

Yeah, I remember reading something about CONFIG_ZTE_FTM_FLAG_SUPPORT in Blade forum. There is a kernel source available for this device here. I tried compiling it with default config from ZTE N880E (basically this device but with CDMA radio) when the source was initially released. Being a ZTE kernel source, it didn't compile of course. :P I'll probably give it now another shot when I get around. There's probably bunch of other stuff that can also be disabled from recovery kernel?

Issue with input keys is a problem with cwm 5.5.0.4, few other devices seem to suffer from it as well. Remaining issue with the cwm 5.0.2.8 build seems to be the USB connectivity - no adb, no mass storage. Maybe Yurbuh Tuggly or someone else who actually has a device could test if booting into recovery mode with 'adb reboot recovery' makes any difference in this matter? Making a postboot script to reboot the recovery would be a really simple solution for this problem. :)

Link to comment
Share on other sites

Guest Sebastian404

Your right, the kernel wont compile due to a typo, but its fairly easy to fix.

edit arch/arm/mach-msm/board-msm7x27a-zte.c

edit line 45, change it from:

#include <proc_comm.h>
to:
#include "proc_comm.h"[/code]




And that will then compile



As for scripts, here is mine:



[CODE]
#!/sbin/sh
#
##########################################
#History:
#when whom what, where, why
#-------- ---- ---------------------------------------------------
#2010-12-08 sebastian404 horrible, horrible hack
#2011-08-09 sebastian404 slighty better hack, but still horrible
##########################################
FTM_MODE=`/sbin/busybox cat /sys/devices/platform/android_usb/functions/ftm_mode`
if [[ $FTM_MODE = "disable" ]]
then
/sbin/recovery
else
/sbin/reboot recovery &
fi
[/code]

Link to comment
Share on other sites

Guest Yurbuh Tuggly

Maybe Yurbuh Tuggly or someone else who actually has a device could test if booting into recovery mode with 'adb reboot recovery' makes any difference in this matter?

Tested.

No difference, I'm afraid.

As soon as recovery starts to appear on the phone, all connectivity to the PC is lost.

Link to comment
Share on other sites

Guest Sebastian404

I grabbed the update file and took a look at the boot.img..

did you remember to add usbconfig into sbin (and a service for it in init.rc)...

tho looking at it they seem to be just writting to the registers directly from init.rc now

    write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct 2d00
write /sys/class/android_usb/android0/enable 1[/CODE]

I'd do both to be sure.

Link to comment
Share on other sites

Guest KonstaT

Yeah, there even seems to be a separate init script for USB in the stock recovery image. Also usbconfig and usbchangemode are in /sbin but there is no service created for them anywhere. And I indeed am missing idVendor/idProduct/etc in init.rc. It looks like this in the stock recovery:


on property:sys.usb.config=diag
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0112
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/functions diag
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=diag,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0213
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/functions diag,adb
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
start adbd
# Restart adbd so it can run as root
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
[/CODE]

Thanks, I have now few more ideas to sort this out. I'll try to do a new build on the weekend when I have more time to play with kernel and what not...

Link to comment
Share on other sites

Guest KonstaT

Here is a new build for someone to try. Please test adb and mass storage and report back. :)

I compiled kernel from source with CONFIG_ZTE_FTM_FLAG_SUPPORT unset. Otherwise I used default config extracted from the regular kernel. Kernel zImage size dropped from 8.3mb to 3.9mb. Someone might assume that kernel source should match the binary shipped with the device, but no - not with ZTE. :P This is untested of course, so there is a small chance it doesn't even boot.

Also added bunch of stuff for usb and hopefully fixed adb and usb mass storage.

recovery-cwm5028-acqua.img

.

md5:5c5f6b1904690c9a6f0c6a4f54a3d1e5

Link to comment
Share on other sites

Guest Sebastian404

Here is a new build for someone to try. Please test adb and mass storage and report back. :)

I compiled kernel from source with CONFIG_ZTE_FTM_FLAG_SUPPORT unset. Otherwise I used default config extracted from the regular kernel. Kernel zImage size dropped from 8.3mb to 3.9mb. Someone might assume that kernel source should match the binary shipped with the device, but no - not with ZTE. :P

For some reason (probably a typo in the build pipeline) zte are not using ziped kernels, its the same on the blade2 & roamer2, the config produces a ziped kernel images, and the devices will boot with a ziped kernel... Im going to assume they picked the wrong file out of the kernel build directory and no-one has spotted it.

Link to comment
Share on other sites

Guest Yurbuh Tuggly

Here is a new build for someone to try. Please test adb and mass storage and report back. :)

Tested. Both boot-only and flashed...same results.

Upon entering the recovery, Windows found new drivers:

USB Composite Device =Check, ready to use

USB Mass Storage Device =Check, ready to use

Linux File-CD Gadget USB Device =Check, ready to use

$ro.product.model = X, no driver found

USB access--full access to the SD card upon mounting. :D

ADB......sorry, no .No devices attached. :(

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.