Skip to content
Snippets Groups Projects
Verified Commit dfdf4df9 authored by zycromerz's avatar zycromerz
Browse files

add path /system/etc/device_features for enable powermode option [miui]


Signed-off-by: default avatarZyCromerZ <neetroid97@gmail.com>
parent 343f8b4a
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,7 @@ if DSC -f $MODPATH/system/vendor/etc/placeholder ];then ...@@ -143,6 +143,7 @@ if DSC -f $MODPATH/system/vendor/etc/placeholder ];then
fi fi
ClearDF="y" ClearDF="y"
ClearDFP=""
if DDC -d /vendor/etc/device_features ]];then if DDC -d /vendor/etc/device_features ]];then
rm -rf $MODPATH/system/vendor/etc/device_features/placeholder rm -rf $MODPATH/system/vendor/etc/device_features/placeholder
for ListXml in $(ls /vendor/etc/device_features) for ListXml in $(ls /vendor/etc/device_features)
...@@ -152,16 +153,15 @@ if DDC -d /vendor/etc/device_features ]];then ...@@ -152,16 +153,15 @@ if DDC -d /vendor/etc/device_features ]];then
cp -af /vendor/etc/device_features/$ListXml $MODPATH/system/vendor/etc/device_features/$ListXml cp -af /vendor/etc/device_features/$ListXml $MODPATH/system/vendor/etc/device_features/$ListXml
sed -i 's/<bool name="support_power_mode">false<\/bool>/<bool name="support_power_mode">true<\/bool>/' $MODPATH/system/vendor/etc/device_features/$ListXml sed -i 's/<bool name="support_power_mode">false<\/bool>/<bool name="support_power_mode">true<\/bool>/' $MODPATH/system/vendor/etc/device_features/$ListXml
ClearDF="n" ClearDF="n"
ClearDFP="$ClearDFP /vendor/etc/device_features"
fi fi
done done
if DDC "$ClearDF" == "n" ]];then
ui_print "- enable powermode option on control center"
fi
# rm -rf $MODPATH/system/product # rm -rf $MODPATH/system/product
DDC "$ClearDF" == "y" ]] && rm -rf $MODPATH/system/vendor/etc/device_features DDC "$ClearDF" == "y" ]] && rm -rf $MODPATH/system/vendor/etc/device_features
else else
rm -rf $MODPATH/system/vendor/etc/device_features rm -rf $MODPATH/system/vendor/etc/device_features
fi fi
if DDC -d /system/product/etc/device_features ]];then if DDC -d /system/product/etc/device_features ]];then
rm -rf $MODPATH/system/product/etc/device_features/placeholder rm -rf $MODPATH/system/product/etc/device_features/placeholder
# rm -rf $MODPATH/system/vendor/etc/device_features # rm -rf $MODPATH/system/vendor/etc/device_features
...@@ -172,16 +172,37 @@ if DDC -d /system/product/etc/device_features ]];then ...@@ -172,16 +172,37 @@ if DDC -d /system/product/etc/device_features ]];then
cp -af /system/product/etc/device_features/$ListXml $MODPATH/system/product/etc/device_features/$ListXml cp -af /system/product/etc/device_features/$ListXml $MODPATH/system/product/etc/device_features/$ListXml
sed -i 's/<bool name="support_power_mode">false<\/bool>/<bool name="support_power_mode">true<\/bool>/' $MODPATH/system/product/etc/device_features/$ListXml sed -i 's/<bool name="support_power_mode">false<\/bool>/<bool name="support_power_mode">true<\/bool>/' $MODPATH/system/product/etc/device_features/$ListXml
ClearDF="n" ClearDF="n"
ClearDFP="$ClearDFP /system/product/etc/device_features"
fi fi
done done
if DDC "$ClearDF" == "n" ]];then
ui_print "- enable powermode option on control center"
fi
DDC "$ClearDF" == "y" ]] && rm -rf $MODPATH/system/product DDC "$ClearDF" == "y" ]] && rm -rf $MODPATH/system/product
else else
rm -rf $MODPATH/system/product rm -rf $MODPATH/system/product
fi fi
if DDC -d /system/etc/device_features ]];then
rm -rf $MODPATH/system/etc/device_features/placeholder
# rm -rf $MODPATH/system/vendor/etc/device_features
for ListXml in $(ls /system/etc/device_features)
do
Check="$(cat /system/etc/device_features/$ListXml | grep support_power_mode)"
if DDC ! -z "$Check" ]];then
cp -af /system/etc/device_features/$ListXml $MODPATH/system/etc/device_features/$ListXml
sed -i 's/<bool name="support_power_mode">false<\/bool>/<bool name="support_power_mode">true<\/bool>/' $MODPATH/system/etc/device_features/$ListXml
ClearDF="n"
ClearDFP="$ClearDFP /system/etc/device_features"
fi
done
DDC "$ClearDF" == "y" ]] && rm -rf $MODPATH/system/etc/device_features
else
rm -rf $MODPATH/system/etc/device_features
fi
if DDC "$ClearDF" == "n" ]];then
ui_print "- enable powermode option on control center"
ui_print "- path : $ClearDFP"
fi
## custom thermal blank remover ## custom thermal blank remover
rm -rf $MODPATH/system/etc/ZyC-Core/thermal-backup rm -rf $MODPATH/system/etc/ZyC-Core/thermal-backup
for ListThermal in thermal-arvr.conf thermal-map.conf thermal-nolimits.conf thermal-normal.conf thermal-phone.conf thermal-tgame.conf thermal-sgame.conf for ListThermal in thermal-arvr.conf thermal-map.conf thermal-nolimits.conf thermal-normal.conf thermal-phone.conf thermal-tgame.conf thermal-sgame.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment