Skip to content

Commit

Permalink
update to v2.1-beta-5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingsman44 committed Aug 29, 2022
1 parent e2623d2 commit baa4ad1
Show file tree
Hide file tree
Showing 22 changed files with 285 additions and 263 deletions.
112 changes: 58 additions & 54 deletions customize.sh

Large diffs are not rendered by default.

248 changes: 107 additions & 141 deletions deviceconfig.txt

Large diffs are not rendered by default.

Binary file added files/hotword-9.tar.xz
Binary file not shown.
Binary file modified files/system.tar.xz
Binary file not shown.
Binary file modified lib/riru/arm64-v8a/libpixelify.so
Binary file not shown.
Binary file modified lib/riru/armeabi-v7a/libpixelify.so
Binary file not shown.
Binary file modified lib/riru/x86/libpixelify.so
Binary file not shown.
Binary file modified lib/riru/x86_64/libpixelify.so
Binary file not shown.
Binary file modified lib/zygisk/arm64-v8a.so
Binary file not shown.
Binary file modified lib/zygisk/armeabi-v7a.so
Binary file not shown.
Binary file modified lib/zygisk/x86.so
Binary file not shown.
Binary file modified lib/zygisk/x86_64.so
Binary file not shown.
Binary file modified lib/zygisk_tensor/arm64-v8a.so
Binary file not shown.
Binary file modified lib/zygisk_tensor/armeabi-v7a.so
Binary file not shown.
Binary file modified lib/zygisk_tensor/x86.so
Binary file not shown.
Binary file modified lib/zygisk_tensor/x86_64.so
Binary file not shown.
6 changes: 6 additions & 0 deletions module-uninstaller.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id=PixelifyUninstaller
name=Pixelify Uninstaller
version=1
versionCode=1
author=Kingsman44
description=Don't Remove it. It is required to completly uninstall Pixelify. It will automatically when unistalling Pixelify.
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=Pixelify
name=Pixelify
version=2.1-beta-4
versionCode=20220816
version=2.1-beta-5
versionCode=20220829
author=Kingsman44
description=Enables pixel exclusive features :- Call Screening, Live Translate, Direct Call, Google Dialer Call Recording, Extreme Battery Saver, Hold For Me, Gboard Smart Compose, Adaptive Connectivity, Adaptive Sound, Next generation assistant, Pixel LiveWallpapers, Google Fit Heart rate and many more...
# 0 - Disable, 1 - Enable
Expand Down
87 changes: 87 additions & 0 deletions service-uninstaller.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/system/bin/sh
# Do NOT assume where your module will be located.
# ALWAYS use $MODDIR if you need to know where this script
# and module is placed.
# This will make sure your module will still work
# if Magisk change its mount point in the future
MODDIR=${0%/*}

# This script will be executed in late_start service mode

sqlite=/data/adb/modules/PixelifyUninstaller/addon/sqlite3
chmod 0755 $sqlite

gms=/data/data/com.google.android.gms/databases/phenotype.db
gser=/data/data/com.google.android.gsf/databases/gservices.db

set_device_config() {
while read p; do
if [ ! -z "$(echo $p)" ]; then
if [ "$(echo $p | head -c 1)" != "#" ]; then
name="$(echo $p | cut -d= -f1)"
namespace="$(echo $name | cut -d/ -f1)"
key="$(echo $name | cut -d/ -f2)"
value="$(echo $p | cut -d= -f2)"
device_config put $namespace $key $value
fi
fi
done <$MODDIR/deviceconfig.txt
}

# Wait for the boot
while true; do
boot=$(getprop sys.boot_completed)
if [ "$boot" -eq 1 ]; then
sleep 5
break
fi
done

# Uninstall if Pixelify is not detected.
if [ ! -d /data/adb/modules/Pixelify ]; then
#Remove XML patches and let app to regenrate without them.
rm -rf /data/data/com.google.android.dialer/shared_prefs/dialer_phenotype_flags.xml
rm -rf /data/data/com.google.android.inputmethod.latin/shared_prefs/flag_value.xml
rm -rf /data/data/com.google.android.inputmethod.latin/shared_prefs/flag_override.xml
rm -rf /data/data/com.google.android.apps.fitness/shared_prefs/growthkit_phenotype_prefs.xml
rm -rf /data/data/com.google.android.googlequicksearchbox/shared_prefs/GEL.GSAPrefs.xml
rm -rf /data/data/com.google.android.apps.turbo/shared_prefs/phenotypeFlags.xml

#Remove Pixelify version store data
rm -rf /data/pixelify

#Remove callscreening patch
chmod 0755 /data/data/com.google.android.dialer/files/phenotype
rm -rf chmod 0755 /data/data/com.google.android.dialer/files/phenotype/*

#Remove GMS patches
$sqlite $gms "DELETE FROM FlagOverrides"
$sqlite $gser "DELETE FROM overrides"

# Fixes Nexus Launcher gone
rm -rf /data/system/package_cache/*

# Uninstall packages of they are not system app.
[ -z $(pm list packages -s | grep com.google.android.as) ] && pm uninstall com.google.android.as
[ -z $(pm list packages -s | grep com.google.pixel.livewallpaper) ] && pm uninstall com.google.pixel.livewallpaper

# Disable Pickachu Wallpaper if device on Pixel 4 or XL
[[ "$(getprop ro.product.vendor.model)" != "Pixel 4" || "$(getprop ro.product.vendor.model)" != "Pixel 4 XL" ]] && pm disable -n com.google.pixel.livewallpaper/com.google.pixel.livewallpaper.pokemon.wallpapers.PokemonWallpaper -a android.intent.action.MAIN

echo "- Uninstalled Completed" >>/sdcard/Pixelify/logs.txt

# Remove Unistaller itself
rm -rf /data/adb/modules/PixelifyUninstaller
fi

# copy bootlogs to Pixelify folder if bootloop happened.
[ -f /data/adb/modules/Pixelify/boot_logs.txt ] && rm -rf /sdcard/Pixelify/boot_logs.txt && mv /data/adb/modules/Pixelify/boot_logs.txt /sdcard/Pixelify/boot_logs.txt

while true
do
set_device_config
if ps -Ao CMD | grep -q ndroid.systemui; then
break
fi
sleep 0.1
done
40 changes: 1 addition & 39 deletions service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,6 @@ check() {
$RESULT
}

set_device_config() {
while read p; do
if [ ! -z "$(echo $p)" ]; then
if [ "$(echo $p | head -c 1)" != "#" ]; then
name="$(echo $p | cut -d= -f1)"
namespace="$(echo $name | cut -d/ -f1)"
key="$(echo $name | cut -d/ -f2)"
value="$(echo $p | cut -d= -f2)"
device_config put $namespace $key $value
fi
fi
done <$MODDIR/deviceconfig.txt
}

mkdir -p /sdcard/Pixelify

log "Service Started"
Expand All @@ -145,9 +131,6 @@ cp -Tf $MODDIR/com.google.android.dialer /data/data/com.google.android.dialer/fi
# Wellbeing
pm_enable com.google.android.apps.wellbeing/com.google.android.apps.wellbeing.walkingdetection.ui.WalkingDetectionActivity

# Temporary Workaround for Precise Location
device_config put privacy location_accuracy_enabled true

if [ $(grep CallScreen $MODDIR/var.prop | cut -d'=' -f2) -eq 1 ]; then
mkdir -p /data/data/com.google.android.dialer/files/phenotype
cp -Tf $MODDIR/com.google.android.dialer /data/data/com.google.android.dialer/files/phenotype/com.google.android.dialer
Expand Down Expand Up @@ -180,20 +163,18 @@ CPU_ABI=$(getprop ro.product.cpu.api)
sleep 5
ZYGOTE_PID1=$(pidof "$MAIN_ZYGOTE_NICENAME")
echo "1z is $ZYGOTE_PID1"
device_config put privacy location_accuracy_enabled true

# Wait for SystemUI to start
sleep 10
SYSUI_PID1=$(pidof "$MAIN_SYSUI_NICENAME")
echo "1s is $SYSUI_PID1"
device_config put privacy location_accuracy_enabled true

sleep 15
ZYGOTE_PID2=$(pidof "$MAIN_ZYGOTE_NICENAME")
SYSUI_PID2=$(pidof "$MAIN_SYSUI_NICENAME")
echo "2z is $ZYGOTE_PID2"
echo "2s is $SYSUI_PID2"
device_config put privacy location_accuracy_enabled true

cp -Tf $MODDIR/com.google.android.dialer /data/data/com.google.android.dialer/files/phenotype/com.google.android.dialer

if check "$ZYGOTE_PID1" "$ZYGOTE_PID2"; then
Expand All @@ -214,7 +195,6 @@ SYSUI_PID3=$(pidof "$MAIN_SYSUI_NICENAME")
echo "3z is $ZYGOTE_PID3"
echo "3s is $SYSUI_PID3"

device_config put privacy location_accuracy_enabled true
cp -Tf $MODDIR/com.google.android.dialer /data/data/com.google.android.dialer/files/phenotype/com.google.android.dialer
am force-stop com.google.android.dialer
patch_gboard
Expand All @@ -239,23 +219,5 @@ fi
# Set device config
set_device_config

# Temporary Workaround for Precise Location
device_config put privacy location_accuracy_enabled true

sleep 30
device_config put privacy location_accuracy_enabled true

sleep 30
device_config put privacy location_accuracy_enabled true

sleep 30
device_config put privacy location_accuracy_enabled true

sleep 30
device_config put privacy location_accuracy_enabled true

sleep 30
device_config put privacy location_accuracy_enabled true

log "Service Finished"
echo "$temp" >>/sdcard/Pixelify/logs.txt
50 changes: 23 additions & 27 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ check_install_type() {
ui_print "! Riru $RIRU_MODULE_MIN_RIRU_VERSION_NAME or above is required."
if [ "$MAGISK_VER_CODE" -ge 24000 ]; then
MODULE_TYPE=2
ui_print "- Switching to Magisk Zygisk"
ui_print "- Changing installation mode to zygisk"
ui_print "- Installation Type: Zygisk"
else
ui_print "- Using Normal version"
ui_print "- Changing installation mode to normal magisk"
ui_print "- Installation Type: Normal Magisk"
fi
else
MODULE_TYPE=3
ui_print "- Using Riru instead of Zygisk"
ui_print "- Installation Type: Riru"
fi
}

Expand Down Expand Up @@ -109,7 +111,7 @@ fetch_version() {
OSRSIZE="$($MODPATH/addon/curl -sI https://gitlab.com/Kingsman-z/pixelify-files/-/raw/master/osr.tar.xz | grep -i Content-Length | cut -d':' -f2 | sed 's/ //g' | tr -d '\r' | online_mb) Mb"
LWSIZE="$($MODPATH/addon/curl -sI https://gitlab.com/Kingsman-z/pixelify-files/-/raw/master/pixel.tar.xz | grep -i Content-Length | cut -d':' -f2 | sed 's/ //g' | tr -d '\r' | online_mb) Mb"
else
echo "! Warning, Cannot able to fetch package version, using saved version instead" >>$logfile
echo " ! Cannot able to fetch package version, using saved version instead" >>$logfile
if [ ! -f $pix/nga.txt ]; then
echo "$NGAVERSIONP" >>$pix/nga.txt
fi
Expand Down Expand Up @@ -424,16 +426,10 @@ oos_fix() {
echo " - Apply fixup for OOS 12/ Color OS 12" >>$logfile
print ""
print " - Applying Fix for OOS 12"
cd $MODPATH/system/product/
cp -rf $MODPATH/system/product/. $MODPATH/system
cd $MODPATH/system/system_ext/
cp -rf $MODPATH/system/system_ext/. ../system
cd /
rm -rf $MODPATH/system/product $MODPATH/system/system_ext
mkdir -p $MODPATH/vendor/overlay
cp -rf $MODPATH/system/overlay/. $MODPATH/vendor/overlay
rm -rf $MODPATH/system/overlay
REMOVE="$(echo $REMOVE | tr ' ' '\n' | grep -v '/product' | grep -v '/system_ext')"
mkdir -p $MODPATH/system_ext/overlay
cp -rf $MODPATH/product/overlay/. $MODPATH/system_ext/overlay
rm -rf $MODPATH/product/overlay
#REMOVE="$(echo $REMOVE | tr ' ' '\n' | grep -v '/product' | grep -v '/system_ext')"
fi
}

Expand Down Expand Up @@ -578,12 +574,11 @@ osr_ins() {
cp -Tf $MODPATH/files/osr.tar.xz /sdcard/Pixelify/backup/osr.tar.xz
echo "$OSRVERSION" >>/sdcard/Pixelify/version/osr.txt
else
print "!! Warning !!"
print " No internet detected"
print " ! No internet detected"
print ""
print "- Using Old backup for now."
print " ! Using Old backup for now."
print ""
echo " - using old backup for Google offline speech recognition due to no internet" >>$logfile
echo " ! using old backup for Google offline speech recognition due to no internet" >>$logfile
fi
else
echo " - using old backup for Google offline speech recognition" >>$logfile
Expand Down Expand Up @@ -655,15 +650,14 @@ osr_ins() {
print ""
fi
else
print "!! Warning !!"
print " No internet detected"
print " ! No internet detected"
print ""
print "- Skipping Google offline speech recognition."
print " ! Skipping Google offline speech recognition."
print ""
echo " - skipping Google offline speech recognition due to no internet" >>$logfile
echo " ! Skipping Google offline speech recognition due to no internet" >>$logfile
fi
else
echo " - skipping Google offline speech recognition" >>$logfile
echo " - Skipping Google offline speech recognition" >>$logfile
fi
fi
}
Expand Down Expand Up @@ -714,9 +708,7 @@ drop_sys() {
}

ok_google_hotword() {
if [ $API -ge 30 ]; then
print ""
print " (NOTE: If Ok Google working fine then dont enable it)"
if [ $API -ge 28 ]; then
print " Do you want to add Hotword Blobs for OK GOOGLE?"
print " Vol Up += Yes"
print " Vol Down += No"
Expand Down Expand Up @@ -754,7 +746,11 @@ ok_google_hotword() {
# ' $MODPATH/system/vendor/etc/audio_policy_configuration.xml
# fi
# fi
tar -xf $MODPATH/files/hotword.tar.xz -C $MODPATH
if [ $API -ge 30 ]; then
tar -xf $MODPATH/files/hotword.tar.xz -C $MODPATH
else
tar -xf $MODPATH/files/hotword-9.tar.xz -C $MODPATH/system$product/priv-app
fi
fi
fi
}
1 change: 1 addition & 0 deletions vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ else
fi

# Default Locations
PIXELIFYUNS=/data/adb/modules/PixelifyUninstaller
FIT=/data/data/com.google.android.apps.fitness/shared_prefs/growthkit_phenotype_prefs.xml
TURBO=/data/data/com.google.android.apps.turbo/shared_prefs/phenotypeFlags.xml
DIALER=com.google.android.dialer
Expand Down

0 comments on commit baa4ad1

Please sign in to comment.