• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] Enable "OK Google" hotword| any language|off line dict| tested on Gnow 3.2.17

Search This thread

memnoc

Inactive Recognized Developer
Feb 23, 2011
4,542
5,209
[GUIDE] Enable "OK Google" hotword| any language|off line dict| tested on Gnow 3.2.17

Screenshots
(take a look at these pictures if you find yourself in trouble with file permission, hex edits, etc. )
https://www.dropbox.com/sh/sj9kopef3v21l3m/wTl1uswAva

I hate long op, so let's get to the point: since Google released the 3.2.x update for Google search, hotword detection has been enabled in many languages, still some languages are missing (as always). Therefore, I decided to create an hack in order to bring the hotword detection for the missing languages, and guess what, I did it ;)
Here's how:
Requirements:

-root
-Google quick search box (GEL is not needed as well as aosp os, I tested this guide on a Sense device, it works perfectly)
-File manager (I will use ES file explorer in this guide)

HOW TO:

METHOD 1
The folder is not needed anymore, plus it seems to brake the offline dictation..this new simplified method should give the same result without breaking the offline dictation

1) Go to data/data/com.google.android.googlequicksearchbox/app_shared_prefs/StartupSettings.bin
2) open the StartupSettings.bin file (*you MUST run Google Now at least once, or this file will be coded into chineese, so unreadable)
3) once opened, locate the line
Code:
micro_hotword.data,OK Google,en-CA,en-US/
change this line (and only this one) to
Code:
micro_hotword.data,OK Google,it-IT,en-US/
*(note that this prefix is for italian only, obviously you have to change it according to your country/language)
4) long pression on the file and give it full permission (like you did for the folder ), save, exit, reboot, and enjoy the hotword working in your language

METHOD 2
(even if the following method is original, turned out that a similar approach has already been used in this guide here, so for the sake of truth, it seems right to me mentioning the guide that was written down before mine)
Why another method?? Because it appears to be cleaner and safer, however, the first one still works plus, it's easier. So use this one just in case you have issues with the first one, but don't forget to use ES file manager and give the proper permission to settings.bin before reboot even if you decide to use this method!
1) download DecHex and Hex Editor from the PlayDevice (both free)
2) DecHex it's useful to find the hex value for your prefix (ex it-IT in ascii become 69 74 2D 49 54 in hex code)
However we have a long list, check it out.
3) use Hex Editor to find en-CA prefix (open the app, navigate till you find data/data/com.google.android.googlequicksearchbox/app_shared_prefs/StartupSettings.bin
open the file, you'll have hex on the left (numbers), ascii (text) on the right
4) click on the magnifing lens and look for en-CA
5) once found out, edit THE CORRESPONDING NUMBERS with the one you obtained from step 2 (you'll see that every number it's a letter actually)
6) once you did it, click on menu (3 dots) save file and reboot
done
Few notes:

-this workaround will work only untill you format data partition, or untill you update Google Now (my current version is 3.2.17.1009776)
-to see if it's really working, try to change in Google Now settings the language to English (Canada). Because of our hack, the hotword shouldn't be available anymore, since we've overwritten the related code line with the one for our language. Also the microphone icon inside the quick search bar, (if you're using GEL launcher) should be now white filled, not empty as before.
-Canadian people might be disappointed, and shouldn't follow this guide LOL
-I tried something like 10 reboots, various Gnow enable/disable, and basically anything that could brake the hack, and for now it seems that it sticks perfectly, hope it will work for you guys too.

Tips and Tricks and Troubleshooting:

-Es file manager is STRONGLY recommended

