People have often referred to Google, Facebook and Twitter as cases where foreign tech companies are blocked in China. In reality, while Facebook and Twitter were indeed blocked, Google chose to withdraw because they didn’t want to comply with Chinese censorship regulations.

It’s important to note that most foreign tech companies were not blocked, and companies like eBay, Amazon, Viadeo and, of course, Apple and Samsung all entered and competed in China.

EBay was beaten by Alibaba more than a decade ago. Amazon entered China through the acquisition of a local company, Joyo, in 2004, but was never able to build a commanding position in China the way they did in the U.S. Viadeo withdrew in 2015 due to a lack of market traction mostly because of the entry of LinkedIn.

On the other hand, Apple and Samsung have done well in China, despite increasing competition from the Chinese who are chipping off pieces of their pies. More recently, Uber China and Didi Chuxing reached a mutually beneficial deal, though some see it as Uber essentially surrendering the China market to Didi Chuxing.

This all seems to beg the question: Can foreign tech companies win in China?

Clearly, China’s regulatory regime regarding the internet, in particular social media, is far more restrictive than that of the U.S. and many other western countries in general. The “Great Firewall” has proven itself repeatedly to be a thorn in the side of foreign companies, and not all have been able to overcome this hurdle. Most have tried, but with varying degrees of success.

It all comes down to the company’s mindset and willingness to adapt. Some firms decided they didn’t want to play in such a context, like Google, and withdrew their operations. Some want to play but got blocked, like Facebook, yet continue to lobby the government for access. Some were allowed to play but couldn’t quite get their act together (for whatever reason), like Amazon, Viadeo and perhaps even Airbnb. There was also Yihaodian, which was Walmart’s online business, but eventually Walmart sold it to JD.com in exchange for some of JD’s shares.

China is not easy. It’s tough for everyone, no matter if one is foreign or not.

But there are some who seem to “get it,” like LinkedIn (at least for now). They entered the China market in 2014 with a dedicated Chinese site, Lingying, and within two years grew their user base to 20 million subscribers and counting. How did they manage such a feat where several others failed? They adapted to the China context. Not only did they localize by conforming to restrictions on content, they partnered with local firms Sequoia China and China Broadband Capital to further understand the China market.

LinkedIn also created local leadership by hiring a president for LinkedIn China, giving the team more autonomy to integrate and cater to local needs. Examples include collaborating with Tencent’s WeChat so users could link profiles, launching a Chinese business social networking app “Chitu” and planning to release a Chinese version of its Pulse news reader app.

Another such example is Evernote . They, too, found success through a focus on meaningful localization. Not only did they hire locally, they employed localized marketing strategies by leveraging local social media like Weibo and WeChat, and had localized customer service, which supports real-time customer support on the mentioned platforms. They did thorough market research before entering in 2012, and looked to solve the “pain points” of the Chinese consumer, mainly security and privacy. Lastly, they had an easy-to-recall Chinese name (Yinxiang Biji) with a memorable pun. This strategy paid off; within the first year after launch they had 4 million users in China, and by 2015 their user base reached 17 million.

The notion that lower-quality clones sprung up because of foreign tech companies being blocked is only partially right. One could argue that the major Chinese social websites of Baidu, Ren Ren, Sina Weibo and Youku Toudu are clones of Google, Facebook, Twitter and YouTube, respectively. While the likes of Ren Ren weren’t able to replicate Facebook-like success in China, others have evolved beyond being clones to having their own unique, innovative ecosystems.

One such example is WeChat. Though it was originally inspired by Kik, and had similar features to WhatsApp, it evolved from mere messaging to becoming an integral part of the Chinese connected lifestyle. WeChat users can now link their bank cards to WeChat Pay, make in-store payments, transfer money to peers, buy movie tickets, hail taxis, pay for utility bills and so on. In fact, the list is practically endless, and shows how WeChat’s business model has become so powerful, and has grown from being a simple messaging app like WhatsApp (which, incidentally is also not blocked in China, but cannot hope to compete on WeChat’s scale).

Foreign tech players tend not to be as extensive in ecosystem building.

Importantly, Chinese innovators are developing new intellectual capital. They are crafting innovative business models and reaching new frontiers of business strategy and organization. Prime examples include Alibaba and LeEco. Jack Ma has built Alibaba into a sprawling internet business through “multiple jumping” from one business area to another, while building its capabilities along the way through a combination of self-built and collaborative partnerships. This disrupted the conventional “core competence” approach that has ruled modern business for the past 30-odd years.

LeEco is, broadly speaking, a “lifestyle” company, with a diverse ecosystem of infotainment content, smart devices and internet-connected mobility. Many commentators by now have pointed out that Chinese innovators are fast, agile and adaptive. However, these are merely phenomenological observations. At heart, the best and brightest of these innovators are deeply reflective on what the new frontiers of business are, focusing on “how can we get it right and do it well?”

Of course, China’s market for tech companies has evolved significantly for over a decade and a half. When Alibaba was competing with eBay more than a decade ago, China’s tech market was pretty primitive. Alibaba merely used guerrilla warfare tactics based on its grit to defeat a major foreign player. Today, both the market and the players are much more sophisticated and their business approaches are much more refined. The leading Chinese innovators are digital ecosystem players building scale and creating customer stickiness through their entire ecosystem. Foreign tech players tend not to be as extensive in ecosystem building.

To “win,” foreign tech companies need to adapt to the China context and deeply understand the key factors of success. Local leadership is critical and appropriate empowerment by the global headquarters to the local leadership to do the right things is essential. While for some, the market is not open or they are not welcome, for many, the opportunities are right there. China is not easy, but why should it be? It’s tough for everyone, no matter if one is foreign or not. And no one can be sustainably successful if they don’t observe, learn and adapt.

LinkedIn China’s Chitu, for instance, is struggling to get market traction. Evernote, while achieving early success in China, seems to be facing some challenges for sustainable growth, mainly due to lack of premium paid users and growing competition from Chinese startups. In fact, drawing a line on “who’s Chinese and who’s not” is also somewhat artificial, given that Alibaba’s and Tencent’s largest respective shareholders are not Chinese, and some of LinkedIn China’s and Uber China’s key shareholders are Chinese. (Sequoia China, whose parent is a Silicon Valley-headquartered VC fund, has its operations led by Chinese venture capitalist Neil Shen, who has a deep understanding of the China context.)

As China’s digital business grows, it’s going to provide more opportunities for many players. Who “gets it” and who doesn’t will certainly not only be a function of “being blocked or not,” but equally (or even more importantly) those who have the right mindset and approach to the China context (and for that matter, China for the world). To this end, it’s a real test of the leadership and capabilities of the companies, as well as the capital behind them.