yashsingh1/xdaforums huggingface dataset:
[Nexus 6  General] hutzdani:
It does work, as soon as google updates their app in the store its broken and you have to re-flash the older version in recovery.

it seems google is supposed to be fixing this in 5.1 so it might not be worth the effort to update this untill those changes come in as people can always flash there V2 fix after every rom flash or when google now gets updated

I Also find it works better if you Retrain after every flash rather than use any saved data for your OKAY GOOGLE command
[Nexus 6  General] kingston73:
I've been doing this every time and it works for me every time. I've been using dirty unicorns and update every week or so, flash ROM, flash the fix and then flash gapps. Retrain voice and it works fine.
[Nexus 6  General] Marcellus1:
I am one that has never been able to get OK Google to work with the screen off or locked and tried every suggested method in this thread and any others I could find, all to no avail. I just flashed the 5.1 image though and now it works! Hooray!
[Nexus 6  General] crazyjimbo:
Can anyone confirm if this is working with any AOSP 5.1 ROMs?
[Nexus 6  General] simms22:
i think it works with all android 5.1 roms now, i havent read a single complaint about it. not yet at least.
[Nexus 6  General] sykopompos:
I agree with simms, I haven't heard anyone say it isn't working but the files here would have been for 5.0.x Roms and there are newer ones for 5.1 that everyone has integrated in since everyone is either using muppets, mine or some version of either of the 2 which are all the same files for it
[Nexus 6  General] crazyjimbo:
Using the Spring CM12.1 ROM I'm having the issue with no ON Google Everywhere" not working. I can change the voice input settings but would have to do it after each boot.

---------- Post added at 07:45 AM ---------- Previous post was at 07:43 AM ----------

Yeah. This didn't do any harm to my 5.1 installation, but it didn't help at all anyway. I guess I'll just try another 5.1 ROM or go back to my modded stock Nandroid. Thanks!
[Nexus 6  General] freddienux:
OK Google not working! Is there new fix for this? Thx in advance

Sent from my Nexus 6
[Nexus 6  General] srgcrespo1:
nqa

S

v

a

A

[Q thataNqqUOTE=simms22;60036723]i think it works with all android 5.1 roms now, i havent read a single complaint about it. not yet at least.[/QUOTE]
[Nexus 6  General] simms22:
:confused: ???
[Nexus 6  General] freddienux:
Its not working for me! I'm using Bliss rom.

Sent from my Nexus 6
[Nexus 6  General] Rangizingo:
YES. It's infuriating. I have this exact thing on Benzo.
[Nexus 6  General] kingston73:
I think it must be a rom issue for those who can't get it working. I've settled on using 2 roms, DU and AOSIP. DU works fine but when I reboot I have to go to the OK google options, turn it off and turn it back on again to make it work with screen off. AOSIP works every time, reboot, screen off, everything. I haven't used the fix for either of these two. I'm no developer so I have no idea what's different with AOSIP vs anything else, and I haven't tried the other roms mentioned so I can't say if it's your phones specifically or those roms in general.
[Nexus 6  General] Rangizingo:
Seems like it's a ROM/code thing from what I've read. Something about how they're built, a bit over my head. Apparently it's a known issue, I just hope that means there's a fix for it soon.
[Nexus 6  General] wipian:
Okay, it's taken some fiddling but I've managed to create a workaround :)

You'll need tasker and root.

Create a tasker profile that is activated on monitor start.

Assign a task that runs a shell script as root with the following:

(removed, needs more thinking)

Enjoy :)

EDIT: Apologies, not a complete fix, needs more thinking :(
[Nexus 6  General] :
Just installed the zip on Terminus, and though nothing in settings changed, I can use "OK Google" from any screen. Thanks! :good:
[Nexus 6  General] simms22:
you couldnt without it? screen off and not plugged in?
[Nexus 6  General] :
Well, I've been tweaking some things. I had been running Nova but I just stumbled across the Velvet thread and now I've installed that. I had forgotten about the setting in Nova to allow it lol!
[Nexus 6  General] trogper:
Can you PM me the code to have a look at it?

I suppose the hotword doesn't work because of SELinux.
[Nexus 6  General] wipian:
Funny that you should ask as I think I've finally got it working [emoji1]

Try the following and see if it works for you guys:

As before, create a tasker profile that runs on monitor start with the following shell scripts as root.

settings put secure voice_interaction_service test

settings put secure voice_interaction_service com.google.android.googlequicksearchbox/com.google.android.voiceinteraction.GsaVoiceInteractionService
[Nexus 6  General] trogper:
I have executed them via adb, Force Stopped Google app after each command

"Always on" is still grayed out
[Nexus 6  General] wipian:
Yeah, if you force stop the app, it doesn't work.

I did start looking into restarting services to see if that would completely fix it, no joy yet.

My tasker fix works after a reboot though which is half the battle...
[Nexus 6  General] trogper:
Going to [Settings > Input & Language > Voice input] and switching to basic recognition and back to google ungrays the Always on toggle

It let's me into setup, but doesn't detect my voice (something was wrong, timing error)

It worked just fine on Feb builds of CM12.0, but stopped working on Mar CM12.0
[Nexus 6  General] wipian:
That's what I used to do to fix it, hence the tasker fix.

All I did was 'fake' the settings toggle by putting 'test' into the database then switching back to 'enhanced'.

As I said, it now works after reboots which is what I was wanting.

I'll probably look into restarting whatever service needs to be running after a force stop for the toggle to work later [emoji1]
[Nexus 6  General] jlvlawrence:
I don't have any issues with CM 12.1. Is this just a problem on certain ROM'S?
[Nexus 6  General] trogper:
I suppose it's caused by GAPPS distro or ROM's SELinux configuration

running "supolicy --live ....." makes it work until reboot

which gapps do you use?
[Nexus 6  General] u2mir:
Has anyone fixed this?

I'm seeing this problem on the latest AOSIP (RC 9) with 5.1.1.

Driving me nuts. Using multirom, and when I boot to stock-rooted, seems to work without a hitch.

But for both Benzo AND AOSiP ROM, google everywhere is simply not sticking.

Thanks!
[Nexus 6  General] noidea24:
Question. Is all of this just to enable "OK Google" from any screen/while screen is off?

Curious, because on EVERY rom I have flashed I've had no problem with it. This is how I do it.

1) make sure Google search is up to date.

2) find the app called "Google Settings" in your app drawer and open it

3) scroll till you see "search and now" click it.

4) look for "voice" click it.

5) locate and tap ""OK Google" detection"

6) Tick "from the Google all" on. And also Tick "always on" on.

7) it might have you train your voice, make sure there is little background noise and it will make things super easy.

8) Profit?

Again, I only went though the first two or three pages and the last two or three pages. So this might have been brought up somewhere in between. I use Banks Gapps, and have had no problem on any of the following roms with 'OK google' from any screen/screen off

Euphoria

Stock 5.1

Blisspop

Pure nexus

Optipop

Sokp

And maybe some others.
[Nexus 6  General] justibasa:
Running aosip 9.0 with always on working without any flaws using banks gapps.
[Nexus 6  General] gee2012:
Nova Launcher 4.0.2beta2 also supports `OK Google` everywhere (even without root afaik) ;)
[Nexus 6  General] VenomXII:
This is still broken in the most recent version of blisspop. using open Gapps aroma
[Nexus 6  General] DRossigalli:
Is it ok tô use it on another device?
[Nexus 6  General] istperson:
It will work on your other Nexus running AOSP.
[Nexus 6  General] tracker01:
This is not working form either on

[ROM] ► [8.1.0_r14] ► [shamu] ► Nitrogen OS Oreo ► Substratum ► (17.Mar.2018) rom
[Nexus 6  General] keselekupil:
doesn't work on lockscreen
[Nexus 6  General] Strephon Alkhalikoi:
[MENTION=2572113]tracker01[/MENTION]: [MENTION=8572064]keselekupil[/MENTION]: Now that isn't a surprise, given that this thread was started four years ago by a guy who is dearly missed around here, and the flashable zip in question is probably just as old. NO Android 8 ROM has OK Google working with the screen off, and it's unlikely the feature will ever work on Android 8 or later. This is due to Motorola not releasing updated versions of the apps in the flashable zip, something they had to do in order to get the feature working on Android 7.x.

If you have Tasker, you can however mimic the feature with the loss of a few minutes of battery life. See https://www.xda-developers.com/how-to-force-ok-google-hotword-detection-to-work/
[Nexus 6  General] varinder jaswal:
Not working on Oreo
[Nexus 6  General] mnsiw:
I tried 'Always On AMOLED' app, it work fine but with noticeable battery drain, even when on battery saving mode.
[Nexus 6  General] Strephon Alkhalikoi:
I wouldn't know, despite owning a copy of Tasker. I switched to a Pixel 2 XL on Monday.
[Nexus 6  General] varinder jaswal:
wow :) good ?

---------- Post added at 10:55 AM ---------- Previous post was at 10:52 AM ----------

