[Elephone P8000] skeleton1911:
thx. and no . did not touched the kernel.

added some viper libs and tweaks. so that it works now :)

here you have some parts of it. maybe you can read it. idk :p

list_files() {
cat <<EOF
addon.d/23-v4a.sh
priv-app/ViPER4AndroidFX-2.4.0.1/ViPER4AndroidFX-2.4.0.1.apk
lib/soundfx/libv4a_fx_ics.so
etc/audio_policy.conf
su.d/50viper.sh
lib/soundfx/libeffectproxy.so
ViPER Version Info.txt
EOF
}

case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Normal/vendor config locations
CONFIG_FILE=/system/etc/audio_effects.conf
VENDOR_CONFIG=/system/vendor/etc/audio_effects.conf

# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $VENDOR_CONFIG

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $VENDOR_CONFIG
fi

# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $CONFIG_FILE

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $CONFIG_FILE

# Normal/vendor config locations
CONFIG_FILE=/system/etc/audio_effects.conf
VENDOR_CONFIG=/system/vendor/etc/audio_effects.conf
# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $VENDOR_CONFIG

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $VENDOR_CONFIG
fi

# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $CONFIG_FILE

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $CONFIG_FILE

# Normal/vendor config locations
CONFIG_FILE=/system/etc/htc_audio_effects.conf
VENDOR_CONFIG=/vendor/etc/audio_effects.conf
# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $VENDOR_CONFIG

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $VENDOR_CONFIG
fi

# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $CONFIG_FILE

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $CONFIG_FILE

# Normal/vendor config locations
CONFIG_FILE=/system/etc/htc_audio_effects.conf
VENDOR_CONFIG=/vendor/etc/audio_effects.conf
# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $VENDOR_CONFIG

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $VENDOR_CONFIG
fi

# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $CONFIG_FILE

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $CONFIG_FILE

echo " " >> /system/build.prop
echo "## ViPER|Atmos™ ##" >> /system/build.prop
echo " " >> /system/build.prop
echo "audio.deep_buffer.media=false" >> /system/build.prop
echo "lpa.decode=false" >> /system/build.prop
echo "tunnel.decode=false" >> /system/build.prop
echo "tunnel.audiovideo.decode=false" >> /system/build.prop
echo "lpa.releaselock=false" >> /system/build.prop
echo "lpa.use-stagefright=false" >> /system/build.prop
echo "persist.sys.media.use-awesome=1" >> /system/build.prop
echo " " >> /system/build.prop
;;
esac

SYSTEMLIB=/system/lib

ui_print() {
echo -n -e "ui_print $1\n" > /proc/self/fd/$OUTFD
echo -n -e "ui_print\n" > /proc/self/fd/$OUTFD
}

ch_con() {
LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox chcon -h u:object_r:system_file:s0 $1
LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox chcon -h u:object_r:system_file:s0 $1
chcon -h u:object_r:system_file:s0 $1
LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox chcon u:object_r:system_file:s0 $1
LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox chcon u:object_r:system_file:s0 $1
chcon u:object_r:system_file:s0 $1
}

ch_con_ext() {
LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox chcon $2 $1
LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox chcon $2 $1
chcon $2 $1
}

ln_con() {
LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox ln -s $1 $2
LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox ln -s $1 $2
ln -s $1 $2
ch_con $2
}

set_perm() {
chown $1.$2 $4
chown $1:$2 $4
chmod $3 $4
ch_con $4
ch_con_ext $4 $5
}

cp_perm() {
rm $5
if [ -f "$4" ]; then
cat $4 > $5
set_perm $1 $2 $3 $5 $6
fi
}

cat /system/bin/toolbox > /system/toolbox
chmod 0755 /system/toolbox
ch_con /system/toolbox

# Normal/vendor config locations
CONFIG_FILE=/system/etc/audio_effects.conf
VENDOR_CONFIG=/system/vendor/etc/audio_effects.conf

# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $VENDOR_CONFIG

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $VENDOR_CONFIG
fi

# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $CONFIG_FILE

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $CONFIG_FILE

# Normal/vendor config locations
CONFIG_FILE=/system/etc/audio_effects.conf
VENDOR_CONFIG=/system/vendor/etc/audio_effects.conf
# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $VENDOR_CONFIG

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $VENDOR_CONFIG
fi

# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $CONFIG_FILE

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $CONFIG_FILE

# Normal/vendor config locations
CONFIG_FILE=/system/etc/htc_audio_effects.conf
VENDOR_CONFIG=/vendor/etc/audio_effects.conf
# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $VENDOR_CONFIG

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $VENDOR_CONFIG
fi

# Remove library & effect
sed -i '/v4a_fx {/,/}/d' $CONFIG_FILE

# Remove library & effect
sed -i '/v4a_standard_fx {/,/}/d' $CONFIG_FILE

# Normal/vendor config locations
CONFIG_FILE=/system/etc/htc_audio_effects.conf
VENDOR_CONFIG=/vendor/etc/audio_effects.conf
# If vendor exists, patch it
if [ -f $VENDOR_CONFIG ];
then
# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $VENDOR_CONFIG

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $VENDOR_CONFIG
fi

# Add libary
sed -i 's/^libraries {/libraries {\n v4a_fx {\n path \/system\/lib\/soundfx\/libv4a_fx_ics.so\n }/g' $CONFIG_FILE

# Add effect
sed -i 's/^effects {/effects {\n v4a_standard_fx {\n library v4a_fx\n uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b\n }/g' $CONFIG_FILE

#!/sbin/sh

sed -i '/deep_buffer {/,/}/d' /system/etc/audio_policy.conf