├── .github └── FUNDING.yml ├── LICENSE ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── cleaner.sh ├── customize.sh ├── function.sh ├── module.prop ├── package.txt ├── post-fs-data.sh ├── sepolicy.rule ├── service.sh ├── system.prop ├── system ├── etc │ ├── default-permissions │ │ └── default-com.google.android.googlequicksearchbox.xml │ ├── permissions │ │ ├── com.android.systemui.SUPPORTS_DRAG_ASSISTANT_TO_SPLIT.xml │ │ ├── com.google.android.feature.ANDROID_ONE_EXPERIENCE.xml │ │ ├── com.google.android.feature.CONTEXTUAL_SEARCH.xml │ │ ├── com.google.android.feature.DSE_CHOICE_SCREEN.xml │ │ ├── com.google.android.feature.ECHO_REFERENCE.xml │ │ ├── com.google.android.feature.GOOGLE_EXPERIENCE.xml │ │ ├── com.google.android.feature.GOOGLE_SPEECH_ENHANCEMENT.xml │ │ ├── com.google.android.feature.GPU_ASR_OFFLOAD.xml │ │ ├── com.google.android.feature.PIXEL_2017_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2018_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2019_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2019_MIDYEAR_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2020_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2020_MIDYEAR_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2021_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2021_MIDYEAR_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2022_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2022_MIDYEAR_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2023_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_2024_EXPERIENCE.xml │ │ ├── com.google.android.feature.PIXEL_EXPERIENCE.xml │ │ ├── com.google.android.googlequicksearchbox.features.xml │ │ └── privapp-com.google.android.googlequicksearchbox.xml │ └── sysconfig │ │ └── config-com.google.android.googlequicksearchbox.xml └── priv-app │ └── Velvet │ └── Velvet.apk └── uninstall.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: reiryuki # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: reiryuki # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: reiryuki # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: https://www.paypal.me/reiryuki # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Rei Ryuki 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | ################# 4 | # Initialization 5 | ################# 6 | 7 | umask 022 8 | 9 | # echo before loading util_functions 10 | ui_print() { echo "$1"; } 11 | 12 | require_new_magisk() { 13 | ui_print "*******************************" 14 | ui_print " Please install Magisk v20.4+! " 15 | ui_print "*******************************" 16 | exit 1 17 | } 18 | 19 | ######################### 20 | # Load util_functions.sh 21 | ######################### 22 | 23 | OUTFD=$2 24 | ZIPFILE=$3 25 | 26 | mount /data 2>/dev/null 27 | 28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk 29 | . /data/adb/magisk/util_functions.sh 30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk 31 | 32 | install_module 33 | exit 0 34 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Google App Magisk Module 2 | 3 | ## DISCLAIMER 4 | - Google apps are owned by Google LLC 5 | - The MIT license specified here is for the Magisk Module only, not for Google apps. 6 | 7 | ## Descriptions 8 | - Quick search box and assistant app by Google LLC integrated as a Magisk Module for all supported and rooted devices with Magisk 9 | - Enables Gemini in Google App if it's not available yet in your device 10 | - Enables Hey Google & Voice Match in Google App if it's not available yet in your device 11 | - WARNING!!! Hey Google & Voice Match consumes very high RAM. I don't recommend to activate Hey Google & Voice Match on devices with RAM lower than 3 GiB, otherwise you will get more lags and even freezing. 12 | - Enables several other features in Google App 13 | - Compatibility is not guaranteed 14 | 15 | ## Sources 16 | - https://apkmirror.com com.google.android.googlequicksearchbox by Google LLC 17 | 18 | ## Screenshots 19 | - https://t.me/ryukinotes/23 20 | 21 | ## Requirements 22 | - arm64-v8a is for arm64-v8a architecture 23 | - armeabi-v7a is for armeabi-v7a architecture 24 | - x86_64 is for x86_64 architecture 25 | - x86 is for x86 architecture 26 | - Min29 is for SDK 29 and up 27 | - Min28 is for SDK 28 and up 28 | - GApps installed 29 | - Magisk or KernelSU installed 30 | 31 | ## Installation Guide & Download Link 32 | - Download the right module according to your device architecture and Android version here: https://www.pling.com/p/2195857/ 33 | - Install the module via Magisk app or KernelSU app or Recovery if Magisk installed 34 | - If you are using KernelSU, you need to disable Unmount Modules by Default in KernelSU app settings 35 | - Reboot 36 | - If you are using KernelSU, you need to allow superuser list manually all package name listed in package.txt (and your home launcher app also) (enable show system apps) and reboot afterwards 37 | 38 | ## Optionals 39 | - Global: https://t.me/ryukinotes/35 40 | 41 | ## Troubleshootings 42 | - Global: https://t.me/ryukinotes/34 43 | 44 | ## Support & Bug Report 45 | - https://t.me/androidryukimodsdiscussions/2618 46 | - If you don't do above, issues will be closed immediately 47 | 48 | ## Credits and Contributors 49 | - @HuskyDG 50 | - https://t.me/androidryukimodsdiscussions 51 | - You can contribute ideas about this Magisk Module here: https://t.me/androidappsportdevelopment 52 | 53 | ## Sponsors 54 | - https://t.me/ryukinotes/25 55 | 56 | 57 | -------------------------------------------------------------------------------- /cleaner.sh: -------------------------------------------------------------------------------- 1 | [ ! "$MODPATH" ] && MODPATH=${0%/*} 2 | UID=`id -u` 3 | 4 | # run 5 | . $MODPATH/function.sh 6 | 7 | # cleaning 8 | remove_cache 9 | PKGS=`cat $MODPATH/package.txt` 10 | for PKG in $PKGS; do 11 | rm -rf /data/user*/"$UID"/$PKG/cache/* 12 | done 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /customize.sh: -------------------------------------------------------------------------------- 1 | # space 2 | ui_print " " 3 | 4 | # var 5 | UID=`id -u` 6 | [ ! "$UID" ] && UID=0 7 | ABILIST=`grep_get_prop ro.product.cpu.abilist` 8 | if [ ! "$ABILIST" ]; then 9 | ABILIST=`grep_get_prop ro.system.product.cpu.abilist` 10 | fi 11 | 12 | # log 13 | if [ "$BOOTMODE" != true ]; then 14 | FILE=/data/media/"$UID"/$MODID\_recovery.log 15 | ui_print "- Log will be saved at $FILE" 16 | exec 2>$FILE 17 | ui_print " " 18 | fi 19 | 20 | # optionals 21 | OPTIONALS=/data/media/"$UID"/optionals.prop 22 | if [ ! -f $OPTIONALS ]; then 23 | touch $OPTIONALS 24 | fi 25 | 26 | # debug 27 | if [ "`grep_prop debug.log $OPTIONALS`" == 1 ]; then 28 | ui_print "- The install log will contain detailed information" 29 | set -x 30 | ui_print " " 31 | fi 32 | 33 | # recovery 34 | if [ "$BOOTMODE" != true ]; then 35 | MODPATH_UPDATE=`echo $MODPATH | sed 's|modules/|modules_update/|g'` 36 | rm -f $MODPATH/update 37 | rm -rf $MODPATH_UPDATE 38 | fi 39 | 40 | # run 41 | . $MODPATH/function.sh 42 | 43 | # info 44 | MODVER=`grep_prop version $MODPATH/module.prop` 45 | MODVERCODE=`grep_prop versionCode $MODPATH/module.prop` 46 | ui_print " ID=$MODID" 47 | ui_print " Version=$MODVER" 48 | ui_print " VersionCode=$MODVERCODE" 49 | if [ "$KSU" == true ]; then 50 | ui_print " KSUVersion=$KSU_VER" 51 | ui_print " KSUVersionCode=$KSU_VER_CODE" 52 | ui_print " KSUKernelVersionCode=$KSU_KERNEL_VER_CODE" 53 | else 54 | ui_print " MagiskVersion=$MAGISK_VER" 55 | ui_print " MagiskVersionCode=$MAGISK_VER_CODE" 56 | fi 57 | ui_print " " 58 | 59 | # architecture 60 | if [ "$ABILIST" ]; then 61 | ui_print "- $ABILIST architecture" 62 | ui_print " " 63 | fi 64 | NAME=arm64-v8a 65 | if ! echo "$ABILIST" | grep -q $NAME; then 66 | if [ "$BOOTMODE" == true ]; then 67 | ui_print "! This ROM doesn't support $NAME architecture" 68 | else 69 | ui_print "! This Recovery doesn't support $NAME architecture" 70 | ui_print " Try to install via Magisk app instead" 71 | fi 72 | abort 73 | fi 74 | 75 | # sdk 76 | NUM=29 77 | if [ "$API" -lt $NUM ]; then 78 | ui_print "! Unsupported SDK $API." 79 | ui_print " You have to upgrade your Android version" 80 | ui_print " at least SDK $NUM to use this module." 81 | abort 82 | else 83 | ui_print "- SDK $API" 84 | ui_print " " 85 | fi 86 | 87 | # recovery 88 | mount_partitions_in_recovery 89 | 90 | # magisk 91 | magisk_setup 92 | 93 | # path 94 | SYSTEM=`realpath $MIRROR/system` 95 | VENDOR=`realpath $MIRROR/vendor` 96 | PRODUCT=`realpath $MIRROR/product` 97 | SYSTEM_EXT=`realpath $MIRROR/system_ext` 98 | ODM=`realpath $MIRROR/odm` 99 | MY_PRODUCT=`realpath $MIRROR/my_product` 100 | 101 | # cleaning 102 | ui_print "- Cleaning..." 103 | remove_sepolicy_rule 104 | ui_print " " 105 | 106 | # function 107 | conflict() { 108 | for NAME in $NAMES; do 109 | DIR=/data/adb/modules_update/$NAME 110 | if [ -f $DIR/uninstall.sh ]; then 111 | sh $DIR/uninstall.sh 112 | fi 113 | rm -rf $DIR 114 | DIR=/data/adb/modules/$NAME 115 | rm -f $DIR/update 116 | touch $DIR/remove 117 | FILE=/data/adb/modules/$NAME/uninstall.sh 118 | if [ -f $FILE ]; then 119 | sh $FILE 120 | rm -f $FILE 121 | fi 122 | rm -rf /metadata/magisk/$NAME\ 123 | /mnt/vendor/persist/magisk/$NAME\ 124 | /persist/magisk/$NAME\ 125 | /data/unencrypted/magisk/$NAME\ 126 | /cache/magisk/$NAME\ 127 | /cust/magisk/$NAME 128 | done 129 | } 130 | 131 | # conflict 132 | NAMES=FeaturesOfGoogleApp 133 | conflict 134 | 135 | # function 136 | cleanup() { 137 | if [ -f $DIR/uninstall.sh ]; then 138 | sh $DIR/uninstall.sh 139 | fi 140 | DIR=/data/adb/modules_update/$MODID 141 | if [ -f $DIR/uninstall.sh ]; then 142 | sh $DIR/uninstall.sh 143 | fi 144 | } 145 | 146 | # cleanup 147 | DIR=/data/adb/modules/$MODID 148 | FILE=$DIR/module.prop 149 | PREVMODNAME=`grep_prop name $FILE` 150 | if [ "`grep_prop data.cleanup $OPTIONALS`" == 1 ]; then 151 | sed -i 's|^data.cleanup=1|data.cleanup=0|g' $OPTIONALS 152 | ui_print "- Cleaning-up $MODID data..." 153 | cleanup 154 | ui_print " " 155 | #elif [ -d $DIR ]\ 156 | #&& [ "$PREVMODNAME" != "$MODNAME" ]; then 157 | # ui_print "- Different module name is detected" 158 | # ui_print " Cleaning-up $MODID data..." 159 | # cleanup 160 | # ui_print " " 161 | fi 162 | 163 | # function 164 | extract_lib() { 165 | for APP in $APPS; do 166 | FILE=`find $MODPATH/system -type f -name $APP.apk` 167 | if [ -f `dirname $FILE`/extract ]; then 168 | ui_print "- Extracting..." 169 | DIR=`dirname $FILE`/lib/"$ARCHLIB" 170 | mkdir -p $DIR 171 | rm -rf $TMPDIR/* 172 | DES=lib/"$ABILIB"/* 173 | unzip -d $TMPDIR -o $FILE $DES 174 | cp -f $TMPDIR/$DES $DIR 175 | ui_print " " 176 | fi 177 | done 178 | } 179 | hide_oat() { 180 | for APP in $APPS; do 181 | REPLACE="$REPLACE 182 | `find $MODPATH/system -type d -name $APP | sed "s|$MODPATH||g"`/oat" 183 | done 184 | } 185 | replace_dir() { 186 | if [ -d $DIR ] && [ ! -d $MODPATH$MODDIR ]; then 187 | REPLACE="$REPLACE $MODDIR" 188 | fi 189 | } 190 | hide_app() { 191 | for APP in $APPS; do 192 | DIR=$SYSTEM/app/$APP 193 | MODDIR=/system/app/$APP 194 | replace_dir 195 | DIR=$SYSTEM/priv-app/$APP 196 | MODDIR=/system/priv-app/$APP 197 | replace_dir 198 | DIR=$PRODUCT/app/$APP 199 | MODDIR=/system/product/app/$APP 200 | replace_dir 201 | DIR=$PRODUCT/priv-app/$APP 202 | MODDIR=/system/product/priv-app/$APP 203 | replace_dir 204 | DIR=$MY_PRODUCT/app/$APP 205 | MODDIR=/system/product/app/$APP 206 | replace_dir 207 | DIR=$MY_PRODUCT/priv-app/$APP 208 | MODDIR=/system/product/priv-app/$APP 209 | replace_dir 210 | DIR=$PRODUCT/preinstall/$APP 211 | MODDIR=/system/product/preinstall/$APP 212 | replace_dir 213 | DIR=$SYSTEM_EXT/app/$APP 214 | MODDIR=/system/system_ext/app/$APP 215 | replace_dir 216 | DIR=$SYSTEM_EXT/priv-app/$APP 217 | MODDIR=/system/system_ext/priv-app/$APP 218 | replace_dir 219 | DIR=$VENDOR/app/$APP 220 | MODDIR=/system/vendor/app/$APP 221 | replace_dir 222 | DIR=$VENDOR/euclid/product/app/$APP 223 | MODDIR=/system/vendor/euclid/product/app/$APP 224 | replace_dir 225 | done 226 | } 227 | 228 | # extract 229 | APPS="`ls $MODPATH/system/priv-app` 230 | `ls $MODPATH/system/app` 231 | `ls $MODPATH/product/priv-app` 232 | `ls $MODPATH/product/app` 233 | `ls $MODPATH/system_ext/priv-app` 234 | `ls $MODPATH/system_ext/app` 235 | `ls $MODPATH/vendor/app`" 236 | ARCHLIB=arm64 237 | ABILIB=arm64-v8a 238 | extract_lib 239 | ARCHLIB=arm 240 | if echo "$ABILIST" | grep -q armeabi-v7a; then 241 | ABILIB=armeabi-v7a 242 | extract_lib 243 | elif echo "$ABILIST" | grep -q armeabi; then 244 | ABILIB=armeabi 245 | extract_lib 246 | else 247 | ABILIB=armeabi-v7a 248 | extract_lib 249 | fi 250 | ARCHLIB=x64 251 | ABILIB=x86_64 252 | extract_lib 253 | ARCHLIB=x86 254 | ABILIB=x86 255 | extract_lib 256 | rm -f `find $MODPATH/system -type f -name extract` 257 | # hide 258 | hide_oat 259 | hide_app 260 | 261 | # unmount 262 | unmount_mirror 263 | 264 | 265 | 266 | 267 | 268 | -------------------------------------------------------------------------------- /function.sh: -------------------------------------------------------------------------------- 1 | # function 2 | remove_cache() { 3 | FILES=`find $MODPATH -type f -name *.apk | sed 's|.apk||g'` 4 | APPS=`for FILE in $FILES; do basename $FILE; done` 5 | for APP in $APPS; do 6 | rm -f `find /data/system/package_cache\ 7 | /data/dalvik-cache /data/resource-cache\ 8 | -type f -name *$APP*` 9 | done 10 | } 11 | mount_partitions_in_recovery() { 12 | if [ "$BOOTMODE" != true ]; then 13 | BLOCK=/dev/block/bootdevice/by-name 14 | BLOCK2=/dev/block/mapper 15 | ui_print "- Recommended to mount all partitions first" 16 | ui_print " before installing this module" 17 | ui_print " " 18 | DIR=/vendor 19 | if [ -d $DIR ] && ! is_mounted $DIR; then 20 | mount -o rw -t auto $BLOCK$DIR$SLOT $DIR\ 21 | || mount -o rw -t auto $BLOCK2$DIR$SLOT $DIR\ 22 | || mount -o rw -t auto $BLOCK/cust $DIR\ 23 | || mount -o rw -t auto $BLOCK2/cust $DIR 24 | fi 25 | DIR=/product 26 | if [ -d $DIR ] && ! is_mounted $DIR; then 27 | mount -o rw -t auto $BLOCK$DIR$SLOT $DIR\ 28 | || mount -o rw -t auto $BLOCK2$DIR$SLOT $DIR 29 | fi 30 | DIR=/system_ext 31 | if [ -d $DIR ] && ! is_mounted $DIR; then 32 | mount -o rw -t auto $BLOCK$DIR$SLOT $DIR\ 33 | || mount -o rw -t auto $BLOCK2$DIR$SLOT $DIR 34 | fi 35 | DIR=/odm 36 | if [ -d $DIR ] && ! is_mounted $DIR; then 37 | mount -o rw -t auto $BLOCK$DIR$SLOT $DIR\ 38 | || mount -o rw -t auto $BLOCK2$DIR$SLOT $DIR 39 | fi 40 | DIR=/my_product 41 | if [ -d $DIR ] && ! is_mounted $DIR; then 42 | mount -o rw -t auto $BLOCK$DIR $DIR\ 43 | || mount -o rw -t auto $BLOCK2$DIR $DIR 44 | fi 45 | DIR=/data 46 | if [ -d $DIR ] && ! is_mounted $DIR; then 47 | mount -o rw -t auto $BLOCK/userdata $DIR\ 48 | || mount -o rw -t auto $BLOCK2/userdata $DIR 49 | fi 50 | DIR=/cache 51 | if [ -d $DIR ] && ! is_mounted $DIR; then 52 | mount -o rw -t auto $BLOCK$DIR $DIR\ 53 | || mount -o rw -t auto $BLOCK2$DIR $DIR 54 | fi 55 | DIR=/persist 56 | if [ -d $DIR ] && ! is_mounted $DIR; then 57 | mount -o rw -t auto $BLOCK$DIR $DIR\ 58 | || mount -o rw -t auto $BLOCK2$DIR $DIR 59 | fi 60 | DIR=/metadata 61 | if [ -d $DIR ] && ! is_mounted $DIR; then 62 | mount -o rw -t auto $BLOCK$DIR $DIR\ 63 | || mount -o rw -t auto $BLOCK2$DIR $DIR 64 | fi 65 | DIR=/cust 66 | if [ -d $DIR ] && ! is_mounted $DIR; then 67 | mount -o rw -t auto $BLOCK$DIR $DIR\ 68 | || mount -o rw -t auto $BLOCK2$DIR $DIR 69 | fi 70 | fi 71 | } 72 | get_device() { 73 | DEV="`cat /proc/self/mountinfo | awk '{ if ( $5 == "'$1'" ) print $3 }' | head -1 | sed 's/:/ /g'`" 74 | } 75 | mount_mirror() { 76 | RAN="`head -c6 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9'`" 77 | while [ -e /dev/$RAN ]; do 78 | RAN="`head -c6 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9'`" 79 | done 80 | mknod /dev/$RAN b `get_device "$1"; echo $DEV` 81 | if mount -t ext4 -o ro /dev/$RAN "$2"\ 82 | || mount -t erofs -o ro /dev/$RAN "$2"\ 83 | || mount -t f2fs -o ro /dev/$RAN "$2"\ 84 | || mount -t auto -o ro /dev/$RAN "$2"; then 85 | blockdev --setrw /dev/$RAN 86 | rm -f /dev/$RAN 87 | return 0 88 | fi 89 | rm -f /dev/$RAN 90 | return 1 91 | } 92 | unmount_mirror() { 93 | if [ "$BOOTMODE" == true ]\ 94 | && [ "$HASMIRROR" == false ]; then 95 | FOLDS="$MIRROR/* $MIRROR" 96 | for FOLD in $FOLDS; do 97 | umount $FOLD 98 | done 99 | rm -rf $MIRROR/* 100 | fi 101 | } 102 | remount_partitions() { 103 | PARS="/ /system /vendor /product /system_ext /odm /my_product" 104 | for PAR in $PARS; do 105 | mount -o ro,remount $PAR 106 | done 107 | } 108 | mount_system_to_mirror() { 109 | DIR=/system 110 | if [ ! -d $MIRROR$DIR ]; then 111 | HASMIRROR=false 112 | remount_partitions 113 | unmount_mirror 114 | ui_print "- Mounting $MIRROR$DIR..." 115 | if [ "$SYSTEM_ROOT" == true ]\ 116 | || [ "$SYSTEM_AS_ROOT" == true ]; then 117 | mkdir -p $MIRROR/system_root 118 | if mount_mirror / $MIRROR/system_root; then 119 | rm -rf $MIRROR$DIR 120 | ln -sf $MIRROR/system_root$DIR $MIRROR 121 | else 122 | ui_print " ! Failed" 123 | rm -rf $MIRROR/system_root 124 | fi 125 | else 126 | mkdir -p $MIRROR$DIR 127 | if ! mount_mirror $DIR $MIRROR$DIR; then 128 | ui_print " ! Failed" 129 | rm -rf $MIRROR$DIR 130 | fi 131 | fi 132 | ui_print " " 133 | else 134 | HASMIRROR=true 135 | fi 136 | } 137 | mount_vendor_to_mirror() { 138 | DIR=/vendor 139 | if [ -d $DIR ] && [ ! -d $MIRROR$DIR ]; then 140 | ui_print "- Mounting $MIRROR$DIR..." 141 | mkdir -p $MIRROR$DIR 142 | if ! mount_mirror $DIR $MIRROR$DIR; then 143 | ui_print " Creating symlink instead" 144 | rm -rf $MIRROR$DIR 145 | if [ -d $MIRROR/system$DIR ]; then 146 | ln -sf $MIRROR/system$DIR $MIRROR 147 | fi 148 | fi 149 | ui_print " " 150 | fi 151 | } 152 | mount_product_to_mirror() { 153 | DIR=/product 154 | if [ -d $DIR ] && [ ! -d $MIRROR$DIR ]; then 155 | ui_print "- Mounting $MIRROR$DIR..." 156 | mkdir -p $MIRROR$DIR 157 | if ! mount_mirror $DIR $MIRROR$DIR; then 158 | ui_print " Creating symlink instead" 159 | rm -rf $MIRROR$DIR 160 | if [ -d $MIRROR/system$DIR ]; then 161 | ln -sf $MIRROR/system$DIR $MIRROR 162 | fi 163 | fi 164 | ui_print " " 165 | fi 166 | } 167 | mount_system_ext_to_mirror() { 168 | DIR=/system_ext 169 | if [ -d $DIR ] && [ ! -d $MIRROR$DIR ]; then 170 | ui_print "- Mounting $MIRROR$DIR..." 171 | mkdir -p $MIRROR$DIR 172 | if ! mount_mirror $DIR $MIRROR$DIR; then 173 | ui_print " Creating symlink instead" 174 | rm -rf $MIRROR$DIR 175 | if [ -d $MIRROR/system$DIR ]; then 176 | ln -sf $MIRROR/system$DIR $MIRROR 177 | fi 178 | fi 179 | ui_print " " 180 | fi 181 | } 182 | mount_odm_to_mirror() { 183 | DIR=/odm 184 | if [ -d $DIR ] && [ ! -d $MIRROR$DIR ]; then 185 | ui_print "- Mounting $MIRROR$DIR..." 186 | mkdir -p $MIRROR$DIR 187 | if ! mount_mirror $DIR $MIRROR$DIR; then 188 | ui_print " Creating symlink instead" 189 | rm -rf $MIRROR$DIR 190 | if [ -d $MIRROR/system_root$DIR ]; then 191 | ln -sf $MIRROR/system_root$DIR $MIRROR 192 | elif [ -d $MIRROR/vendor$DIR ]; then 193 | ln -sf $MIRROR/vendor$DIR $MIRROR 194 | elif [ -d $MIRROR/system/vendor$DIR ]; then 195 | ln -sf $MIRROR/system/vendor$DIR $MIRROR 196 | fi 197 | fi 198 | ui_print " " 199 | fi 200 | } 201 | mount_my_product_to_mirror() { 202 | DIR=/my_product 203 | if [ -d $DIR ] && [ ! -d $MIRROR$DIR ]; then 204 | ui_print "- Mounting $MIRROR$DIR..." 205 | mkdir -p $MIRROR$DIR 206 | if ! mount_mirror $DIR $MIRROR$DIR; then 207 | ui_print " Creating symlink instead" 208 | rm -rf $MIRROR$DIR 209 | if [ -d $MIRROR/system_root$DIR ]; then 210 | ln -sf $MIRROR/system_root$DIR $MIRROR 211 | fi 212 | fi 213 | ui_print " " 214 | fi 215 | } 216 | mount_partitions_to_mirror() { 217 | mount_system_to_mirror 218 | mount_vendor_to_mirror 219 | mount_product_to_mirror 220 | mount_system_ext_to_mirror 221 | mount_odm_to_mirror 222 | mount_my_product_to_mirror 223 | } 224 | magisk_setup() { 225 | MAGISKTMP=`magisk --path` 226 | if [ "$BOOTMODE" == true ]; then 227 | if [ "$MAGISKTMP" ]; then 228 | mount -o rw,remount $MAGISKTMP 229 | INTERNALDIR=$MAGISKTMP/.magisk 230 | MIRROR=$INTERNALDIR/mirror 231 | else 232 | INTERNALDIR=/mnt 233 | mount -o rw,remount $INTERNALDIR 234 | MIRROR=$INTERNALDIR/mirror 235 | fi 236 | mount_partitions_to_mirror 237 | fi 238 | } 239 | remove_sepolicy_rule() { 240 | rm -rf /metadata/magisk/"$MODID"\ 241 | /mnt/vendor/persist/magisk/"$MODID"\ 242 | /persist/magisk/"$MODID"\ 243 | /data/unencrypted/magisk/"$MODID"\ 244 | /cache/magisk/"$MODID"\ 245 | /cust/magisk/"$MODID" 246 | } 247 | 248 | 249 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=GoogleApp 2 | name=Google App 3 | version=v0.6 4 | versionCode=6 5 | author=Rei Ryuki the Fixer 6 | description=Quick search box and assistant app (com.google.android.googlequicksearchbox) by Google LLC. 7 | 8 | 9 | -------------------------------------------------------------------------------- /package.txt: -------------------------------------------------------------------------------- 1 | com.google.android.googlequicksearchbox 2 | -------------------------------------------------------------------------------- /post-fs-data.sh: -------------------------------------------------------------------------------- 1 | mount -o rw,remount /data 2 | MODPATH=${0%/*} 3 | 4 | # log 5 | exec 2>$MODPATH/debug-pfsd.log 6 | set -x 7 | 8 | # cleaning 9 | FILE=$MODPATH/cleaner.sh 10 | if [ -f $FILE ]; then 11 | . $FILE 12 | mv -f $FILE $FILE.txt 13 | fi 14 | 15 | 16 | -------------------------------------------------------------------------------- /sepolicy.rule: -------------------------------------------------------------------------------- 1 | # debug 2 | allow system_server system_file file write 3 | -------------------------------------------------------------------------------- /service.sh: -------------------------------------------------------------------------------- 1 | MODPATH=${0%/*} 2 | 3 | # log 4 | exec 2>$MODPATH/debug.log 5 | set -x 6 | 7 | # var 8 | API=`getprop ro.build.version.sdk` 9 | 10 | # wait 11 | until [ "`getprop sys.boot_completed`" == 1 ]; do 12 | sleep 10 13 | done 14 | 15 | # list 16 | PKGS="`cat $MODPATH/package.txt` 17 | com.google.android.googlequicksearchbox:search 18 | com.google.android.googlequicksearchbox:assistant 19 | com.google.android.googlequicksearchbox:playcore_dialog_wrapper_activity 20 | com.google.android.googlequicksearchbox:playcore_missing_splits_activity 21 | com.google.android.googlequicksearchbox:interactor 22 | com.google.android.googlequicksearchbox:wallpaper_chooser 23 | com.google.android.googlequicksearchbox:crash_report 24 | com.google.android.googlequicksearchbox:dev 25 | com.google.android.googlequicksearchbox:ui 26 | com.google.android.googlequicksearchbox:afw 27 | com.google.android.googlequicksearchbox:primes_lifeboat 28 | com.google.android.googlequicksearchbox:client_logging 29 | com.google.android.googlequicksearchbox:trusted_disable_art_image_ 30 | com.google.android.googlequicksearchbox:trusted 31 | com.google.android.googlequicksearchbox:googleapp 32 | com.google.android.googlequicksearchbox:train 33 | com.google.android.googlequicksearchbox:ar_runtime_loader" 34 | for PKG in $PKGS; do 35 | magisk --denylist rm $PKG 2>/dev/null 36 | magisk --sulist add $PKG 2>/dev/null 37 | done 38 | if magisk magiskhide sulist; then 39 | for PKG in $PKGS; do 40 | magisk magiskhide add $PKG 41 | done 42 | else 43 | for PKG in $PKGS; do 44 | magisk magiskhide rm $PKG 45 | done 46 | fi 47 | 48 | # grant 49 | PKG=com.google.android.googlequicksearchbox 50 | if appops get $PKG > /dev/null 2>&1; then 51 | appops set $PKG LEGACY_STORAGE allow 52 | appops set $PKG WRITE_MEDIA_IMAGES allow 53 | appops set $PKG WRITE_MEDIA_VIDEO allow 54 | appops set $PKG MANAGE_ONGOING_CALLS allow 55 | appops set $PKG GET_USAGE_STATS allow 56 | if [ "$API" -ge 30 ]; then 57 | appops set $PKG MANAGE_EXTERNAL_STORAGE allow 58 | appops set $PKG NO_ISOLATED_STORAGE allow 59 | fi 60 | if [ "$API" -ge 33 ]; then 61 | appops set $PKG ACCESS_RESTRICTED_SETTINGS allow 62 | fi 63 | PKGOPS=`appops get $PKG` 64 | UID=`dumpsys package $PKG 2>/dev/null | grep -m 1 Id= | sed -e 's| userId=||g' -e 's| appId=||g'` 65 | if [ "$UID" ] && [ "$UID" -gt 9999 ]; then 66 | appops set --uid "$UID" LEGACY_STORAGE allow 67 | appops set --uid "$UID" SCHEDULE_EXACT_ALARM allow 68 | UIDOPS=`appops get --uid "$UID"` 69 | fi 70 | fi 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # prevent bootloop 2 | ro.control_privapp_permissions=log 3 | 4 | # prop 5 | ro.opa.eligible_device=true 6 | 7 | 8 | -------------------------------------------------------------------------------- /system/etc/default-permissions/default-com.google.android.googlequicksearchbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /system/etc/permissions/com.android.systemui.SUPPORTS_DRAG_ASSISTANT_TO_SPLIT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.ANDROID_ONE_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.CONTEXTUAL_SEARCH.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.DSE_CHOICE_SCREEN.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.ECHO_REFERENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.GOOGLE_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.GOOGLE_SPEECH_ENHANCEMENT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.GPU_ASR_OFFLOAD.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2017_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2018_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2019_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2019_MIDYEAR_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2020_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2020_MIDYEAR_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2021_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2021_MIDYEAR_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2022_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2022_MIDYEAR_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2023_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_2024_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.feature.PIXEL_EXPERIENCE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /system/etc/permissions/com.google.android.googlequicksearchbox.features.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /system/etc/permissions/privapp-com.google.android.googlequicksearchbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /system/etc/sysconfig/config-com.google.android.googlequicksearchbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /system/priv-app/Velvet/Velvet.apk: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | mount -o rw,remount /data 2 | [ ! "$MODPATH" ] && MODPATH=${0%/*} 3 | [ ! "$MODID" ] && MODID=`basename "$MODPATH"` 4 | UID=`id -u` 5 | 6 | # log 7 | exec 2>/data/media/"$UID"/$MODID\_uninstall.log 8 | set -x 9 | 10 | # run 11 | . $MODPATH/function.sh 12 | 13 | # cleaning 14 | remove_cache 15 | remove_sepolicy_rule 16 | 17 | 18 | --------------------------------------------------------------------------------