yashsingh1/xdaforums huggingface dataset:
[Nexus 6  General] sykopompos:
Now I can't guarantee this will work on every n6 aosp ROM. I have a lot of stuff in my builds that might be missing from theirs like mot vr, moto's DSP files and audio utilities files in mine (yes these do tie in)

If a ROM Dev needs them, just check my git under proprietary moto, all the missing files from aosp are there along with where to put the files into the system

https://github.com/The-Ancile-Project/proprietary_vendor/tree/lollipop/moto/shamu
[Nexus 6  General] sykopompos:
And yes, the selinux edit is needed for the sepolicy so it can connect to the socket
[Nexus 6  General] hidea:
I have trouble installing the APKs on this ROM here: http://xdaforums.com/nexus-6/development/daily-stock-cm12-builds-t2988749/page4. It's an unofficial CM12 nightly ROM.

I'll try putting in those missing files you listed on your github, [MENTION=1050103]sykopompos[/MENTION]
[Nexus 6  General] sykopompos:
The apks need to be pushed into priv-apk and permissions set on them. There is a flashable zip earlier in the thread (might be in the op) that you can replace the apks in and rezip and flash that might be easier since it will place them in the right places and set the permissions on it
[Nexus 6  General] hidea:
I GOT IT TO WORK! Flashed it on a unofficial nightly CM12 ROM, through TWRP.

I took the flashable .zip from Post#6 and replace the APKs inside with the ones [MENTION=1050103]sykopompos[/MENTION] just posted.

'OK Google' persists through reboots; with phone locked/unlocked (display off/on), and USB connected/disconnected. Great work, everyone!

I'm attaching the said .zip, I can't take credit for this, as I've only replaced the .apks from post #6.
[Nexus 6  General] sykopompos:
There you go [MENTION=1811927]simms22[/MENTION] now you got a updated zip to put in the op for everyone and we know it will work on cm now too
[Nexus 6  General] venturizhou:
So I flashed the zip, set everything up which is awesome and thanks for your efforts. During screen off I hear the Google Now respond to OK Google with the little beep, is the screen suppose to turn itself on at this point. If so is there anything obvious I might not be enabling if it stays black? Thanks.
[Nexus 6  General] sykopompos:
Yes, the screen turns on when you hear the OK google beep. You might have something in whatever ROM that you have from waking it up though
[Nexus 6  General] hidea:
I'm not entirely sure by what you mean, but 'OK Google' has two different noises it makes. One is when it is called on, and another is when it turns itself off (upon cancel/or timeouts). If you're calling 'OK Google' while your phone is locked/screen off… then OK Google should turn your screen on.
[Nexus 6  General] rougerasha:
it works...

... but not with screen off and unplugged. Im on liquid smooth. Anyone knows why?
[Nexus 6  General] rlsroufe:
Got it working in Terminus ROM after flashing zip. Thanks! One less reason to go back to stock.
[Nexus 6  General] the7thson:
Confirmed! Flashable zip now works on Liquid Smooth (AOSP-based ROM). It wakes up consistently from screen off without being plugged in and persists through reboots, I'm a happy camper :)

Thank you sykopompos and everyone else!!
[Nexus 6  General] dtroup64:
With screen off unplugged? I'm on terminus and it won't work for me.
[Nexus 6  General] rignfool:
You need the lib files from the other post as well...
[Nexus 6  General] rlsroufe:
Works with screen off for me. All i did was flash the zip hidea posted, wiped data from google now, and retrained my voice. I dont know if its necessary but i also have selinux mode changer app to set selinux to permissive. I needed that for viper4android to work.
[Nexus 6  General] analyst28:
Flashed this zip and everything seems to be working well on SLIM. Thanks to all.
[Nexus 6  General] dtroup64:
Very jealous. I know it'll be incorporated in the roms pretty soon, but can't get it to work on Terminus yet. I've cleared Google Search Data, Flashed the Zip, retrained my voice - works everywhere but with screen off.

I've done it the other way. Flashed the Zip, then Cleared the app data, then trained my voice... no go.

Love the feature, but I can wait! :)
[Nexus 6  General] hutzdani:
Flashed on CM 12 Unoffical here with Franco r4 Kernel Selinux Permissive, works when Locked / Sleep and persists through Reboot !

Great work Guys !

This should make it to the news page :good:
[Nexus 6  General] rlsroufe:
Try setting selinux to permissive using the selinux mode changer app and try again.
[Nexus 6  General] dtroup64:
Have it set to permissive. Tried everything so far, except doing a complete clean re-install.. which is what I'll do tonight when I get home from work. Thanks everyone for the suggestions. I'll keep at it!
[Nexus 6  General] rlsroufe:
The other thing I would try before a full wipe is to just flash the ROM over again with Banks gapps and supersu and then flash the OK google zip. only wipe dalvik and cache.
[Nexus 6  General] hutzdani:
It would be great to see the Top page updated its quite messy for people who are looking to flash the MOD you guys have made, this would make it better to grab the right files and know what settings user need to enable regarding Selinux : Permissive e.c.t
[Nexus 6  General] dtroup64:
Clean install did the trick. Again, thanks everyone! All is good now!
[Nexus 6  General] MontAlbert:
I agree. So, if we flash the zip, change selinux modes, do we still have to do the thing with chainfires app for selinux permissions?

---------- Post added at 08:59 AM ---------- Previous post was at 08:42 AM ----------

*edit* wouldn't work for me. Clean install. Flashed the zip. Changed mode to permissive, did the supolicy thing in terminal and still wouldn't record. Cleared data and it saved it but would only give me google now with screen on.

I'm using pa gapps if that makes a difference... Can't see how it should (not a fan of banks gapps these days- I like the aosp stuff replaced)
[Nexus 6  General] sykopompos:
Simms22 has to update the op with all the info, I just provided the fixes that should get it working for everyone on every aosp build
[Nexus 6  General] lichti1901:
Out of the box or do you have to flash the fix?

// AOSP </Terminus Rom> Nexus 6 \\
[Nexus 6  General] sykopompos:
About a page or 2 back, there is a selinux patch commit for it to incorporate into terminus for it to connect to the socket properly when you go to add it in for everyone
[Nexus 6  General] the7thson:
I didn't even have to set SELinux to permissive. I just flashed the zip and it all works now.. I'm on Liquid Smooth (AOSP-based) with ElementalX kernel. It works with screen off (unplugged) and persists through reboots. I have a feeling the kernel had something to do with ultimately allowing this to work.
[Nexus 6  General] rougerasha:
OK after a fresh install of liquid smooth + banks gapps + the ZIP from this thread. All fine! Thanks a lot!
[Nexus 6  General] MontAlbert:
Maybe that's my issue? I've been using sensei kernel... Didn't realise there was anything inside kernel that affected it?
[Nexus 6  General] hidea:
In case anyone is wondering, I flashed mine on CM12, with SELinux == Enforcing.
[Nexus 6  General] kingston73:
No idea what I'm doing wrong but I tried the new zip with slimlp and it didn't work. I clean flashed the rom, flashed supersu, and flashed the zip. Rebooted and set up and then cleared search. Set up voice recognition but with screen off it didn't work.
[Nexus 6  General] the7thson:
It's possible. The easy test is to flash Elemental and try it. You could always go back to your current kernel, it's pretty painless.
[Nexus 6  General] cheami:
it works, kind of, for me. if screen is off for a while (i assume when deep sleep hits), it will take me 2-3 ok googles to get it to work. it is rarely the first ok google when screen has been off for awhile.

when doing ok google with screen off right after i turned it off, it is instant.
[Nexus 6  General] freddienux:
where do i push the apks you provided? and thx you for the fix.
[Nexus 6  General] sykopompos:
There is a updated flash able zip that was made like 2 posts after that. The apks go to priv-app because they are privileged apps
[Nexus 6  General] D-m-x:
Fixed it for me on Liquid Smooth, I've just flashed the latest Zip, no App Wipe or Cache Wipe, just rebooted and i could select both Options.

Also works with Screen Off and after a Reboot! Thanks very much!
[Nexus 6  General] hlxanthus:
Alright guys, I took all this stuff and modified it as required. Also added backup/restore capability with addon.d support. Also seeing as this is kind of a final deal, went ahead and signed the package. Passed this to simms22 for his approval prior to adding it to the OP. But feedback from all of you is good too. Myself, I have never had wide success with the previous fixes. Never survived reboot or with screen off and unplugged. These new files seem to completely fix that. THANKS [MENTION=1050103]sykopompos[/MENTION] !!

Download - OkayGoogleEverywhere_shamu.v2.zip

Simply flash like any other package, and if you are not manually wiping /system, no need to flash again with every rom update!!
[Nexus 6  General] hidea:
Thanks!! I'll flash this v2 instead of the .zip I made when I do a clean flash? Or would you advise to flash this too?
[Nexus 6  General] varinder jaswal:
Hi [MENTION=4129069]hlxanthus[/MENTION]...

Can't download shamu.v2.zip... pl fix the link...thanx
[Nexus 6  General] hlxanthus:
Link is fine for me on mobile chrome browser and is and chrome on my laptop. Don't know what else I can do . .