-If your hotword is setted and working but the widget still shows an empty icon, it means your version of Gnow in data/app and your version of Gnow in system/priv-app (if you're on KK) are NOT the same! This is because you probably flashed a gapps package then updated Gnow through the PlayStore.. In this case, just copy the version from data/app in system/priv-app renaming it 'velvet', give it permissions and reboot. Redo the guide if needed.

-if you use Nova launcher the widget won't respond to the vocal command 'Ok Google '

-if the hack doesn't stick after a reboot, make sure you properly gave permissions to the bin file the same way you did it for the folder

-If you use Es file manager, and you have "read only file system", go to the left-side menu, click on root explorer, a pop up menu will appear, then you can mount the file system in RW (read/write)

-If you use ES file manager, in order to give the right permission to yourcountry-YOURCOUNTRY folder, long pression on the folder/properties, click on the rw---- and flag all of the available permissions

This guide have been tested on my Nexus 5 (KK 4.4.2 kot49h), on a Nexus 4, and on a HTC One S running Sense 5 Android 4.2.2, so GEL launcher is not needed, you just need Google Now.

Prefix list:

Code:
af-ZA Afrikaans - South Africa
sq-ALAlbanian - Albania
ar-DZ Arabic - Algeria
ar-BHArabic - Bahrain
ar-EGArabic - Egypt
ar-IQ        Arabic - Iraq
ar-JO  Arabic - Jordan
ar-KWArabic - Kuwait
ar-LB        Arabic - Lebanon
ar-LY  Arabic - Libya
ar-MAArabic - Morocco
ar-OMArabic - Oman
ar-QAArabic - Qatar
ar-SAArabic - Saudi Arabia
ar-SYArabic - Syria
ar-TN Arabic - Tunisia
ar-AEArabic - United Arab Emirates
ar-YEArabic - Yemen
hy-AMArmenian - Armenia
Cy-az-AZAzeri (Cyrillic) - Azerbaijan 
Lt-az-AZAzeri (Latin) - Azerbaijan 
eu-ESBasque - Basque
be-BYBelarusian - Belarus
bg-BGBulgarian - Bulgaria
ca-ESCatalan - Catalan
zh-CNChinese - China
zh-HKChinese - Hong Kong 
zh-MOChinese - Macau
zh-SGChinese - Singapore
zh-TWChinese - Taiwan
zh-CHSChinese (Simplified) 
zh-CHTChinese (Traditional) 
hr-HRCroatian - Croatia
cs-CZCzech - Czech Republic
da-DKDanish - Denmark
div-MVDhivehi - Maldives 
nl-BEDutch - Belgium
nl-NL        Dutch - The Netherlands 
en-AUEnglish - Australia
en-BZEnglish - Belize
en-CAEnglish - Canada
en-CBEnglish - Caribbean 
en-IE        English - Ireland
en-JMEnglish - Jamaica
en-NZEnglish - New Zealand
en-PHEnglish - Philippines 
en-ZAEnglish - South Africa
en-TTEnglish - Trinidad and Tobago
en-GBEnglish - United Kingdom
en-USEnglish - United States
en-ZWEnglish - Zimbabwe 
et-EEEstonian - Estonia
fo-FOFaroese - Faroe Islands
fa-IR        Farsi - Iran
fi-FI        Finnish - Finland
fr-BE        French - Belgium
fr-CA  French - Canada
fr-FR  French - France 
fr-LU  French - Luxembourg
fr-MC French - Monaco
fr-CH French - Switzerland
gl-ESGalician - Galician 
ka-GEGeorgian - Georgia 
de-ATGerman - Austria
de-DEGerman - Germany 
de-LI        German - Liechtenstein
de-LUGerman - Luxembourg
de-CHGerman - Switzerland
el-GRGreek - Greece
gu-IN        Gujarati - India 
he-IL        Hebrew - Israel
hi-IN        Hindi - India
hu-HUHungarian - Hungary
is-IS   Icelandic - Iceland
id-ID        Indonesian - Indonesia 
it-IT        Italian - Italy 
it-CH Italian - Switzerland
ja-JP       Japanese - Japan
kn-IN        Kannada - India 
kk-KZKazakh - Kazakhstan 
kok-INKonkani - India 
ko-KRKorean - Korea
ky-KZKyrgyz - Kazakhstan 
lv-LV        Latvian - Latvia
lt-LT        Lithuanian - Lithuania
mk-MKMacedonian (FYROM)
ms-BNMalay - Brunei 
ms-MYMalay - Malaysia 
mr-IN        Marathi - India 
mn-MNMongolian - Mongolia 
nb-NONorwegian (Bokmål) - Norway 
nn-NONorwegian (Nynorsk) - Norway 
pl-PL  Polish - Poland
pt-BRPortuguese - Brazil
pt-PT        Portuguese - Portugal 
pa-IN        Punjabi - India 
ro-RORomanian - Romania
ru-RURussian - Russia
sa-IN        Sanskrit - India
Cy-sr-SPSerbian (Cyrillic) - Serbia 
Lt-sr-SPSerbian (Latin) - Serbia 
sk-SKSlovak - Slovakia
sl-SI        Slovenian - Slovenia
es-ARSpanish - Argentina
es-BOSpanish - Bolivia
es-CLSpanish - Chile
es-COSpanish - Colombia
es-CRSpanish - Costa Rica
es-DOSpanish - Dominican Republic
es-ECSpanish - Ecuador
es-SVSpanish - El Salvador
es-GTSpanish - Guatemala
es-HNSpanish - Honduras
es-MXSpanish - Mexico
es-NI        Spanish - Nicaragua
es-PASpanish - Panama
es-PYSpanish - Paraguay
es-PESpanish - Peru
es-PRSpanish - Puerto Rico
es-ESSpanish - Spain 
es-UYSpanish - Uruguay
es-VESpanish - Venezuela
sw-KESwahili - Kenya
sv-FI        Swedish - Finland
sv-SESwedish - Sweden 
syr-SYSyriac - Syria 
ta-IN        Tamil - India 
tt-RU  Tatar - Russia 
te-IN        Telugu - India 
th-TH        Thai - Thailand
tr-TR        Turkish - Turkey
uk-UAUkrainian - Ukraine
ur-PKUrdu - Pakistan
Cy-uz-UZUzbek (Cyrillic) - Uzbekistan 
Lt-uz-UZUzbek (Latin) - Uzbekistan 
vi-VN  Vietnamese - Vietnam

Hexadecimal list
Code:
af-ZA        Afrikaans-SouthAfrica                 61 66 2d 5a 41            
sq-AL        Albanian-Albania                      73 71 2d 41 4c
ar-DZ        Arabic-Algeria                        61 72 2d 44 5a
ar-BH        Arabic-Bahrain                        61 72 2d 42 48
ar-EG        Arabic-Egypt                          61 72 2d 45 47
ar-IQ        Arabic-Iraq                           61 72 2d 49 51
ar-JO        Arabic-Jordan                         61 72 2d 4a 4f
ar-KW        Arabic-Kuwait                         61 72 2d 4b 57
ar-LB        Arabic-Lebanon                        61 72 2d 4c 42
ar-LY        Arabic-Libya                          61 72 2d 4c 59
ar-MA        Arabic-Morocco                        61 72 2d 4d 41
ar-OM        Arabic-Oman                           61 72 2d 4f 4d
ar-QA        Arabic-Qatar                          61 72 2d 51 41
ar-SA        Arabic-SaudiArabia                    61 72 2d 53 41
ar-SY        Arabic-Syria                          61 72 2d 53 59
ar-TN        Arabic-Tunisia                        61 72 2d 54 4e
ar-AE        Arabic-UnitedArabEmirates             61 72 2d 41 45
ar-YE        Arabic-Yemen                          61 72 2d 59 45
hy-AM        Armenian-Armenia                      68 79 2d 41 4d
Cy-az-AZ     Azeri(Cyrillic)-Azerbaijan            43 79 2d 61 7a 2d 41 5a
Lt-az-AZ     Azeri(Latin)-Azerbaijan               4c 74 2d 61 7a 2d 41 5a
eu-ES        Basque-Basque                         65 75 2d 45 53
be-BY        Belarusian-Belarus                    62 65 2d 42 59
bg-BG        Bulgarian-Bulgaria                    62 67 2d 42 47
ca-ES        Catalan-Catalan                       63 61 2d 45 53
zh-CN        Chinese-China                         7a 68 2d 43 4e
zh-HK        Chinese-HongKong                      7a 68 2d 48 4b
zh-MO        Chinese-Macau                         7a 68 2d 4d 4f
zh-SG        Chinese-Singapore                     7a 68 2d 53 47
zh-TW        Chinese-Taiwan                        7a 68 2d 54 57
zh-CHS       Chinese(Simplified)                   7a 68 2d 43 48 53
zh-CHT       Chinese(Traditional)                  7a 68 2d 43 48 54
hr-HR        Croatian-Croatia                      68 72 2d 48 52
cs-CZ        Czech-CzechRepublic                   63 73 2d 43 5a
da-DK        Danish-Denmark                        64 61 2d 44 4b
div-MV       Dhivehi-Maldives                      64 69 76 2d 4d 56
nl-BE        Dutch-Belgium                         6e 6c 2d 42 45
nl-NL        Dutch-TheNetherlands                  6e 6c 2d 4e 4c
en-AU        English-Australia                     65 6e 2d 41 55
en-BZ        English-Belize                        65 6e 2d 42 5a
en-CA        English-Canada                        65 6e 2d 43 41
en-CB        English-Caribbean                     65 6e 2d 43 42
en-IE        English-Ireland                       65 6e 2d 49 45
en-JM        English-Jamaica                       65 6e 2d 4a 4d
en-NZ        English-NewZealand                    65 6e 2d 4e 5a
en-PH        English-Philippines                   65 6e 2d 50 48
en-ZA        English-SouthAfrica                   65 6e 2d 5a 41
en-TT        English-TrinidadandTobago             65 6e 2d 54 54
en-GB        English-UnitedKingdom                 65 6e 2d 47 42
en-US        English-UnitedStates                  65 6e 2d 55 53
en-ZW        English-Zimbabwe                      65 6e 2d 5a 57
et-EE        Estonian-Estonia                      65 74 2d 45 45
fo-FO        Faroese-FaroeIslands                  66 6f 2d 46 4f
fa-IR        Farsi-Iran                            66 61 2d 49 52
fi-FI        Finnish-Finland                       66 69 2d 46 49
fr-BE        French-Belgium                        66 72 2d 42 45
fr-CA        French-Canada                         66 72 2d 43 41
fr-FR        French-France                         66 72 2d 46 52
fr-LU        French-Luxembourg                     66 72 2d 4c 55
fr-MC        French-Monaco                         66 72 2d 4d 43
fr-CH        French-Switzerland                    66 72 2d 43 48
gl-ES        Galician-Galician                     67 6c 2d 45 53
ka-GE        Georgian-Georgia                      6b 61 2d 47 45
de-AT        German-Austria                        64 65 2d 41 54
de-DE        German-Germany                        64 65 2d 44 45
de-LI        German-Liechtenstein                  64 65 2d 4c 49
de-LU        German-Luxembourg                     64 65 2d 4c 55
de-CH        German-Switzerland                    64 65 2d 43 48
el-GR        Greek-Greece                          65 6c 2d 47 52
gu-IN        Gujarati-India                        67 75 2d 49 4e
he-IL        Hebrew-Israel                         68 65 2d 49 4c
hi-IN        Hindi-India                           68 69 2d 49 4e
hu-HU        Hungarian-Hungary                     68 75 2d 48 55
is-IS        Icelandic-Iceland                     69 73 2d 49 53
id-ID        Indonesian-Indonesia                  69 64 2d 49 44
it-IT        Italian-Italy                         69 74 2d 49 54
it-CH        Italian-Switzerland                   69 74 2d 43 48
ja-JP        Japanese-Japan                        6a 61 2d 4a 50
kn-IN        Kannada-India                         6b 6e 2d 49 4e
kk-KZ        Kazakh-Kazakhstan                     6b 6b 2d 4b 5a
kok-IN       Konkani-India                         6b 6f 6b 2d 49 4e
ko-KR        Korean-Korea                          6b 6f 2d 4b 52
ky-KZ        Kyrgyz-Kazakhstan                     6b 79 2d 4b 5a
lv-LV        Latvian-Latvia                        6c 76 2d 4c 56
lt-LT        Lithuanian-Lithuania                  6c 74 2d 4c 54
mk-MK        Macedonian(FYROM)                     6d 6b 2d 4d 4b
ms-BN        Malay-Brunei                          6d 73 2d 42 4e
ms-MY        Malay-Malaysia                        6d 73 2d 4d 59
mr-IN        Marathi-India                         6d 72 2d 49 4e
mn-MN        Mongolian-Mongolia                    6d 6e 2d 4d 4e
nb-NO        Norwegian(Bokmål)-Norway              6e 62 2d 4e 4f
nn-NO        Norwegian(Nynorsk)-Norway             6e 6e 2d 4e 4f
pl-PL        Polish-Poland                         70 6c 2d 50 4c
pt-BR        Portuguese-Brazil                     70 74 2d 42 52
pt-PT        Portuguese-Portugal                   70 74 2d 50 54
pa-IN        Punjabi-India                         70 61 2d 49 4e
ro-RO        Romanian-Romania                      72 6f 2d 52 4f
ru-RU        Russian-Russia                        72 75 2d 52 55
sa-IN        Sanskrit-India                        73 61 2d 49 4e
Cy-sr-SP     Serbian(Cyrillic)-Serbia              43 79 2d 73 72 2d 53 50
Lt-sr-SP     Serbian(Latin)-Serbia                 4c 74 2d 73 72 2d 53 50
sk-SK        Slovak-Slovakia                       73 6b 2d 53 4b
sl-SI        Slovenian-Slovenia                    73 6c 2d 53 49
es-AR        Spanish-Argentina                     65 73 2d 41 52
es-BO        Spanish-Bolivia                       65 73 2d 42 4f
es-CL        Spanish-Chile                         65 73 2d 43 4c
es-CO        Spanish-Colombia                      65 73 2d 43 4f
es-CR        Spanish-CostaRica                     65 73 2d 43 52
es-DO        Spanish-DominicanRepublic             65 73 2d 44 4f
es-EC        Spanish-Ecuador                       65 73 2d 45 43
es-SV        Spanish-ElSalvador                    65 73 2d 53 56
es-GT        Spanish-Guatemala                     65 73 2d 47 54
es-HN        Spanish-Honduras                      65 73 2d 48 4e
es-MX        Spanish-Mexico                        65 73 2d 4d 58
es-NI        Spanish-Nicaragua                     65 73 2d 4e 49
es-PA        Spanish-Panama                        65 73 2d 50 41
es-PY        Spanish-Paraguay                      65 73 2d 50 59
es-PE        Spanish-Peru                          65 73 2d 50 45
es-PR        Spanish-PuertoRico                    65 73 2d 50 52
es-ES        Spanish-Spain                         65 73 2d 45 53
es-UY        Spanish-Uruguay                       65 73 2d 55 59
es-VE        Spanish-Venezuela                     65 73 2d 56 45
sw-KE        Swahili-Kenya                         73 77 2d 4b 45
sv-FI        Swedish-Finland                       73 76 2d 46 49
sv-SE        Swedish-Sweden                        73 76 2d 53 45
syr-SY       Syriac-Syria                          73 79 72 2d 53 59
ta-IN        Tamil-India                           74 61 2d 49 4e
tt-RU        Tatar-Russia                          74 74 2d 52 55
te-IN        Telugu-India                          74 65 2d 49 4e
th-TH        Thai-Thailand                         74 68 2d 54 48
tr-TR        Turkish-Turkey                        74 72 2d 54 52
uk-UA        Ukrainian-Ukraine                     75 6b 2d 55 41
ur-PK        Urdu-Pakistan                         75 72 2d 50 4b
Cy-uz-UZ     Uzbek(Cyrillic)-Uzbekistan            43 79 2d 75 7a 2d 55 5a
Lt-uz-UZ     Uzbek(Latin)-Uzbekistan               4c 74 2d 75 7a 2d 55 5a
vi-VN        Vietnamese-Vietnam                    76 69 2d 56 4e

Tested launchers:

Nova: working except the search bar widget
Apex: working except search bar widget
HTC Sense: fully working
GEL: fully working
KK Launcher (except search bar widget)
Tested devices:

Nexus 5 (kk )
Nexus 4 (kk)
Galaxy Nexus (kk)
Nexus S (Slim Bean Android 4.3.1)
HTC One S (jb 4.2.2)
HTC One X ( Sense 5.0 android 4.2.2)
HTC One
Samsung Galaxy S4+cm11
Motorola Moto Gli (CM 11)

I'd like to thanks the following users for their contribution to the thread:

@Alex_95_Bo for testing this hack on his HTC
@Gu$houn*
@bob8x
@JOKERz
@luettsegler
@raul338
@jonata
@Jaggions
@Belgadon
@lukes91
@rodem77
@mycontradiction


Enjoy:good:
 
Last edited:

teorouge

Senior Member
Jul 29, 2008
2,599
294
39
Trento
Thanks for the advice, I tried on my 4.4.2 HTC One and unfortunately it doesn't work: I do all the things you listed, reboot the phone, but as I launch Google Now it's like I just installed it because I get the tutorial and the file I edited goes back to the unedited version. I even checked the file after the save and before the reboot and it's edited: as soon as I reboot, it goes back to stock. Can you think about something I may have missed or did wrong?
 

memnoc

Inactive Recognized Developer
Feb 23, 2011
4,542
5,209
Thanks for the advice, I tried on my 4.4.2 HTC One and unfortunately it doesn't work: I do all the things you listed, reboot the phone, but as I launch Google Now it's like I just installed it because I get the tutorial and the file I edited goes back to the unedited version. I even checked the file after the save and before the reboot and it's edited: as soon as I reboot, it goes back to stock. Can you think about something I may have missed or did wrong?

Yes, you didn't give the permission to the bin properly, please check the screenshot folder at the beginning of the op and use Es file manager, and it will work

Inviato dal mio Nexus 5 utilizzando Tapatalk
 

jonata

Senior Member
Jul 14, 2007
2,101
116
Casette d'Ete

memnoc

Inactive Recognized Developer
Feb 23, 2011
4,542
5,209
ok, tks a lot ...
;)

