Beijing - It’s goodbye China, hello virtual reality for Hugo Barra.
After spending three and half years in Beijing leading smartphone-maker Xiaomi global division, Barra is returning to Silicon Valley to head Facebook Inc.’s VR efforts.
He leaves behind an uneven legacy.
Barra, 40, was hired in 2013 from Google, where he worked as head of product management for Android, to oversee Xiaomi’s international expansion.
While he helped boost device sales in India, the company aborted a push into Brazil and its other global efforts have largely stalled.
READ: Facebook hires Xiaomi’s Barra to lead VR efforts
At the same time, Xiaomi lost ground in its home market to domestic competitors like Vivo and Oppo, which worked more effectively with retail stores. Barra arrived with an ambitious vision, but failed to predict and overcome rapid changes in the global smartphone market.
“He did a lot to build up Xiaomi’s mindshare internationally,” said Bryan Ma, vice president for devices research at IDC in Singapore.
“But when you look at the hard numbers, they show mixed results.”
Barra’s surprise exit comes just a couple of weeks after co-founder and CEO Lei Jun said in a letter to employees that the company had recently faced "unforgettable" challenges and now needed to focus on "sustainable growth."
After building its success by selling only online, it’s now developing brick-and-mortar stores in China.
Barra declined to comment for this story, but he cited several accomplishments in social media posts as he departed, including the expansion into India and more than 20 other markets.
A spokesperson for Xiaomi said Thursday he would continue to advise the company "for the indefinite future."
When he first moved from sunny California to smoggy Beijing, Barra brought the world spotlight with him.
Energetic, globe-trotting, and supremely comfortable commanding a conference-hall stage, the Brazilian-born Barra showed Xiaomi how to introduce its expanding line of products - which include fitness bands, ear buds, and air filters - into other countries with a fast-growing middle class.
"He helped to be that ambassador to the rest of the world," said IDC’s Ma.
"He was that enthusiastic, charismatic guy on stage, who helped explain who this Chinese company was."
From 2012 to 2015, Xiaomi’s smartphone sales rose at a furious clip, expanding more than six-fold, powered by online flash sales and savvy social-media.
For parts of 2014 and 2015, Xiaomi ranked first in domestic smartphone sales, and local and international media dubbed the company the Apple of China.
When Barra joined, he hoped to translate that success abroad, identifying India and Brazil as key targets.
READ: Facebook launches Group Video Call through Messenger
The vision was promising enough that in late 2014, Xiaomi was valued at about $45bn, the highest for any startup in the world at the time.
Yet Xiaomi’s position at home soon began slipping. Facing intense competition from Vivo, Oppo and other rivals, Xiaomi dropped from first to fourth among smartphone sellers in China.
While it focused on online sales, its competitors worked to become more prominent in retail stores, where the vast majority of customers still buy phones.
The challenges at home foreshadowed hurdles in other markets.
"To replicate an e-commerce model from China in India or Indonesia is not as easy as it sounds. Every country has a different internet culture," said Edward Tse, a Hong Kong-based business consultant and author of the book "China’s Disruptors," which described the early days of Xiaomi and other Chinese tech upstarts.
By traveling frequently to India - and chronicling his trips on social media - Barra helped to build a smartphone business there with $1bn in annual revenue, an achievement he noted in his farewell Facebook post.
Xiaomi is currently ranked third in the Indian smartphone market, with 9 percent market share, according to Counterpoint Research.
"Hugo spearheaded the idea of how you bring Xiaomi-branded products outside of China," said Gary Rieschel, founding managing partner at Qiming Venture Partners, an early investor in Xiaomi. "He works incredibly hard."
Barra thanked Lei Jun and Xiaomi’s fans in his departure post on Facebook.
“This journey has been nothing short of spectacular in every way,” he wrote, “and I can proudly say that Xiaomi Global is the first baby I helped bring into the world.”
Neil Shah, Counterpoint’s research director in India, thinks Xiaomi’s performance in India may be near peaking.
"There’s almost a ceiling about how much you can sell online. Sixty to seventy percent of the markets are offline," he said.
For online channels, Xiaomi’s margins are razor thin, in India and China alike. Chinese rival Vivo, which works closely with retail stores, has already overtaken Xiaomi in India.
IDC’s Ma says Xiaomi’s prospects in India look positive for the next year, but after that he isn’t so sure.
"The story in India reflects a lot of what has been happening in China, too. As the market shifts toward offline channels, it favors Oppo and Vivo."
According to IDC, India is now Xiaomi’s dominant overseas market - accounting for 62% of its non-China shipments for the first nine months of 2016. Next up is Myanmar, accounting for 16 percent of shipments.
"Myanmar is not exactly the first country that comes to mind when you think of the global smartphone market," said Ma.
After opening with much fanfare in the summer of 2015, Xiaomi’s Brazil office closed last year.
READ: Facebook to fight 'fake news' with new journalism project
The company’s position in Brazilian smartphone sales peaked in the fourth quarter of 2015 and the first quarter of 2016, with about 1% of the market, according to Tina Lu, head of Counterpoint Research for Latin America.
“Everything they were selling, they were selling at a loss," she said.
"Unless you assemble devices locally, you face taxes of about 60 percent."
Xiaomi explored, but never finalized, plans to manufacture devices in Brazil.
A former employee at Xiaomi’s Brazil office, which once employed 23 people, said local management struggled to distinguish itself.
Beyond the pricing and brand challenges, the outpost had a difficult time coordinating strategy with Beijing, the person said.
Replicating Xiaomi’s early success in developing economies turned out to be elusive - with obstacles ranging from Brazil’s heavy taxes on foreign-assembled devices; to patent-infringement lawsuits in India; to the slow adoption of e-commerce in most developing countries compared with China.
READ: Xiaomi just took the Note 7 and made it better
"A lot of people, including myself, once thought that if a Chinese technology company can make it there in China, it can make it anywhere.
But I got that wrong," said Clay Shirky, an associate professor at NYU Shanghai and author of the 2015 book on Xiaomi, “Little Rice: Smartphones, Xiaomi, and the Chinese Dream.”
Now Xiaomi will turn greater attention to fighting for its home turf.
In his recent letter to employers, Lei Jun admitted the company had lost focus as it attempted rapid expansion, into both new products and countries.
"That’s why we must slow our pace, and seriously learn from our mistakes,” he wrote.
Barra isn’t the only executive departing amid the slowdown.
In October, Chen Tong, a vice-president for content at Xiaomi, left the company to join news platform Yidianzixun.
Zhang Jinling, a vice-president managing finance and investments, left to join Baidu Inc. Chen did not respond to a request for comment, and Zhang declined to comment.
“They had some glory days in the past. One can never count them out," said Tse.
"But for them to really come back, they need to do a lot of hard work to rebuild the brand. People in China view it now as a declining brand."
Read Fin24's top stories trending on Twitter: