Skip to content

Commit

Permalink
Merge pull request #13 from nianweb-dev/master
Browse files Browse the repository at this point in the history
增加对真我设备的支持
  • Loading branch information
fei-ke authored Sep 5, 2024
2 parents bd30d44 + 02c4749 commit 0e86f41
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ elif [ -e /product/etc/permissions/cn.google.services.xml ]; then
origin=/product/etc/permissions/cn.google.services.xml
elif [ -e /my_bigball/etc/permissions/oplus_google_cn_gms_features.xml ]; then
origin=/my_bigball/etc/permissions/oplus_google_cn_gms_features.xml
elif [ -e /my_heytap/etc/permissions/my_heytap_cn_gms_features.xml ]; then
origin=/my_heytap/etc/permissions/my_heytap_cn_gms_features.xml
else
abort "File not found!"
fi
Expand All @@ -18,6 +20,14 @@ if [[ $origin == *my_bigball* ]]; then
target=$MODPATH/oplus_google_cn_gms_features.xml
echo -e '#!/system/bin/sh\nmount -o ro,bind ${0%/*}/oplus_google_cn_gms_features.xml /my_bigball/etc/permissions/oplus_google_cn_gms_features.xml' > $MODPATH/post-fs-data.sh
# echo 'sleep 60; umount /my_bigball/etc/permissions/oplus_google_cn_gms_features.xml' > $MODPATH/service.sh
elif [[ $origin == *my_heytap* ]]; then
target=$MODPATH/my_heytap_cn_gms_features.xml
echo -e '#!/system/bin/sh\nmount -o ro,bind ${0%/*}/my_heytap_cn_gms_features.xml /my_heytap/etc/permissions/my_heytap_cn_gms_features.xml' > $MODPATH/post-fs-data.sh
if [[ -e /my_heytap/etc/permissions/my_heytap_cn_features.xml ]]; then
echo -e '\nmount -o ro,bind ${0%/*}/my_heytap_cn_features.xml /my_heytap/etc/permissions/my_heytap_cn_features.xml' >> $MODPATH/post-fs-data.sh
heytap_cn_features_orgin=/my_heytap/etc/permissions/my_heytap_cn_features.xml
heytap_cn_features_target=$MODPATH/my_heytap_cn_features.xml
fi
elif [[ $origin == *system* || $KSU ]]; then
target=$MODPATH$origin
else
Expand All @@ -29,3 +39,11 @@ cp -f $origin $target
sed -i '/cn.google.services/d' $target
sed -i '/services_updater/d' $target
ui_print "modify $origin"

if [[ -e $heytap_cn_features_orgin ]]; then
mkdir -p $(dirname $heytap_cn_features_target)
cp -f $heytap_cn_features_orgin $heytap_cn_features_target
sed -i '/cn.google.services/d' $heytap_cn_features_target
sed -i '/services_updater/d' $heytap_cn_features_target
ui_print "modify $heytap_cn_features_orgin"
fi

0 comments on commit 0e86f41

Please sign in to comment.