EDIT: Version 6.9 onwards, the methods are moved to somewhere else. I haven't found them yet due to exams.
So, last week a news struck android users viciously- the new much awaited Google assistant will be pixel specific only. But developers have already managed to get assistant on any nougat phone by editing the build.prop. But users have reported that camera and some other apps aren't working properly.
Today, I tried to decompile and remove from Google app the check for pixel device. I have got it working on my android one running Resurrection Remix 6.0.1.
I'll give here the steps.
DISCLAIMER- I won't be responsible for your bricked device. I tried it and it worked. Doesn't mean it will work for you too. Keep the original apk ready so that you can revert back in case anything happens.
What is working
What isn't working
Requirements
Let's start
1. First we need the Google apk. Make sure you have upgraded to the latest ( mine was 6.8.21.21). Copy the file to your PC. Name it Google.apk
2. Open up a terminal in Linux (in Windows, navigate to the folder where apktool is located, and shift+right click on a blank space and click "open command prompt here"). If you're on Linux, make sure apktool is in your PATH.
Type
This should create a folder called "Google"
3. Open Google/smali/com/google/android/apps/gsa/assistant/a/e.smali file with your preferred editor.
4. Look for a method called pU() like this-
change the
to
Repeat the same process with another method called pT()
If you can't find them in the path I provided, then look for something like this "ro.opa.eligible_device" inside an "if-neq" or "if-eqz". If you find this, then that is probably the required method.
5. Return to the root directory (where the Google directory is located) and type
6. The app should be ready in Google/dist directory. Move to there and copy the Original apk.
7. Open the original apk with a zip viewer (winrar or 7zip, I used ark). Extract the META-INF folder to the directory.
8. Open the modified apk with the zip viewer . Don't extract it. Just drag and drop the META-INF folder on the apk. Make sure you have the compression option as "store"
9. Now install this app. Some people reported that it does not install from the device. I never tried to install it from my phone. I actually installed it via adb and it worked. type-
10. Wipe the data of the Google app from settings. No need to reboot.
Attachment: Assistant running on my phone with screen search
Guys, try this and let me know if it works or not.
So, last week a news struck android users viciously- the new much awaited Google assistant will be pixel specific only. But developers have already managed to get assistant on any nougat phone by editing the build.prop. But users have reported that camera and some other apps aren't working properly.
Today, I tried to decompile and remove from Google app the check for pixel device. I have got it working on my android one running Resurrection Remix 6.0.1.
I'll give here the steps.
DISCLAIMER- I won't be responsible for your bricked device. I tried it and it worked. Doesn't mean it will work for you too. Keep the original apk ready so that you can revert back in case anything happens.
What is working
- Voice recognition
- chats
- Navigation etc.
What isn't working
- The "OK Google" hotword detection is not working. It tells you to train your voice model everytime.
Requirements
- apktool (make sure you have set it up properly)
- A smali editor ( Notepad++ for Windows, I used kate on Linux)
- patience
- Android build tools (adb and zipalign)
Let's start
1. First we need the Google apk. Make sure you have upgraded to the latest ( mine was 6.8.21.21). Copy the file to your PC. Name it Google.apk
2. Open up a terminal in Linux (in Windows, navigate to the folder where apktool is located, and shift+right click on a blank space and click "open command prompt here"). If you're on Linux, make sure apktool is in your PATH.
Type
Code:
apktool d Google.apk
3. Open Google/smali/com/google/android/apps/gsa/assistant/a/e.smali file with your preferred editor.
4. Look for a method called pU() like this-
Code:
.method public static pU()Z
.locals 3
.prologue
const/4 v0, 0x1
.line 97
invoke-static {}, Lcom/google/android/libraries/e/a/a;->aY()Z
move-result v1
.line 2188
............
Code:
const/4 v0, 0x0
Code:
const/4 v0, 0x1
Repeat the same process with another method called pT()
If you can't find them in the path I provided, then look for something like this "ro.opa.eligible_device" inside an "if-neq" or "if-eqz". If you find this, then that is probably the required method.
5. Return to the root directory (where the Google directory is located) and type
Code:
apktool b Google
6. The app should be ready in Google/dist directory. Move to there and copy the Original apk.
7. Open the original apk with a zip viewer (winrar or 7zip, I used ark). Extract the META-INF folder to the directory.
8. Open the modified apk with the zip viewer . Don't extract it. Just drag and drop the META-INF folder on the apk. Make sure you have the compression option as "store"
9. Now install this app. Some people reported that it does not install from the device. I never tried to install it from my phone. I actually installed it via adb and it worked. type-
Code:
adb install -r Google.apk
10. Wipe the data of the Google app from settings. No need to reboot.
Attachment: Assistant running on my phone with screen search
Guys, try this and let me know if it works or not.
Attachments
Last edited: