Samsung and Apple have increased their market share and revenues as cheaper rivals see sales slow.