Skip to content

Commit

Permalink
update v2.2-beta-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingsman44 committed Nov 27, 2022
1 parent 2c9be3e commit 159a803
Show file tree
Hide file tree
Showing 21 changed files with 693 additions and 309 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
build
/out
/riru/build
/zygisk/build
/zygisk/build
/module/files/system
2 changes: 1 addition & 1 deletion module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
moduleName = "Pixelify"
moduleAuthor = "Kingsman44"
moduleDescription = "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..."
moduleVersion = "v2.2-beta-1"
moduleVersion = "v2.2-beta-2"
moduleVersionCode = 20221014

//Riru Properties
Expand Down
34 changes: 18 additions & 16 deletions module/config.prop
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ UPDATE_DPS=1
# Create Backup for Device Personalistaion Services
BACKUP_DPS=1

# Enable Google Now playing
ENABLE_NOW_PLAYING=0

# Google Dialer Features
# Includes Call Recording, Hold for Me, Direct My Call
ENABLE_DIALER_FEATURES=1
Expand All @@ -38,9 +35,6 @@ ADD_CALL_SCREENING_FILES=1
# BAckup Lang Specific files for Call Screenining in DE,JP,IT,FR..
BACKUP_CALL_SCREENING_FILES=1

# Ok google fix Google hotword
OK_GOOGLE_HOTWORD=0

# Enable Next Generation Assistant
ENABLE_NGA=1

Expand Down Expand Up @@ -86,15 +80,6 @@ UPDATE_PIXEL_LAUNCHER=1
# Backup Pixel Launcher
BACKUP_PIXEL_LAUNCHER=1

# Pixel camera services
ENABLE_PCS=0

# Download updates of Pixel camera services.
UPDATE_PCS=1

# Pixel camera services backup
BACKUP_PCS=1

# Enable installation of Google settings intelligence
ENABLE_GSI=0

Expand All @@ -107,5 +92,22 @@ ENABLE_EXTREME_BATTERY_SAVER=0
# G Logo in Gboard
G_LOGO=0

# Depreciated features

# Google San fonts
GSAN_FONT=0
GSAN_FONT=0

# Pixel camera services
ENABLE_PCS=0

# Download updates of Pixel camera services.
UPDATE_PCS=1

# Pixel camera services backup
BACKUP_PCS=1

# Ok google fix Google hotword
OK_GOOGLE_HOTWORD=0

# Enable Google Now playing
ENABLE_NOW_PLAYING=0
199 changes: 109 additions & 90 deletions module/customize.sh

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions module/deviceconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ notification_assistant/generate_replies=true

# Privacy
privacy/safety_center_is_enabled=true
privacy/location_access_check_enabled=true
#privacy/location_access_check_enabled=true
privacy/location_accuracy_enabled=true
privacy/location_indicators_enabled=true
#privacy/location_indicators_enabled=true
privacy/permissions_hub_enabled=true
privacy/permissions_hub_2_enabled=true
privacy/privacy_dashboard_7_day_toggle=true
Expand Down
File renamed without changes.
File renamed without changes.
Binary file added module/extras/nplaying.tar.xz
Binary file not shown.
Binary file modified module/files/PixeliflyDPS.apk
Binary file not shown.
Binary file modified module/files/com.google.android.dialer
Binary file not shown.
Binary file modified module/files/com.google.android.dialer.bak
Binary file not shown.
Binary file modified module/files/sig.tar.xz
Binary file not shown.
Binary file modified module/files/system.tar.xz
Binary file not shown.
42 changes: 41 additions & 1 deletion module/pixelify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ option=$1
sel=$2
ac=0

. $DIR/vars.sh
. $DIR/utils.sh

case $option in
"--disable")
if [ $sel == "pixellauncher" ] || [ $sel == "pl" ]; then
Expand All @@ -15,12 +18,17 @@ case $option in
rm -rf $DIR/system/**/priv-app/*MiuiHome*
rm -rf $DIR/system/**/priv-app/*TouchWizHome*
rm -rf $DIR/system/**/PixelLauncherOverlay.apk
elif [ $sel == "now-playing" ]; then
rm -rf $DIR/system/etc/firmware
rm -rf $DIR/system/product/overlay/PixeliflyNowPlaying.apk
elif [ $sel == "hotword" ]; then
rm -rf $DIR/system/
else
echo "x Invalid choice"
ac=1
fi
if [ $ac -eq 0 ]; then
echo "- Success"
echo "- Success, Please Reboot to take effect !!"
fi
;;
"--remove-backup")
Expand Down Expand Up @@ -48,6 +56,38 @@ case $option in
echo "- Done"
fi
;;
"lockscreen_qr")
if [ $sel == "1" ] || [ $sel == "true" ]; then
settings put secure lock_screen_show_qr_code_scanner 1
echo "- Success"
elif [ $sel == "0" ] || [ $sel == "false" ]; then
settings put secure lock_screen_show_qr_code_scanner 0
echo "- Success"
else
echo "x Invalid choice"
ac=1
fi
;;
"install")
if [ $sel == "now-playing" ]; then
if [ -f $DIR/extras/nplaying.tar.xz ]; then
tar -xf $DIR/extras/nplaying.tar.xz -C $DIR/system
echo "- Success, Please Reboot to take effect !!"
else
echo "! File missing, cannot able to install now playing"
fi
elif [ $sel == "hotword" ]; then
if [ $API -ge 30 ]; then
tar -xf $DIR/extras/hotword.tar.xz -C $DIR
else
tar -xf $DIR/extras/hotword-9.tar.xz -C $DIR/system$product/priv-app
fi
echo "- Success, Please Reboot to take effect !!"
else
echo "x Invalid choice"
ac=1
fi
;;
"*")
echo "x Invalid choice"
;;
Expand Down
58 changes: 52 additions & 6 deletions module/service-uninstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ set_device_config() {
log() {
date=$(date +%y/%m/%d)
tim=$(date +%H:%M:%S)
echo "$@"
temp="$temp
$date $tim: $@"
}
Expand Down Expand Up @@ -221,17 +222,62 @@ else
am force-stop com.google.android.settings.intelligence

settings put global settings_enable_clear_calling true
settings put secure show_qr_code_scanner_setting true
set_device_config

patch_gboard
am force-stop com.google.android.dialer com.google.android.inputmethod.latin

pref_patch 45353596 1 boolean $PHOTOS_PREF
pref_patch 45363145 1 boolean $PHOTOS_PREF
pref_patch 45357512 1 boolean $PHOTOS_PREF
pref_patch 45361445 1 boolean $PHOTOS_PREF
pref_patch 45357511 1 boolean $PHOTOS_PREF
pref_patch photos.backup.throttled_state 0 boolean $PHOTOS_PREF
pref_patch 45353596 true boolean $PHOTOS_PREF
pref_patch 45363145 true boolean $PHOTOS_PREF
pref_patch 45357512 true boolean $PHOTOS_PREF
pref_patch 45361445 true boolean $PHOTOS_PREF
pref_patch 45357511 true boolean $PHOTOS_PREF
pref_patch photos.backup.throttled_state false boolean $PHOTOS_PREF

if [ -f $MODDIR/first ]; then
if [ -d /data/data/com.google.android.apps.nexuslauncher ]; then
pm install $MODDIR/system/**/priv-app/WallpaperPickerGoogleRelease/WallpaperPickerGoogleRelease.apk
if [ ! -f $PL_PREF ]; then
echo "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>" >>$PL_PREF
echo '<map>
<int name="launcher.home_bounce_count" value="3" />
<boolean name="launcher.apps_view_shown" value="true" />
<boolean name="pref_allowChromeTabResult" value="false" />
<boolean name="pref_allowWebResultAga" value="true" />
<int name="ALL_APPS_SEARCH_CORPUS_PREFERENCE" value="206719" />
<boolean name="pref_allowWidgetsResult" value="false" />
<int name="migration_src_device_type" value="0" />
<boolean name="pref_search_show_keyboard" value="false" />
<boolean name="pref_allowPeopleResult" value="true" />
<boolean name="pref_enable_minus_one" value="true" />
<string name="migration_src_workspace_size">5,5</string>
<boolean name="pref_search_show_hidden_targets" value="false" />
<boolean name="pref_allowWebSuggestChrome" value="false" />
<boolean name="pref_allowPixelTipsResult" value="true" />
<string name="idp_grid_name">normal</string>
<boolean name="pref_allowScreenshotResult" value="true" />
<boolean name="pref_allowMemoryResult" value="true" />
<boolean name="pref_allowShortcutResult" value="true" />
<boolean name="pref_allowRotation" value="false" />
<boolean name="launcher.select_tip_seen" value="true" />
<boolean name="pref_allowWebResult" value="true" />
<boolean name="pref_allowSettingsResult" value="true" />
<int name="migration_src_hotseat_count" value="5" />
<int name="launcher.hotseat_discovery_tip_count" value="5" />
<boolean name="pref_add_icon_to_home" value="true" />
<string name="migration_src_db_file">launcher.db</string>
<boolean name="pref_overview_action_suggestions" value="false" />
<boolean name="pref_allowPlayResult" value="true" />
<int name="launcher.all_apps_visited_count" value="10" />
</map>' >>$PL_PREF
else
pref_patch pref_overview_action_suggestions false boolean $PL_PREF
fi
am force-stop com.google.android.apps.nexuslauncher
fi
rm -rf $MODDIR/first
fi
fi

# loop=0
Expand Down
83 changes: 30 additions & 53 deletions module/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ bootlooped() {
#logcat -d >> /sdcard/Pixelify/boot_logs.txt
rip="$(logcat -d)"
rm -rf $MODDIR/boot_logs.txt
echo "$(getprop)" >>MODDIR/boot_logs.txt
echo "$rip" >>$MODDIR/boot_logs.txt
cp -Tf $MODDIR/boot_logs.txt /sdcard/Pixelify/boot_logs.txt
#echo "$rip" >> /sdcard/Pixelify/boot_logs.txt
Expand All @@ -45,73 +46,49 @@ bootlooped() {
}

check() {
VALUEA="$1"
VALUEB="$2"
RESULT=false
for i in $VALUEA; do
for j in $VALUEB; do
[ "$i" == "$j" ] && RESULT=true
TEXT1="$1"
TEXT2="$2"
result=false
for i in $TEXT1; do
for j in $TEXT2; do
[ "$i" == "$j" ] && result=true
done
done
$RESULT
$result
}

#HuskyDG@github's bootloop preventer
MAIN_ZYGOTE_NICENAME=zygote
MAIN_SYSUI_NICENAME=com.android.systemui

# Wait for zygote starts
sleep 5

MAIN_ZYGOTE_NICENAME=zygote
CPU_ABI=$(getprop ro.product.cpu.api)
[ "$CPU_ABI" = "arm64-v8a" -o "$CPU_ABI" = "x86_64" ] && MAIN_ZYGOTE_NICENAME=zygote64

# Wait for zygote to start
sleep 5
ZYGOTE_PID1=$(pidof "$MAIN_ZYGOTE_NICENAME")
echo "1z is $ZYGOTE_PID1"

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

sleep 15
ZYGOTE_PID2=$(pidof "$MAIN_ZYGOTE_NICENAME")
SYSUI_PID2=$(pidof "$MAIN_SYSUI_NICENAME")
echo "2z is $ZYGOTE_PID2"
echo "2s is $SYSUI_PID2"

if check "$ZYGOTE_PID1" "$ZYGOTE_PID2"; then
echo "No zygote error on step 1, ok!"
else
echo "Error on zygote step 1 but continue just to make sure..."
fi

if check "$SYSUI_PID1" "$SYSUI_PID2"; then
echo "No SystemUI error on step 1, ok!"
else
echo "Error on SystemUI step 1 but continue just to make sure..."
fi

sleep 30
sleep 15
ZYGOTE_PID3=$(pidof "$MAIN_ZYGOTE_NICENAME")
SYSUI_PID3=$(pidof "$MAIN_SYSUI_NICENAME")
echo "3z is $ZYGOTE_PID3"
echo "3s is $SYSUI_PID3"

if check "$ZYGOTE_PID2" "$ZYGOTE_PID3"; then
echo "No zygote error on step 2, ok!"
else if [ $(getprop sys.boot_completed) -eq 0 ]; then
echo "Error on zygote step 2 as well"
echo "Boot loop detected! Starting rescue script..."
bootlooped
fi
PIDS=0

if check "$SYSUI_PID2" "$SYSUI_PID3"; then
echo "No SystemUI error on step 2, ok!"
else if [ $(getprop sys.boot_completed) -eq 0 ]; then
echo "Error on SystemUI step 2 as well"
echo "Boot loop detected! Starting rescue script..."
bootlooped
if check "$ZYGOTE_PID1" "$ZYGOTE_PID2" && check "$ZYGOTE_PID2" "$ZYGOTE_PID3"; then
if [ -z "$ZYGOTE_PID1" ] && [ "$(getprop init.svc.bootanim)" != "stopped" ]; then
bootlooped
else
PIDS=1
fi
fi

# Set device config
set_device_config
if [ $PIDS -eq 0 ]; then
sleep 15
ZYGOTE_PID4=$(pidof "$MAIN_ZYGOTE_NICENAME")
if check "$ZYGOTE_PID3" "$ZYGOTE_PID4"; then
# Set device config
set_device_config
elif [ "$(getprop init.svc.bootanim)" != "stopped" ]; then
disable_modules
fi
fi
Loading

0 comments on commit 159a803

Please sign in to comment.