First, buy the original [http://www.witrigs.com/replacement-parts-mid-frame-with-small-parts-for-sony-xperia-z-black|full housing replacement with adhesive sticker].
Then, prepare the [http://www.witrigs.com/replacement-parts-battery-cover-sticker-adhesive-for-sony-xperia-z-oem|back cover adhesive sticker] you need, must be original and waterproof.
Next, remove and install the small parts inside carefully and correctly especially pay attention to the headphone jack. If you remove it and you'd better use the glue to fix it when put it back.
At last, press the adhesive stickers between every two parts with much efforts to ensure they are stuck very well.
Sony Xperia Z is not easy to take apart, so be careful enough. Good luck to you!