Step 1 – Battery
Remove the two Phillips #00 screws from the dock-connector end of the iPhone.
There is a rubber gasket between the silver front bezel and black display assembly. A bit of force is required in this step to separate the iPhone’s display assembly. Use a small suction cup near the Home button to gently pull up the bottom portion of the iPhone’s display assembly
The display assembly is still connected to the iPhone by several cables, so don’t try to remove it entirely just yet. Rotate the display assembly up until it is at an angle of approximately 45 degrees.
Continue to hold the display assembly with one hand, and use your other hand and a spudger to disconnect the black ribbon cable labeled “1.”
Rotate the display assembly up until it is roughly vertical. This will allow easier access for disconnecting the remaining cables. Use a spudger to disconnect the black ribbon cable labeled “2.”
Some iPhone 3Gs may have the connector colors reversed (black plastic tab, white connector). Make sure you’re flipping up the tab properly, otherwise you may damage the connector.
Use a spudger to flip up the white plastic tab holding the remaining ribbon cable in place. The white tab will rotate up 90 degrees, releasing the ribbon cable. Slide the black ribbon cable out of its connector, and remove the display assembly from the iPhone.
Get pdf Installing iPhone 3G Headphone Jack