---------- Post added at 01:57 PM ---------- Previous post was at 01:08 PM ----------


do all in the guide, but it works only if I put english langiage in Google serach setting ...
where I'm in wrong ?

What Language are you trying to enable?

Inviato dal mio Nexus 5 utilizzando Tapatalk
 

jonata

Senior Member
Jul 14, 2007
2,101
116
Casette d'Ete
Then you have to follow the guide carefully, especially if you're on a nexus 5, see the screenshot folder to see how set permission and try es file manager if your explorer doesn't work

Inviato dal mio Nexus 5 utilizzando Tapatalk
solved now ...
problems was the right permission in folder it-IT
changed also the string en-CA in it-IT with decimal editor
now works like a charme
ths bro
;)
 

memnoc

Inactive Recognized Developer
Feb 23, 2011
4,542
5,209
solved now ...
problems was the right permission in folder it-IT
changed also the string en-CA in it-IT with decimal editor
now works like a charme
ths bro
;)

No need for hex editor, but if you'd like to share what program you used I'll put an advise in op... Glad it's working

Inviato dal mio Nexus 5 utilizzando Tapatalk
 

bob8x

Senior Member
Oct 19, 2008
206
42
I found out you can do it from the phone easily, I'll post the how to later...
PS. I'm curious, is offline dictation working for you guys?

Inviato dal mio Nexus 5 utilizzando Tapatalk


ehm nope, offline or online dictation is setted to english outside google now, despite the fact the tooltip shows "italiano"....

[I'm wandering if there are only italians in this thread...]
 

Dilesh Perera

Senior Member
May 26, 2012
1,795
941
Colombo
hi Bro

nice hack.

im little confused what should i use as prefix for my country . im from Sri Lanka ( and i dont even get Gnow in search too )

:) any suggestions how i do this?
 

memnoc

Inactive Recognized Developer
Feb 23, 2011
4,542
5,209
As I posted in the deleted thread, will this work with offline commands? Elsewhere there's an easier procedure...

Post a link for that procedure, but if it's that one that involves hex editing I already tried it with no success.. Sorry for the deleted thread, according to moderation rules seems I can't post the same thread more than once even in different places

Inviato dal mio Nexus 5 utilizzando Tapatalk
 

memnoc

Inactive Recognized Developer
Feb 23, 2011
4,542
5,209
Hey, thanks A LOT, working great on N4 with czech language /cs-CZ/. :good:


On Nova Prime 2.3 can't access it from homescreen, is it correct according to this quote? On GEL everything works flawlessly.

P.
//EDIT: I have search bar enabled on Nova.

Yes it's ok, unfortunately something in Nova launcher blocks the speech recognition from the widget





ehm nope, offline or online dictation is setted to english outside google now, despite the fact the tooltip shows "italiano"....

[I'm wandering if there are only italians in this thread...]


It doesn't work for me either




hi Bro

nice hack.

im little confused what should i use as prefix for my country . im from Sri Lanka ( and i dont even get Gnow in search too )

:) any suggestions how i do this?

Is your language supported in the language list under the 'voice/language' menu?

Inviato dal mio Nexus 5 utilizzando Tapatalk
 
  • Like
Reactions: Gu$houn*

Top Liked Posts

  • There are no posts matching your filters.
  • 120
    [GUIDE] Enable "OK Google" hotword| any language|off line dict| tested on Gnow 3.2.17

    Screenshots
    (take a look at these pictures if you find yourself in trouble with file permission, hex edits, etc. )
    https://www.dropbox.com/sh/sj9kopef3v21l3m/wTl1uswAva

    I hate long op, so let's get to the point: since Google released the 3.2.x update for Google search, hotword detection has been enabled in many languages, still some languages are missing (as always). Therefore, I decided to create an hack in order to bring the hotword detection for the missing languages, and guess what, I did it ;)
    Here's how:
    Requirements:

    -root
    -Google quick search box (GEL is not needed as well as aosp os, I tested this guide on a Sense device, it works perfectly)
    -File manager (I will use ES file explorer in this guide)

    HOW TO:

    METHOD 1
    The folder is not needed anymore, plus it seems to brake the offline dictation..this new simplified method should give the same result without breaking the offline dictation

    1) Go to data/data/com.google.android.googlequicksearchbox/app_shared_prefs/StartupSettings.bin
    2) open the StartupSettings.bin file (*you MUST run Google Now at least once, or this file will be coded into chineese, so unreadable)
    3) once opened, locate the line
    Code:
    micro_hotword.data,OK Google,en-CA,en-US/
    change this line (and only this one) to
    Code:
    micro_hotword.data,OK Google,it-IT,en-US/
    *(note that this prefix is for italian only, obviously you have to change it according to your country/language)
    4) long pression on the file and give it full permission (like you did for the folder ), save, exit, reboot, and enjoy the hotword working in your language

    METHOD 2
    (even if the following method is original, turned out that a similar approach has already been used in this guide here, so for the sake of truth, it seems right to me mentioning the guide that was written down before mine)
    Why another method?? Because it appears to be cleaner and safer, however, the first one still works plus, it's easier. So use this one just in case you have issues with the first one, but don't forget to use ES file manager and give the proper permission to settings.bin before reboot even if you decide to use this method!
    1) download DecHex and Hex Editor from the PlayDevice (both free)
    2) DecHex it's useful to find the hex value for your prefix (ex it-IT in ascii become 69 74 2D 49 54 in hex code)
    However we have a long list, check it out.
    3) use Hex Editor to find en-CA prefix (open the app, navigate till you find data/data/com.google.android.googlequicksearchbox/app_shared_prefs/StartupSettings.bin
    open the file, you'll have hex on the left (numbers), ascii (text) on the right
    4) click on the magnifing lens and look for en-CA
    5) once found out, edit THE CORRESPONDING NUMBERS with the one you obtained from step 2 (you'll see that every number it's a letter actually)
    6) once you did it, click on menu (3 dots) save file and reboot
    done
    Few notes:

    -this workaround will work only untill you format data partition, or untill you update Google Now (my current version is 3.2.17.1009776)
    -to see if it's really working, try to change in Google Now settings the language to English (Canada). Because of our hack, the hotword shouldn't be available anymore, since we've overwritten the related code line with the one for our language. Also the microphone icon inside the quick search bar, (if you're using GEL launcher) should be now white filled, not empty as before.
    -Canadian people might be disappointed, and shouldn't follow this guide LOL
    -I tried something like 10 reboots, various Gnow enable/disable, and basically anything that could brake the hack, and for now it seems that it sticks perfectly, hope it will work for you guys too.

    Tips and Tricks and Troubleshooting:

    -Es file manager is STRONGLY recommended

    -If your hotword is setted and working but the widget still shows an empty icon, it means your version of Gnow in data/app and your version of Gnow in system/priv-app (if you're on KK) are NOT the same! This is because you probably flashed a gapps package then updated Gnow through the PlayStore.. In this case, just copy the version from data/app in system/priv-app renaming it 'velvet', give it permissions and reboot. Redo the guide if needed.

    -if you use Nova launcher the widget won't respond to the vocal command 'Ok Google '

    -if the hack doesn't stick after a reboot, make sure you properly gave permissions to the bin file the same way you did it for the folder

    -If you use Es file manager, and you have "read only file system", go to the left-side menu, click on root explorer, a pop up menu will appear, then you can mount the file system in RW (read/write)

    -If you use ES file manager, in order to give the right permission to yourcountry-YOURCOUNTRY folder, long pression on the folder/properties, click on the rw---- and flag all of the available permissions

    This guide have been tested on my Nexus 5 (KK 4.4.2 kot49h), on a Nexus 4, and on a HTC One S running Sense 5 Android 4.2.2, so GEL launcher is not needed, you just need Google Now.

    Prefix list:

    Code:
    af-ZA Afrikaans - South Africa
    sq-ALAlbanian - Albania
    ar-DZ Arabic - Algeria
    ar-BHArabic - Bahrain
    ar-EGArabic - Egypt
    ar-IQ        Arabic - Iraq
    ar-JO  Arabic - Jordan
    ar-KWArabic - Kuwait
    ar-LB        Arabic - Lebanon
    ar-LY  Arabic - Libya
    ar-MAArabic - Morocco
    ar-OMArabic - Oman
    ar-QAArabic - Qatar
    ar-SAArabic - Saudi Arabia
    ar-SYArabic - Syria
    ar-TN Arabic - Tunisia
    ar-AEArabic - United Arab Emirates
    ar-YEArabic - Yemen
    hy-AMArmenian - Armenia
    Cy-az-AZAzeri (Cyrillic) - Azerbaijan 
    Lt-az-AZAzeri (Latin) - Azerbaijan 
    eu-ESBasque - Basque
    be-BYBelarusian - Belarus
    bg-BGBulgarian - Bulgaria
    ca-ESCatalan - Catalan
    zh-CNChinese - China
    zh-HKChinese - Hong Kong 
    zh-MOChinese - Macau
    zh-SGChinese - Singapore
    zh-TWChinese - Taiwan
    zh-CHSChinese (Simplified) 
    zh-CHTChinese (Traditional) 
    hr-HRCroatian - Croatia
    cs-CZCzech - Czech Republic
    da-DKDanish - Denmark
    div-MVDhivehi - Maldives 
    nl-BEDutch - Belgium
    nl-NL        Dutch - The Netherlands 
    en-AUEnglish - Australia
    en-BZEnglish - Belize
    en-CAEnglish - Canada
    en-CBEnglish - Caribbean 
    en-IE        English - Ireland
    en-JMEnglish - Jamaica
    en-NZEnglish - New Zealand
    en-PHEnglish - Philippines 
    en-ZAEnglish - South Africa
    en-TTEnglish - Trinidad and Tobago
    en-GBEnglish - United Kingdom
    en-USEnglish - United States
    en-ZWEnglish - Zimbabwe 
    et-EEEstonian - Estonia
    fo-FOFaroese - Faroe Islands
    fa-IR        Farsi - Iran
    fi-FI        Finnish - Finland
    fr-BE        French - Belgium
    fr-CA  French - Canada
    fr-FR  French - France 
    fr-LU  French - Luxembourg
    fr-MC French - Monaco
    fr-CH French - Switzerland
    gl-ESGalician - Galician 
    ka-GEGeorgian - Georgia 
    de-ATGerman - Austria
    de-DEGerman - Germany 
    de-LI        German - Liechtenstein
    de-LUGerman - Luxembourg
    de-CHGerman - Switzerland
    el-GRGreek - Greece
    gu-IN        Gujarati - India 
    he-IL        Hebrew - Israel
    hi-IN        Hindi - India
    hu-HUHungarian - Hungary
    is-IS   Icelandic - Iceland
    id-ID        Indonesian - Indonesia 
    it-IT        Italian - Italy 
    it-CH Italian - Switzerland
    ja-JP       Japanese - Japan
    kn-IN        Kannada - India 
    kk-KZKazakh - Kazakhstan 
    kok-INKonkani - India 
    ko-KRKorean - Korea
    ky-KZKyrgyz - Kazakhstan 
    lv-LV        Latvian - Latvia
    lt-LT        Lithuanian - Lithuania
    mk-MKMacedonian (FYROM)
    ms-BNMalay - Brunei 
    ms-MYMalay - Malaysia 
    mr-IN        Marathi - India 
    mn-MNMongolian - Mongolia 
    nb-NONorwegian (Bokmål) - Norway 
    nn-NONorwegian (Nynorsk) - Norway 
    pl-PL  Polish - Poland
    pt-BRPortuguese - Brazil
    pt-PT        Portuguese - Portugal 
    pa-IN        Punjabi - India 
    ro-RORomanian - Romania
    ru-RURussian - Russia
    sa-IN        Sanskrit - India
    Cy-sr-SPSerbian (Cyrillic) - Serbia 
    Lt-sr-SPSerbian (Latin) - Serbia 
    sk-SKSlovak - Slovakia
    sl-SI        Slovenian - Slovenia
    es-ARSpanish - Argentina
    es-BOSpanish - Bolivia
    es-CLSpanish - Chile
    es-COSpanish - Colombia
    es-CRSpanish - Costa Rica
    es-DOSpanish - Dominican Republic
    es-ECSpanish - Ecuador
    es-SVSpanish - El Salvador
    es-GTSpanish - Guatemala
    es-HNSpanish - Honduras
    es-MXSpanish - Mexico
    es-NI        Spanish - Nicaragua
    es-PASpanish - Panama
    es-PYSpanish - Paraguay
    es-PESpanish - Peru
    es-PRSpanish - Puerto Rico
    es-ESSpanish - Spain 
    es-UYSpanish - Uruguay
    es-VESpanish - Venezuela
    sw-KESwahili - Kenya
    sv-FI        Swedish - Finland
    sv-SESwedish - Sweden 
    syr-SYSyriac - Syria 
    ta-IN        Tamil - India 
    tt-RU  Tatar - Russia 
    te-IN        Telugu - India 
    th-TH        Thai - Thailand
    tr-TR        Turkish - Turkey
    uk-UAUkrainian - Ukraine
    ur-PKUrdu - Pakistan
    Cy-uz-UZUzbek (Cyrillic) - Uzbekistan 
    Lt-uz-UZUzbek (Latin) - Uzbekistan 
    vi-VN  Vietnamese - Vietnam

    Hexadecimal list
    Code:
    af-ZA        Afrikaans-SouthAfrica                 61 66 2d 5a 41            
    sq-AL        Albanian-Albania                      73 71 2d 41 4c
    ar-DZ        Arabic-Algeria                        61 72 2d 44 5a
    ar-BH        Arabic-Bahrain                        61 72 2d 42 48
    ar-EG        Arabic-Egypt                          61 72 2d 45 47
    ar-IQ        Arabic-Iraq                           61 72 2d 49 51
    ar-JO        Arabic-Jordan                         61 72 2d 4a 4f
    ar-KW        Arabic-Kuwait                         61 72 2d 4b 57
    ar-LB        Arabic-Lebanon                        61 72 2d 4c 42
    ar-LY        Arabic-Libya                          61 72 2d 4c 59
    ar-MA        Arabic-Morocco                        61 72 2d 4d 41
    ar-OM        Arabic-Oman                           61 72 2d 4f 4d
    ar-QA        Arabic-Qatar                          61 72 2d 51 41
    ar-SA        Arabic-SaudiArabia                    61 72 2d 53 41
    ar-SY        Arabic-Syria                          61 72 2d 53 59
    ar-TN        Arabic-Tunisia                        61 72 2d 54 4e
    ar-AE        Arabic-UnitedArabEmirates             61 72 2d 41 45
    ar-YE        Arabic-Yemen                          61 72 2d 59 45
    hy-AM        Armenian-Armenia                      68 79 2d 41 4d
    Cy-az-AZ     Azeri(Cyrillic)-Azerbaijan            43 79 2d 61 7a 2d 41 5a
    Lt-az-AZ     Azeri(Latin)-Azerbaijan               4c 74 2d 61 7a 2d 41 5a
    eu-ES        Basque-Basque                         65 75 2d 45 53
    be-BY        Belarusian-Belarus                    62 65 2d 42 59
    bg-BG        Bulgarian-Bulgaria                    62 67 2d 42 47
    ca-ES        Catalan-Catalan                       63 61 2d 45 53
    zh-CN        Chinese-China                         7a 68 2d 43 4e
    zh-HK        Chinese-HongKong                      7a 68 2d 48 4b
    zh-MO        Chinese-Macau                         7a 68 2d 4d 4f
    zh-SG        Chinese-Singapore                     7a 68 2d 53 47
    zh-TW        Chinese-Taiwan                        7a 68 2d 54 57
    zh-CHS       Chinese(Simplified)                   7a 68 2d 43 48 53
    zh-CHT       Chinese(Traditional)                  7a 68 2d 43 48 54
    hr-HR        Croatian-Croatia                      68 72 2d 48 52
    cs-CZ        Czech-CzechRepublic                   63 73 2d 43 5a
    da-DK        Danish-Denmark                        64 61 2d 44 4b
    div-MV       Dhivehi-Maldives                      64 69 76 2d 4d 56
    nl-BE        Dutch-Belgium                         6e 6c 2d 42 45
    nl-NL        Dutch-TheNetherlands                  6e 6c 2d 4e 4c
    en-AU        English-Australia                     65 6e 2d 41 55
    en-BZ        English-Belize                        65 6e 2d 42 5a
    en-CA        English-Canada                        65 6e 2d 43 41
    en-CB        English-Caribbean                     65 6e 2d 43 42
    en-IE        English-Ireland                       65 6e 2d 49 45
    en-JM        English-Jamaica                       65 6e 2d 4a 4d
    en-NZ        English-NewZealand                    65 6e 2d 4e 5a
    en-PH        English-Philippines                   65 6e 2d 50 48
    en-ZA        English-SouthAfrica                   65 6e 2d 5a 41
    en-TT        English-TrinidadandTobago             65 6e 2d 54 54
    en-GB        English-UnitedKingdom                 65 6e 2d 47 42
    en-US        English-UnitedStates                  65 6e 2d 55 53
    en-ZW        English-Zimbabwe                      65 6e 2d 5a 57
    et-EE        Estonian-Estonia                      65 74 2d 45 45
    fo-FO        Faroese-FaroeIslands                  66 6f 2d 46 4f
    fa-IR        Farsi-Iran                            66 61 2d 49 52
    fi-FI        Finnish-Finland                       66 69 2d 46 49
    fr-BE        French-Belgium                        66 72 2d 42 45
    fr-CA        French-Canada                         66 72 2d 43 41
    fr-FR        French-France                         66 72 2d 46 52
    fr-LU        French-Luxembourg                     66 72 2d 4c 55
    fr-MC        French-Monaco                         66 72 2d 4d 43
    fr-CH        French-Switzerland                    66 72 2d 43 48
    gl-ES        Galician-Galician                     67 6c 2d 45 53
    ka-GE        Georgian-Georgia                      6b 61 2d 47 45
    de-AT        German-Austria                        64 65 2d 41 54
    de-DE        German-Germany                        64 65 2d 44 45
    de-LI        German-Liechtenstein                  64 65 2d 4c 49
    de-LU        German-Luxembourg                     64 65 2d 4c 55
    de-CH        German-Switzerland                    64 65 2d 43 48
    el-GR        Greek-Greece                          65 6c 2d 47 52
    gu-IN        Gujarati-India                        67 75 2d 49 4e
    he-IL        Hebrew-Israel                         68 65 2d 49 4c
    hi-IN        Hindi-India                           68 69 2d 49 4e
    hu-HU        Hungarian-Hungary                     68 75 2d 48 55
    is-IS        Icelandic-Iceland                     69 73 2d 49 53
    id-ID        Indonesian-Indonesia                  69 64 2d 49 44
    it-IT        Italian-Italy                         69 74 2d 49 54
    it-CH        Italian-Switzerland                   69 74 2d 43 48
    ja-JP        Japanese-Japan                        6a 61 2d 4a 50
    kn-IN        Kannada-India                         6b 6e 2d 49 4e
    kk-KZ        Kazakh-Kazakhstan                     6b 6b 2d 4b 5a
    kok-IN       Konkani-India                         6b 6f 6b 2d 49 4e
    ko-KR        Korean-Korea                          6b 6f 2d 4b 52
    ky-KZ        Kyrgyz-Kazakhstan                     6b 79 2d 4b 5a
    lv-LV        Latvian-Latvia                        6c 76 2d 4c 56
    lt-LT        Lithuanian-Lithuania                  6c 74 2d 4c 54
    mk-MK        Macedonian(FYROM)                     6d 6b 2d 4d 4b
    ms-BN        Malay-Brunei                          6d 73 2d 42 4e
    ms-MY        Malay-Malaysia                        6d 73 2d 4d 59
    mr-IN        Marathi-India                         6d 72 2d 49 4e
    mn-MN        Mongolian-Mongolia                    6d 6e 2d 4d 4e
    nb-NO        Norwegian(Bokmål)-Norway              6e 62 2d 4e 4f
    nn-NO        Norwegian(Nynorsk)-Norway             6e 6e 2d 4e 4f
    pl-PL        Polish-Poland                         70 6c 2d 50 4c
    pt-BR        Portuguese-Brazil                     70 74 2d 42 52
    pt-PT        Portuguese-Portugal                   70 74 2d 50 54
    pa-IN        Punjabi-India                         70 61 2d 49 4e
    ro-RO        Romanian-Romania                      72 6f 2d 52 4f
    ru-RU        Russian-Russia                        72 75 2d 52 55
    sa-IN        Sanskrit-India                        73 61 2d 49 4e
    Cy-sr-SP     Serbian(Cyrillic)-Serbia              43 79 2d 73 72 2d 53 50
    Lt-sr-SP     Serbian(Latin)-Serbia                 4c 74 2d 73 72 2d 53 50
    sk-SK        Slovak-Slovakia                       73 6b 2d 53 4b
    sl-SI        Slovenian-Slovenia                    73 6c 2d 53 49
    es-AR        Spanish-Argentina                     65 73 2d 41 52
    es-BO        Spanish-Bolivia                       65 73 2d 42 4f
    es-CL        Spanish-Chile                         65 73 2d 43 4c
    es-CO        Spanish-Colombia                      65 73 2d 43 4f
    es-CR        Spanish-CostaRica                     65 73 2d 43 52
    es-DO        Spanish-DominicanRepublic             65 73 2d 44 4f
    es-EC        Spanish-Ecuador                       65 73 2d 45 43
    es-SV        Spanish-ElSalvador                    65 73 2d 53 56
    es-GT        Spanish-Guatemala                     65 73 2d 47 54
    es-HN        Spanish-Honduras                      65 73 2d 48 4e
    es-MX        Spanish-Mexico                        65 73 2d 4d 58
    es-NI        Spanish-Nicaragua                     65 73 2d 4e 49
    es-PA        Spanish-Panama                        65 73 2d 50 41
    es-PY        Spanish-Paraguay                      65 73 2d 50 59
    es-PE        Spanish-Peru                          65 73 2d 50 45
    es-PR        Spanish-PuertoRico                    65 73 2d 50 52
    es-ES        Spanish-Spain                         65 73 2d 45 53
    es-UY        Spanish-Uruguay                       65 73 2d 55 59
    es-VE        Spanish-Venezuela                     65 73 2d 56 45
    sw-KE        Swahili-Kenya                         73 77 2d 4b 45
    sv-FI        Swedish-Finland                       73 76 2d 46 49
    sv-SE        Swedish-Sweden                        73 76 2d 53 45
    syr-SY       Syriac-Syria                          73 79 72 2d 53 59
    ta-IN        Tamil-India                           74 61 2d 49 4e
    tt-RU        Tatar-Russia                          74 74 2d 52 55
    te-IN        Telugu-India                          74 65 2d 49 4e
    th-TH        Thai-Thailand                         74 68 2d 54 48
    tr-TR        Turkish-Turkey                        74 72 2d 54 52
    uk-UA        Ukrainian-Ukraine                     75 6b 2d 55 41
    ur-PK        Urdu-Pakistan                         75 72 2d 50 4b
    Cy-uz-UZ     Uzbek(Cyrillic)-Uzbekistan            43 79 2d 75 7a 2d 55 5a
    Lt-uz-UZ     Uzbek(Latin)-Uzbekistan               4c 74 2d 75 7a 2d 55 5a
    vi-VN        Vietnamese-Vietnam                    76 69 2d 56 4e

    Tested launchers:

    Nova: working except the search bar widget
    Apex: working except search bar widget
    HTC Sense: fully working
    GEL: fully working
    KK Launcher (except search bar widget)
    Tested devices:

    Nexus 5 (kk )
    Nexus 4 (kk)
    Galaxy Nexus (kk)
    Nexus S (Slim Bean Android 4.3.1)
    HTC One S (jb 4.2.2)
    HTC One X ( Sense 5.0 android 4.2.2)
    HTC One
    Samsung Galaxy S4+cm11
    Motorola Moto Gli (CM 11)

    I'd like to thanks the following users for their contribution to the thread:

    @Alex_95_Bo for testing this hack on his HTC
    @Gu$houn*
    @bob8x
    @JOKERz
    @luettsegler
    @raul338
    @jonata
    @Jaggions
    @Belgadon
    @lukes91
    @rodem77
    @mycontradiction


    Enjoy:good:
    6
    Yeah new version seems to break this guide

    edit: got it working. The bin file format apparently is changed, now I changed en-CA to pt-BR (my case) in 2 places:

    in hotword_models_locations and in hotword_supported_locales lines
    3
    Thanks for the advice, I tried on my 4.4.2 HTC One and unfortunately it doesn't work: I do all the things you listed, reboot the phone, but as I launch Google Now it's like I just installed it because I get the tutorial and the file I edited goes back to the unedited version. I even checked the file after the save and before the reboot and it's edited: as soon as I reboot, it goes back to stock. Can you think about something I may have missed or did wrong?
    3
    Thanks for the advice, I tried on my 4.4.2 HTC One and unfortunately it doesn't work: I do all the things you listed, reboot the phone, but as I launch Google Now it's like I just installed it because I get the tutorial and the file I edited goes back to the unedited version. I even checked the file after the save and before the reboot and it's edited: as soon as I reboot, it goes back to stock. Can you think about something I may have missed or did wrong?

    Yes, you didn't give the permission to the bin properly, please check the screenshot folder at the beginning of the op and use Es file manager, and it will work

    Inviato dal mio Nexus 5 utilizzando Tapatalk
    3
    Made a video tutorial for this awesome hack...