It is the exact same as yours (which was the exact same as my original flashable besides the new files ?) except I added add-on.d support and a zip signature. No real functional reason to flash unless you flash a lot of nightlies.
[Nexus 6  General] hidea:
I flash nightlies like there's no tomorrow. I guess guess the .zip needs to be re-applied each time I flash a new nightly build?
[Nexus 6  General] hlxanthus:
Hahaha mine doesn't, along as you don't manually wipe /system. It will survive nightly flashes just like gapps packages do.
[Nexus 6  General] sykopompos:
Now that it is all worked out, it will be getting added into all the custom ROMs soon if not in yet
[Nexus 6  General] hidea:
You reckon Cyanogen will include this in their ROM? That'd be amazing if they do!
[Nexus 6  General] sykopompos:
Most likely since it came stock on the n6
[Nexus 6  General] simms22:
ok, im back(sorry), what should go into the op? i see too many files here.. and is it working?
[Nexus 6  General] hidea:
welcome back! anyway, [MENTION=4129069]hlxanthus[/MENTION] has kindly offered an updated .zip (as well as a few additions to the updater-script). Just use the linked on this post Post #242 called OkayGoogleEverywhere_shamu.v2.zip
[Nexus 6  General] simms22:
added to the op
[Nexus 6  General] old_fart:
For me and my N6 running the latest validus rom ( rom is beautiful )

https://plus.google.com/communities...8/stream/cef5cfa7-dd9f-44e6-81c9-d029cb52eb6e

ugg, cannot get it to work . . .
[Nexus 6  General] simms22:
after you flash the zip, try clearing the dats for google search, so it'll make you go through the "voice training"(so it makes you say ok google 3 times).
[Nexus 6  General] hlxanthus:
There is likely something missing in the validus device tree. Might want to point them to sykos tree
[Nexus 6  General] StephenP85:
Works perfectly! Thanks to everyone who worked to get this fixed!
[Nexus 6  General] kingston73:
I don't have any idea what I could be doing wrong but I cannot get this to work with slimlp, even though others on the same rom are saying it's working for them. Is there some trick or method I'm missing? My steps are

flash rom and gappps, reboot.

Setup rom, reboot

Flash elementalx kernel, reboot

Flash anywhere fix, reboot

Clear Google search, go throug the 3 ok Google setup, and I get it working from any screen, will continue after reboot, BUT...nothing I do will make it work with the screen off.
[Nexus 6  General] sykopompos:
Some kernels modify the boot image which contains the sepolicy which could be a factor in it not working with the screen off
[Nexus 6  General] hlxanthus:
I clean flashed slimlp last night. Full wipe (including /system) and flashed everything at once. ROM, Franco kernel, supersu, okaygoogle flashable, then pa gapps. All in one giant install. Booted any everything works fine. Did the same this morning with official cm12, also working as intended.

What [MENTION=1050103]sykopompos[/MENTION] says above may be correct and it is a simple fix, flash another kernel . .
[Nexus 6  General] kingston73:
Thanks for the suggestion, I have it working now on cm with the stock kernel. I'm going to backup and then try flashing elemental kernel and see if that breaks it.
[Nexus 6  General] MontAlbert:
Mine wasn't working after first flashing pure rom.. Then after several reboots ok google stopped working and then after retraining it started working out of the blue. Screen off and everything. So weird. It's like the supolicy took a while to take effect.
[Nexus 6  General] kingston73:
Is it at all possible that the order you flash things in has any effect? I know flashing a kernel will break it and I need to reflash the fix after, but does it matter when you flash gapps vs the fix? I'm just trying to understand why I seem to be having so many issues when it seems easy for everybody else.:confused:
[Nexus 6  General] hlxanthus:
Flashing a kernel before or after makes zero difference. We are talking 4 files within /system.

And you always flash your gapps last, specifically if you use pa gapps like I do.
[Nexus 6  General] lainemac:
Zip worked perfectly!
[Nexus 6  General] sledge3n8:
So flash Gapps

AFTER

flashing the OK Google Everywhere zip? I cannot get mine to persist either. I flashed ROM, Gapps, OK Google fix then booted. I then cleared the cache and data for Google search then cleared cache for Play Services, trained voice and all was good until I rebooted.

Edit: I am running Terminus ROM.
[Nexus 6  General] matteo.gee:
Working on Nexus 5?

Did anyone manage to make the "always on" feature (with screen off, while not charging) work on a Nexus 5? :confused:

I've read countless times that the N5 has a low power processor for these kind of things :crying:
[Nexus 6  General] kingston73:
Not sure about the n5 but always listening works without any fix on the n7.
[Nexus 6  General] chemahg7:
CM12 Oficial

I try the zipV2 with CM12 Official Nightly 08/01 and doesn't work, someone have an idea?

Tried again, works perfect, Tnks.
[Nexus 6  General] matteo.gee:
I'm trying to enable "Ok Google" while the screen is OFF and the device is NOT charging. Are you sure that you can do this on a N7? I have a Nexus 7 3G 2012 and it doesn't work.
[Nexus 6  General] sykopompos:
It wouldn't work either because it needs the sensory files. He must mean while charging
[Nexus 6  General] kingston73:
I have the 2nd gen model but I'm also a crack flasher on it, I use it to test roms before I flash on my n6 so I've lost track but I know one rom had it working. I'm using slimlp now and just tried it and it doesn't work, wish I could remember which rom had it working.
[Nexus 6  General] liqn7:
Is this suppose to work with the screen off and while not charging?

Works with the screen off for me but only when charging.

Running liquidsmooth and Franco kernel.

Cheers
[Nexus 6  General] sykopompos:
On the n6, yes
[Nexus 6  General] liqn7:
Thanks for the quick reply.

What combinations of roms/kernels does the screen off and charge off ok google work with?
[Nexus 6  General] hlxanthus:
Hmmm . . latest google search update seems to have removed while device is off and not charging functionality . . odd
[Nexus 6  General] sykopompos:
Idk, I just know that it works on my rom with the stock aosp kernel.

I can have my phone in my pocket and say OK google and it works
[Nexus 6  General] simms22:
works perfectly here, no matter which rom/kernel combo i try. works for me on rastapop, terminus, frank, lean kernel, elementalx kernel, franco kernel, and faux kernel. all i do is add in those files in the first post if not in the rom already, and it works. screen off, not plugged in. but it works for me because of other reasons(because i dirty flashed from the very beginning). this issue is so odd, as it doesnt have a completely foolproof solution. only lots of partial solutions :(
[Nexus 6  General] hlxanthus:
Okay, now I am confused. I could not duplicate this. Downloaded a new ROM (latest cm official nighty). Flashed ROM, okay google fix, and pa gapps stock package. I initialized okay Google before allowing it to play store update and it worked, even after the app updated. Then I booted to recovery and did a factory reset and did it again but this time I let google now update via play store, and after setting it up I still had okay google everywhere (including screen off, not on charger). No idea what happened there.
[Nexus 6  General] simms22:
same here, still works great. didnt have to do a thing after updating terminus rom, worked perfectly for me with everything that's in the rom already.
[Nexus 6  General] Williamsss:
Added the files to my vendor tree and built with it. It works fine but about 40% of the time Google will crash after saying the command. (Like I will say what time is it and it will say it is 2:3..... Then it will crash. But the other 60% of the time it works fine. I'll get a logcat tomorrow night and help isolate it. I've also tried several gapps. Could be a ROM issue. I'm on the latest exodus builds on my gihub page. But let me know if anyone else notices these types of issues.
[Nexus 6  General] hutzdani:
Running CM12 09/1/15 nightly, Flashed SU2.40 / Franco r5 / Slim Gapps / Okay google fix ( From Clean Slate Full wipe )

Okay Google persists with screen off with the new Google Update ( V4.1.24.1672412.arm )
[Nexus 6  General] GreeleyXda:
so just flash it then reboot and it'll work on LS? or did i miss something
[Nexus 6  General] hlxanthus:
That's the idea. I can't guarantee that it will work with a dirty flash, as I only test from clean installs. But in theory it should. Good luck!!
[Nexus 6  General] GreeleyXda:
i switched to BlissPop, and so far i have no need to flash anything. (screen off works too)

is there a way to change it from ok google to something else, i have problems pronouncing it. or is that only for the moto x? id prefer something like "ok nexus"
[Nexus 6  General] sykopompos:
I just saw something in the general thread about how to do that. There is also an app called something commander that adds custom phrases and features to google now
[Nexus 6  General] moosiemooses:
http://xdaforums.com/showthread.php?t=3003449
[Nexus 6  General] GreeleyXda:
well that half works (only works on sceen off)

tried opening my camera and it fc so had to wipe to fix that

next problem, when i say "open" insert app from the lockscreen it doesnt work untill after i swipe. is that how its suppouse to work?

for example, phone is off and i say ok google open camera. it stays on the lockscreen till i swipe to unlock then it open the app.
[Nexus 6  General] hlxanthus:
Okay google is not a lockscreen bypass. That is how it should
[Nexus 6  General] kingston73:
Not entirely true, depends on what your lockscreen is, doesn't it? I don't have a password or anything, just swipe to unlock, and I can launch siriusXM app using just my voice.
[Nexus 6  General] Smallsmx3:
Anyone get this to work with Slimlp?
[Nexus 6  General] hlxanthus:
Yes
[Nexus 6  General] Smallsmx3:
Hmmmm
[Nexus 6  General] hlxanthus:
As always, I only test on a clean install. So I manually wipe everything except internal storage. Then flash ROM, any mods (this okay google package, SuperSU, etc) then GApps last. This package has worked on every ROM I have tried so far, flashing in that method.
[Nexus 6  General] MechaMorph:
Worked beautifully. CM12 Nightly from the 15th. "Dirty" flashed it and works great. many thanks!
[Nexus 6  General] hupo224:
Does not work with Euphoria
[Nexus 6  General] simms22:
it works with every rom, and at the same time doesnt work with every rom. there seems to be other things that effect it :rolleyes:
[Nexus 6  General] Smallsmx3:
I can't get it to work with slim
[Nexus 6  General] hlxanthus:
Works for me . .
[Nexus 6  General] Smallsmx3:
Let me rephrase....I can't get it to work with the screen off like on stock
[Nexus 6  General] sykopompos:
Use frank..... Lol
[Nexus 6  General] hutzdani:
V2 works great for me with screen off.

CM12 15th/1/2015 build and Franco R8 kernel, has worked since the official nightlys have been out :D
[Nexus 6  General] aka_word:
This worked for me.
[Nexus 6  General] Smallsmx3:
Yes I was using Frank... I'm trying out some different Roms before I decide what to stick with.
[Nexus 6  General] kingston73:
It's working great with liquid smooth.
[Nexus 6  General] lostrg:
Using 10.5 and Ok Google is not working from screen off? Clean Flash, latest banks gapps, any ideas?

Thanks!
[Nexus 6  General] malcalevak:
So, I'm probably the only idiot who didn't realize you have to actually go in and enable "Always on" for "Ok Google" Detection, before this will work (hey, I'd never used it before). I saw people talking about "voice training" and finally figured out I was missing something and found it.

If it's not working for you, make sure you've got that set!!!
[Nexus 6  General] Smallsmx3:
I'm having the same problem. I was just on CM and it worked.
[Nexus 6  General] bills742:
I'm in the same boat, where do you train your voice? I've never seen that option. The only setting I see toggle OK Google detection from the Google app.
[Nexus 6  General] kingston73:
In this order:

Language and input it

Voice input

Click the gear icon to the right of enhanced Google services

Ok Google detection

That last option gives you sliders where you can turn on and off the ok Google everywhere options.
[Nexus 6  General] Smallsmx3:
So I'm trying to track down why it still doesn't work. It seems all the files are in the appropriate location. Triggerenroll and training apks never have any data that I can delete so something it's not talking to them I'm assuming. I'm on frank which the fix is built in. I've clean flashed. Dirty flashed, flashed this zip. Cleared Google search and nothing. Trigger and training are the same. No data. Like they aren't being used
[Nexus 6  General] bills742:
Here's what I see on that screen. I'm assuming I'm missing some options but I wonder why?
[Nexus 6  General] kingston73:
Definitely missing things there, but I have no idea why. What rom are you using? I don't think it should make a difference but I have no other thoughts.
[Nexus 6  General] CCJ22:
Your print screen is what I see. No training or any other option.

I'm on broken rom, franko kernel, latest update from play store.

I flashed the zip in this forum, didn't clear cache or dalvik. And it doesn't work.
[Nexus 6  General] bills742:
Twisted slim ROM, with twisted gapps and included lean kernel.
[Nexus 6  General] maddbomber83:
Stock with Franco...
[Nexus 6  General] Radixtrator:
Everytime i reboot, OK Google stops Working and I have to reselect enhanced voice. Anyone else experiencing the same?
[Nexus 6  General] CCJ22:
Running R13 (latest franco kernel)

And broken ROM OS

Flashed this zip, and still can't get it to work. On the latest update from google for google search that was released today.
[Nexus 6  General] Aztriltus:
Same here.

Zip was working well until a few weeks ago where this keeps occurring. DU 9.1 with franco 13

Sometimes it couldn't even recognize my voice. Back to stock I guess
[Nexus 6  General] D-m-x:
I'm having the same issue. Both on my N6 and N9. It started a few weeks back like you said-
[Nexus 6  General] simms22:
so google now, everywhere and with screen off still isnt working for everyone, on an aosp rom?