How long does it take to master reset iphone 3gs 32GB as the apple logo has appeared and the scroll thing appears goes all the way around then the screen turns black and this process goes on again for the last 4 hours?
There is no "Master Reset" function defined for iPhones. Do you mean Reset phone or Restore in iTunes? See page 242 of the (English) User Guide for a description of these functions.
Whatever you mean, 4 hours is way way way way way too long. Please repost with less vague description of what problem(s) the phone had to begin with and what you actually cdid and.
I have attempted the "Erase All content and setting" option just because I wanted to remove the jailbreak and install the latest OS 4.1 Currently the phone is connected to power adapter for the last 5 hours and it keeps looping the apple logo....
Something has gone wrong in the "Erase All Contents" procedure. On a 3GS this should only take a minute or two. Do this:
First, reset your phone:
Press the sleep/wake button & home button at the same time, keep pressing until you(hopefully) see the Apple logo, then release(ignore the slide to power off).
Then, see if you can force the phone into recovery mode:
Leave the USB cable connected to your computer, but NOT your phone, itunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new. In your case, select setup as "new".