Update service.sh

This commit is contained in:
Cuynu 2023-12-24 18:12:19 +00:00
commit be36e1ce24

View file

@ -30,11 +30,11 @@ fi
wait_until_login
PKGNAME=com.google.android.apps.youtube.music
STOCKAPPVER=$(dumpsys package $PKGNAME | grep versionName | cut -d "=" -f 2 | sed -n '1p')
VANCEDXAPPVER=$(basename /data/adb/modules/ytvancedx-music/app/YTMusic* .apk | cut -d "-" -f 2)
VANCEDXAPPVER=$(basename /data/adb/modules/ytvancedx-music/app/vancedx* .apk | cut -d "-" -f 2)
if [ "$STOCKAPPVER" = "$VANCEDXAPPVER" ]
then
STOCKAPK=$(pm path $PKGNAME | grep base | cut -d ":" -f2)
VANCEDXAPK="/data/adb/modules/ytvancedx-music/app/YTMusicVancedX-$VANCEDXAPPVER.apk"
VANCEDXAPK="/data/adb/modules/ytvancedx-music/app/vancedx-$VANCEDXAPPVER.apk"
chcon u:object_r:apk_data_file:s0 "$VANCEDXAPK"
mount -o bind "$VANCEDXAPK" "$STOCKAPK"
fi