Skip to content

Commit

Permalink
add Pixel launcher march patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingsman44 committed Mar 20, 2023
1 parent 0378587 commit 12c8720
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
25 changes: 15 additions & 10 deletions module/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,12 @@ fi

sec_patch="$(getprop ro.build.version.security_patch)"
build_date="$(getprop ro.build.date.utc)"
# Greater then DEC patch 2022 or Android version 12L or greater

if [ $API -eq 33 ]; then
for i in "ro.lineage.device" "ro.crdroid.version" "ro.rice.version" "ro.miui.ui.version.code"; do
if [ ! -z "$(getprop $i)" ]; then
LOS_FIX=1
break
fi
done
LOS_FIX=1
fi

# Greater then DEC patch 2022 or Android version 12L or greater
if [ $API -ge 32 ]; then
NEW_PL=1
elif [ $(echo $sec_patch | cut -d- -f1) -ge 2022 ] && [ $API -ge 31 ]; then
Expand Down Expand Up @@ -253,6 +249,8 @@ if [ $API -eq 32 ]; then
fi
fi

NEW_M_PL=0

# Dec patch 2022
if [ $API -ge 33 ]; then
if [ $(echo $sec_patch | cut -d- -f1) -le 2021 ]; then
Expand All @@ -262,10 +260,14 @@ if [ $API -ge 33 ]; then
NEW_D_PL=1
fi
else
if [ $(echo $sec_patch | cut -d- -f1) -eq 2022 ] && [ $(echo $sec_patch | cut -d- -f2) -ge 12 ]; then
if [ $(echo $sec_patch | cut -d- -f1) -eq 2023 ] && [ $(echo $sec_patch | cut -d- -f2) -ge 3 ]; then
NEW_M_PL=1
elif [ $(echo $sec_patch | cut -d- -f1) -eq 2022 ] && [ $(echo $sec_patch | cut -d- -f2) -ge 12 ]; then
NEW_D_PL=1
elif [ $(echo $sec_patch | cut -d- -f1) -ge 2023 ]; then
elif [ $(echo $sec_patch | cut -d- -f1) -eq 2023 ]; then
NEW_D_PL=1
elif [ $(echo $sec_patch | cut -d- -f1) -ge 2024 ]; then
NEW_M_PL=1
fi
fi
fi
Expand Down Expand Up @@ -1461,7 +1463,10 @@ if [ $API -ge 29 ]; then
rm -rf /sdcard/Pixelify/backup/pl-$API.tar.xz
rm -rf /sdcard/Pixelify/version/pl-$API.txt
cd $MODPATH/files
if [ $API -eq 33 ] && [ $LOS_FIX -eq 1 ] && [ $NEW_D_PL -eq 1 ]; then
if [ $API -eq 33 ] && [ $NEW_M_PL -eq 1 ]; then
$MODPATH/addon/curl https://gitlab.com/Kingsman-z/pixelify-files/-/raw/master/pl-m-33.tar.xz -O &>/proc/self/fd/$OUTFD
mv pl-m-33.tar.xz pl-$API.tar.xz
elif [ $API -eq 33 ] && [ $LOS_FIX -eq 1 ] && [ $NEW_D_PL -eq 1 ]; then
$MODPATH/addon/curl https://gitlab.com/Kingsman-z/pixelify-files/-/raw/master/pl-d-los-33.tar.xz -O &>/proc/self/fd/$OUTFD
mv pl-d-los-33.tar.xz pl-$API.tar.xz
elif [ $API -eq 33 ] && [ $NEW_D_PL -eq 1 ]; then
Expand Down
6 changes: 5 additions & 1 deletion module/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ fetch_version() {
DPVERSION=$(echo "$ver" | grep asis-new-33 | cut -d'=' -f2)
DPSIZE="$($MODPATH/addon/curl -sI https://gitlab.com/Kingsman-z/pixelify-files/-/raw/master/asis-new-33.tar.xz | grep -i Content-Length | cut -d':' -f2 | sed 's/ //g' | tr -d '\r' | online_mb)"
fi
if [ $API -eq 33 ] && [ $LOS_FIX -eq 1 ] && [ $NEW_D_PL -eq 1 ]; then

if [ $API -eq 33 ] && [ $NEW_M_PL -eq 1 ]; then
PLVERSION=$(echo "$ver" | grep pl-m-$API | cut -d'=' -f2)
PLSIZE="$($MODPATH/addon/curl -sI https://gitlab.com/Kingsman-z/pixelify-files/-/raw/master/pl-m-$API.tar.xz | grep -i Content-Length | cut -d':' -f2 | sed 's/ //g' | tr -d '\r' | online_mb) Mb"
elif [ $API -eq 33 ] && [ $LOS_FIX -eq 1 ] && [ $NEW_D_PL -eq 1 ]; then
PLVERSION=$(echo "$ver" | grep pl-d-los-$API | cut -d'=' -f2)
PLSIZE="$($MODPATH/addon/curl -sI https://gitlab.com/Kingsman-z/pixelify-files/-/raw/master/pl-d-los-$API.tar.xz | grep -i Content-Length | cut -d':' -f2 | sed 's/ //g' | tr -d '\r' | online_mb) Mb"
elif [ $API -eq 33 ] && [ $NEW_D_PL -eq 1 ]; then
Expand Down

0 comments on commit 12c8720

Please sign in to comment.