yes thats true.. u can try Saiy app.. that also has good potential..
[Nexus 6  General] darryim:
works

Ok i flashed the zip file and then clear data, now it works everywhere but only with screen on, it won't work with screen off... Damit
[Nexus 6  General] simms22:
oh, so my last idea worked? in settings, apps, all, they should be there.

yea, it works perfectly now, with the screen off, phone asleep :)
[Nexus 6  General] ®AndroidDoctor®:
hmm, some people lose the screen off ability when they wipe data.
[Nexus 6  General] simms22:
maybe you put one of those files in the wrong place? have you tried just rebooting?
[Nexus 6  General] simms22:
thats just weird, again :eek:
[Nexus 6  General] ®AndroidDoctor®:
Yea that's the new problem i'am trying to looking into.
[Nexus 6  General] aoaleman:
This worked on Rastapop, setting permissions and clearing data on Search. Thank you!
[Nexus 6  General] ®AndroidDoctor®:
As soon as u reboot, the voice trainer updates and breaks again. Facepalm

---------- Post added at 11:00 PM ---------- Previous post was at 10:59 PM ----------

Can u try rebooting pls and see if it sticks for u, cause if it does it might be rom related problem
[Nexus 6  General] aoaleman:
Ooh, thanks. I shall reboot and report back.

---------- Post added at 10:07 PM ---------- Previous post was at 10:01 PM ----------

Rebooted and you were right. Tried to reenable, Does not work now.
[Nexus 6  General] ®AndroidDoctor®:
hmmm, i keep looking into it
[Nexus 6  General] aoaleman:
Thank you, AndroidDoctor.
[Nexus 6  General] ®AndroidDoctor®:
Thank You for helping me :o
[Nexus 6  General] simms22:
ok, i just rebooted for the 11th time..

after i booted, i disabled mpdecision, set my max/min cpu speed, and turned my screen off for about 10 seconds. after, i went to check my setting, then i turned my screen off(not plugged in) and tested. it all still works perfectly :confused:
[Nexus 6  General] ®AndroidDoctor®:
This is so weird, idk know why some phones take it and some dont.
[Nexus 6  General] brizey:
SO....figured out the training force close...I think.

You have to both clear data AND force close search. It then takes you through a different setup structure. The record screen is immediately after you flip the switch, and it looks slightly different.

BUT...it does not work when the screen is off. But it does work from the lockscreen. Rebooting now...

Edit...and it did persist through the reboot. Summary: flash the zip, clear data and force close search, set it up, done. Be nice if someone tried that exact sequence. Again, I do not have the screen off capability, but lockscreen capability persisted through a reboot.

Edit: DUHHH

It works from screen off. It has to be plugged in for it to work from screen off, just like stock. I think we done, brahs.
[Nexus 6  General] simms22:
not true. it works with screen off and not plugged in as well. on my n6 its working right.
[Nexus 6  General] brizey:
Weird weird weird. Mine even says "Responds to your voice, works when the screen is on or the device is charging." on the "Ok Google" Detection set up screen.
[Nexus 6  General] simms22:
its not like my screenshot above? uninstall google now, reboot, then reinstall it.
[Nexus 6  General] brizey:
Can't simply uninstall it, it was baked in the gapps I used. It's getting too late now...will start over with a slimmed down gapps package (going to try the simple aosp ones with google dialer).

Thinking maybe this is the issue...different versions of google now floating around.

Mine right now is:

version 4.0.29.1615250.arm
[Nexus 6  General] Smallsmx3:
Same here.... [MENTION=1811927]simms22[/MENTION] what gapps are you using?
[Nexus 6  General] simms22:
im using banks gapps http://fitsnugly.euroskank.com/?rom=banks&device=gapps
[Nexus 6  General] brizey:
I tried it with the banks gapps and rastapop this morning. The Google search is out of date. Tried it with and without updating. Always get the force close on the trigger enroll when it is ready to set up for screen off access.
[Nexus 6  General] simms22:
clear data in settings, apps, all, of those 2 apks added and google search. it should start working.
[Nexus 6  General] brizey:
Done that. Well, sort of, they never have any data to clear. But I went ahead cleared their caches. And by "they" I mean the two training apps.

Edit: Actually, triggerenroll has 32 KB of data, but the clear data button is grayed out.

Edit: Tried using TiBU to clear data...nada.

Edit: And now I tried manually deleting data with root explorer. Still does not work.

