Eakrin 's Blog (บล็อกของเอก)

Unofficial A780 & A1200 & Rokr E6 software developer

How to edit your A780, E680/i 's cg35 with your phone and M$ Windows with cygwin installed

, , ,

what is cg35? cg35 is one part of firmware in your phone that storage local program for each country. cg35 is in /usr/language in phone and contain default themes, default wallpapers, default ringtones, font, language input libraries, vr libraries, and preload programs. this article is how to add theme, font, picture, and sound into your cg35.

This article was written from my experiance and knowledge from MotorolaFans forums. If someone read and try to do like me I do not response for all of damage of your phone.

Requirements.
1. knowledge about Linux file system.
2. PC that installed cygwin with mkcramfs command. you can download cygwin here
3. loop.o module from cyph's flashkit. here
4. 25MB available space in mmc
5. can telnet into your phone.
6. can use linux's command line.


first we need to get cg35 from phone's firmware.

Step to get cg35 from phone.

1. telnet into phone.
2. execute copy command incommandprompt to copy cg35 from phone.

cp /dev/tffsa /mmc/mmca1/cg35.smg

3. wait a moment and you 'll get cg35 in file cg35.smg in MMC.
4. make folder for mounting cg35 file by

mk /mmc/mmca1/cg35

5. copy loop.o to mmc and install loop.o module by

cd /mmc/mmca1
insmod loop.o


6. mount cg35.smg to cg35 folder by

mount -t cramfs -o loop cg35.smg cg35

after that we can go into cg35 folder to look what is inside it but cannot edit.

7. tar cg35 folder by

tar -zcvf cg35.tar.gz cg35

and you 'll got cg35.tar.gz.

8. unmount cg35 folder in phone by

umount cg35

9. move c35.tar.gz to cygwin 's user home folder by Windows Explorer.

10. extract cg35.tar.gz file for editing in cygwin by

tar -zxvf ./cg35.tar.gz

after step 10 we got cg35 files in cg35 folder to edit everything you want.

Step to add theme into cg35.

1. extract theme file (*.mtf) and put it in this folder

animation for GIF animate file.
picture for wallpaper file.
theme/themename for iconres.ezx, skin file, and theme logo file.
appwrite/setup for theme config file (*.dhm)

2. rename theme config file from *.dhm to *.phm
3. edit theme config file in THEME_CONFIG_TABLE

ThemeIconDir = /usr/lanuguage/theme/themename (from step 1)
ThemeLogoIcon = /usr/lanuguage/theme/themename/logofile
ThemeSkinFile = /usr/lanuguage/theme/themename/skinfile

ThemeWallpaperFile = /usr/language/picture/wallpaperfile
ThemePowerUpImage = /usr/language/animation/powerupfile
ThemePowerDownImage = /usr/language/animation/powerdownfile

Change default wallpapers, power on/off Animations, font, Ringtones .

we can change system font by replace AlbanyMotorola.ttf in folder font with your font. for default wallpapers and default ringtones we can add them by put your wallpaper in folder picture and ringtone in folder ringtone.

Font folder -> cg35/font
Wallpaper folder -> cg35/picture
Poweron/off Animation folder -> cg35/animation
Ringtone folder -> cg35/ringtone

default Wallpaper and animation is first file in its' folder sorted by name. if you want old default wallpaper and animation try to rename your another file to display after default one or add ThemePowerUpImage and ThemePowerDownImage into phm file for theme that use default animation.

cg35 have limited size about 12MB (before extract). if you need more available space in cg35 try to remove VR library in vr folder. there contain many of unused vr libraries. or you can remove preload apps. and make them a mpkg package for install to phone or mmc instead.

After edited cg35 we need to create cg35 file to send it back to phone

Step to create smg file (compress rom file) and install to back to phone

1. execute command mkcramfs to create smg file in cygwin.

mkcrmafs cg35 newcg35.smg

2. wait unitl you got newcg35.smg file
3. send newcg35.smg into phone mmc
4. copy newcg35 file into firmware by execute this command in telnet or Qonsole.

cp /mmc/mmca1/newcg35.smg /dev/tffsa

5. wait until copy complete.
6. if you add new theme into cg35. you should delete old theme in ezxlocal and copy new theme into ezxlocal by master reset phone or run this command in telnet.

rm -f /ezxlocal/download/appwrite/setup/*.phm
cp -f /usr/language/theme/*.phm /ezxlocal/download/appwrite/setup


After this your phone 'll have new cg35.


PS. cg36 of E680/i/A780 is cramfs like cg35. can use this method to edit but require flashing to install.

PS. becareful for cg35 file size. It should not bigger that original cg35 size that your got from cp /dev/tffsa command. and for E680i that cannot use Hyper terminal to telnet if your cg35 install fail or wrong theme configuration your phone 'll hang at start up. only flashing can solve this for E680i.


eakrin @ MotorolaFans.com
First publish on April 18, 2006
Revision 1 on July 14, 2006

เรื่องของผม, น้องเอ, และนายแสนดี

Comments

การบูรarthas7 Friday, July 28, 2006 12:13:14 PM

รีบย้ายบ้านเร็วนะคับพี่....รออ่านอยู่คับ

Anonymous Wednesday, November 8, 2006 9:59:49 AM

Anonymous writes: Hello, can i use these steps to edit cg33?

Anonymous Wednesday, November 8, 2006 10:14:37 AM

iniro writes: Hello magic eakrin. The anonymous two previous mensages were mine. First of all sorry for my poor english. I'm from spain. I follow your wonderful steps and i edited my own cg35 but i have three questions. 1.- Can i edit cg33 like cg35? 2.- How can i change default font? i don´t have any .ttf in my /usr/language/fonts, my font is in cg33. Can i have two fonts in cg35 and switch between this two fonts? 3.- Can i delete default1 and default2 themes? i deleted it in cg35 but when i start a780 and after run theme-reset.lin my phone starts with bad icons. 4.- In one time i edited my own cg35 and my phone freeze in hellomoto (bad configuration in themes). I don't know how to restore it with at+99 mode. My solution was reflash entire phone :( Thanks, thanks, thanks eakrin.

Eakrin (Ake หรือ เอก)eakrin Wednesday, November 8, 2006 4:55:08 PM

Hi, iniro
I'm poor in english too. don't warry about it. and about your question

1. I didn't try cg33 because i'm never flash my phone before. but i think it can done with this way like cg35

2. about the font in original cg35 there have a font and use font in /font in cg35 but in a modified firmware i don't know where it moved.

3. theme use a merge system by merge your theme icons with a default icons. default icon file is in /icon in cg35. so you can delete only default 2 and 3. but it give you a little space. if you need more space in cg35 first delete vr library file that you doesn't use. and second delete preload app. about preload app you can copy in out and make it a mpkg in install in diska or mmc like normal app.

4. create text file by wordpad

echo at+mode=99 > com4

and save as telnet.cmd

so plug usb cable to phone and com. and run telnet.cmd. it 's the same as hyperterminal. after this like a normal telnet. com4 is a motorola usb modem. and goto edit ezx_thmee.cfg in ezxlocal and delete some theme in it by linux command or windows explorer.

more info pls goto www.motorolafans.com

have fun with it.
cheer.
eakrin

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies