[Sources] CWM Based Recovery On-Screen Touch Navigation Controls [Team UtterChaos]

plikmuny

Senior Member
Apr 12, 2012
137
12
38
can i request you people to develope an english based CWM recovery for my SmartQ T30 android tab ?
because it comes preloaded with chinese version of CWM recovery...
atleast tell me how do i change the menu language from chinese to English ?
awaiting your inputs pls....
 

cj360

Senior Member
Oct 24, 2011
1,331
709
0
can i request you people to develope an english based CWM recovery for my SmartQ T30 android tab ?
because it comes preloaded with chinese version of CWM recovery...
atleast tell me how do i change the menu language from chinese to English ?
awaiting your inputs pls....
Your recovery probably has to be remade with your language. Your better of looking in the development forums for your device for how to build recovery for your device. Unless there's a way to change the default language of your recovery.

Sent from my Xperia Play
 

sgt. meow

Senior Member
Dec 21, 2011
4,431
2,980
0
22
Dhaka
If I compile after applying your changes (the 4 commits from your repo) to the .zip file downloaded from the github link in the instructions post, I should get a full touch CWM recovery (like the one in djnilse's vid) right? Not just touch navigation buttons at the bottom, right?
 

Napstar

Inactive Recognized Developer
Aug 20, 2011
398
1,097
0
Pune
Not now! I am busy with other work.

If I compile after applying your changes (the 4 commits from your repo) to the .zip file downloaded from the github link in the instructions post, I should get a full touch CWM recovery (like the one in djnilse's vid) right? Not just touch navigation buttons at the bottom, right?
Find your device developer and have him look at this thread. Because every device is different and my patches will apply only if your cwm tree is perfectly staged to my CWM state.
 
  • Like
Reactions: sgt. meow

sgt. meow

Senior Member
Dec 21, 2011
4,431
2,980
0
22
Dhaka
I'm compiling for the X8. You did one for djnilse. Unfortuantely it was a bit...err.."faulty". So I'd like to do one myself. Would you help me, please?
 

Napstar

Inactive Recognized Developer
Aug 20, 2011
398
1,097
0
Pune
For last few months I was unable to do any development..
I will start porting our sources for CWM v6 from next week onwards!
Also I will try to fix few bugs!!
Lets see... :)

I'm compiling for the X8. You did one for djnilse. Unfortuantely it was a bit...err.."faulty". So I'd like to do one myself. Would you help me, please?
 

Android-Andi

Recognized Contributor
Mar 3, 2013
10,846
29,203
0
andi34.github.io
Thanks @carliv (out of thanks today, i press it later) :) Worked!

There is another issue:
At the Top it should write "CWM-based Recovery v 6.0.4.5" but it only writes "CWM-based Recovery v 6" and "by Napstar" but it only writes "by"

Any Idea for that too?

Edit:
Added some spaces behind "Napstar" and now shown... but not "v6.0.4.5"

 
Last edited:
  • Like
Reactions: Napstar

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,024
0
carliv.eu
Thanks @carliv (out of thanks today, i press it later) :) Worked!

There is another issue:
At the Top it should write "CWM-based Recovery v 6.0.4.5" but it only writes "CWM-based Recovery v 6" and "by Napstar" but it only writes "by"

Any Idea for that too?

Edit:
Added some spaces behind "Napstar" and now shown... but not "v6.0.4.5"
For that look in ui.c for "int ui_start_menu" and focuse at these lines:
Code:
if (text_rows > 0 && text_cols > 0) {
        for (i = 0; i < text_rows; ++i) {
            if (headers[i] == NULL) break;
			remChar = (int)(resX - strlen(headers[i])*CHAR_WIDTH)/[COLOR="Red"](CHAR_WIDTH*2)[/COLOR];            //To centre align text from header
			for (j = 0; j < remChar; j++) {
				strcpy(menu[i]+j, " ");
			}
            strncpy(menu[i]+remChar, headers[i], text_cols- remChar);
            menu[i][text_cols-remChar] = '\0';
Try a lower value for "(CHAR_WIDTH*2).
 

Napstar

Inactive Recognized Developer
Aug 20, 2011
398
1,097
0
Pune
That won't help. (CHAR_WIDTH*2) helps in center aligning the header lines as is mentioned in comments.

Try playing around with
Code:
if (text_rows > 0 && text_cols > 0) {
        for (i = 0; i < text_rows; ++i) {
            if (headers[i] == NULL) break;
                        remChar = (int)(resX - strlen(headers[i])*CHAR_WIDTH)/(CHAR_WIDTH*2);            //To centre align text from header
                        for (j = 0; j < remChar; j++) {
                                strcpy(menu[i]+j, " ");
                        }
            strncpy(menu[i]+remChar, headers[i], [COLOR=Red]text_cols- remChar[/COLOR]);
            menu[i][[COLOR=Red]text_cols-remChar[/COLOR]] = '\0';
        }
        menu_top = i;
In both the places shown i red colored text. I will need to figure out the reason. Till then try changing these values which should serve the purpose.

[EDIT] I guess, it was a mistake to use text_cols-remChar at that place. Replace it with strlen(headers) and let me know if that corrects.

Thanks!

For that look in ui.c for "int ui_start_menu" and focuse at these lines:
Code:
if (text_rows > 0 && text_cols > 0) {
        for (i = 0; i < text_rows; ++i) {
            if (headers[i] == NULL) break;
            remChar = (int)(resX - strlen(headers[i])*CHAR_WIDTH)/[COLOR=Red](CHAR_WIDTH*2)[/COLOR];            //To centre align text from header
            for (j = 0; j < remChar; j++) {
                strcpy(menu[i]+j, " ");
            }
            strncpy(menu[i]+remChar, headers[i], text_cols- remChar);
            menu[i][text_cols-remChar] = '\0';
Try a lower value for "(CHAR_WIDTH*2).
i will try next days again. thanks again for your help!
i am working now on omnirom :)
 
Last edited:

Phil3759

Inactive Recognized Developer
May 30, 2012
9,557
33,049
0
Congrats for this amazing work
You just TWRP-fied CWM GUI

You went into the GUI and touch handling far from all I've done till now
@DooMLoRD suggested that I contact you
I do to congratulate the work you've done

However, just watching through your code changes gives me some bad headache :D
It will be a huge effort on my side to follow with it

In any-case, feel free to ask if you need some info about parts of my code