Help us with English ClockworkMod recovery for Hongmi


Status
Not open for further replies.

redmaner

translators.xiaomi.eu maintainer
Staff member
Jan 12, 2013
537
182
Dear community,

Since the last few days I've been working toghter with ingbrzy to get ClockworkMod recovery (CWM) working on Xiaomi RedRice (Hongmi).

We didn't succeed yet. That's why we ask for help.

Why a new CWM recovery?
This is a logical question. The awnser is simple.
We at miuiandroid.com are all about user support.
A recovery is in some cases the ultimate remedy to fix a device (from death or anything).
We don't believe that this recovery should be in Chinese.

Besides that we are all about open source.
Our code (if it's going to work someday) could be the start for other projects in the future.
So we worked on a CWM recovery from source. But we can't get it to work (yet).

What's wrong?
Currently booting to recovery wipes the modem and IMEI.
No sign of CWM because of bootloop / hang.

We tried many configurations and options but I don't have a clue at the moment.
Because I don't have a Hongmi and my experience in this is nihil I ask for help.

What can I do?
If you have any experience in this I ask you to help us and the community.
Take a look at my device tree. Which can be reached with the link below.

What we know
The recovery binary in /sbin/recovery wipes the modem and IMEI somehow.
I replaced this binary with an empty file and the modem and IMEI where still there after boot.

It could also be the init files, used from stock recovery.

I compared with lots of devices, also older mediatek devices with MT6589 socs, no succes.

The exsisting Chinese CWM is build with sources from Mediatek or Xiaomi.
The build fingerprint is nearly identical compared to the stock recovery image.
Only dates and buildnumbers are diffrent.

We used ramdisk from stock recovery image

Building CWM on top of stock image gives no succes either.
I wrote a script you can test out, it builds fresh compiled CWM on top of exsisting stock recovery image.
Issue
Code:
cd android
. device/xiaomi/hongmi/make_recovery.sh --help

Known problems
- I don't know the exact maximum size for boot and recovery image (if there is a maximum). Currently set to 10mb each.

Sources
Device tree: http://github.com/redmaner/android_device_xiaomi_hongmi
CWM recovery: http://github.com/cyanogenmod/android_bootable_recovery

Thanks in advance
 
Last edited:
I hope someone will be able to do it. Thanks for sharing.

Sent from my MI 2 using Tapatalk 4
 
  • Like
Reactions: MarkHUK
just for info.. we have already working CWM recovery for hongmi but its in Chinese and cant be translated to the English as its hardcoded...
 
Hope we can get some hands on help with this stuff :)
 
The only thing I can do is test the things you want to be tested. Don't have experience in writing.

Sent from my Xiaomi mi2 with Tapatalk. This is why my message could contain spelling mistakes. now Free
 
I wait for kernel sources.
Or clockworkmod/cyanogenmod for faea f2s (which has same chipset)
 
I hope you have success for this project. Unfortunately I can't help, but I can test if you like.
Thanks any way for the effort.
 
It seems that the recovery image for WCDMA version of Hongmi is also in English. Do you think that it works also for TD version???
 
It could also be the init files, used from stock recovery.
[...]
We used ramdisk from stock recovery image
Is this really needed for a recovery? I built CWM for the Mi3 some days ago, and once I got the recovery-fstab correct, it booted up normally -- just needed to integrate the dualsystem support to make it usable.

So, have you tried using just the kernel and nothing else (init-scripts, ramdisk)? Of course this means you need to use real device names in fstab (mmcblk*) for all partitions, but as long as the kernel has all drivers needed for recovery built-in, this should work and eliminate potential causes of problems.

Sure, this could be completely wrong if the ramdisk e.g. contains mmc drivers...
 
Is this really needed for a recovery? I built CWM for the Mi3 some days ago, and once I got the recovery-fstab correct, it booted up normally -- just needed to integrate the dualsystem support to make it usable.

So, have you tried using just the kernel and nothing else (init-scripts, ramdisk)? Of course this means you need to use real device names in fstab (mmcblk*) for all partitions, but as long as the kernel has all drivers needed for recovery built-in, this should work and eliminate potential causes of problems.

Sure, this could be completely wrong if the ramdisk e.g. contains mmc drivers...
Tried but doesn't work. I've tried everything you mention.
Thanks for the input anyway.
This is probably because of MTK platform
 
I've made an english CWM recovery but version 5.5.0.4...i'm testing now, the recovery has booted up, has installed the latest miui an wiped (seems correctly) system data cache etc..
Edit: the recovery work! no sim problem. I'm creating a new thread with the new recovery.
 
Last edited:
That's for dummies, a.k.a. not compiled from source but hacked ramdisk. That shouldn't be the way to get recovery working
I've made cwm for so much MTK devices with this metod, and it worked also for the Hongmi :)
 
Status
Not open for further replies.