如何擋下觸寶輸入法的COVID-19廣告/How to block Touchpal IME’s COVID-19 ads

In case you’re still using it

Jerry Ho
Jerry Ho

--

Damn it, it’s everywhere

Please check the second half of this article for English version.

從知乎得到的不可考消息與常識判斷,觸寶輸入法早就停止維護更新了。

我想應該很明顯沒有要重新上架的意思,畢竟只做輸入法他們也沒法賺錢。Time to move on.

但如果你像我一樣偏執,死不改變輸入習慣也不想move on,又不在意觸寶後臺送了一卡車隱私統計資料出去,要怎麼處理掉下面這個煩人的廣告?

因為我不太想patch apk,各位會不知道我放了什麼東西進去,感覺髒髒的。所以你有兩條路可以選:

  1. 先使用觸寶內建選項備份詞庫=>wipe 觸寶的應用程式資料=>用Adguard之類會在本地處理流量的VPN/擋廣告軟體,直接block touchpal整隻app的網路連線=>再還原詞庫。

這個解法比較乾淨一些啦,至少你不會因為發現觸寶在背景傳了很多東西感到不爽,可以應對精神潔癖。
缺點大概就是少了server-side的詞庫跟同步備份。

2. htc oem的路徑,其他請自行延伸。
到這個path:

/data/data/com.emoji.keyboard.touchpal.oem/databases/ararat-shm

先chown將此檔案的權限先改成root, 避免又被觸寶蓋回去;然後移除以下這一段即可:

<promoApp fid="IME_OEM_ANDROID_wenzi_oem_weather_2020_0714_01_default"
initialPromptDays='0'
packageOldVersion='-1'
promptTimes='-1'
promptInterval='0'>
<toolbarToast allowClean='false' clickClean='false' ensureNetwork='any'>
<display>&#x26A1;COVID-19</display>
<action action="launchLocalApp" intent="android.intent.action.VIEW" packageName="" data="https://usa.ime.cdn.cootekservice.com/default/webpage/kbd_push_20200622/weather_news/weather_newsInfoti0713.htm" cleanAcknowledge="launched"/>
</toolbarToast>
</promoApp>

反正包在<promoApp></promoApp>裡面的都砍了,就六根清淨了。
當然你也可以選擇整個內容砍掉,我沒測過不負責就是了。

什麼?你說沒有root也想解決這個問題?你要我變魔術喔,你以為我FBI嗎可以進你手機沙盒。

It is * rumored * that the development of Touchpal was no longer active. It’s kinda obvious that you can’t find it on Google Play anymore after being flagged as adware/malware a long time ago. https://www.xda-developers.com/touchpal-keyboard-cootek-google-play-store-disruptive-advertising/

Well they can’t get enough revenue on Touchpal IME, it’s only fair that they abandoned it. Time to move on.

But, what if you are as stubborn as I do, and you don’t wanna change your input method?

This is what you get. Aggressive advertisements.
I’ll tell you how to get rid of it.

I don’t like to provide patched apk for various legal and moral reasons, so here’s two ways that you can patch it out:

  1. Backup your user dict/input behavior file via built-in option=>wipe Touchpal data=>Block the internet connection of the whole Touchpal app via Adguard/some other local VPN with customized rules=>restore input data and your personal settings

This is kinda clean as it also block touchpal from upload some of your * diagnostic data * onto their server. You’ll lose cloudsync and cloud vocabulary, though.

2. Refer to this path (htc oem version, check similar paths for your phone if not found)

/data/data/com.emoji.keyboard.touchpal.oem/databases/ararat-shm

chown this file into…root or whatever you want to prevent Touchpal overwriting our changes.
Remove these lines, surrounded by <promoApp>

<promoApp fid="IME_OEM_ANDROID_wenzi_oem_weather_2020_0714_01_default"
initialPromptDays='0'
packageOldVersion='-1'
promptTimes='-1'
promptInterval='0'>
<toolbarToast allowClean='false' clickClean='false' ensureNetwork='any'>
<display>&#x26A1;COVID-19</display>
<action action="launchLocalApp" intent="android.intent.action.VIEW" packageName="" data="https://usa.ime.cdn.cootekservice.com/default/webpage/kbd_push_20200622/weather_news/weather_newsInfoti0713.htm" cleanAcknowledge="launched"/>
</toolbarToast>
</promoApp>

You can also zero out the file, but I haven’t test it out yet so not recommended.

One last thing: suck it up if you don’t have root on your phone. I don’t have some magical 0 day like FBI agents do, thus I can’t help you enter your application sandbox. Sorry about that.

--

--

Jerry Ho
Jerry Ho

A cryptographer, rigorous defender of civil liberties on blockchain. Trilingual in Mandarin, Japanese and English, I firmly believe in self-sovereign identity.