But, in other news I think I was able to make a flashable zip that replaces the AOSP dialer with the Google dialer. Does that count?
[Nexus 6  General] hupo224:
Not working over on Slim combined with lean kernel here.
[Nexus 6  General] simms22:
ok, i might be in to something. i just disabled nlplocationreceiverservices with the app disable services, and as soon as i did it stopped working on google now with the screen off. i reenabled them, reboot, and its working again. anyone disable any services/wakelocks that doesnt have it working with screen off?
[Nexus 6  General] LeoRex:
I think it's a licensing issue folks... that's why it works plugged in... The phone will stay awake. To get it to work with the screen off and not plugged in requires use of the low power core functions of the SoC and those functions are propriety and probably licensed from Qualcomm... and most likely not available on any AOSP builds.
[Nexus 6  General] simms22:
my ok google works fine with the screen off and not plugged in :p
[Nexus 6  General] bigant262:
I flashed the zip that was posted, on numerous roms/gapps, and I can't get it to work. Its always the same, either it keeps asking to record or I get the force close message.
[Nexus 6  General] simms22:
clear the data on the 2 apks that it installed, and clear the data for google search.
[Nexus 6  General] bigant262:
I can't seem to find them, they are the trigger apk's right?
[Nexus 6  General] simms22:
triggerEnroll and TriggerTrainingServices
[Nexus 6  General] simms22:
i thing that they might not have any data, so force stop them, google search clear data. reboot after.
[Nexus 6  General] boynamedstacy:
I too flashed the zip and can't find the two trigger apps. Also don't get ok Google with a locked screen :(
[Nexus 6  General] brizey:
I've tried everything. I even manually cleared the data for the two motorola apps by deleting their folders in /data/data. I always get the force close at the end of recording. I have forced closed the apps, I have deleted their folders, I have went in on a fresh install having never used google now, etc. etc. Always get the crash at the end of enrollment.
[Nexus 6  General] simms22:
that is sooo odd. its like 50/50, if itll work right, or fc and stop.
[Nexus 6  General] brizey:
My NlpLocationReceiverService is up and running.
[Nexus 6  General] simms22:
was going to ask.. :p
[Nexus 6  General] brizey:
Its driving me bonkers. There must be some little thing somewhere. Maybe another setting buried somewhere. I may dig through the settings db's again. That's how i figured out how to enable trusted places...found a "smoking gun" field in the GSF database.
[Nexus 6  General] simms22:
ok y'all, if its still not working for you, try this http://xdaforums.com/showpost.php?p=57335716&postcount=295
[Nexus 6  General] bigant262:
I did this, it works, but I don't have the option of saying OK Google from the screen off.

It seems that wiping data from Google Search takes away always on for some reason.
[Nexus 6  General] brizey:
Same for me. Funny thing is I will probably never use the screen off function. I just can't stand trying something and not having it work, lol.
[Nexus 6  General] simms22:
thats one function of the n6 that i personally love and use all the time, the screen off ok google.
[Nexus 6  General] simms22:
so i flashed a new kernel today.. after, ok google stopped working at screen off, and any other screen besides homescreens. so i opened up the google now settings, and those settings were grayed out, again! anyways, even though they were grayed out, i decided to touch them anyways. as soon as i did, they turned on and became ungrayed out :eek:
[Nexus 6  General] bigant262:
Anyone try this and see if it worked? Talking about the Google dialer
[Nexus 6  General] brizey:
Yes, please try it! It worked for me the when I tried it, but I am running one of the stock ROMs now. For all I know I had a peculiar situation and it does not work in general. If it doesn't work, let me know. I am no dev, and may not be able to fix it, but I will at least take the link down. All I did was find all the files in a known-working gapps package that were related to the dialer and stripped it down to just those files, and edited the script to just flash them.
[Nexus 6  General] kingston73:
I tried using Validus rom and this fix, no go. Read every post and tried every method, a couple times it was working fine until I rebooted and then no go. I don't know how much difference different roms and/or kernels make with this? Has anybody gotten it to work 100% everywhere yet?
[Nexus 6  General] simms22:
works 100% everywhere over here, screen off and all, after every reboot as well.
[Nexus 6  General] kingston73:
what rom are you using? Should the rom make any difference at all? I tried it a few different ways, I did the manual transfer, I did the flash/zip file, force closed, etc. and it wouldn't stick through a reboot.
[Nexus 6  General] simms22:
im using rastapop. but its the same for that rom, for some it works now, for some it doesnt, and for some it works until a reboot. i think it works for me because i dirty flashed, and it was working for me beforehand. since i dirty flashed and it was working before, as soon as i added what was missing, my setting for it reappeared and it started working. for those that have to set it up, it usually doesnt last past a reboot. what you can try is clearing data from google search and the play services.
[Nexus 6  General] kingston73:
I didn't try dirty flashing, I wonder if maybe that's the key? Can't hurt to try I guess. I'm currently on stock/rooted/decrypted 21O version, I wonder how many issues I'd have dirty flashing something AOSP over the stock?
[Nexus 6  General] simms22:
i havent had any issues, yet :angel:
[Nexus 6  General] brizey:
I'm thinking this is key. It works fine for me when using sinless. I bet it works with elixir, too. I'm on sinless right now and have it working. Going to try to dirty flash rastapop and see if it works.
[Nexus 6  General] Alex740il:
It works on any stock rom, aosp is the issue... If dirty flashing without formattong /system, just need to see what files were left over (not overwritten). Because it seems aosp is just missing a file(s).
[Nexus 6  General] brizey:
I noticed there are some files in /system/vendor/moto/audiomonitor/sensory that seem to be related. They are raw data files related to the language packs. Keep in mind that when you first do stock AOSP the reason for the grayed out switch is that the language is incompatible. Maybe something amiss here?
[Nexus 6  General] brizey:
Thought of something. I am wondering if there is an issue with the deodexing if the triggerenroll and triggertrainingservice apk's?
[Nexus 6  General] simms22:
no. those i posted are deodexed.
[Nexus 6  General] brizey:
OK... Just a thought as a reason for the force closing.

Another question...Do you have Google Now Launcher installed?
[Nexus 6  General] simms22:
yup, thats the only launcher i use.
[Nexus 6  General] kingston73:
I tried dirty flashing liquidrom over stock and it wouldn't let me. Factory reset and flashed liquid and then the fix and it worked until reboot. After reboot it worked 1 time and then sped.
[Nexus 6  General] antiochasylum:
I was getting the FC at the end as everyone else was. Did this and profit. Everything works and survives a reboot.
[Nexus 6  General] simms22:
sweet!
[Nexus 6  General] Williamsss:
Did you use the flash zip fix or not?
[Nexus 6  General] brizey:
Tried a few more things and nada. I noticed that the stock ROM has links to the libraries instead of the libraries themselves for velvet. The libraries all matched md5's. Tried making them links...nope. Noticed the soundtrigger libsoundtrigger.so was different in the stock ROM vs. AOSP. Swapping it in did not work.

Just to confirm for the non simms22 folks that have it working:

You are on a compiled AOSP ROM like raspop, not stock based like Sinless

It is working with the screen off, not just from any screen, but off and locked
[Nexus 6  General] Aztriltus:
Care to share a bit more details as to how you got it working? What ROM and gapps are you using and did you dirty flash or clean flash?

Afterwards, did you use the flashable zip for the okay Google everywhere and did you have okay Google always on even on screen off without charging?
[Nexus 6  General] varinder jaswal:
I am on lollipop 5.0.1, flashed google now everywhere zip, okay google worked for me, it works on screen off when charging... I have cleared the data from google search and google play services, but not working on screen off without charging...

Okay google everywhere_shamu.zip couldn't be flashed showing installation failed...
[Nexus 6  General] simms22:
im also on 5.0.1, in rastapop to be precise. but your screen differs than mine, i installed all the files msnually, and it works, with screen off not plugged in.
[Nexus 6  General] Aztriltus:
For those who are desperate to get this working, just do the following:

1) Get the LNX07M build (Pre-lollipop) and setup your Google accounts together with Ok Google Everywhere

2) Optional: Flash Papi's stock AOSP rom + gapps + modified boot.img (if not you'll be encrypted!) + OkGoogleEverywhere.zip

2.5) Boot up and you'll find that Ok Google Everywhere is still working

3) Optional: Nandroid this ROM as this will be your starting point for all your custom ROM needs

3) Dirty flash your custom ROM over + gapps + supersu + kernel (optional) + OkGoogleEverywhere.zip (as found in this thread)

4) Boot into your ROM and you'll probably find Ok Google Everywhere would be enabled on boot-up and screen-off Ok Google works w/o charging

Why LNX07M build? I couldn't dirty flash custom ROM over the factory images provided by Google. It gave me black screen with only a back button and battery icon on the status bar.

Why step 2? Sometimes flashing custom ROM over LNX07M would kill the home button, causing some weird bugs. Using Papi's stock ROM made everything more stable I suppose.

So every time you wish to try a new ROM, just restore to your Papi's nandroid and dirty flash from there.

Credit to simms22 for helping me out!
[Nexus 6  General] Guitarfreak26:
Works for me on latest liquid rom after wiping app data too.

Doesnt seem to work with screen off though or is that how its meant to be?