Update customize.sh
This commit is contained in:
parent
55d06c9183
commit
ea2bc7918b
1 changed files with 9 additions and 6 deletions
|
|
@ -38,6 +38,8 @@ fi
|
|||
|
||||
STOCKAPPVER=$(dumpsys package $PKGNAME | grep versionName | cut -d= -f 2 | sed -n '1p')
|
||||
VANCEDXAPPVER=$(grep version= module.prop | sed 's/version=v//')
|
||||
ui_print "INFO : Installed $APPNAME version : $STOCKAPPVER"
|
||||
ui_print "INFO : YouTube Vanced+ Music version : $VANCEDXAPPVER"
|
||||
|
||||
if [ "$STOCKAPPVER" != "$VANCEDXAPPVER" ]
|
||||
then
|
||||
|
|
@ -50,29 +52,30 @@ then
|
|||
|
||||
fi
|
||||
|
||||
ui_print "INFO : Unmounting previous mounts"
|
||||
ui_print "INFO : Unmounting previous mounts..."
|
||||
|
||||
grep $PKGNAME /proc/mounts | while read -r LINE
|
||||
do
|
||||
echo "$LINE" | grep "$PKGNAME" | cut -d " " -f 2 | sed "s/apk.*/apk/" | xargs -r umount -l
|
||||
done
|
||||
|
||||
ui_print "INFO : Moving files"
|
||||
sleep 2
|
||||
ui_print "INFO : Copying necessary files..."
|
||||
mkdir -p "$MODPATH/app"
|
||||
rm $MODPATH/app/"$APPNAME"*
|
||||
mv $MODPATH/*.apk $MODPATH/app/"$APPNAME"vancedx-"$VANCEDXAPPVER".apk
|
||||
STOCKAPK=$(pm path $PKGNAME | grep base | cut -d ":" -f2)
|
||||
VANCEDXAPK=$MODPATH/app/"$APPNAME"vancedx-"$VANCEDXAPPVER".apk
|
||||
ui_print "INFO : set permissions"
|
||||
ui_print "INFO : Setting permissions..."
|
||||
chmod 644 "$VANCEDXAPK"
|
||||
chown system:system "$VANCEDXAPK"
|
||||
chcon u:object_r:apk_data_file:s0 "$VANCEDXAPK"
|
||||
sleep 2
|
||||
ui_print "INFO : Mounting YouTube Vanced+ Music to YouTube Music app..."
|
||||
mount -o bind "$VANCEDXAPK" "$STOCKAPK"
|
||||
sleep 2
|
||||
ui_print "INFO : Force closing current YouTube Music app..."
|
||||
am force-stop "$PKGNAME"
|
||||
|
||||
|
||||
sleep 2
|
||||
ui_print "INFO : YouTube Music Vanced+ Installed !"
|
||||
ui_print "TIPS : To prevent update from Play Store, use zygisk-detach module !"
|
||||
ui_print "TIPS : GitHub : https://github.com/j-hc/zygisk-detach"
|
||||
|
|
|
|||
Loading…
Reference in a new issue