Skip to content

Commit cd671a1

Browse files
disable LineageOS AudioFX automatically
LineageOS AudioFX is not needed anymore if ViPER4Android is installed this may alse remove the need for Audio Modification Library as it removes a potential additional equalizer Most people won't need LineageOS AudioFX anymore if they installed ViPER4Android on uninstall LineageOS AudioFX gets reenabled automatically
1 parent 2536f57 commit cd671a1

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

magiskmodule/common/install.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,25 @@ sed -i "/<effects>/ a\ <effect name=\"v4a_standard_fx\" library=\"v4a_fx\
9090
# run adb root
9191
# run in adb shell
9292
# while [ -z "$(pidof com.pittvandewitt.viperfx)" ]; do true; done && (strace -f -p $(pidof com.pittvandewitt.viperfx) 2>&1| grep -i "open")
93+
94+
AUDIOFX_PACKAGE="org.lineageos.audiofx"
95+
if [ -n "$(pm list packages | grep $AUDIOFX_PACKAGE)" ]; then
96+
ui_print " "
97+
ui_print "- Disabling $AUDIOFX_PACKAGE"
98+
if [ -n "$(pm list packages -d | grep $AUDIOFX_PACKAGE)" ]; then
99+
ui_print" $AUDIOFX_PACKAGE is already disabled"
100+
else
101+
pm disable $AUDIOFX_PACKAGE
102+
fi
103+
ui_print " "
104+
fi
105+
106+
93107
ui_print " "
94108
ui_print "- Installing ViPER4AndroidFX $(grep_prop version $MODPATH/module.prop)..."
95-
ui_print " After this completes,"
96-
#ui_print " open V4A app and follow the prompts"
97-
ui_print " you MUST REBOOT before opening the app"
98-
#ui_print " reboot your device."
109+
ui_print " After this completes, reboot your device."
99110
ui_print " "
100111
$ENFORCE && setenforce 0
101112
(pm install $MODPATH/v4afx.apk >/dev/null 2>&1) || abort "Failed to install V4AFX!"
102113
$ENFORCE && setenforce 1
114+
pm disable $VIPERFXPACKAGE

magiskmodule/uninstall.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2+
(
3+
while [ $(getprop sys.boot_completed) -ne 1 ] || [ "$(getprop init.svc.bootanim | tr '[:upper:]' '[:lower:]')" != "stopped" ]; do
4+
sleep 1
5+
done
6+
sleep 10
7+
AUDIOFXPACKAGE="org.lineageos.audiofx"
8+
[ -n "$(pm list packages -d | grep "$AUDIOFXPACKAGE")" ] && pm enable "$AUDIOFXPACKAGE"
9+
) &
10+
111
# Don't modify anything after this
212
if [ -f $INFO ]; then
313
while read LINE; do

0 commit comments

Comments
 (0)