Kobayashi Ayao tries not to utter a word in her native Japanese when she boards a bus in case people discover her nationality.
The homemaker fears some Chinese passengers may say or do something nasty after the Japanese government bought some of the disputed Diaoyu/Senkaku islands in August 2012, triggering protests and a boycott of Japanese goods across China.
Worries over personal security, as well as China's air pollution and poor food safety, prompted some Japanese friends to head home, Ms Ayao (not her real name) told The Sunday Times. Ms Ayao, 33, who moved to China in June 2012 when her husband took up a job, is staying put - for now.
"Thankfully, there hasn't been much impact on my relationships with Chinese friends, who know there are many people in Japan opposing the Japanese government's actions," she says.
The number of Japanese living in China rose from 140,900 in 2012 to 150,300 last year. For foreigners from countries such as Japan and the Philippines that are locked in territorial spats with China, living on the mainland is akin to tiptoeing around a dragon, though few have had unfortunate encounters.
Filipino Michael Juadiong, 29, a master's student based in southern Shenzhen, does not introduce himself as a Filipino to strangers.
"I never deny it whenever I am asked. I have always believed that I will be able to represent what is good in Filipinos, and a Chinese personally knowing a Filipino will be one way of creating a good impression of my country," he told The Sunday Times, adding that as a foreigner he avoids talking about politics.
Japanese nationals say they do not broach the territorial dispute with their Chinese counterparts.
Mr Kokitsu Yoshihiro, 40, who has lived in China since 1997 and married a Chinese in 1999, avoids discussing the bilateral tensions with Chinese friends and relatives.
"Some have tried to seek my views. I tell them I don't see any point in discussing it since I'm not involved in it," says the Japanese language teacher in Beijing.
Post-doctoral economics student Takashi Nishimaki, 29, who has lived in Beijing since 2004, has had only one chat about the disputed islands, with his lecturer, a Chinese national, who raised it over lunch.
"He blamed it on the United States for leaving behind this legacy problem between China and Japan," says Mr Nishimaki. "I said I agreed and thought it was silly for both countries to be fighting over small islands with no one living there."
Friction between Beijing and Tokyo has pushed the Chinese and Japanese perceptions of each other to record lows, based on the results of an annual poll conducted by the Tokyo-based nonprofit think-tank Genron NPO and the China Daily, released last August.
Among Japanese respondents, 90.1 per cent had unfavourable impressions of China while 92.8 per cent of the Chinese polled felt likewise about Japan.
But Mr Nishimaki lived through an earlier episode of bilateral tensions and says the reality on the ground may be different. Sino-Japanese relations hit a nadir when then Japanese leader Junichiro Koizumi made annual visits to the controversial Yasukuni war shrine during his 2001-2006 tenure.
Mr Nishimaki, who studied the Chinese language before enrolling in economics management at Beihang University, says he did not have any bad experiences then.
"My Chinese classmates and students would even ask if I was okay and urge me to alert them if I was being bullied or attacked."
Mr Nishimaki says his Chinese friends' perceptions of Japanese people have not worsened despite the anti-Japanese rhetoric on Chinese television. "It shows they can draw a line between the actions of a government from that of its people," he says.
Peking University North-east Asian analyst Wang Dong is cheered by the lack of unpleasantness towards Japanese and Filipinos. "I believe no matter what political spat the two countries have at the government level, people-to-people ties should not be curtailed or, worse, cut off," he says.
Additional reporting by Lina Miao