HOW TO ENABLE HOTWORD “OK GOOGLE” IN ITALIAN, FRENCH, GERMAN, SPANISH AND JAPANESE ON ANDROID DEVICES

by wyatt376

January 1, 2014
Updated on February 11, 2014

SayOkGoogleLittleEN

Hotword “Ok Google” working with the new version of Google Search (v3.2.17 – February 2014)

The procedure shown below was discovered in this days by Ameisentaetowierer and allows you to re-enable the HotWord “Ok Google” in any language that you want (supported from Google Now). The old procedure after the new update of Google Search stopped working.

Succesfully tested on Nexus 4 with android 4.4.2

– Copy from your phone on your PC the file /data/data/com.google.android.googlequicksearchbox/app_shared_prefs/StartupSettings.bin (with adb)

– Open this file with an HEX Editor (such as notepad++ with hex plugin,) and replace all occurrences of the string”en-CA” with the locale-code of your language (it-IT Italian, de-DE German, fr-FR French, es-ES Spanish, ja-Jp Japanese)

– Upload on the phone the file in the same location

– Reboot and that’s all

thanks to Ameisentaetowierer that share it in this post

Old Procedure, working with oldest version of Google Search

This procedure show you the old method to enable the hotword detection of the phrase “Ok Google” in all supported languages by google now for android devices for the first time in the world (! i think).
In my opinion this vocal command is the most fascinating feature introduced in Android KitKat and for the first time i can try it in my language and not only in english!

You can do this procedure directly from your device if you have a rooted file explorer (for example “root explorer”).

If you want to share this method in your blog, web site, forum or others, please write also the source thanks

Tested on

  • Nexus 4 stock
  • Nexus 5 stock
  • Galaxy Nexus with Paranoid Android and kernel mpokang
  • Nexus 7 2013 stock

Prerequisites:

– Android 4.4 or hotword “Ok Google” working only in English (US)

– rooted phone

– 20 MB free space in /system partition (for each languages that you want to enable)

Update: if you create a symbolic link and not a new folder you don’t need this requirement)

OLD PROCEDURE

– open shell from adb

adb shell

– get root and remount /system in write mode

su
mount -o rw,remount /system

– go to /system/usr/srec/ and list content

cd /system/usr/srec
ls -l

– copy the content of folder “en-US” in other folder (create new one in the same path) named like the local code of the language that you want to enable

cp -r en-US it-IT



(Supported languages by standard google now are “it-IT” for italian, “de-DE” for german, “es-ES” spanish, , “ja-JP” japanese, “fr-FR” french)

– fix permissions to the new folder at 755 (the sames of “en-US”)

chmod 755 it-IT

– fix permissions to the files inside this new folder at 644

cd it-IT
chmod 644 *

– re-set /system partition to readonly, close the shell and reboot phone to get the new feature

mount -o ro,remount /system
exit
exit

adb reboot

– after the reboot set the language of your android that you want and try to say “Ok Google”  (if you have GEL Launcher, just try from the home)

Enabling OFFLINE speech recognition:

If you use offline voice data, then you have to follow other steps for their rehabilitation

Following summary of the procedure (tested and working)

– Display the folders in /data/data/com.google.android.googlequicksearchbox/app_g3_models , if it isn’t the folder it-IT (or your language) you have to download the data package offline from section “Settings – Languages – Google Voice Typing – Offline speech recognition ” (will not be installed correctly, but it will download the necessary files )

– Delete from the folder that you have created to enable the hotword ” Ok Google” /system/usr/srec/it-IT the files that you see in the folder /data/data/com.google.android.googlequicksearchbox/app_g3_models/it-IT except the “metadata” file ( which it must remain equal to the original)

– copy all the files in /data/data/com.google.android.googlequicksearchbox/app_g3_models/it-IT in /system/usr/srec/it-IT except for the file “metadata” (which , as just stated, must remain the original one in /system/usr/srec/it-IT)

– fix permissions to 644 for all files in /system/usr/srec/it-IT

– reboot the device

thanks to Ameisentaetowierer

Updates:

1 – you can create a symbolic link to the folder en-US instead of a new folder, is important link the folder directly in the path /system/usr/srec/ and not link folder in other path, here the command to execute and next no permissions fixing is needed

ln -s /system/usr/srec/en-US /system/usr/srec/it-IT

thanks to madnessmike and Jacopo Martini

2 – you can enable hotword also running a flashabile zip from recovery, which goes to replace all of the steps listed above. The zip (since now only for the italian language) can be found at this link [Mod] flashable zip for italian language androidiani.com

thanks to rockky, dryblow and morrigan91

Optional

– before reboot, flush the dalvik-cache

cd /data/dalvik-cache
rm *

– to view in the search bar the hint “Say “Ok Google” (in your language) you have to reinstall the google search, from the market or with command below (the command below is the forced disinstallation from adb, after the execution you can get more google launcher crash, reboot your phone and next you get the upgrade of the launcher , after the upgrade the launcher (and only the launcher) is resetted)

adb uninstall com.google.android.googlequicksearchbox

And then reinstall it from market (Google Search)

Enjoy this fantastic feature!
If you want, you can improve the method leaving a message below

[english] Say “Ok Google”

SayOkGoogleLittleEN

Screenshot_2014-01-01-13-03-51 Screenshot_2014-01-01-12-59-23

[italiano] Pronuncia “Ok Google”

SayOkGoogleLittleIT

screenshot_2014-01-01-12-41-22 screenshot_2014-01-01-12-48-46

[deutsch] “Ok Google” sagen

SayOkGoogleLittleDE

screenshot_2014-01-01-12-41-47 screenshot_2014-01-01-12-44-58

[français] Dites “Ok Google”

SayOkGoogleLittleFR

screenshot_2014-01-01-12-42-26 screenshot_2014-01-01-12-46-54

[español] Di “Ok Google”

SayOkGoogleLittleES

screenshot_2014-01-01-12-43-55 screenshot_2014-01-01-12-45-49

[日本の] OK Googleは言う

SayOkGoogleLittleJA

screenshot_2014-01-01-12-44-15 screenshot_2014-01-01-12-48-25

Advertisements