Wednesday 12 October 2016

How to install Google Assistant for devices running Android Marshmallow

2 comments
https://www.androidcentral.com/sites/androidcentral.com/files/styles/large/public/topic_images/2016/google-assistant-topic.png?itok=r9tg3yU1

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.

A xda developer named ~ ANIKETultimate ~ has figured out a way to use Google Assistant on any device running Android Marshmallow. The best part is that you wont require any root permissions or build.prop edits, So lets get started

Disclaimer : Me or the ANIKETultimate is not responsible if any shit happens to you android device. Take your own responsibility so this one.But will be happy to help if any bullshit occurs to your device 

WHAT WORKS
-  Voice recognition
-  Chats
-  Navigation etc.

WHAT DOES NOT WORK FOR NOW
-  The assistant settings page is not opening
-  The "OK Google" hotword detection is not working. The App crashes if I open the "hotword detection" page in settings

REQUIREMENTS
  1. apktool (make sure you have set it up properly)
  2. A smali editor ( Notepad++ for Windows, I used kate on Linux)
  3. patience
  4. Android build tools (adb and zipalign) 
INSTRUCTIONS

1. First we need the Google apk. Make sure you have upgraded to the latest ( mine was 6.6.14.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
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 pa() like this-
Code:
.method public static pa()Z
    .locals 3

    .prologue
    const/4 v0, 0x0

    .line 98
    invoke-static {}, Lcom/google/android/libraries/e/a/a;->aN()Z

    move-result v1

    .line 2191
............
change the
Code:
const/4 v0, 0x0
to
Code:
const/4 v0, 0x1
Repeat the same process with another method called oZ()
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.

SCREENSHOTS
http://dl-1.va.us.xda-developers.com/3/9/0/0/9/2/5/Screenshot_20161011-233040.png?key=sHU-dP_kFBIj9HgEeJU83Q&ts=1476271400 http://dl-1.va.us.xda-developers.com/3/9/0/0/9/2/4/Screenshot_20161011-232932.png?key=xgiVuAF0D-PYZBYzWTUejQ&ts=1476271438

DON'T WANT TO GO THROUGH ALL THE HASSLE OF UNZIPPING AND OTHER CRAP HERE IS THE APK WHICH IS MODDED BY THE ANIKETultimate HIMSELF : LINK 

NOTE : if the above apk does not install, could you try running 'pm install -r Google.apk' from a terminal on your phone, and send me the output?

NEED ANY HELP JUST COMMENT IT IN THE COMMENT SECTION

2 comments :

  1. it says [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION].What to do?

    ReplyDelete
  2. Please upload this modded app on mediafire

    ReplyDelete

Powered by Blogger.