[MOD][Xposed] Google Search / Now API

Search This thread

tineprogramming

Senior Member
Oct 25, 2008
95
32
Bangkok
No problem, but like I said, I haven't been able to test them to make sure those are the right hooks. So please let me know if they are!

I'm trying to fix my phone asap as my phone is currently bootloop now haha. I will let you know if it's working. Also can you guide me how to find the new hooks, as I rely on this module very much to open my garage door using Autovoice with android auto in my car.
 

tineprogramming

Senior Member
Oct 25, 2008
95
32
Bangkok
Hey guys, so I tried to find the hooks by searching for "setFinal" this time in that folder that I normally used "ls" on. It was in one file for 6.10-12 so I figured why not and took down the file names for the hook endings. I ended up with this:
v6.10
Code:
com.google.android.apps.gsa.search.shared.service.ad
v6.11
Code:
com.google.android.apps.gsa.search.shared.service.ac
v6.12
Code:
com.google.android.apps.gsa.search.shared.service.ac

FYI I have NOT TESTED these hooks because my device is running nougat so no xposed. Let me know if they work so I can post them on reddit and whatnot.

Also, I made a quick site for easy reference of all the google app hooks I've found so far. Check it out

I tried. It's doesn't work man
 

zbombattack

Member
Jun 9, 2016
21
1
Hey guys, so I tried to find the hooks by searching for "setFinal" this time in that folder that I normally used "ls" on. It was in one file for 6.10-12 so I figured why not and took down the file names for the hook endings. I ended up with this:
v6.10

v6.11

v6.12


I tried. It's doesn't work man

That really sucks. In that case it seems like Google has changed the app enough that this module doesn't work anymore. So unless the module Dev can find a way to get it working I don't know what else to do.
 

tineprogramming

Senior Member
Oct 25, 2008
95
32
Bangkok
That really sucks. In that case it seems like Google has changed the app enough that this module doesn't work anymore. So unless the module Dev can find a way to get it working I don't know what else to do.
Yeah. I rely on this very much. I will try to do some research. by the way new google app has come out to 6.13 version today. Thank you for your hard work though. Maybe it's doesn't work because I mistaken something. Let's others confirm it more.

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

That really sucks. In that case it seems like Google has changed the app enough that this module doesn't work anymore. So unless the module Dev can find a way to get it working I don't know what else to do.

However, if you need me to test it or provide you the log. I'm happy to help you with anything I could.
 

chwzr

New member
Mar 14, 2017
1
0
hmmmpf

now actually i have version 6.15.24.21
are there new hooks or a other mod or smthng else?

it would be a verry good if we could get this working again.
i wrote a entire app based on this framework for controlling my house ( basicly it connects to a raspberry pi over ssh and exec some scripts that speak to the 433mhz receivers in the electronics in my house) .

it worked verry good while laying on couch and saying "lights out" to take a nap haha :p

why is google doing this **** and dont offer custom voice commands for developers? i think it would be cool if every app can say "my action word is "xxx" and my commands are f1, f2,f3 " and when a user says "ok google, xxx f1" the right intent or activity gets fired up. life could be so easy.

and why they implemented a function to send whatsapp messages ( how did the devs of whatsapp do this shizzle?)
there is a whole interface for sending messages with whatsapp in google assistant. out of the box... :confused::confused::confused:
please google, do some magic, post some new hooks or offer devs a better voice api !!! :angel:
 

ricardojlrufino

New member
Apr 4, 2017
1
3
New Version of Google Search API

Google has changed method signatures.
I created a new modification with the changes:

Tested on Android 5.1

Download:
https://github.com/ricardojlrufino/Google-Search-API/releases

Source:
https://github.com/ricardojlrufino/Google-Search-API

In github page have instructions to decompile and find new hooks
Please update file: hooksversion.properties
 

steviehs

Member
Sep 15, 2014
7
1
ricardojlrufino said:
Google has changed method signatures.
I created a new modification with the changes:

Ricardo, you made my day!
Afer a resynchronisation of my watch, the wear app on the phone stopped demanding for an update - a bevaviour which more and more apps get - very nasty. So I had to go for a new android wear app, which then asked me to update Google Now.

So I took your apk, and checked via your described method for the hooks and set this. Mission completed.

Google App 7.1.29.21.arm now has "com.google.android.apps.gsa.search.core.service.n"

ricardojlrufino said:
In github page have instructions to decompile and find new hooks
Please update file: hooksversion.properties

I hope, I've done it right with the patch...

It is a shame for the big players that they became so incredibly rich because of the open structure of the internet, but they push you in their incomplete and unsecure walled gardens with their voice assistants...
 
  • Like
Reactions: mndmlp

ninestarkoko

Senior Member
Nov 26, 2013
513
213
So I took your apk, and checked via your described method for the hooks and set this. Mission completed.

Google App 7.1.29.21.arm now has "com.google.android.apps.gsa.search.core.service.n"

Did You manage to find the new class that needs to be hooked on latest 7.12. versions?
Seems like google has changed something in the .../core/service area
the setFinalRecognizedText is no more there.
the only useful class might be the SearchPlate one
 

Contitigno

New member
Dec 4, 2017
2
0
45
Chateaudun
64 chiffres avec du 6 Bit

pour ce qui est du langage courant:

0=000
1=001
2=010
3=011
4=100
5=101
6=110
7=111



le langage est en 6bit le code a gauche et le chiffrement a droite


00=0
01=1
10=2
11=3
02=4
20=5
12=6
21=7
22=8
03=9
30=10
13=11
31=12
23=13
32=14
33=15
04=16
40=17
14=18
41=19
24=20
42=21
34=22
43=23
44=24
05=25
50=26
15=27
51=28
25=29
52=30
35=31
53=32
45=33
54=34
55=35
06=36
60=37
16=38
61=39
26=40
62=41
36=42
63=43
46=44
64=45
56=46
65=47
66=48
07=49
70=50
17=51
71=52
27=53
72=54
37=55
73=56
47=57
74=58
57=59
75=60
67=61
76=62
77=63





3.6.13 Google Search Update

bir -> bpn
bjb -> bpy
bur -> cby
cmh -> cuc
w -> x
azL -> aCT
heb -> hmu
bul -> cbs
bkt ->bqk

Tested and everything is working including text searches. APK is attached.
 

steviehs

Member
Sep 15, 2014
7
1
Alternatives?

It seems, that the issue has calmed down a bit, my guess is that the reason is not, that anything is working, but that it is too complicated to kepp google now and wear from updating :) Still I would really miss the feature of controlling my appliances just via "ok google" (and google now and google now api and autovoice and some rest magic) and no external cloud services (except google of course) involved.

So my big question: is there an alternative way to do so? There are some pretty affordable new Wear 2.0 watches on the market, but I really don't like to lose this feature...
 

ninestarkoko

Senior Member
Nov 26, 2013
513
213
It seems, that the issue has calmed down a bit, my guess is that the reason is not, that anything is working, but that it is too complicated to kepp google now and wear from updating :) Still I would really miss the feature of controlling my appliances just via "ok google" (and google now and google now api and autovoice and some rest magic) and no external cloud services (except google of course) involved.

So my big question: is there an alternative way to do so? There are some pretty affordable new Wear 2.0 watches on the market, but I really don't like to lose this feature...

Don't know if it works for the wear platform but you might look here https://automagic4android.com/forum/viewtopic.php?f=5&t=6507&p=19580#p19580
Automagic (or other automation apps like Tasker probably) can intercept Google Assistant commands with some tricks on latest app versions.
No need for third party apps but need some experience with those programs.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 118
    Requires Xposed Framework!

    This module adds an API to the Google Search app, commonly referred to as Google Now.
    This allows developers to make plugins that react to searches done in Google Search.

    As of right now, the developers cannot interact with the cards UI, not sure how feasible that is, if it is, it'll be in future versions.

    (I showed this on reddit some days ago: http://www.reddit.com/r/Android/comments/1rmvxs/heres_a_preview_of_my_google_search_now_api/)

    Screenshots:
    IWbHojml.png
    0TQkSlkl.png


    Demos:
    Lyrics fetching: https://www.youtube.com/watch?v=OsNCHo5JZuA
    Song recognition outside US with Shazam: https://www.youtube.com/watch?v=ThbW5glU7zM
    AutoVoice: http://www.youtube.com/watch?v=usjqq5hwlSE

    Compatibility:
    Any 4.1+ device that can run Xposed Framework. ICS not supported at the moment, not sure how recent the Google Search port is.

    Download:
    Please note that this is a 1.0 release, it may or may not have bugs.
    http://repo.xposed.info/module/com.mohammadag.googlesearchapi

    Source:
    This is open source, you're free to contribute to the source, but you're in now way allowed to release this anywhere else.
    https://github.com/MohammadAG/Google-Search-API

    Plugins:
    This doesn't do anything without plugins, which needs developer support. More on that below. Here are some fully working examples:
    • Music Controls: Control music playback. Supported commands: "play/pause/resume music", "play songs by <artist>", "play song <title>", "next/previous track/song", "volume up/down/max", "what song is this" opens in Shazam, requires Shazam, no idea what happens without it.
    • Voice Toggles: Turn on/off Wi-Fi, Mobile Data, or Bluetooth.
    • AZLyrics Viewer: Shows lyrics for songs from AZLyrics.com. Supported commands: "show lyrics for <song> by <artist>", exact syntax required here, artist is not optional.
    • Autovoice, by @joaomgcd, run Tasker commands from Google Search.

    Plugin sources:
    1. Music Controls: https://github.com/MohammadAG/GNAPI-MusicControls
    2. Voice Toggles: https://github.com/MohammadAG/GNAPI-VoiceToggles
    3. AZLyrics Viewer: https://github.com/MohammadAG/Android-AZLyricsViewer

    Developers:
    Implementing plugins is as easy as copying one file to your source, and implementing a BroadcastReceiver that listens for the search queries (sent as text). If you're implementing a UI, implement TextToSpeech for voice feedback, if not, use GoogleNowApi.speak for voice replies.
    All this is demonstrated in the examples above.
    You'll also need to add a permission to AndroidManifest.xml: "com.mohammadag.googlesearchapi.permission.ACCESS_GGOGLE_SEARCH_API"
    Remember that any package needs one activity to be started to work, see the music controls example for a way around that.
    Of course, you're free to make your plugins free/paid/whatever.

    What are the two checkboxes for?
    If you're using GEL, you basically need to have the first checkbox checked. This is because GEL uses an overlay for the first part of the search, then opens the usual search app without the transitions. This means that if a developer already started an activity, it'll be sent to the background cause search was started after it.

    Second checkbox prevents duplicate searches, this can be useful (you'll see how), and not so useful (when you do two volume ups/downs). Experiment as needed.

    Support development
    This took quite a lot of research, Google Search's code is huge, if you found this useful, please consider a donation.
    26
    3.6.13 Google Search Update

    bir -> bpn
    bjb -> bpy
    bur -> cby
    cmh -> cuc
    w -> x
    azL -> aCT
    heb -> hmu
    bul -> cbs
    bkt ->bqk

    Tested and everything is working including text searches. APK is attached.
    21
    Okay, I mean I have no real life and stuff.
    So I forked @MohammadAG project on Github and fixed it.

    All credits go to the OP! It's confirmed working on Auto voice again, didn't test it myself, though. Needs more testing.
    I've incremented the build number and opened a pull request on Github. The apk above is signed with debug keys if anyone cares.

    If OP doesn't want it, please report this post. Calling @GermainZ just to let him know.
    18
    MohammadAG You are the man! Here is a video I put together on some of the things you can do with it, fantastic Job!

    15
    Enjoy. Updated to 1.31 and should be working perfectly.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone