While I have never flown Air China, my understanding of the United code-share requirement is that you have to buy your ticket from United. United charges more than Air China does for the very same flights, and they won't give you miles if the ticket is bought from Air China alone. AC is not part of Star Alliance and therefore United gets zero revenue (and you get zero miles)if you buy your ticket from AC.