-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
#!/system/bin/sh | ||
PATH=/data/high_perf_dac | ||
DIR1=$(find /sys/module -name high_perf_mode) | ||
DIR2=$(find /sys/module -name cpe_debug_mode) | ||
DIR3=$(find /sys/module -name impedance_detect_en) | ||
chmod 0777 $MODDIR/post-fs-data.sh | ||
if $DIR1; then | ||
echo "Disabled High Perf Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $PATH/high_perf_mode.log | ||
# Do not remove credit if you're using a part of this mod to your module. | ||
# by akirasupr@github | ||
MOUNT=/data | ||
if [ ! -d $MOUNT/high_perf_dac ]; then | ||
mkdir -p $MOUNT/high_perf_dac | ||
fi | ||
LOG=$MOUNT/high_perf_dac | ||
# Check if sync enabled | ||
if ! sync; then | ||
rm -rf $MODPATH | ||
echo "Disabled Module Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
else | ||
su && chmod 777 $MODPATH/post-fs-data.sh | ||
echo "Enabled Module Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
fi | ||
# Check if file exist | ||
FILE1=$(find /sys/module -name high_perf_mode) | ||
FILE2=$(find /sys/module -name cpe_debug_mode) | ||
FILE3=$(find /sys/module -name impedance_detect_en) | ||
# High Perf Mode | ||
if $FILE1; then | ||
echo "Disabled High Perf Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
else | ||
su busybox echo "1" > $DIR1 | ||
echo "Enabled High Perf Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $PATH/high_perf_mode.log | ||
echo 1 > $FILE1 | ||
echo "Enabled High Perf Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
fi | ||
if $DIR2; then | ||
echo "Disabled CPE Debug Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $PATH/cpe_debug_mode.log | ||
# CPE Debug Mode | ||
if $FILE2; then | ||
echo "Disabled CPE Debug Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
else | ||
su busybox echo "1" > $DIR2 | ||
echo "Enabled CPE Debug Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $PATH/cpe_debug_mode.log | ||
echo 1 > $FILE2 | ||
echo "Enabled CPE Debug Mode Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
fi | ||
if $DIR3; then | ||
echo "Disabled Impedance Detect EN Excecuted on $(date +"%d-%m-%Y %r" )" >> $PATH/impedance_detect_en.log | ||
# Impedance Detect EN | ||
if $FILE3; then | ||
echo "Disabled Impedance Detect EN Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
else | ||
su busybox echo "1" > $DIR3 | ||
echo "Enabled Impedance Detect EN Excecuted on $(date +"%d-%m-%Y %r" )" >> $PATH/impedance_detect_en.log | ||
echo 1 > $FILE3 | ||
echo "Enabled Impedance Detect EN Excecuted on $(date +"%d-%m-%Y %r" )" >> $LOG/akirasuper.log | ||
fi |