You can exchange $5000 from Bank of China
I think you can bring out any amount of USD. I don't think China Custom cares about it, but you need to claim it to US Custom if > 10,000.
By the way, asking friends to bring cash is NOT a good idea. In case that it is lost for some reason, who should be responsible for it? Why don't you tranfer it through banks?