├── assets └── xposed_init ├── bin ├── HiGoogle.apk ├── classes.dex ├── resources.ap_ ├── classes │ └── com │ │ └── botsone │ │ └── higoogle │ │ ├── R.class │ │ ├── R$attr.class │ │ ├── R$style.class │ │ ├── HiGoogle.class │ │ ├── R$string.class │ │ ├── BuildConfig.class │ │ ├── HiGoogle$1.class │ │ └── R$drawable.class ├── res │ └── crunch │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ └── drawable-xxhdpi │ │ └── ic_launcher.png ├── jarlist.cache ├── dexedLibs │ └── android-support-v4-e548498b02097f63df4106061dc42b1c.jar └── AndroidManifest.xml ├── ic_launcher-web.png ├── libs └── android-support-v4.jar ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── values │ ├── strings.xml │ └── styles.xml ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── values-v11 │ └── styles.xml └── values-v14 │ └── styles.xml ├── README.md ├── gen └── com │ └── botsone │ └── higoogle │ ├── BuildConfig.java │ └── R.java ├── project.properties ├── proguard-project.txt ├── AndroidManifest.xml └── src └── com └── botsone └── higoogle └── HiGoogle.java /assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.botsone.higoogle.HiGoogle -------------------------------------------------------------------------------- /bin/HiGoogle.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/HiGoogle.apk -------------------------------------------------------------------------------- /bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes.dex -------------------------------------------------------------------------------- /bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/resources.ap_ -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/ic_launcher-web.png -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/libs/android-support-v4.jar -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | HiGoogle 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/R.class -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | HiGoogle 2 | ======== 3 | 4 | XPosed Mod - Launches Google Now instead of S-Voice on Samsung "always listening" devices. 5 | -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/R$attr.class -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/R$style.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/R$style.class -------------------------------------------------------------------------------- /bin/res/crunch/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/res/crunch/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/res/crunch/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/res/crunch/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/res/crunch/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/HiGoogle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/HiGoogle.class -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/R$string.class -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/BuildConfig.class -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/HiGoogle$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/HiGoogle$1.class -------------------------------------------------------------------------------- /bin/classes/com/botsone/higoogle/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/classes/com/botsone/higoogle/R$drawable.class -------------------------------------------------------------------------------- /bin/jarlist.cache: -------------------------------------------------------------------------------- 1 | # cache for current jar dependency. DO NOT EDIT. 2 | # format is 3 | # Encoding is UTF-8 4 | -------------------------------------------------------------------------------- /bin/dexedLibs/android-support-v4-e548498b02097f63df4106061dc42b1c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots/HiGoogle/master/bin/dexedLibs/android-support-v4-e548498b02097f63df4106061dc42b1c.jar -------------------------------------------------------------------------------- /gen/com/botsone/higoogle/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package com.botsone.higoogle; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-16 15 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /gen/com/botsone/higoogle/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package com.botsone.higoogle; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class drawable { 14 | public static final int ic_launcher=0x7f020000; 15 | } 16 | public static final class string { 17 | public static final int app_name=0x7f030000; 18 | } 19 | public static final class style { 20 | /** 21 | Base application theme, dependent on API level. This theme is replaced 22 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices. 23 | 24 | 25 | Theme customizations available in newer API levels can go in 26 | res/values-vXX/styles.xml, while customizations related to 27 | backward-compatibility can go here. 28 | 29 | 30 | Base application theme for API 11+. This theme completely replaces 31 | AppBaseTheme from res/values/styles.xml on API 11+ devices. 32 | 33 | API 11 theme customizations can go here. 34 | 35 | Base application theme for API 14+. This theme completely replaces 36 | AppBaseTheme from BOTH res/values/styles.xml and 37 | res/values-v11/styles.xml on API 14+ devices. 38 | 39 | API 14 theme customizations can go here. 40 | */ 41 | public static final int AppBaseTheme=0x7f040000; 42 | /** Application theme. 43 | All customizations that are NOT specific to a particular API-level can go here. 44 | */ 45 | public static final int AppTheme=0x7f040001; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/com/botsone/higoogle/HiGoogle.java: -------------------------------------------------------------------------------- 1 | package com.botsone.higoogle; 2 | 3 | 4 | import static de.robv.android.xposed.XposedHelpers.findAndHookMethod; 5 | import android.annotation.SuppressLint; 6 | import android.app.AndroidAppHelper; 7 | import android.app.Application; 8 | import android.content.Context; 9 | import android.content.Intent; 10 | import android.os.PowerManager; 11 | import android.speech.RecognizerIntent; 12 | import android.util.Log; 13 | import android.view.WindowManager; 14 | import de.robv.android.xposed.IXposedHookLoadPackage; 15 | import de.robv.android.xposed.XC_MethodReplacement; 16 | import de.robv.android.xposed.XposedBridge; 17 | import de.robv.android.xposed.XposedHelpers; 18 | import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; 19 | 20 | 21 | public class HiGoogle extends Application implements IXposedHookLoadPackage { 22 | 23 | 24 | 25 | public void handleLoadPackage(final LoadPackageParam lpparam) 26 | throws Throwable { 27 | 28 | 29 | 30 | if (!lpparam.packageName.equals("com.vlingo.midas")) 31 | return; 32 | 33 | 34 | XposedBridge.log("Loaded app: " + lpparam.packageName); 35 | 36 | 37 | findAndHookMethod("com.samsung.alwaysmicon.AlwaysMicOnService", 38 | lpparam.classLoader, "launchSVoice", 39 | new XC_MethodReplacement() { 40 | 41 | 42 | 43 | @SuppressLint("Wakelock") 44 | protected Object replaceHookedMethod(MethodHookParam param) 45 | throws Throwable { 46 | 47 | 48 | 49 | Context context = getContextHelper(); 50 | 51 | 52 | createWakeLock(context); 53 | 54 | 55 | configureIntent(context); 56 | 57 | 58 | return null; 59 | 60 | 61 | } 62 | 63 | 64 | 65 | @SuppressLint("Wakelock") 66 | private void createWakeLock(Context context){ 67 | 68 | 69 | 70 | PowerManager pm = (PowerManager) context 71 | .getSystemService(Context.POWER_SERVICE); 72 | 73 | 74 | @SuppressWarnings("deprecation") 75 | PowerManager.WakeLock wakeLock = pm.newWakeLock( 76 | PowerManager.SCREEN_BRIGHT_WAKE_LOCK 77 | | PowerManager.ACQUIRE_CAUSES_WAKEUP 78 | , "HiGoogle wakelock"); 79 | 80 | 81 | wakeLock.acquire(10000); 82 | 83 | 84 | //TODO add stuff to turn screen off etc... 85 | 86 | 87 | } 88 | 89 | 90 | 91 | private void configureIntent(Context localContext) { 92 | 93 | 94 | 95 | Intent localIntent = new Intent( 96 | RecognizerIntent.ACTION_WEB_SEARCH); 97 | 98 | 99 | localIntent.putExtra( 100 | "android.speech.extra.LANGUAGE_MODEL", "en-US"); 101 | 102 | 103 | localIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 104 | 105 | 106 | localIntent 107 | .addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); 108 | 109 | 110 | localContext.startActivity(localIntent); 111 | 112 | 113 | } 114 | 115 | 116 | 117 | private Context getContextHelper() { 118 | 119 | 120 | 121 | Log.d("vlingo VLINGO_LOG", 122 | "vlingo Trying to get context from AndroidAppHelper"); 123 | 124 | 125 | Context localContext = AndroidAppHelper 126 | .currentApplication().getApplicationContext(); 127 | 128 | 129 | if (localContext == null) { 130 | 131 | 132 | 133 | Log.d("vlingo VLINGO_LOG", 134 | "vlingo Trying to get context from mSystemContext"); 135 | 136 | 137 | Object localObject2 = XposedHelpers.getStaticObjectField( 138 | XposedHelpers.findClass( 139 | "android.app.ActivityThread", null), 140 | "mSystemContext"); 141 | 142 | 143 | if (localObject2 != null) 144 | 145 | 146 | localContext = (Context) localObject2; 147 | 148 | 149 | } 150 | 151 | 152 | 153 | if (localContext == null) { 154 | 155 | 156 | 157 | Log.d("vlingo VLINGO_LOG", 158 | "vlingo Trying to get activityThread from systemMain"); 159 | 160 | 161 | Object localObject1 = XposedHelpers.callStaticMethod( 162 | XposedHelpers.findClass( 163 | "android.app.ActivityThread", null), 164 | "systemMain", new Object[0]); 165 | 166 | 167 | if (localObject1 != null) { 168 | 169 | 170 | 171 | Log.d("vlingo VLINGO_LOG", 172 | "vlingo Trying to get context from getSystemContext"); 173 | 174 | 175 | localContext = (Context) XposedHelpers 176 | .callMethod(localObject1, 177 | "getSystemContext", 178 | new Object[0]); 179 | 180 | 181 | } 182 | } 183 | return localContext; 184 | 185 | 186 | } 187 | }); 188 | }; 189 | } 190 | --------------------------------------------------------------------------------