1. Remove the SIM card and the MMC card.
2. Turn off your phone.
3. Press and hold the following 3 keys: Green dial key, * Star key, no. 3 key on keypad Together.
4. Turn your device on while you are pressing the three buttons.
5. You should now see "Formatting .." on the screen.
Another method:
You can remove the mmc but keep the sim card and restart your phone.
1. Then press the keys *#7370#.
2. The phone would ask you for a confirmation.
3. Select YES.
4. Then it will ask for a code.
5. The code is 12345 (the default).