-
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
7 changed files
with
120 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
##### High Performance DAC | Magisk Module | ||
##### High perf DAC | Magisk/KSU Module | ||
|
||
##### Contact: https://t.me/AkiraSuper | ||
|
||
##### - This Magisk module enables the "High Performance DAC" mode of Qualcomm's WCD9xx DAC to maximize it's power and get the best audio quality possible. | ||
##### - This Magisk/KSU module enables the "High Performance DAC" mode of Qualcomm's WCD9xx DAC to maximize it's power and get the best audio quality possible. | ||
|
||
##### • `Needs Kernel Support` | ||
|
||
##### ✓ INSTALLATION: Just flash via Magisk and reboot. | ||
##### ✓ INSTALLATION: Just flash via Magisk/KSU and reboot. | ||
|
||
##### Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things. I (Akira) will not be responsible for ANY damage caused to anyone's devices due to the use of this module. | ||
##### Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things. I (Akera) will not be responsible for ANY damage caused to anyone's devices due to the use of this module. |
This file was deleted.
Oops, something went wrong.
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,53 +1,49 @@ | ||
SKIPUNZIP=1 | ||
MODLOG="/storage/emulated/0/high_perf_dac.log" | ||
CODENAME=$(grep_prop Codename $MODPATH/module.prop 2>/dev/null) | ||
MODEL=$(getprop ro.product.system.model 2>/dev/null) | ||
RELEASE=$(getprop ro.system.build.version.release 2>/dev/null) | ||
HARDWARE=$(getprop ro.hardware 2>/dev/null) | ||
REMOVE() { | ||
remove() { | ||
rm -rf $MODLOG 2>/dev/null | ||
rm -rf $MODPATH/changelog.txt 2>/dev/null | ||
rm -rf $MODPATH/LICENSE 2>/dev/null | ||
rm -rf $MODPATH/README.md 2>/dev/null | ||
} | ||
PERMISSION() { | ||
permission() { | ||
set_perm_recursive $MODPATH 0 0 0755 0644 | ||
set_perm $MODPATH/post-fs-data.sh 0 0 0777 0777 | ||
set_perm $MODPATH/service.sh 0 0 0777 0777 | ||
} | ||
EXTRACT() { | ||
extract() { | ||
ui_print "- Extracting module files" | ||
unzip -o "$ZIPFILE" module.prop -d $MODPATH >&2 | ||
unzip -o "$ZIPFILE" post-fs-data.sh -d $MODPATH >&2 | ||
unzip -o "$ZIPFILE" service.sh -d $MODPATH >&2 | ||
} | ||
FUNCTION() { | ||
function() { | ||
if [ "$HARDWARE" == "qcom" ]; then | ||
ui_print "" | ||
ui_print "• Installing High Performance DAC, ✓ Qualcomm Detected" | ||
ui_print "• ✓ Qcom Detected" | ||
ui_print "" | ||
REMOVE | ||
PERMISSION | ||
if [ "$FILE1" && "$FILE2" && "$FILE3" ]; then | ||
ui_print "" | ||
ui_print "• Installing High perf DAC" | ||
ui_print "" | ||
remove | ||
permission | ||
else | ||
ui_print "" | ||
ui_print "- ! Failed because your Kernel is Not Supported" | ||
ui_print "" | ||
abort | ||
fi | ||
else | ||
ui_print "" | ||
ui_print "• Installation High Performance DAC, ! Failed because your Kernel is Not Supported" | ||
ui_print "- ! Shit MTK Detected, Failed" | ||
ui_print "" | ||
abort | ||
fi | ||
} | ||
PRINT() { | ||
ui_print "" | ||
ui_print " ╭━━┳╮╭╮╱╱╱╱╭━━╮ " | ||
ui_print " ┃╭╮┃┣╋╋┳┳━╮┃━━╋┳┳━┳━┳┳╮ " | ||
ui_print " ┃┣┫┃━┫┃╭┫╋╰╋━━┃┃┃╋┃┻┫╭╯ " | ||
ui_print " ╰╯╰┻┻┻┻╯╰━━┻━━┻━┫╭┻━┻╯ " | ||
ui_print " ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰╯ " | ||
print() { | ||
ui_print "" | ||
ui_print "• Device : $MODEL" | ||
ui_print "• Android : $RELEASE" | ||
ui_print "• Hardware : $HARDWARE" | ||
ui_print "" | ||
EXTRACT | ||
extract | ||
ui_print "• Codename : $CODENAME" | ||
FUNCTION | ||
function | ||
} | ||
set -x | ||
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,7 +1,7 @@ | ||
id=high_perf_dac | ||
name=High Performance DAC | ||
Codename=sonorousness | ||
version=v5.5 | ||
versionCode=55 | ||
author=akirasup3r | ||
name=High perf DAC | ||
Codename=feck | ||
version=v6 | ||
versionCode=60 | ||
author=reallyakera | ||
description=This Magisk module enables the "High Performance DAC" mode of Qualcomm's WCD9xx DAC to maximize it's power and get the best audio quality possible. |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/system/bin/sh | ||
# Do not remove credit if you're using a part of this mod to your! | ||
# by reallyakera | ||
# Function to write values to files | ||
write() { | ||
local file="$1" | ||
local value="$2" | ||
|
||
# Check if the file exists | ||
if [ ! -f "$file" ]; then | ||
log-error "Error: File $file does not exist." | ||
return 1 | ||
fi | ||
|
||
# Make file writable | ||
chmod +w "$file" 2>/dev/null | ||
|
||
# Write new value, bail out if it fails | ||
if ! echo "$value" >"$file" 2>/dev/null; then | ||
echo "Error: Failed to write to $file." | ||
return 1 | ||
else | ||
return 0 | ||
fi | ||
} | ||
|
||
# Vars | ||
MODDIR=${0%/*} | ||
MODLOG="/sdcard/Android/high_perf_dac.txt" | ||
MODDATE=$(date +"%d-%m-%Y %r") | ||
CODENAME=$(grep_prop Codename $MODPATH/module.prop 2>/dev/null) | ||
MODEL=$(getprop ro.product.system.model 2>/dev/null) | ||
RELEASE=$(getprop ro.system.build.version.release 2>/dev/null) | ||
HARDWARE=$(getprop ro.hardware 2>/dev/null) | ||
|
||
# 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) | ||
|
||
# O_o | ||
touch $MODLOG | ||
echo "# Device : $MODEL" > $MODLOG | ||
echo "# Android : $RELEASE" >> $MODLOG | ||
echo "# Hardware : $HARDWARE" >> $MODLOG | ||
echo "# Codename : $CODENAME" >> $MODLOG | ||
echo "×---------------------------------------------------×" >> $MODLOG | ||
|
||
# DAC Mode | ||
if $FILE1; then | ||
echo "! Cannot find high_perf_mode file | ${MODDATE}" >> $MODLOG | ||
else | ||
write $FILE1 1 | ||
echo "✓ Enabled high_perf_mode | ${MODDATE}" >> $MODLOG | ||
fi | ||
|
||
# CPE Debug Mode | ||
if $FILE2; then | ||
echo "! Cannot find cpe_debug_mode file | ${MODDATE}" >> $MODLOG | ||
else | ||
write $FILE2 1 | ||
echo "✓ Enabled cpe_debug_mode | ${MODDATE}" >> $MODLOG | ||
fi | ||
|
||
# Impedance Detect EN | ||
if $FILE3; then | ||
echo "! Cannot find impedance_detect_en file | ${MODDATE}" >> $MODLOG | ||
else | ||
write $FILE2 3 | ||
echo "✓ Enabled impedance_detect_en | ${MODDATE}" >> $MODLOG | ||
fi | ||
|
||
#End |