Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
OIakera committed Aug 30, 2021
1 parent 6965dfd commit 2ff7c9b
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 24 deletions.
5 changes: 2 additions & 3 deletions common/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ ui_print "- Android: $(getprop ro.system.build.version.release)"
ui_print "- Hardware: $(getprop ro.hardware)"
ui_print ""
if [ "$sound" == "mode" ]; then
ui_print "- Installing High Performance DAC, Qualcomm Detected"
ui_print "- Installing High Performance DAC, Qualcomm Detected"
ui_print ""
ui_print "- NOTE:"
ui_print "• High Performance DAC Still Bug For Other Devices."
ui_print "• Let Me Know If You Face Any Issues."
ui_print ""
rm -rf /data/high_perf_dac && mkdir -p /data/high_perf_dac
else
ui_print "- Installation High Performance DAC, Failed Wrong Hardware Detected !"
ui_print "- Installation High Performance DAC, Failed Wrong Hardware Detected"
ui_print ""
abort
fi
4 changes: 1 addition & 3 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@
# Uncomment and change 'MINAPI' and 'MAXAPI' to the minimum and maximum android version for your mod
# Uncomment DYNLIB if you want libs installed to vendor for oreo+ and system for anything older
# Uncomment DEBUG if you want full debug logs (saved to /sdcard)
#MINAPI=21
#MINAPI=26
#MAXAPI=30
#DYNLIB=true
DEBUG=true
ASH_STANDALONE=1

##########################################################################################
# Permissions
##########################################################################################

set_permissions() {
set_perm_recursive $MODPATH/high_perf_dac 0 0 0755 0755
}

##########################################################################################
Expand Down
Binary file removed high_perf_dac
Binary file not shown.
2 changes: 1 addition & 1 deletion module.prop
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ id=high_perf_dac
name=High Performance DAC
version=v2
versionCode=2
author=akira-vishal
author=akirasupr
description=Enable "High Performance DAC" of Qualcomm's WCD9xx DAC to maximize its power and get the best audio quality possible.
support=https://t.me/AkiraSuper
51 changes: 34 additions & 17 deletions post-fs-data.sh
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

0 comments on commit 2ff7c9b

Please sign in to comment.