Xiaomi has spent 16 years growing from a smartphone start-up into a company that writes its own software, builds its own ...